]> git.sur5r.net Git - openldap/blob - configure
8554ee602caeac18dd9aa492fa90eae3c93eed84
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.500 2003/12/06 10:41:57 hyc 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         ol_enable_dynamic=no
2700
2701         ol_with_ldbm_api=no
2702         ol_with_ldbm_type=no
2703
2704         ol_with_bdb_module=static
2705         ol_with_dnssrv_module=static
2706         ol_with_hdb_module=static
2707         ol_with_ldap_module=static
2708         ol_with_ldbm_module=static
2709         ol_with_meta_module=static
2710         ol_with_monitor_module=static
2711         ol_with_null_module=static
2712         ol_with_passwd_module=static
2713         ol_with_perl_module=static
2714         ol_with_shell_module=static
2715         ol_with_sql_module=static
2716
2717         ol_enable_slurpd=no
2718
2719         ol_enable_rewrite=no
2720
2721         ol_with_dyngroup=no
2722         ol_with_proxycache=no
2723
2724 elif test $ol_enable_ldbm = no ; then
2725         
2726         if test $ol_with_ldbm_api != auto ; then
2727                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2728         fi
2729
2730         if test $ol_with_ldbm_type != auto ; then
2731                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2732         fi
2733
2734         if test $ol_with_ldbm_module != static ; then
2735                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2736         fi
2737
2738         if test $ol_enable_modules != yes -a \
2739                 $ol_enable_bdb = no -a \
2740                 $ol_enable_dnssrv = no -a \
2741                 $ol_enable_hdb = no -a \
2742                 $ol_enable_ldap = no -a \
2743                 $ol_enable_meta = no -a \
2744                 $ol_enable_monitor = no -a \
2745                 $ol_enable_null = no -a \
2746                 $ol_enable_passwd = no -a \
2747                 $ol_enable_perl = no -a \
2748                 $ol_enable_shell = no -a \
2749                 $ol_enable_sql = no -a ; then
2750
2751                 if test $ol_enable_slapd = yes ; then
2752                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2753                 else
2754                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2755                         ol_enable_slapd=no
2756                 fi
2757         fi
2758
2759         ol_with_ldbm_api=no
2760         ol_with_ldbm_type=no
2761         ol_with_ldbm_module=static
2762
2763         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2764                 ol_with_ldbm_api=berkeley
2765         fi
2766
2767 else
2768                 if test $ol_with_ldbm_api = gdbm -a \
2769                 $ol_with_ldbm_type = btree ; then
2770                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2771         fi
2772         if test $ol_with_ldbm_api = mdbm -a \
2773                 $ol_with_ldbm_type = btree ; then
2774                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2775         fi
2776         if test $ol_with_ldbm_api = ndbm -a \
2777                 $ol_with_ldbm_type = btree ; then
2778                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2779         fi
2780
2781         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2782                 if test $ol_with_ldbm_api = auto ; then
2783                         ol_with_ldbm_api=berkeley
2784                 elif test $ol_with_ldbm_api != berkeley ; then
2785                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2786                 fi
2787
2788         elif test $ol_enable_bdb = auto ; then
2789                 if test $ol_with_ldbm_api != berkeley \
2790                         -o $ol_with_ldbm_api != auto ; then
2791                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2792                         ol_enable_bdb=no
2793                 fi
2794         fi
2795 fi
2796
2797 if test $ol_enable_slurpd = yes ; then
2798                 if test $ol_with_threads = no ; then
2799                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2800         fi
2801 fi
2802
2803 if test $ol_enable_lmpasswd = yes ; then
2804         if test $ol_with_tls = no ; then
2805                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2806         fi
2807 fi
2808
2809 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2810         if test $ol_with_kerberos = no ; then
2811                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2812         elif test $ol_with_kerberos = auto ; then
2813                 ol_with_kerberos=yes
2814         fi
2815
2816 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2817         if test $ol_with_kerberos = auto ; then
2818                 ol_with_kerberos=no
2819         elif test $ol_with_kerberos != no ; then
2820                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2821                 ol_with_kerberos=no
2822         fi
2823 fi
2824
2825 if test $ol_enable_spasswd = yes ; then
2826         if test $ol_with_cyrus_sasl = no ; then
2827                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2828         fi
2829         ol_with_cyrus_sasl=yes
2830 fi
2831
2832 echo "$ac_t""done" 1>&6
2833
2834 LDAP_LIBS=
2835 LDBM_LIBS=
2836 LTHREAD_LIBS=
2837 LUTIL_LIBS=
2838
2839 SLAPD_LIBS=
2840 SLURPD_LIBS=
2841
2842 BUILD_SLAPD=no
2843 BUILD_SLURPD=no
2844
2845 BUILD_THREAD=no
2846
2847 BUILD_SLAPI=no
2848 SLAPD_SLAPI_DEPEND=
2849
2850 BUILD_BDB=no
2851 BUILD_DNSSRV=no
2852 BUILD_HDB=no
2853 BUILD_LDAP=no
2854 BUILD_LDBM=no
2855 BUILD_META=no
2856 BUILD_MONITOR=no
2857 BUILD_NULL=no
2858 BUILD_PASSWD=no
2859 BUILD_PERL=no
2860 BUILD_SHELL=no
2861 BUILD_SQL=no
2862
2863 BUILD_BDB_DYNAMIC=static
2864 BUILD_DNSSRV_DYNAMIC=static
2865 BUILD_HDB_DYNAMIC=static
2866 BUILD_LDAP_DYNAMIC=static
2867 BUILD_LDBM_DYNAMIC=static
2868 BUILD_META_DYNAMIC=static
2869 BUILD_MONITOR_DYNAMIC=static
2870 BUILD_NULL_DYNAMIC=static
2871 BUILD_PASSWD_DYNAMIC=static
2872 BUILD_PERL_DYNAMIC=static
2873 BUILD_SHELL_DYNAMIC=static
2874 BUILD_SQL_DYNAMIC=static
2875
2876 BUILD_DYNGROUP=no
2877 BUILD_PROXYCACHE=no
2878
2879 SLAPD_DYNAMIC_OVERLAYS=
2880
2881 SLAPD_MODULES_LDFLAGS=
2882 SLAPD_MODULES_CPPFLAGS=
2883
2884 SLAPD_STATIC_BACKENDS=
2885 SLAPD_DYNAMIC_BACKENDS=
2886
2887 SLAPD_PERL_LDFLAGS=
2888 MOD_PERL_LDFLAGS=
2889 PERL_CPPFLAGS=
2890
2891 SLAPD_SQL_LDFLAGS=
2892 SLAPD_SQL_LIBS=
2893 SLAPD_SQL_INCLUDES=
2894
2895 KRB4_LIBS=
2896 KRB5_LIBS=
2897 SASL_LIBS=
2898 TERMCAP_LIBS=
2899 TLS_LIBS=
2900 MODULES_LIBS=
2901 SLAPI_LIBS=
2902 LIBSLAPI=
2903 LIBSLAPITOOLS=
2904 AUTH_LIBS=
2905
2906 SLAPD_SLP_LIBS=
2907
2908
2909 # Find a good install program.  We prefer a C program (faster),
2910 # so one script is as good as another.  But avoid the broken or
2911 # incompatible versions:
2912 # SysV /etc/install, /usr/sbin/install
2913 # SunOS /usr/etc/install
2914 # IRIX /sbin/install
2915 # AIX /bin/install
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2921 echo "configure:2922: checking for a BSD compatible install" >&5
2922 if test -z "$INSTALL"; then
2923 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2927   for ac_dir in $PATH; do
2928     # Account for people who put trailing slashes in PATH elements.
2929     case "$ac_dir/" in
2930     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2931     *)
2932       # OSF1 and SCO ODT 3.0 have their own names for install.
2933       # Don't use installbsd from OSF since it installs stuff as root
2934       # by default.
2935       for ac_prog in ginstall scoinst install; do
2936         if test -f $ac_dir/$ac_prog; then
2937           if test $ac_prog = install &&
2938             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2939             # AIX install.  It has an incompatible calling convention.
2940             :
2941           elif test $ac_prog = install &&
2942             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2943             # program-specific install script used by HP pwplus--don't use.
2944             :
2945           else
2946             ac_cv_path_install="$ac_dir/$ac_prog -c"
2947             break 2
2948           fi
2949         fi
2950       done
2951       ;;
2952     esac
2953   done
2954   IFS="$ac_save_IFS"
2955
2956 fi
2957   if test "${ac_cv_path_install+set}" = set; then
2958     INSTALL="$ac_cv_path_install"
2959   else
2960     # As a last resort, use the slow shell script.  We don't cache a
2961     # path for INSTALL within a source directory, because that will
2962     # break other packages using the cache if that directory is
2963     # removed, or if the path is relative.
2964     INSTALL="$ac_install_sh"
2965   fi
2966 fi
2967 echo "$ac_t""$INSTALL" 1>&6
2968
2969 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2970 # It thinks the first close brace ends the variable substitution.
2971 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2972
2973 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2974
2975 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2976
2977
2978 cat >> confdefs.h <<\EOF
2979 #define HAVE_MKVERSION 1
2980 EOF
2981
2982
2983
2984
2985 ol_aix_threads=no
2986 case "$target" in
2987 *-*-aix*)       if test -z "$CC" ; then
2988                 case "$ol_with_threads" in
2989                 auto | yes |  posix) ol_aix_threads=yes ;;
2990                 esac
2991         fi
2992 ;;
2993 esac
2994
2995 if test $ol_aix_threads = yes ; then
2996         if test -z "${CC}" ; then
2997                 for ac_prog in cc_r xlc_r cc
2998 do
2999 # Extract the first word of "$ac_prog", so it can be a program name with args.
3000 set dummy $ac_prog; ac_word=$2
3001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3002 echo "configure:3003: checking for $ac_word" >&5
3003 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   if test -n "$CC"; then
3007   ac_cv_prog_CC="$CC" # Let the user override the test.
3008 else
3009   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3010   ac_dummy="$PATH"
3011   for ac_dir in $ac_dummy; do
3012     test -z "$ac_dir" && ac_dir=.
3013     if test -f $ac_dir/$ac_word; then
3014       ac_cv_prog_CC="$ac_prog"
3015       break
3016     fi
3017   done
3018   IFS="$ac_save_ifs"
3019 fi
3020 fi
3021 CC="$ac_cv_prog_CC"
3022 if test -n "$CC"; then
3023   echo "$ac_t""$CC" 1>&6
3024 else
3025   echo "$ac_t""no" 1>&6
3026 fi
3027
3028 test -n "$CC" && break
3029 done
3030
3031
3032                 if test "$CC" = cc ; then
3033                                                 if test $ol_with_threads != auto ; then
3034                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3035                         else
3036                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3037                         fi
3038                         ol_with_threads=no
3039                 fi
3040         fi
3041
3042         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3043                 ol_with_threads=posix
3044                 ol_cv_pthread_create=yes
3045         fi
3046 fi
3047
3048 if test -z "${CC}"; then
3049         for ac_prog in cc gcc
3050 do
3051 # Extract the first word of "$ac_prog", so it can be a program name with args.
3052 set dummy $ac_prog; ac_word=$2
3053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3054 echo "configure:3055: checking for $ac_word" >&5
3055 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3056   echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058   if test -n "$CC"; then
3059   ac_cv_prog_CC="$CC" # Let the user override the test.
3060 else
3061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3062   ac_dummy="$PATH"
3063   for ac_dir in $ac_dummy; do
3064     test -z "$ac_dir" && ac_dir=.
3065     if test -f $ac_dir/$ac_word; then
3066       ac_cv_prog_CC="$ac_prog"
3067       break
3068     fi
3069   done
3070   IFS="$ac_save_ifs"
3071 fi
3072 fi
3073 CC="$ac_cv_prog_CC"
3074 if test -n "$CC"; then
3075   echo "$ac_t""$CC" 1>&6
3076 else
3077   echo "$ac_t""no" 1>&6
3078 fi
3079
3080 test -n "$CC" && break
3081 done
3082 test -n "$CC" || CC="missing"
3083
3084
3085         if test "${CC}" = "missing" ; then
3086                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3087         fi
3088 fi
3089
3090 if test -z "${AR}"; then
3091         for ac_prog in ar gar
3092 do
3093 # Extract the first word of "$ac_prog", so it can be a program name with args.
3094 set dummy $ac_prog; ac_word=$2
3095 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3096 echo "configure:3097: checking for $ac_word" >&5
3097 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   if test -n "$AR"; then
3101   ac_cv_prog_AR="$AR" # Let the user override the test.
3102 else
3103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3104   ac_dummy="$PATH"
3105   for ac_dir in $ac_dummy; do
3106     test -z "$ac_dir" && ac_dir=.
3107     if test -f $ac_dir/$ac_word; then
3108       ac_cv_prog_AR="$ac_prog"
3109       break
3110     fi
3111   done
3112   IFS="$ac_save_ifs"
3113 fi
3114 fi
3115 AR="$ac_cv_prog_AR"
3116 if test -n "$AR"; then
3117   echo "$ac_t""$AR" 1>&6
3118 else
3119   echo "$ac_t""no" 1>&6
3120 fi
3121
3122 test -n "$AR" && break
3123 done
3124 test -n "$AR" || AR="missing"
3125
3126
3127         if test "${AR}" = "missing" ; then
3128                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3129         fi
3130 fi
3131
3132
3133
3134 # Find the correct PATH separator.  Usually this is `:', but
3135 # DJGPP uses `;' like DOS.
3136 if test "X${PATH_SEPARATOR+set}" != Xset; then
3137   UNAME=${UNAME-`uname 2>/dev/null`}
3138   case X$UNAME in
3139     *-DOS) lt_cv_sys_path_separator=';' ;;
3140     *)     lt_cv_sys_path_separator=':' ;;
3141   esac
3142   PATH_SEPARATOR=$lt_cv_sys_path_separator
3143 fi
3144
3145 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3146 echo "configure:3147: checking for Cygwin environment" >&5
3147 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153
3154 int main() {
3155
3156 #ifndef __CYGWIN__
3157 #define __CYGWIN__ __CYGWIN32__
3158 #endif
3159 return __CYGWIN__;
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3163   rm -rf conftest*
3164   ac_cv_cygwin=yes
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168   rm -rf conftest*
3169   ac_cv_cygwin=no
3170 fi
3171 rm -f conftest*
3172 fi
3173
3174 echo "$ac_t""$ac_cv_cygwin" 1>&6
3175 CYGWIN=
3176 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3177 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3178 echo "configure:3179: checking for mingw32 environment" >&5
3179 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185
3186 int main() {
3187 return __MINGW32__;
3188 ; return 0; }
3189 EOF
3190 if { (eval echo configure:3191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3191   rm -rf conftest*
3192   ac_cv_mingw32=yes
3193 else
3194   echo "configure: failed program was:" >&5
3195   cat conftest.$ac_ext >&5
3196   rm -rf conftest*
3197   ac_cv_mingw32=no
3198 fi
3199 rm -f conftest*
3200 fi
3201
3202 echo "$ac_t""$ac_cv_mingw32" 1>&6
3203 MINGW32=
3204 test "$ac_cv_mingw32" = yes && MINGW32=yes
3205 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3206 echo "configure:3207: checking for EMX OS/2 environment" >&5
3207 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3208   echo $ac_n "(cached) $ac_c" 1>&6
3209 else
3210   cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213
3214 int main() {
3215 return __EMX__;
3216 ; return 0; }
3217 EOF
3218 if { (eval echo configure:3219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3219   rm -rf conftest*
3220   ac_cv_emxos2=yes
3221 else
3222   echo "configure: failed program was:" >&5
3223   cat conftest.$ac_ext >&5
3224   rm -rf conftest*
3225   ac_cv_emxos2=no
3226 fi
3227 rm -f conftest*
3228 fi
3229
3230 echo "$ac_t""$ac_cv_emxos2" 1>&6
3231 EMXOS2=
3232 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3233 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3234 echo "configure:3235: checking how to run the C preprocessor" >&5
3235 # On Suns, sometimes $CPP names a directory.
3236 if test -n "$CPP" && test -d "$CPP"; then
3237   CPP=
3238 fi
3239 if test -z "$CPP"; then
3240 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243     # This must be in double quotes, not single quotes, because CPP may get
3244   # substituted into the Makefile and "${CC-cc}" will confuse make.
3245   CPP="${CC-cc} -E"
3246   # On the NeXT, cc -E runs the code through the compiler's parser,
3247   # not just through cpp.
3248   cat > conftest.$ac_ext <<EOF
3249 #line 3250 "configure"
3250 #include "confdefs.h"
3251 #include <assert.h>
3252 Syntax Error
3253 EOF
3254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3255 { (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3257 if test -z "$ac_err"; then
3258   :
3259 else
3260   echo "$ac_err" >&5
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   CPP="${CC-cc} -E -traditional-cpp"
3265   cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 #include <assert.h>
3269 Syntax Error
3270 EOF
3271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3272 { (eval echo configure:3273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3274 if test -z "$ac_err"; then
3275   :
3276 else
3277   echo "$ac_err" >&5
3278   echo "configure: failed program was:" >&5
3279   cat conftest.$ac_ext >&5
3280   rm -rf conftest*
3281   CPP="${CC-cc} -nologo -E"
3282   cat > conftest.$ac_ext <<EOF
3283 #line 3284 "configure"
3284 #include "confdefs.h"
3285 #include <assert.h>
3286 Syntax Error
3287 EOF
3288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3289 { (eval echo configure:3290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3291 if test -z "$ac_err"; then
3292   :
3293 else
3294   echo "$ac_err" >&5
3295   echo "configure: failed program was:" >&5
3296   cat conftest.$ac_ext >&5
3297   rm -rf conftest*
3298   CPP=/lib/cpp
3299 fi
3300 rm -f conftest*
3301 fi
3302 rm -f conftest*
3303 fi
3304 rm -f conftest*
3305   ac_cv_prog_CPP="$CPP"
3306 fi
3307   CPP="$ac_cv_prog_CPP"
3308 else
3309   ac_cv_prog_CPP="$CPP"
3310 fi
3311 echo "$ac_t""$CPP" 1>&6
3312
3313 # Check whether --enable-fast-install or --disable-fast-install was given.
3314 if test "${enable_fast_install+set}" = set; then
3315   enableval="$enable_fast_install"
3316   p=${PACKAGE-default}
3317 case $enableval in
3318 yes) enable_fast_install=yes ;;
3319 no) enable_fast_install=no ;;
3320 *)
3321   enable_fast_install=no
3322   # Look at the argument we got.  We use all the common list separators.
3323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3324   for pkg in $enableval; do
3325     if test "X$pkg" = "X$p"; then
3326       enable_fast_install=yes
3327     fi
3328   done
3329   IFS="$ac_save_ifs"
3330   ;;
3331 esac
3332 else
3333   enable_fast_install=yes
3334 fi
3335
3336 # Extract the first word of "gcc", so it can be a program name with args.
3337 set dummy gcc; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   if test -n "$CC"; then
3344   ac_cv_prog_CC="$CC" # Let the user override the test.
3345 else
3346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3347   ac_dummy="$PATH"
3348   for ac_dir in $ac_dummy; do
3349     test -z "$ac_dir" && ac_dir=.
3350     if test -f $ac_dir/$ac_word; then
3351       ac_cv_prog_CC="gcc"
3352       break
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356 fi
3357 fi
3358 CC="$ac_cv_prog_CC"
3359 if test -n "$CC"; then
3360   echo "$ac_t""$CC" 1>&6
3361 else
3362   echo "$ac_t""no" 1>&6
3363 fi
3364
3365 if test -z "$CC"; then
3366   # Extract the first word of "cc", so it can be a program name with args.
3367 set dummy cc; ac_word=$2
3368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3369 echo "configure:3370: checking for $ac_word" >&5
3370 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   if test -n "$CC"; then
3374   ac_cv_prog_CC="$CC" # Let the user override the test.
3375 else
3376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3377   ac_prog_rejected=no
3378   ac_dummy="$PATH"
3379   for ac_dir in $ac_dummy; do
3380     test -z "$ac_dir" && ac_dir=.
3381     if test -f $ac_dir/$ac_word; then
3382       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3383         ac_prog_rejected=yes
3384         continue
3385       fi
3386       ac_cv_prog_CC="cc"
3387       break
3388     fi
3389   done
3390   IFS="$ac_save_ifs"
3391 if test $ac_prog_rejected = yes; then
3392   # We found a bogon in the path, so make sure we never use it.
3393   set dummy $ac_cv_prog_CC
3394   shift
3395   if test $# -gt 0; then
3396     # We chose a different compiler from the bogus one.
3397     # However, it has the same basename, so the bogon will be chosen
3398     # first if we set CC to just the basename; use the full file name.
3399     shift
3400     set dummy "$ac_dir/$ac_word" "$@"
3401     shift
3402     ac_cv_prog_CC="$@"
3403   fi
3404 fi
3405 fi
3406 fi
3407 CC="$ac_cv_prog_CC"
3408 if test -n "$CC"; then
3409   echo "$ac_t""$CC" 1>&6
3410 else
3411   echo "$ac_t""no" 1>&6
3412 fi
3413
3414   if test -z "$CC"; then
3415     case "`uname -s`" in
3416     *win32* | *WIN32* | *CYGWIN*)
3417       # Extract the first word of "cl", so it can be a program name with args.
3418 set dummy cl; ac_word=$2
3419 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3420 echo "configure:3421: checking for $ac_word" >&5
3421 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   if test -n "$CC"; then
3425   ac_cv_prog_CC="$CC" # Let the user override the test.
3426 else
3427   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3428   ac_dummy="$PATH"
3429   for ac_dir in $ac_dummy; do
3430     test -z "$ac_dir" && ac_dir=.
3431     if test -f $ac_dir/$ac_word; then
3432       ac_cv_prog_CC="cl"
3433       break
3434     fi
3435   done
3436   IFS="$ac_save_ifs"
3437 fi
3438 fi
3439 CC="$ac_cv_prog_CC"
3440 if test -n "$CC"; then
3441   echo "$ac_t""$CC" 1>&6
3442 else
3443   echo "$ac_t""no" 1>&6
3444 fi
3445  ;;
3446     esac
3447   fi
3448   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3449 fi
3450
3451 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3452 echo "configure:3453: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3453
3454 ac_ext=c
3455 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3456 ac_cpp='$CPP $CPPFLAGS'
3457 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3458 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3459 cross_compiling=$ac_cv_prog_cc_cross
3460
3461 cat > conftest.$ac_ext << EOF
3462
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465
3466 main(){return(0);}
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3469   ac_cv_prog_cc_works=yes
3470   # If we can't run a trivial program, we are probably using a cross compiler.
3471   if (./conftest; exit) 2>/dev/null; then
3472     ac_cv_prog_cc_cross=no
3473   else
3474     ac_cv_prog_cc_cross=yes
3475   fi
3476 else
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   ac_cv_prog_cc_works=no
3480 fi
3481 rm -fr conftest*
3482 ac_ext=c
3483 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3484 ac_cpp='$CPP $CPPFLAGS'
3485 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3486 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3487 cross_compiling=$ac_cv_prog_cc_cross
3488
3489 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3490 if test $ac_cv_prog_cc_works = no; then
3491   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3492 fi
3493 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3494 echo "configure:3495: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3495 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3496 cross_compiling=$ac_cv_prog_cc_cross
3497
3498 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3499 echo "configure:3500: checking whether we are using GNU C" >&5
3500 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   cat > conftest.c <<EOF
3504 #ifdef __GNUC__
3505   yes;
3506 #endif
3507 EOF
3508 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3509   ac_cv_prog_gcc=yes
3510 else
3511   ac_cv_prog_gcc=no
3512 fi
3513 fi
3514
3515 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3516
3517 if test $ac_cv_prog_gcc = yes; then
3518   GCC=yes
3519 else
3520   GCC=
3521 fi
3522
3523 ac_test_CFLAGS="${CFLAGS+set}"
3524 ac_save_CFLAGS="$CFLAGS"
3525 CFLAGS=
3526 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3527 echo "configure:3528: checking whether ${CC-cc} accepts -g" >&5
3528 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3529   echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531   echo 'void f(){}' > conftest.c
3532 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3533   ac_cv_prog_cc_g=yes
3534 else
3535   ac_cv_prog_cc_g=no
3536 fi
3537 rm -f conftest*
3538
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3542 if test "$ac_test_CFLAGS" = set; then
3543   CFLAGS="$ac_save_CFLAGS"
3544 elif test $ac_cv_prog_cc_g = yes; then
3545   if test "$GCC" = yes; then
3546     CFLAGS="-g -O2"
3547   else
3548     CFLAGS="-g"
3549   fi
3550 else
3551   if test "$GCC" = yes; then
3552     CFLAGS="-O2"
3553   else
3554     CFLAGS=
3555   fi
3556 fi
3557
3558 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3559 if test "${with_gnu_ld+set}" = set; then
3560   withval="$with_gnu_ld"
3561   test "$withval" = no || with_gnu_ld=yes
3562 else
3563   with_gnu_ld=no
3564 fi
3565
3566 ac_prog=ld
3567 if test "$GCC" = yes; then
3568   # Check if gcc -print-prog-name=ld gives a path.
3569   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3570 echo "configure:3571: checking for ld used by GCC" >&5
3571   case $host in
3572   *-*-mingw*)
3573     # gcc leaves a trailing carriage return which upsets mingw
3574     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3575   *)
3576     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3577   esac
3578   case $ac_prog in
3579     # Accept absolute paths.
3580     [\\/]* | [A-Za-z]:[\\/]*)
3581       re_direlt='/[^/][^/]*/\.\./'
3582       # Canonicalize the path of ld
3583       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3584       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3585         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3586       done
3587       test -z "$LD" && LD="$ac_prog"
3588       ;;
3589   "")
3590     # If it fails, then pretend we aren't using GCC.
3591     ac_prog=ld
3592     ;;
3593   *)
3594     # If it is relative, then search for the first ld in PATH.
3595     with_gnu_ld=unknown
3596     ;;
3597   esac
3598 elif test "$with_gnu_ld" = yes; then
3599   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3600 echo "configure:3601: checking for GNU ld" >&5
3601 else
3602   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3603 echo "configure:3604: checking for non-GNU ld" >&5
3604 fi
3605 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3606   echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608   if test -z "$LD"; then
3609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3610   for ac_dir in $PATH; do
3611     test -z "$ac_dir" && ac_dir=.
3612     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3613       lt_cv_path_LD="$ac_dir/$ac_prog"
3614       # Check to see if the program is GNU ld.  I'd rather use --version,
3615       # but apparently some GNU ld's only accept -v.
3616       # Break only if it was the GNU/non-GNU ld that we prefer.
3617       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3618         test "$with_gnu_ld" != no && break
3619       else
3620         test "$with_gnu_ld" != yes && break
3621       fi
3622     fi
3623   done
3624   IFS="$ac_save_ifs"
3625 else
3626   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3627 fi
3628 fi
3629
3630 LD="$lt_cv_path_LD"
3631 if test -n "$LD"; then
3632   echo "$ac_t""$LD" 1>&6
3633 else
3634   echo "$ac_t""no" 1>&6
3635 fi
3636 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3637 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3638 echo "configure:3639: checking if the linker ($LD) is GNU ld" >&5
3639 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3640   echo $ac_n "(cached) $ac_c" 1>&6
3641 else
3642   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3643 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3644   lt_cv_prog_gnu_ld=yes
3645 else
3646   lt_cv_prog_gnu_ld=no
3647 fi
3648 fi
3649
3650 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3651 with_gnu_ld=$lt_cv_prog_gnu_ld
3652
3653
3654 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3655 echo "configure:3656: checking for $LD option to reload object files" >&5
3656 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   lt_cv_ld_reload_flag='-r'
3660 fi
3661
3662 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3663 reload_flag=$lt_cv_ld_reload_flag
3664 test -n "$reload_flag" && reload_flag=" $reload_flag"
3665
3666 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3667 echo "configure:3668: checking for BSD-compatible nm" >&5
3668 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   if test -n "$NM"; then
3672   # Let the user override the test.
3673   lt_cv_path_NM="$NM"
3674 else
3675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3676   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3677     test -z "$ac_dir" && ac_dir=.
3678     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3679     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3680       # Check to see if the nm accepts a BSD-compat flag.
3681       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3682       #   nm: unknown option "B" ignored
3683       # Tru64's nm complains that /dev/null is an invalid object file
3684       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3685         lt_cv_path_NM="$tmp_nm -B"
3686         break
3687       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3688         lt_cv_path_NM="$tmp_nm -p"
3689         break
3690       else
3691         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3692         continue # so that we can try to find one that supports BSD flags
3693       fi
3694     fi
3695   done
3696   IFS="$ac_save_ifs"
3697   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3698 fi
3699 fi
3700
3701 NM="$lt_cv_path_NM"
3702 echo "$ac_t""$NM" 1>&6
3703
3704 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3705 echo "configure:3706: checking for a sed that does not truncate output" >&5
3706 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   # Loop through the user's path and test for sed and gsed.
3710 # Then use that list of sed's as ones to test for truncation.
3711 as_executable_p="test -f"
3712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713 for as_dir in $PATH
3714 do
3715   IFS=$as_save_IFS
3716   test -z "$as_dir" && as_dir=.
3717   for ac_prog in sed gsed; do
3718     for ac_exec_ext in '' $ac_executable_extensions; do
3719       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3720         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3721       fi
3722     done
3723   done
3724 done
3725
3726   # Create a temporary directory, and hook for its removal unless debugging.
3727 $debug ||
3728 {
3729   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3730   trap '{ (exit 1); exit 1; }' 1 2 13 15
3731 }
3732
3733 # Create a (secure) tmp directory for tmp files.
3734 : ${TMPDIR=/tmp}
3735 {
3736   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3737   test -n "$tmp" && test -d "$tmp"
3738 }  ||
3739 {
3740   tmp=$TMPDIR/sed$$-$RANDOM
3741   (umask 077 && mkdir $tmp)
3742 } ||
3743 {
3744    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3745    { (exit 1); exit 1; }
3746 }
3747   _max=0
3748   _count=0
3749   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3750   # along with /bin/sed that truncates output.
3751   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3752     test ! -f ${_sed} && break
3753     cat /dev/null > "$tmp/sed.in"
3754     _count=0
3755     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3756     # Check for GNU sed and select it if it is found.
3757     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3758       lt_cv_path_SED=${_sed}
3759       break
3760     fi
3761     while true; do
3762       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3763       mv "$tmp/sed.tmp" "$tmp/sed.in"
3764       cp "$tmp/sed.in" "$tmp/sed.nl"
3765       echo >>"$tmp/sed.nl"
3766       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3767       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3768       # 40000 chars as input seems more than enough
3769       test $_count -gt 10 && break
3770       _count=`expr $_count + 1`
3771       if test $_count -gt $_max; then
3772         _max=$_count
3773         lt_cv_path_SED=$_sed
3774       fi
3775     done
3776   done
3777   rm -rf "$tmp"
3778
3779 fi
3780
3781 if test "X$SED" != "X"; then
3782   lt_cv_path_SED=$SED
3783 else
3784   SED=$lt_cv_path_SED
3785 fi
3786 echo "$ac_t""$SED" 1>&6
3787
3788 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3789 echo "configure:3790: checking whether ln -s works" >&5
3790 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   rm -f conftestdata
3794 if ln -s X conftestdata 2>/dev/null
3795 then
3796   rm -f conftestdata
3797   ac_cv_prog_LN_S="ln -s"
3798 else
3799   ac_cv_prog_LN_S=ln
3800 fi
3801 fi
3802 LN_S="$ac_cv_prog_LN_S"
3803 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3804   echo "$ac_t""yes" 1>&6
3805 else
3806   echo "$ac_t""no" 1>&6
3807 fi
3808
3809 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3810 echo "configure:3811: checking how to recognise dependent libraries" >&5
3811 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   lt_cv_file_magic_cmd='$MAGIC_CMD'
3815 lt_cv_file_magic_test_file=
3816 lt_cv_deplibs_check_method='unknown'
3817 # Need to set the preceding variable on all platforms that support
3818 # interlibrary dependencies.
3819 # 'none' -- dependencies not supported.
3820 # `unknown' -- same as none, but documents that we really don't know.
3821 # 'pass_all' -- all dependencies passed with no checks.
3822 # 'test_compile' -- check by making test program.
3823 # 'file_magic [[regex]]' -- check by looking for files in library path
3824 # which responds to the $file_magic_cmd with a given egrep regex.
3825 # If you have `file' or equivalent on your system and you're not sure
3826 # whether `pass_all' will *always* work, you probably want this one.
3827
3828 case $host_os in
3829 aix4* | aix5*)
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 beos*)
3834   lt_cv_deplibs_check_method=pass_all
3835   ;;
3836
3837 bsdi4*)
3838   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3839   lt_cv_file_magic_cmd='/usr/bin/file -L'
3840   lt_cv_file_magic_test_file=/shlib/libc.so
3841   ;;
3842
3843 cygwin* | mingw* | pw32*)
3844   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3845   lt_cv_file_magic_cmd='$OBJDUMP -f'
3846   ;;
3847
3848 darwin* | rhapsody*)
3849   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3850   lt_cv_file_magic_cmd='/usr/bin/file -L'
3851   case "$host_os" in
3852   rhapsody* | darwin1.[012])
3853     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3854     ;;
3855   *) # Darwin 1.3 on
3856     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3857     ;;
3858   esac
3859   ;;
3860
3861 freebsd*)
3862   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3863     case $host_cpu in
3864     i*86 )
3865       # Not sure whether the presence of OpenBSD here was a mistake.
3866       # Let's accept both of them until this is cleared up.
3867       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3868       lt_cv_file_magic_cmd=/usr/bin/file
3869       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3870       ;;
3871     esac
3872   else
3873     lt_cv_deplibs_check_method=pass_all
3874   fi
3875   ;;
3876
3877 gnu*)
3878   lt_cv_deplibs_check_method=pass_all
3879   ;;
3880
3881 hpux10.20*|hpux11*)
3882   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3883   lt_cv_file_magic_cmd=/usr/bin/file
3884   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3885   ;;
3886
3887 irix5* | irix6* | nonstopux*)
3888   case $host_os in
3889   irix5* | nonstopux*)
3890     # this will be overridden with pass_all, but let us keep it just in case
3891     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3892     ;;
3893   *)
3894     case $LD in
3895     *-32|*"-32 ") libmagic=32-bit;;
3896     *-n32|*"-n32 ") libmagic=N32;;
3897     *-64|*"-64 ") libmagic=64-bit;;
3898     *) libmagic=never-match;;
3899     esac
3900     # this will be overridden with pass_all, but let us keep it just in case
3901     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3902     ;;
3903   esac
3904   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3905   lt_cv_deplibs_check_method=pass_all
3906   ;;
3907
3908 # This must be Linux ELF.
3909 linux-gnu*)
3910   case $host_cpu in
3911   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3912     lt_cv_deplibs_check_method=pass_all ;;
3913   *)
3914     # glibc up to 2.1.1 does not perform some relocations on ARM
3915     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3916   esac
3917   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3918   ;;
3919
3920 netbsd*)
3921   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3922     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3923   else
3924     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3925   fi
3926   ;;
3927
3928 newos6*)
3929   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3930   lt_cv_file_magic_cmd=/usr/bin/file
3931   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3932   ;;
3933
3934 openbsd*)
3935   lt_cv_file_magic_cmd=/usr/bin/file
3936   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3937   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3938     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3939   else
3940     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3941   fi
3942   ;;
3943
3944 osf3* | osf4* | osf5*)
3945   # this will be overridden with pass_all, but let us keep it just in case
3946   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3947   lt_cv_file_magic_test_file=/shlib/libc.so
3948   lt_cv_deplibs_check_method=pass_all
3949   ;;
3950
3951 sco3.2v5*)
3952   lt_cv_deplibs_check_method=pass_all
3953   ;;
3954
3955 solaris*)
3956   lt_cv_deplibs_check_method=pass_all
3957   lt_cv_file_magic_test_file=/lib/libc.so
3958   ;;
3959
3960 sysv5uw[78]* | sysv4*uw2*)
3961   lt_cv_deplibs_check_method=pass_all
3962   ;;
3963
3964 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3965   case $host_vendor in
3966   motorola)
3967     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]'
3968     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3969     ;;
3970   ncr)
3971     lt_cv_deplibs_check_method=pass_all
3972     ;;
3973   sequent)
3974     lt_cv_file_magic_cmd='/bin/file'
3975     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3976     ;;
3977   sni)
3978     lt_cv_file_magic_cmd='/bin/file'
3979     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3980     lt_cv_file_magic_test_file=/lib/libc.so
3981     ;;
3982   siemens)
3983     lt_cv_deplibs_check_method=pass_all
3984     ;;
3985   esac
3986   ;;
3987 esac
3988
3989 fi
3990
3991 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3992 file_magic_cmd=$lt_cv_file_magic_cmd
3993 deplibs_check_method=$lt_cv_deplibs_check_method
3994
3995 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3996 echo "configure:3997: checking for object suffix" >&5
3997 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3998   echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000   rm -f conftest*
4001 echo 'int i = 1;' > conftest.$ac_ext
4002 if { (eval echo configure:4003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4003   for ac_file in conftest.*; do
4004     case $ac_file in
4005     *.c) ;;
4006     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4007     esac
4008   done
4009 else
4010   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4011 fi
4012 rm -f conftest*
4013 fi
4014
4015 echo "$ac_t""$ac_cv_objext" 1>&6
4016 OBJEXT=$ac_cv_objext
4017 ac_objext=$ac_cv_objext
4018
4019
4020
4021
4022 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4023 echo "configure:4024: checking for executable suffix" >&5
4024 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4028   ac_cv_exeext=.exe
4029 else
4030   rm -f conftest*
4031   echo 'int main () { return 0; }' > conftest.$ac_ext
4032   ac_cv_exeext=
4033   if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4034     for file in conftest.*; do
4035       case $file in
4036       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4037       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4038       esac
4039     done
4040   else
4041     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4042   fi
4043   rm -f conftest*
4044   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4045 fi
4046 fi
4047
4048 EXEEXT=""
4049 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4050 echo "$ac_t""${ac_cv_exeext}" 1>&6
4051 ac_exeext=$EXEEXT
4052
4053 if test $host != $build; then
4054   ac_tool_prefix=${host_alias}-
4055 else
4056   ac_tool_prefix=
4057 fi
4058
4059
4060
4061
4062 # Check for command to grab the raw symbol name followed by C symbol from nm.
4063 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4064 echo "configure:4065: checking command to parse $NM output" >&5
4065 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4066   echo $ac_n "(cached) $ac_c" 1>&6
4067 else
4068   
4069 # These are sane defaults that work on at least a few old systems.
4070 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4071
4072 # Character class describing NM global symbol codes.
4073 symcode='[BCDEGRST]'
4074
4075 # Regexp to match symbols that can be accessed directly from C.
4076 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4077
4078 # Transform the above into a raw symbol and a C symbol.
4079 symxfrm='\1 \2\3 \3'
4080
4081 # Transform an extracted symbol line into a proper C declaration
4082 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4083
4084 # Transform an extracted symbol line into symbol name and symbol address
4085 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'"
4086
4087 # Define system-specific variables.
4088 case $host_os in
4089 aix*)
4090   symcode='[BCDT]'
4091   ;;
4092 cygwin* | mingw* | pw32*)
4093   symcode='[ABCDGISTW]'
4094   ;;
4095 hpux*) # Its linker distinguishes data from code symbols
4096   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4097   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'"
4098   ;;
4099 irix* | nonstopux*)
4100   symcode='[BCDEGRST]'
4101   ;;
4102 osf*)
4103   symcode='[BCDEGQRST]'
4104   ;;
4105 solaris* | sysv5*)
4106   symcode='[BDT]'
4107   ;;
4108 sysv4)
4109   symcode='[DFNSTU]'
4110   ;;
4111 esac
4112
4113 # Handle CRLF in mingw tool chain
4114 opt_cr=
4115 case $host_os in
4116 mingw*)
4117   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4118   ;;
4119 esac
4120
4121 # If we're using GNU nm, then use its standard symbol codes.
4122 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4123   symcode='[ABCDGISTW]'
4124 fi
4125
4126 # Try without a prefix undercore, then with it.
4127 for ac_symprfx in "" "_"; do
4128
4129   # Write the raw and C identifiers.
4130 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4131
4132   # Check to see that the pipe works correctly.
4133   pipe_works=no
4134   rm -f conftest*
4135   cat > conftest.$ac_ext <<EOF
4136 #ifdef __cplusplus
4137 extern "C" {
4138 #endif
4139 char nm_test_var;
4140 void nm_test_func(){}
4141 #ifdef __cplusplus
4142 }
4143 #endif
4144 int main(){nm_test_var='a';nm_test_func();return(0);}
4145 EOF
4146
4147   if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4148     # Now try to grab the symbols.
4149     nlist=conftest.nm
4150     if { (eval echo configure:4151: \"$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
4151       # Try sorting and uniquifying the output.
4152       if sort "$nlist" | uniq > "$nlist"T; then
4153         mv -f "$nlist"T "$nlist"
4154       else
4155         rm -f "$nlist"T
4156       fi
4157
4158       # Make sure that we snagged all the symbols we need.
4159       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4160         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4161           cat <<EOF > conftest.$ac_ext
4162 #ifdef __cplusplus
4163 extern "C" {
4164 #endif
4165
4166 EOF
4167           # Now generate the symbol file.
4168           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4169
4170           cat <<EOF >> conftest.$ac_ext
4171 #if defined (__STDC__) && __STDC__
4172 # define lt_ptr void *
4173 #else
4174 # define lt_ptr char *
4175 # define const
4176 #endif
4177
4178 /* The mapping between symbol names and symbols. */
4179 const struct {
4180   const char *name;
4181   lt_ptr address;
4182 }
4183 lt_preloaded_symbols[] =
4184 {
4185 EOF
4186           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4187           cat <<\EOF >> conftest.$ac_ext
4188   {0, (lt_ptr) 0}
4189 };
4190
4191 #ifdef __cplusplus
4192 }
4193 #endif
4194 EOF
4195           # Now try linking the two files.
4196           mv conftest.$ac_objext conftstm.$ac_objext
4197           save_LIBS="$LIBS"
4198           save_CFLAGS="$CFLAGS"
4199           LIBS="conftstm.$ac_objext"
4200           CFLAGS="$CFLAGS$no_builtin_flag"
4201           if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4202             pipe_works=yes
4203           fi
4204           LIBS="$save_LIBS"
4205           CFLAGS="$save_CFLAGS"
4206         else
4207           echo "cannot find nm_test_func in $nlist" >&5
4208         fi
4209       else
4210         echo "cannot find nm_test_var in $nlist" >&5
4211       fi
4212     else
4213       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4214     fi
4215   else
4216     echo "$progname: failed program was:" >&5
4217     cat conftest.$ac_ext >&5
4218   fi
4219   rm -f conftest* conftst*
4220
4221   # Do not use the global_symbol_pipe unless it works.
4222   if test "$pipe_works" = yes; then
4223     break
4224   else
4225     lt_cv_sys_global_symbol_pipe=
4226   fi
4227 done
4228
4229 fi
4230
4231 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4232 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4233   global_symbol_to_cdecl=
4234   global_symbol_to_c_name_address=
4235 else
4236   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4237   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4238 fi
4239 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4240 then
4241   echo "$ac_t""failed" 1>&6
4242 else
4243   echo "$ac_t""ok" 1>&6
4244 fi
4245
4246 for ac_hdr in dlfcn.h
4247 do
4248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4250 echo "configure:4251: checking for $ac_hdr" >&5
4251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4252   echo $ac_n "(cached) $ac_c" 1>&6
4253 else
4254   cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <$ac_hdr>
4258 EOF
4259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4260 { (eval echo configure:4261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4262 if test -z "$ac_err"; then
4263   rm -rf conftest*
4264   eval "ac_cv_header_$ac_safe=yes"
4265 else
4266   echo "$ac_err" >&5
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_header_$ac_safe=no"
4271 fi
4272 rm -f conftest*
4273 fi
4274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4277   cat >> confdefs.h <<EOF
4278 #define $ac_tr_hdr 1
4279 EOF
4280  
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284 done
4285
4286
4287
4288
4289
4290
4291 # Only perform the check for file, if the check method requires it
4292 case $deplibs_check_method in
4293 file_magic*)
4294   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4295     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4296 echo "configure:4297: checking for ${ac_tool_prefix}file" >&5
4297 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4298   echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300   case $MAGIC_CMD in
4301   /*)
4302   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4303   ;;
4304   ?:/*)
4305   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4306   ;;
4307   *)
4308   ac_save_MAGIC_CMD="$MAGIC_CMD"
4309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4310   ac_dummy="/usr/bin:$PATH"
4311   for ac_dir in $ac_dummy; do
4312     test -z "$ac_dir" && ac_dir=.
4313     if test -f $ac_dir/${ac_tool_prefix}file; then
4314       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4315       if test -n "$file_magic_test_file"; then
4316         case $deplibs_check_method in
4317         "file_magic "*)
4318           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4319           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4320           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4321             egrep "$file_magic_regex" > /dev/null; then
4322             :
4323           else
4324             cat <<EOF 1>&2
4325
4326 *** Warning: the command libtool uses to detect shared libraries,
4327 *** $file_magic_cmd, produces output that libtool cannot recognize.
4328 *** The result is that libtool may fail to recognize shared libraries
4329 *** as such.  This will affect the creation of libtool libraries that
4330 *** depend on shared libraries, but programs linked with such libtool
4331 *** libraries will work regardless of this problem.  Nevertheless, you
4332 *** may want to report the problem to your system manager and/or to
4333 *** bug-libtool@gnu.org
4334
4335 EOF
4336           fi ;;
4337         esac
4338       fi
4339       break
4340     fi
4341   done
4342   IFS="$ac_save_ifs"
4343   MAGIC_CMD="$ac_save_MAGIC_CMD"
4344   ;;
4345 esac
4346 fi
4347
4348 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4349 if test -n "$MAGIC_CMD"; then
4350   echo "$ac_t""$MAGIC_CMD" 1>&6
4351 else
4352   echo "$ac_t""no" 1>&6
4353 fi
4354
4355 if test -z "$lt_cv_path_MAGIC_CMD"; then
4356   if test -n "$ac_tool_prefix"; then
4357     echo $ac_n "checking for file""... $ac_c" 1>&6
4358 echo "configure:4359: checking for file" >&5
4359 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   case $MAGIC_CMD in
4363   /*)
4364   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4365   ;;
4366   ?:/*)
4367   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4368   ;;
4369   *)
4370   ac_save_MAGIC_CMD="$MAGIC_CMD"
4371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4372   ac_dummy="/usr/bin:$PATH"
4373   for ac_dir in $ac_dummy; do
4374     test -z "$ac_dir" && ac_dir=.
4375     if test -f $ac_dir/file; then
4376       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4377       if test -n "$file_magic_test_file"; then
4378         case $deplibs_check_method in
4379         "file_magic "*)
4380           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4381           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4382           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4383             egrep "$file_magic_regex" > /dev/null; then
4384             :
4385           else
4386             cat <<EOF 1>&2
4387
4388 *** Warning: the command libtool uses to detect shared libraries,
4389 *** $file_magic_cmd, produces output that libtool cannot recognize.
4390 *** The result is that libtool may fail to recognize shared libraries
4391 *** as such.  This will affect the creation of libtool libraries that
4392 *** depend on shared libraries, but programs linked with such libtool
4393 *** libraries will work regardless of this problem.  Nevertheless, you
4394 *** may want to report the problem to your system manager and/or to
4395 *** bug-libtool@gnu.org
4396
4397 EOF
4398           fi ;;
4399         esac
4400       fi
4401       break
4402     fi
4403   done
4404   IFS="$ac_save_ifs"
4405   MAGIC_CMD="$ac_save_MAGIC_CMD"
4406   ;;
4407 esac
4408 fi
4409
4410 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4411 if test -n "$MAGIC_CMD"; then
4412   echo "$ac_t""$MAGIC_CMD" 1>&6
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416
4417   else
4418     MAGIC_CMD=:
4419   fi
4420 fi
4421
4422   fi
4423   ;;
4424 esac
4425
4426 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4427 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4429 echo "configure:4430: checking for $ac_word" >&5
4430 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4431   echo $ac_n "(cached) $ac_c" 1>&6
4432 else
4433   if test -n "$RANLIB"; then
4434   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4435 else
4436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4437   ac_dummy="$PATH"
4438   for ac_dir in $ac_dummy; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f $ac_dir/$ac_word; then
4441       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4442       break
4443     fi
4444   done
4445   IFS="$ac_save_ifs"
4446 fi
4447 fi
4448 RANLIB="$ac_cv_prog_RANLIB"
4449 if test -n "$RANLIB"; then
4450   echo "$ac_t""$RANLIB" 1>&6
4451 else
4452   echo "$ac_t""no" 1>&6
4453 fi
4454
4455
4456 if test -z "$ac_cv_prog_RANLIB"; then
4457 if test -n "$ac_tool_prefix"; then
4458   # Extract the first word of "ranlib", so it can be a program name with args.
4459 set dummy ranlib; ac_word=$2
4460 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4461 echo "configure:4462: checking for $ac_word" >&5
4462 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4463   echo $ac_n "(cached) $ac_c" 1>&6
4464 else
4465   if test -n "$RANLIB"; then
4466   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4467 else
4468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4469   ac_dummy="$PATH"
4470   for ac_dir in $ac_dummy; do
4471     test -z "$ac_dir" && ac_dir=.
4472     if test -f $ac_dir/$ac_word; then
4473       ac_cv_prog_RANLIB="ranlib"
4474       break
4475     fi
4476   done
4477   IFS="$ac_save_ifs"
4478   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4479 fi
4480 fi
4481 RANLIB="$ac_cv_prog_RANLIB"
4482 if test -n "$RANLIB"; then
4483   echo "$ac_t""$RANLIB" 1>&6
4484 else
4485   echo "$ac_t""no" 1>&6
4486 fi
4487
4488 else
4489   RANLIB=":"
4490 fi
4491 fi
4492
4493 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4494 set dummy ${ac_tool_prefix}strip; ac_word=$2
4495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4496 echo "configure:4497: checking for $ac_word" >&5
4497 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   if test -n "$STRIP"; then
4501   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4502 else
4503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4504   ac_dummy="$PATH"
4505   for ac_dir in $ac_dummy; do
4506     test -z "$ac_dir" && ac_dir=.
4507     if test -f $ac_dir/$ac_word; then
4508       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4509       break
4510     fi
4511   done
4512   IFS="$ac_save_ifs"
4513 fi
4514 fi
4515 STRIP="$ac_cv_prog_STRIP"
4516 if test -n "$STRIP"; then
4517   echo "$ac_t""$STRIP" 1>&6
4518 else
4519   echo "$ac_t""no" 1>&6
4520 fi
4521
4522
4523 if test -z "$ac_cv_prog_STRIP"; then
4524 if test -n "$ac_tool_prefix"; then
4525   # Extract the first word of "strip", so it can be a program name with args.
4526 set dummy strip; ac_word=$2
4527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4528 echo "configure:4529: checking for $ac_word" >&5
4529 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   if test -n "$STRIP"; then
4533   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4534 else
4535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4536   ac_dummy="$PATH"
4537   for ac_dir in $ac_dummy; do
4538     test -z "$ac_dir" && ac_dir=.
4539     if test -f $ac_dir/$ac_word; then
4540       ac_cv_prog_STRIP="strip"
4541       break
4542     fi
4543   done
4544   IFS="$ac_save_ifs"
4545   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4546 fi
4547 fi
4548 STRIP="$ac_cv_prog_STRIP"
4549 if test -n "$STRIP"; then
4550   echo "$ac_t""$STRIP" 1>&6
4551 else
4552   echo "$ac_t""no" 1>&6
4553 fi
4554
4555 else
4556   STRIP=":"
4557 fi
4558 fi
4559
4560
4561 enable_dlopen=yes
4562 enable_win32_dll=yes
4563
4564 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4565 if test "${enable_libtool_lock+set}" = set; then
4566   enableval="$enable_libtool_lock"
4567   :
4568 fi
4569
4570 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4571
4572 # Some flags need to be propagated to the compiler or linker for good
4573 # libtool support.
4574 case $host in
4575 *-*-irix6*)
4576   # Find out which ABI we are using.
4577   echo '#line 4578 "configure"' > conftest.$ac_ext
4578   if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4579     case `/usr/bin/file conftest.$ac_objext` in
4580     *32-bit*)
4581       LD="${LD-ld} -32"
4582       ;;
4583     *N32*)
4584       LD="${LD-ld} -n32"
4585       ;;
4586     *64-bit*)
4587       LD="${LD-ld} -64"
4588       ;;
4589     esac
4590   fi
4591   rm -rf conftest*
4592   ;;
4593
4594 *-*-sco3.2v5*)
4595   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4596   SAVE_CFLAGS="$CFLAGS"
4597   CFLAGS="$CFLAGS -belf"
4598   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4599 echo "configure:4600: checking whether the C compiler needs -belf" >&5
4600 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   
4604      ac_ext=c
4605 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4606 ac_cpp='$CPP $CPPFLAGS'
4607 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4608 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4609 cross_compiling=$ac_cv_prog_cc_cross
4610
4611      cat > conftest.$ac_ext <<EOF
4612 #line 4613 "configure"
4613 #include "confdefs.h"
4614
4615 int main() {
4616
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   lt_cv_cc_needs_belf=yes
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   lt_cv_cc_needs_belf=no
4627 fi
4628 rm -f conftest*
4629      ac_ext=c
4630 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4631 ac_cpp='$CPP $CPPFLAGS'
4632 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4633 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4634 cross_compiling=$ac_cv_prog_cc_cross
4635
4636 fi
4637
4638 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4639   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4640     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4641     CFLAGS="$SAVE_CFLAGS"
4642   fi
4643   ;;
4644
4645 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4646   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4647 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_word" >&5
4650 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   if test -n "$DLLTOOL"; then
4654   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4655 else
4656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4657   ac_dummy="$PATH"
4658   for ac_dir in $ac_dummy; do
4659     test -z "$ac_dir" && ac_dir=.
4660     if test -f $ac_dir/$ac_word; then
4661       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4662       break
4663     fi
4664   done
4665   IFS="$ac_save_ifs"
4666 fi
4667 fi
4668 DLLTOOL="$ac_cv_prog_DLLTOOL"
4669 if test -n "$DLLTOOL"; then
4670   echo "$ac_t""$DLLTOOL" 1>&6
4671 else
4672   echo "$ac_t""no" 1>&6
4673 fi
4674
4675
4676 if test -z "$ac_cv_prog_DLLTOOL"; then
4677 if test -n "$ac_tool_prefix"; then
4678   # Extract the first word of "dlltool", so it can be a program name with args.
4679 set dummy dlltool; ac_word=$2
4680 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4681 echo "configure:4682: checking for $ac_word" >&5
4682 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   if test -n "$DLLTOOL"; then
4686   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4687 else
4688   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4689   ac_dummy="$PATH"
4690   for ac_dir in $ac_dummy; do
4691     test -z "$ac_dir" && ac_dir=.
4692     if test -f $ac_dir/$ac_word; then
4693       ac_cv_prog_DLLTOOL="dlltool"
4694       break
4695     fi
4696   done
4697   IFS="$ac_save_ifs"
4698   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4699 fi
4700 fi
4701 DLLTOOL="$ac_cv_prog_DLLTOOL"
4702 if test -n "$DLLTOOL"; then
4703   echo "$ac_t""$DLLTOOL" 1>&6
4704 else
4705   echo "$ac_t""no" 1>&6
4706 fi
4707
4708 else
4709   DLLTOOL="false"
4710 fi
4711 fi
4712
4713   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4714 set dummy ${ac_tool_prefix}as; ac_word=$2
4715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4716 echo "configure:4717: checking for $ac_word" >&5
4717 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4718   echo $ac_n "(cached) $ac_c" 1>&6
4719 else
4720   if test -n "$AS"; then
4721   ac_cv_prog_AS="$AS" # Let the user override the test.
4722 else
4723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4724   ac_dummy="$PATH"
4725   for ac_dir in $ac_dummy; do
4726     test -z "$ac_dir" && ac_dir=.
4727     if test -f $ac_dir/$ac_word; then
4728       ac_cv_prog_AS="${ac_tool_prefix}as"
4729       break
4730     fi
4731   done
4732   IFS="$ac_save_ifs"
4733 fi
4734 fi
4735 AS="$ac_cv_prog_AS"
4736 if test -n "$AS"; then
4737   echo "$ac_t""$AS" 1>&6
4738 else
4739   echo "$ac_t""no" 1>&6
4740 fi
4741
4742
4743 if test -z "$ac_cv_prog_AS"; then
4744 if test -n "$ac_tool_prefix"; then
4745   # Extract the first word of "as", so it can be a program name with args.
4746 set dummy as; ac_word=$2
4747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4748 echo "configure:4749: checking for $ac_word" >&5
4749 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   if test -n "$AS"; then
4753   ac_cv_prog_AS="$AS" # Let the user override the test.
4754 else
4755   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4756   ac_dummy="$PATH"
4757   for ac_dir in $ac_dummy; do
4758     test -z "$ac_dir" && ac_dir=.
4759     if test -f $ac_dir/$ac_word; then
4760       ac_cv_prog_AS="as"
4761       break
4762     fi
4763   done
4764   IFS="$ac_save_ifs"
4765   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4766 fi
4767 fi
4768 AS="$ac_cv_prog_AS"
4769 if test -n "$AS"; then
4770   echo "$ac_t""$AS" 1>&6
4771 else
4772   echo "$ac_t""no" 1>&6
4773 fi
4774
4775 else
4776   AS="false"
4777 fi
4778 fi
4779
4780   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4781 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4783 echo "configure:4784: checking for $ac_word" >&5
4784 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   if test -n "$OBJDUMP"; then
4788   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4789 else
4790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4791   ac_dummy="$PATH"
4792   for ac_dir in $ac_dummy; do
4793     test -z "$ac_dir" && ac_dir=.
4794     if test -f $ac_dir/$ac_word; then
4795       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4796       break
4797     fi
4798   done
4799   IFS="$ac_save_ifs"
4800 fi
4801 fi
4802 OBJDUMP="$ac_cv_prog_OBJDUMP"
4803 if test -n "$OBJDUMP"; then
4804   echo "$ac_t""$OBJDUMP" 1>&6
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808
4809
4810 if test -z "$ac_cv_prog_OBJDUMP"; then
4811 if test -n "$ac_tool_prefix"; then
4812   # Extract the first word of "objdump", so it can be a program name with args.
4813 set dummy objdump; ac_word=$2
4814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_word" >&5
4816 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   if test -n "$OBJDUMP"; then
4820   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4821 else
4822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4823   ac_dummy="$PATH"
4824   for ac_dir in $ac_dummy; do
4825     test -z "$ac_dir" && ac_dir=.
4826     if test -f $ac_dir/$ac_word; then
4827       ac_cv_prog_OBJDUMP="objdump"
4828       break
4829     fi
4830   done
4831   IFS="$ac_save_ifs"
4832   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4833 fi
4834 fi
4835 OBJDUMP="$ac_cv_prog_OBJDUMP"
4836 if test -n "$OBJDUMP"; then
4837   echo "$ac_t""$OBJDUMP" 1>&6
4838 else
4839   echo "$ac_t""no" 1>&6
4840 fi
4841
4842 else
4843   OBJDUMP="false"
4844 fi
4845 fi
4846
4847
4848   # recent cygwin and mingw systems supply a stub DllMain which the user
4849   # can override, but on older systems we have to supply one
4850   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4851 echo "configure:4852: checking if libtool should supply DllMain function" >&5
4852 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   cat > conftest.$ac_ext <<EOF
4856 #line 4857 "configure"
4857 #include "confdefs.h"
4858
4859 int main() {
4860 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4861       DllMain (0, 0, 0);
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   lt_cv_need_dllmain=no
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   lt_cv_need_dllmain=yes
4872 fi
4873 rm -f conftest*
4874 fi
4875
4876 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4877
4878   case $host/$CC in
4879   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4880     # old mingw systems require "-dll" to link a DLL, while more recent ones
4881     # require "-mdll"
4882     SAVE_CFLAGS="$CFLAGS"
4883     CFLAGS="$CFLAGS -mdll"
4884     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4885 echo "configure:4886: checking how to link DLLs" >&5
4886 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892
4893 int main() {
4894
4895 ; return 0; }
4896 EOF
4897 if { (eval echo configure:4898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4898   rm -rf conftest*
4899   lt_cv_cc_dll_switch=-mdll
4900 else
4901   echo "configure: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   rm -rf conftest*
4904   lt_cv_cc_dll_switch=-dll
4905 fi
4906 rm -f conftest*
4907 fi
4908
4909 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4910     CFLAGS="$SAVE_CFLAGS" ;;
4911   *-*-cygwin* | *-*-pw32*)
4912     # cygwin systems need to pass --dll to the linker, and not link
4913     # crt.o which will require a WinMain@16 definition.
4914     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4915   esac
4916   ;;
4917   
4918 esac
4919
4920 # Sed substitution that helps us do robust quoting.  It backslashifies
4921 # metacharacters that are still active within double-quoted strings.
4922 Xsed='sed -e s/^X//'
4923 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4924
4925 # Same as above, but do not quote variable references.
4926 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4927
4928 # Sed substitution to delay expansion of an escaped shell variable in a
4929 # double_quote_subst'ed string.
4930 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4931
4932 # Constants:
4933 rm="rm -f"
4934
4935 # Global variables:
4936 default_ofile=libtool
4937 can_build_shared=yes
4938
4939 # All known linkers require a `.a' archive for static linking (except M$VC,
4940 # which needs '.lib').
4941 libext=a
4942 ltmain="$ac_aux_dir/ltmain.sh"
4943 ofile="$default_ofile"
4944 with_gnu_ld="$lt_cv_prog_gnu_ld"
4945 need_locks="$enable_libtool_lock"
4946
4947 old_CC="$CC"
4948 old_CFLAGS="$CFLAGS"
4949
4950 # Set sane defaults for various variables
4951 test -z "$AR" && AR=ar
4952 test -z "$AR_FLAGS" && AR_FLAGS=cru
4953 test -z "$AS" && AS=as
4954 test -z "$CC" && CC=cc
4955 test -z "$DLLTOOL" && DLLTOOL=dlltool
4956 test -z "$LD" && LD=ld
4957 test -z "$LN_S" && LN_S="ln -s"
4958 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4959 test -z "$NM" && NM=nm
4960 test -z "$OBJDUMP" && OBJDUMP=objdump
4961 test -z "$RANLIB" && RANLIB=:
4962 test -z "$STRIP" && STRIP=:
4963 test -z "$ac_objext" && ac_objext=o
4964
4965 if test x"$host" != x"$build"; then
4966   ac_tool_prefix=${host_alias}-
4967 else
4968   ac_tool_prefix=
4969 fi
4970
4971 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4972 case $host_os in
4973 linux-gnu*) ;;
4974 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4975 esac
4976
4977 case $host_os in
4978 aix3*)
4979   # AIX sometimes has problems with the GCC collect2 program.  For some
4980   # reason, if we set the COLLECT_NAMES environment variable, the problems
4981   # vanish in a puff of smoke.
4982   if test "X${COLLECT_NAMES+set}" != Xset; then
4983     COLLECT_NAMES=
4984     export COLLECT_NAMES
4985   fi
4986   ;;
4987 esac
4988
4989 # Determine commands to create old-style static archives.
4990 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4991 old_postinstall_cmds='chmod 644 $oldlib'
4992 old_postuninstall_cmds=
4993
4994 if test -n "$RANLIB"; then
4995   case $host_os in
4996   openbsd*)
4997     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4998     ;;
4999   *)
5000     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5001     ;;
5002   esac
5003   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5004 fi
5005
5006 # Allow CC to be a program name with arguments.
5007 set dummy $CC
5008 compiler="$2"
5009
5010 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5011 echo "configure:5012: checking for objdir" >&5
5012 rm -f .libs 2>/dev/null
5013 mkdir .libs 2>/dev/null
5014 if test -d .libs; then
5015   objdir=.libs
5016 else
5017   # MS-DOS does not allow filenames that begin with a dot.
5018   objdir=_libs
5019 fi
5020 rmdir .libs 2>/dev/null
5021 echo "$ac_t""$objdir" 1>&6
5022
5023
5024 # Check whether --with-pic or --without-pic was given.
5025 if test "${with_pic+set}" = set; then
5026   withval="$with_pic"
5027   pic_mode="$withval"
5028 else
5029   pic_mode=default
5030 fi
5031
5032 test -z "$pic_mode" && pic_mode=default
5033
5034 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5035 # in isolation, and that seeing it set (from the cache) indicates that
5036 # the associated values are set (in the cache) correctly too.
5037 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5038 echo "configure:5039: checking for $compiler option to produce PIC" >&5
5039 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5040   echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042    lt_cv_prog_cc_pic=
5043   lt_cv_prog_cc_shlib=
5044   lt_cv_prog_cc_wl=
5045   lt_cv_prog_cc_static=
5046   lt_cv_prog_cc_no_builtin=
5047   lt_cv_prog_cc_can_build_shared=$can_build_shared
5048
5049   if test "$GCC" = yes; then
5050     lt_cv_prog_cc_wl='-Wl,'
5051     lt_cv_prog_cc_static='-static'
5052
5053     case $host_os in
5054     aix*)
5055       # Below there is a dirty hack to force normal static linking with -ldl
5056       # The problem is because libdl dynamically linked with both libc and
5057       # libC (AIX C++ library), which obviously doesn't included in libraries
5058       # list by gcc. This cause undefined symbols with -static flags.
5059       # This hack allows C programs to be linked with "-static -ldl", but
5060       # not sure about C++ programs.
5061       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5062       ;;
5063     amigaos*)
5064       # FIXME: we need at least 68020 code to build shared libraries, but
5065       # adding the `-m68020' flag to GCC prevents building anything better,
5066       # like `-m68040'.
5067       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5068       ;;
5069     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5070       # PIC is the default for these OSes.
5071       ;;
5072     darwin* | rhapsody*)
5073       # PIC is the default on this platform
5074       # Common symbols not allowed in MH_DYLIB files
5075       lt_cv_prog_cc_pic='-fno-common'
5076       ;;
5077     cygwin* | mingw* | pw32* | os2*)
5078       # This hack is so that the source file can tell whether it is being
5079       # built for inclusion in a dll (and should export symbols for example).
5080       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5081       ;;
5082     sysv4*MP*)
5083       if test -d /usr/nec; then
5084          lt_cv_prog_cc_pic=-Kconform_pic
5085       fi
5086       ;;
5087     *)
5088       lt_cv_prog_cc_pic='-fPIC'
5089       ;;
5090     esac
5091   else
5092     # PORTME Check for PIC flags for the system compiler.
5093     case $host_os in
5094     aix3* | aix4* | aix5*)
5095       lt_cv_prog_cc_wl='-Wl,'
5096       # All AIX code is PIC.
5097       if test "$host_cpu" = ia64; then
5098         # AIX 5 now supports IA64 processor
5099         lt_cv_prog_cc_static='-Bstatic'
5100       else
5101         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5102       fi
5103       ;;
5104
5105     hpux9* | hpux10* | hpux11*)
5106       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5107       lt_cv_prog_cc_wl='-Wl,'
5108       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5109       lt_cv_prog_cc_pic='+Z'
5110       ;;
5111
5112     irix5* | irix6* | nonstopux*)
5113       lt_cv_prog_cc_wl='-Wl,'
5114       lt_cv_prog_cc_static='-non_shared'
5115       # PIC (with -KPIC) is the default.
5116       ;;
5117
5118     cygwin* | mingw* | pw32* | os2*)
5119       # This hack is so that the source file can tell whether it is being
5120       # built for inclusion in a dll (and should export symbols for example).
5121       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5122       ;;
5123
5124     newsos6)
5125       lt_cv_prog_cc_pic='-KPIC'
5126       lt_cv_prog_cc_static='-Bstatic'
5127       ;;
5128
5129     osf3* | osf4* | osf5*)
5130       # All OSF/1 code is PIC.
5131       lt_cv_prog_cc_wl='-Wl,'
5132       lt_cv_prog_cc_static='-non_shared'
5133       ;;
5134
5135     sco3.2v5*)
5136       lt_cv_prog_cc_pic='-Kpic'
5137       lt_cv_prog_cc_static='-dn'
5138       lt_cv_prog_cc_shlib='-belf'
5139       ;;
5140
5141     solaris*)
5142       lt_cv_prog_cc_pic='-KPIC'
5143       lt_cv_prog_cc_static='-Bstatic'
5144       lt_cv_prog_cc_wl='-Wl,'
5145       ;;
5146
5147     sunos4*)
5148       lt_cv_prog_cc_pic='-PIC'
5149       lt_cv_prog_cc_static='-Bstatic'
5150       lt_cv_prog_cc_wl='-Qoption ld '
5151       ;;
5152
5153     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5154       lt_cv_prog_cc_pic='-KPIC'
5155       lt_cv_prog_cc_static='-Bstatic'
5156       lt_cv_prog_cc_wl='-Wl,'
5157       ;;
5158
5159     uts4*)
5160       lt_cv_prog_cc_pic='-pic'
5161       lt_cv_prog_cc_static='-Bstatic'
5162       ;;
5163
5164     sysv4*MP*)
5165       if test -d /usr/nec ;then
5166         lt_cv_prog_cc_pic='-Kconform_pic'
5167         lt_cv_prog_cc_static='-Bstatic'
5168       fi
5169       ;;
5170
5171     *)
5172       lt_cv_prog_cc_can_build_shared=no
5173       ;;
5174     esac
5175   fi
5176
5177 fi
5178
5179 if test -z "$lt_cv_prog_cc_pic"; then
5180   echo "$ac_t""none" 1>&6
5181 else
5182   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5183
5184   # Check to make sure the pic_flag actually works.
5185   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5186 echo "configure:5187: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5187   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190       save_CFLAGS="$CFLAGS"
5191     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5192     cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195
5196 int main() {
5197
5198 ; return 0; }
5199 EOF
5200 if { (eval echo configure:5201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5201   rm -rf conftest*
5202         case $host_os in
5203       hpux9* | hpux10* | hpux11*)
5204         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5205         # they create non-PIC objects.  So, if there were any warnings, we
5206         # assume that PIC is not supported.
5207         if test -s conftest.err; then
5208           lt_cv_prog_cc_pic_works=no
5209         else
5210           lt_cv_prog_cc_pic_works=yes
5211         fi
5212         ;;
5213       *)
5214         lt_cv_prog_cc_pic_works=yes
5215         ;;
5216       esac
5217     
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221   rm -rf conftest*
5222         lt_cv_prog_cc_pic_works=no
5223     
5224 fi
5225 rm -f conftest*
5226     CFLAGS="$save_CFLAGS"
5227   
5228 fi
5229
5230
5231   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5232     lt_cv_prog_cc_pic=
5233     lt_cv_prog_cc_can_build_shared=no
5234   else
5235     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5236   fi
5237
5238   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5239 fi
5240
5241 # Check for any special shared library compilation flags.
5242 if test -n "$lt_cv_prog_cc_shlib"; then
5243   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5244   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5245   else
5246    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5247     lt_cv_prog_cc_can_build_shared=no
5248   fi
5249 fi
5250
5251 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5252 echo "configure:5253: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5253 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5254   echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256     lt_cv_prog_cc_static_works=no
5257   save_LDFLAGS="$LDFLAGS"
5258   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5259   cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262
5263 int main() {
5264
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268   rm -rf conftest*
5269   lt_cv_prog_cc_static_works=yes
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273 fi
5274 rm -f conftest*
5275   LDFLAGS="$save_LDFLAGS"
5276
5277 fi
5278
5279
5280 # Belt *and* braces to stop my trousers falling down:
5281 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5282 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5283
5284 pic_flag="$lt_cv_prog_cc_pic"
5285 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5286 wl="$lt_cv_prog_cc_wl"
5287 link_static_flag="$lt_cv_prog_cc_static"
5288 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5289 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5290
5291
5292 # Check to see if options -o and -c are simultaneously supported by compiler
5293 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5294 echo "configure:5295: checking if $compiler supports -c -o file.$ac_objext" >&5
5295 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5296   echo $ac_n "(cached) $ac_c" 1>&6
5297 else
5298   
5299 $rm -r conftest 2>/dev/null
5300 mkdir conftest
5301 cd conftest
5302 echo "int some_variable = 0;" > conftest.$ac_ext
5303 mkdir out
5304 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5305 # that will create temporary files in the current directory regardless of
5306 # the output directory.  Thus, making CWD read-only will cause this test
5307 # to fail, enabling locking or at least warning the user not to do parallel
5308 # builds.
5309 chmod -w .
5310 save_CFLAGS="$CFLAGS"
5311 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5312 compiler_c_o=no
5313 if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5314   # The compiler can only warn and ignore the option if not recognized
5315   # So say no if there are warnings
5316   if test -s out/conftest.err; then
5317     lt_cv_compiler_c_o=no
5318   else
5319     lt_cv_compiler_c_o=yes
5320   fi
5321 else
5322   # Append any errors to the config.log.
5323   cat out/conftest.err 1>&5
5324   lt_cv_compiler_c_o=no
5325 fi
5326 CFLAGS="$save_CFLAGS"
5327 chmod u+w .
5328 $rm conftest* out/*
5329 rmdir out
5330 cd ..
5331 rmdir conftest
5332 $rm -r conftest 2>/dev/null
5333
5334 fi
5335
5336 compiler_c_o=$lt_cv_compiler_c_o
5337 echo "$ac_t""$compiler_c_o" 1>&6
5338
5339 if test x"$compiler_c_o" = x"yes"; then
5340   # Check to see if we can write to a .lo
5341   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5342 echo "configure:5343: checking if $compiler supports -c -o file.lo" >&5
5343   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5344   echo $ac_n "(cached) $ac_c" 1>&6
5345 else
5346   
5347   lt_cv_compiler_o_lo=no
5348   save_CFLAGS="$CFLAGS"
5349   CFLAGS="$CFLAGS -c -o conftest.lo"
5350   save_objext="$ac_objext"
5351   ac_objext=lo
5352   cat > conftest.$ac_ext <<EOF
5353 #line 5354 "configure"
5354 #include "confdefs.h"
5355
5356 int main() {
5357 int some_variable = 0;
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5361   rm -rf conftest*
5362       # The compiler can only warn and ignore the option if not recognized
5363     # So say no if there are warnings
5364     if test -s conftest.err; then
5365       lt_cv_compiler_o_lo=no
5366     else
5367       lt_cv_compiler_o_lo=yes
5368     fi
5369   
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373 fi
5374 rm -f conftest*
5375   ac_objext="$save_objext"
5376   CFLAGS="$save_CFLAGS"
5377   
5378 fi
5379
5380   compiler_o_lo=$lt_cv_compiler_o_lo
5381   echo "$ac_t""$compiler_o_lo" 1>&6
5382 else
5383   compiler_o_lo=no
5384 fi
5385
5386 # Check to see if we can do hard links to lock some files if needed
5387 hard_links="nottested"
5388 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5389   # do not overwrite the value of need_locks provided by the user
5390   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5391 echo "configure:5392: checking if we can lock with hard links" >&5
5392   hard_links=yes
5393   $rm conftest*
5394   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5395   touch conftest.a
5396   ln conftest.a conftest.b 2>&5 || hard_links=no
5397   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5398   echo "$ac_t""$hard_links" 1>&6
5399   if test "$hard_links" = no; then
5400     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5401     need_locks=warn
5402   fi
5403 else
5404   need_locks=no
5405 fi
5406
5407 if test "$GCC" = yes; then
5408   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5409   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5410 echo "configure:5411: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5411   echo "int some_variable = 0;" > conftest.$ac_ext
5412   save_CFLAGS="$CFLAGS"
5413   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5414   compiler_rtti_exceptions=no
5415   cat > conftest.$ac_ext <<EOF
5416 #line 5417 "configure"
5417 #include "confdefs.h"
5418
5419 int main() {
5420 int some_variable = 0;
5421 ; return 0; }
5422 EOF
5423 if { (eval echo configure:5424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5424   rm -rf conftest*
5425       # The compiler can only warn and ignore the option if not recognized
5426     # So say no if there are warnings
5427     if test -s conftest.err; then
5428       compiler_rtti_exceptions=no
5429     else
5430       compiler_rtti_exceptions=yes
5431     fi
5432   
5433 else
5434   echo "configure: failed program was:" >&5
5435   cat conftest.$ac_ext >&5
5436 fi
5437 rm -f conftest*
5438   CFLAGS="$save_CFLAGS"
5439   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5440
5441   if test "$compiler_rtti_exceptions" = "yes"; then
5442     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5443   else
5444     no_builtin_flag=' -fno-builtin'
5445   fi
5446 fi
5447
5448 # See if the linker supports building shared libraries.
5449 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5450 echo "configure:5451: checking whether the linker ($LD) supports shared libraries" >&5
5451
5452 allow_undefined_flag=
5453 no_undefined_flag=
5454 need_lib_prefix=unknown
5455 need_version=unknown
5456 # when you set need_version to no, make sure it does not cause -set_version
5457 # flags to be left without arguments
5458 archive_cmds=
5459 archive_expsym_cmds=
5460 old_archive_from_new_cmds=
5461 old_archive_from_expsyms_cmds=
5462 export_dynamic_flag_spec=
5463 whole_archive_flag_spec=
5464 thread_safe_flag_spec=
5465 hardcode_into_libs=no
5466 hardcode_libdir_flag_spec=
5467 hardcode_libdir_separator=
5468 hardcode_direct=no
5469 hardcode_minus_L=no
5470 hardcode_shlibpath_var=unsupported
5471 runpath_var=
5472 link_all_deplibs=unknown
5473 always_export_symbols=no
5474 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5475 # include_expsyms should be a list of space-separated symbols to be *always*
5476 # included in the symbol list
5477 include_expsyms=
5478 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5479 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5480 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5481 # as well as any symbol that contains `d'.
5482 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5483 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5484 # platforms (ab)use it in PIC code, but their linkers get confused if
5485 # the symbol is explicitly referenced.  Since portable code cannot
5486 # rely on this symbol name, it's probably fine to never include it in
5487 # preloaded symbol tables.
5488 extract_expsyms_cmds=
5489
5490 case $host_os in
5491 cygwin* | mingw* | pw32*)
5492   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5493   # When not using gcc, we currently assume that we are using
5494   # Microsoft Visual C++.
5495   if test "$GCC" != yes; then
5496     with_gnu_ld=no
5497   fi
5498   ;;
5499 openbsd*)
5500   with_gnu_ld=no
5501   ;;
5502 esac
5503
5504 ld_shlibs=yes
5505 if test "$with_gnu_ld" = yes; then
5506   # If archive_cmds runs LD, not CC, wlarc should be empty
5507   wlarc='${wl}'
5508
5509   # See if GNU ld supports shared libraries.
5510   case $host_os in
5511   aix3* | aix4* | aix5*)
5512     # On AIX, the GNU linker is very broken
5513     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5514     ld_shlibs=no
5515     cat <<EOF 1>&2
5516
5517 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5518 *** to be unable to reliably create shared libraries on AIX.
5519 *** Therefore, libtool is disabling shared libraries support.  If you
5520 *** really care for shared libraries, you may want to modify your PATH
5521 *** so that a non-GNU linker is found, and then restart.
5522
5523 EOF
5524     ;;
5525
5526   amigaos*)
5527     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)'
5528     hardcode_libdir_flag_spec='-L$libdir'
5529     hardcode_minus_L=yes
5530
5531     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5532     # that the semantics of dynamic libraries on AmigaOS, at least up
5533     # to version 4, is to share data among multiple programs linked
5534     # with the same dynamic library.  Since this doesn't match the
5535     # behavior of shared libraries on other platforms, we can use
5536     # them.
5537     ld_shlibs=no
5538     ;;
5539
5540   beos*)
5541     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5542       allow_undefined_flag=unsupported
5543       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5544       # support --undefined.  This deserves some investigation.  FIXME
5545       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5546     else
5547       ld_shlibs=no
5548     fi
5549     ;;
5550
5551   cygwin* | mingw* | pw32*)
5552     # hardcode_libdir_flag_spec is actually meaningless, as there is
5553     # no search path for DLLs.
5554     hardcode_libdir_flag_spec='-L$libdir'
5555     allow_undefined_flag=unsupported
5556     always_export_symbols=yes
5557
5558     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5559       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5560       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5561       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5562       else $CC -o impgen impgen.c ; fi)~
5563       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5564
5565     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5566
5567     # cygwin and mingw dlls have different entry points and sets of symbols
5568     # to exclude.
5569     # FIXME: what about values for MSVC?
5570     dll_entry=__cygwin_dll_entry@12
5571     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5572     case $host_os in
5573     mingw*)
5574       # mingw values
5575       dll_entry=_DllMainCRTStartup@12
5576       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5577       ;;
5578     esac
5579
5580     # mingw and cygwin differ, and it's simplest to just exclude the union
5581     # of the two symbol sets.
5582     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5583
5584     # recent cygwin and mingw systems supply a stub DllMain which the user
5585     # can override, but on older systems we have to supply one (in ltdll.c)
5586     if test "x$lt_cv_need_dllmain" = "xyes"; then
5587       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5588       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~
5589         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5590     else
5591       ltdll_obj=
5592       ltdll_cmds=
5593     fi
5594
5595     # Extract the symbol export list from an `--export-all' def file,
5596     # then regenerate the def file from the symbol export list, so that
5597     # the compiled dll only exports the symbol export list.
5598     # Be careful not to strip the DATA tag left be newer dlltools.
5599     export_symbols_cmds="$ltdll_cmds"'
5600       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5601       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5602
5603     # If the export-symbols file already is a .def file (1st line
5604     # is EXPORTS), use it as is.
5605     # If DATA tags from a recent dlltool are present, honour them!
5606     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5607         cp $export_symbols $output_objdir/$soname-def;
5608       else
5609         echo EXPORTS > $output_objdir/$soname-def;
5610         _lt_hint=1;
5611         cat $export_symbols | while read symbol; do
5612          set dummy \$symbol;
5613          case \$# in
5614            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5615            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5616            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5617          esac;
5618          _lt_hint=`expr 1 + \$_lt_hint`;
5619         done;
5620       fi~
5621       '"$ltdll_cmds"'
5622       $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~
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~
5624       $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~
5625       $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~
5626       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5627     ;;
5628
5629   netbsd*)
5630     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5631       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5632       wlarc=
5633     else
5634       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5635       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5636     fi
5637     ;;
5638
5639   solaris* | sysv5*)
5640     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5641       ld_shlibs=no
5642       cat <<EOF 1>&2
5643
5644 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5645 *** create shared libraries on Solaris systems.  Therefore, libtool
5646 *** is disabling shared libraries support.  We urge you to upgrade GNU
5647 *** binutils to release 2.9.1 or newer.  Another option is to modify
5648 *** your PATH or compiler configuration so that the native linker is
5649 *** used, and then restart.
5650
5651 EOF
5652     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5653       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5654       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5655     else
5656       ld_shlibs=no
5657     fi
5658     ;;
5659
5660   sunos4*)
5661     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5662     wlarc=
5663     hardcode_direct=yes
5664     hardcode_shlibpath_var=no
5665     ;;
5666
5667   *)
5668     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5669       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5670       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5671     else
5672       ld_shlibs=no
5673     fi
5674     ;;
5675   esac
5676
5677   if test "$ld_shlibs" = yes; then
5678     runpath_var=LD_RUN_PATH
5679     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5680     export_dynamic_flag_spec='${wl}--export-dynamic'
5681     case $host_os in
5682     cygwin* | mingw* | pw32*)
5683       # dlltool doesn't understand --whole-archive et. al.
5684       whole_archive_flag_spec=
5685       ;;
5686     *)
5687       # ancient GNU ld didn't support --whole-archive et. al.
5688       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5689         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5690       else
5691         whole_archive_flag_spec=
5692       fi
5693       ;;
5694     esac
5695   fi
5696 else
5697   # PORTME fill in a description of your system's linker (not GNU ld)
5698   case $host_os in
5699   aix3*)
5700     allow_undefined_flag=unsupported
5701     always_export_symbols=yes
5702     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'
5703     # Note: this linker hardcodes the directories in LIBPATH if there
5704     # are no directories specified by -L.
5705     hardcode_minus_L=yes
5706     if test "$GCC" = yes && test -z "$link_static_flag"; then
5707       # Neither direct hardcoding nor static linking is supported with a
5708       # broken collect2.
5709       hardcode_direct=unsupported
5710     fi
5711     ;;
5712
5713   aix4* | aix5*)
5714     if test "$host_cpu" = ia64; then
5715       # On IA64, the linker does run time linking by default, so we don't
5716       # have to do anything special.
5717       aix_use_runtimelinking=no
5718       exp_sym_flag='-Bexport'
5719       no_entry_flag=""
5720     else
5721       aix_use_runtimelinking=no
5722
5723       # Test if we are trying to use run time linking or normal
5724       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5725       # need to do runtime linking.
5726       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5727         for ld_flag in $LDFLAGS; do
5728           case $ld_flag in
5729           *-brtl*)
5730             aix_use_runtimelinking=yes
5731             break
5732           ;;
5733           esac
5734         done
5735       esac
5736
5737       exp_sym_flag='-bexport'
5738       no_entry_flag='-bnoentry'
5739     fi
5740
5741     # When large executables or shared objects are built, AIX ld can
5742     # have problems creating the table of contents.  If linking a library
5743     # or program results in "error TOC overflow" add -mminimal-toc to
5744     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5745     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5746
5747     hardcode_direct=yes
5748     archive_cmds=''
5749     hardcode_libdir_separator=':'
5750     if test "$GCC" = yes; then
5751       case $host_os in aix4.[012]|aix4.[012].*)
5752         collect2name=`${CC} -print-prog-name=collect2`
5753         if test -f "$collect2name" && \
5754           strings "$collect2name" | grep resolve_lib_name >/dev/null
5755         then
5756           # We have reworked collect2
5757           hardcode_direct=yes
5758         else
5759           # We have old collect2
5760           hardcode_direct=unsupported
5761           # It fails to find uninstalled libraries when the uninstalled
5762           # path is not listed in the libpath.  Setting hardcode_minus_L
5763           # to unsupported forces relinking
5764           hardcode_minus_L=yes
5765           hardcode_libdir_flag_spec='-L$libdir'
5766           hardcode_libdir_separator=
5767         fi
5768       esac
5769
5770       shared_flag='-shared'
5771     else
5772       # not using gcc
5773       if test "$host_cpu" = ia64; then
5774         shared_flag='${wl}-G'
5775       else
5776         if test "$aix_use_runtimelinking" = yes; then
5777           shared_flag='${wl}-G'
5778         else
5779           shared_flag='${wl}-bM:SRE'
5780         fi
5781       fi
5782     fi
5783
5784     # It seems that -bexpall can do strange things, so it is better to
5785     # generate a list of symbols to export.
5786     always_export_symbols=yes
5787     if test "$aix_use_runtimelinking" = yes; then
5788       # Warning - without using the other runtime loading flags (-brtl),
5789       # -berok will link without error, but may produce a broken library.
5790       allow_undefined_flag='-berok'
5791       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5792       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"
5793     else
5794       if test "$host_cpu" = ia64; then
5795         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5796         allow_undefined_flag="-z nodefs"
5797         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"
5798       else
5799         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5800         # Warning - without using the other run time loading flags,
5801         # -berok will link without error, but may produce a broken library.
5802         allow_undefined_flag='${wl}-berok'
5803         # This is a bit strange, but is similar to how AIX traditionally builds
5804         # it's shared libraries.
5805         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'
5806       fi
5807     fi
5808     ;;
5809
5810   amigaos*)
5811     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)'
5812     hardcode_libdir_flag_spec='-L$libdir'
5813     hardcode_minus_L=yes
5814     # see comment about different semantics on the GNU ld section
5815     ld_shlibs=no
5816     ;;
5817
5818   cygwin* | mingw* | pw32*)
5819     # When not using gcc, we currently assume that we are using
5820     # Microsoft Visual C++.
5821     # hardcode_libdir_flag_spec is actually meaningless, as there is
5822     # no search path for DLLs.
5823     hardcode_libdir_flag_spec=' '
5824     allow_undefined_flag=unsupported
5825     # Tell ltmain to make .lib files, not .a files.
5826     libext=lib
5827     # FIXME: Setting linknames here is a bad hack.
5828     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5829     # The linker will automatically build a .lib file if we build a DLL.
5830     old_archive_from_new_cmds='true'
5831     # FIXME: Should let the user specify the lib program.
5832     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5833     fix_srcfile_path='`cygpath -w "$srcfile"`'
5834     ;;
5835
5836   darwin* | rhapsody*)
5837     case "$host_os" in
5838     rhapsody* | darwin1.[012])
5839       allow_undefined_flag='-undefined suppress'
5840       ;;
5841     *) # Darwin 1.3 on
5842       allow_undefined_flag='-flat_namespace -undefined suppress'
5843       ;;
5844     esac
5845     # FIXME: Relying on posixy $() will cause problems for
5846     #        cross-compilation, but unfortunately the echo tests do not
5847     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5848     #        `"' quotes if we put them in here... so don't!
5849     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)'
5850     # We need to add '_' to the symbols in $export_symbols first
5851     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5852     hardcode_direct=yes
5853     hardcode_shlibpath_var=no
5854     whole_archive_flag_spec='-all_load $convenience'
5855     ;;
5856
5857   freebsd1*)
5858     ld_shlibs=no
5859     ;;
5860
5861   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5862   # support.  Future versions do this automatically, but an explicit c++rt0.o
5863   # does not break anything, and helps significantly (at the cost of a little
5864   # extra space).
5865   freebsd2.2*)
5866     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_direct=yes
5869     hardcode_shlibpath_var=no
5870     ;;
5871
5872   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5873   freebsd2*)
5874     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5875     hardcode_direct=yes
5876     hardcode_minus_L=yes
5877     hardcode_shlibpath_var=no
5878     ;;
5879
5880   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5881   freebsd*)
5882     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5883     hardcode_libdir_flag_spec='-R$libdir'
5884     hardcode_direct=yes
5885     hardcode_shlibpath_var=no
5886     ;;
5887
5888   hpux9* | hpux10* | hpux11*)
5889     case $host_os in
5890     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' ;;
5891     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5892     esac
5893     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5894     hardcode_libdir_separator=:
5895     hardcode_direct=yes
5896     hardcode_minus_L=yes # Not in the search PATH, but as the default
5897                          # location of the library.
5898     export_dynamic_flag_spec='${wl}-E'
5899     ;;
5900
5901   irix5* | irix6* | nonstopux*)
5902     if test "$GCC" = yes; then
5903       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'
5904       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5905     else
5906       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'
5907       hardcode_libdir_flag_spec='-rpath $libdir'
5908     fi
5909     hardcode_libdir_separator=:
5910     link_all_deplibs=yes
5911     ;;
5912
5913   netbsd*)
5914     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5915       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5916     else
5917       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5918     fi
5919     hardcode_libdir_flag_spec='-R$libdir'
5920     hardcode_direct=yes
5921     hardcode_shlibpath_var=no
5922     ;;
5923
5924   newsos6)
5925     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926     hardcode_direct=yes
5927     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5928     hardcode_libdir_separator=:
5929     hardcode_shlibpath_var=no
5930     ;;
5931
5932   openbsd*)
5933     hardcode_direct=yes
5934     hardcode_shlibpath_var=no
5935     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5936       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5937       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5938       export_dynamic_flag_spec='${wl}-E'
5939     else
5940       case "$host_os" in
5941       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5942         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5943         hardcode_libdir_flag_spec='-R$libdir'
5944         ;;
5945       *)
5946         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5947         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5948         ;;
5949       esac
5950     fi
5951     ;;
5952
5953   os2*)
5954     hardcode_libdir_flag_spec='-L$libdir'
5955     hardcode_minus_L=yes
5956     allow_undefined_flag=unsupported
5957     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'
5958     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5959     ;;
5960
5961   osf3*)
5962     if test "$GCC" = yes; then
5963       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5964       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'
5965     else
5966       allow_undefined_flag=' -expect_unresolved \*'
5967       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'
5968     fi
5969     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5970     hardcode_libdir_separator=:
5971     ;;
5972
5973   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5974     if test "$GCC" = yes; then
5975       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5976       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'
5977       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5978     else
5979       allow_undefined_flag=' -expect_unresolved \*'
5980       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'
5981       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5982       $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'
5983
5984       #Both c and cxx compiler support -rpath directly
5985       hardcode_libdir_flag_spec='-rpath $libdir'
5986     fi
5987     hardcode_libdir_separator=:
5988     ;;
5989
5990   sco3.2v5*)
5991     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992     hardcode_shlibpath_var=no
5993     runpath_var=LD_RUN_PATH
5994     hardcode_runpath_var=yes
5995     export_dynamic_flag_spec='${wl}-Bexport'
5996     ;;
5997
5998   solaris*)
5999     # gcc --version < 3.0 without binutils cannot create self contained
6000     # shared libraries reliably, requiring libgcc.a to resolve some of
6001     # the object symbols generated in some cases.  Libraries that use
6002     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6003     # a copy of libgcc.a into every shared library to guarantee resolving
6004     # such symbols causes other problems:  According to Tim Van Holder
6005     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6006     # (to the application) exception stack for one thing.
6007     no_undefined_flag=' -z defs'
6008     if test "$GCC" = yes; then
6009       case `$CC --version 2>/dev/null` in
6010       [12].*)
6011         cat <<EOF 1>&2
6012
6013 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6014 *** create self contained shared libraries on Solaris systems, without
6015 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6016 *** -no-undefined support, which will at least allow you to build shared
6017 *** libraries.  However, you may find that when you link such libraries
6018 *** into an application without using GCC, you have to manually add
6019 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6020 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6021 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6022
6023 EOF
6024         no_undefined_flag=
6025         ;;
6026       esac
6027     fi
6028     # $CC -shared without GNU ld will not create a library from C++
6029     # object files and a static libstdc++, better avoid it by now
6030     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6031     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6032                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6033     hardcode_libdir_flag_spec='-R$libdir'
6034     hardcode_shlibpath_var=no
6035     case $host_os in
6036     solaris2.[0-5] | solaris2.[0-5].*) ;;
6037     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6038       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6039     esac
6040     link_all_deplibs=yes
6041     ;;
6042
6043   sunos4*)
6044     if test "x$host_vendor" = xsequent; then
6045       # Use $CC to link under sequent, because it throws in some extra .o
6046       # files that make .init and .fini sections work.
6047       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6048     else
6049       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6050     fi
6051     hardcode_libdir_flag_spec='-L$libdir'
6052     hardcode_direct=yes
6053     hardcode_minus_L=yes
6054     hardcode_shlibpath_var=no
6055     ;;
6056
6057   sysv4)
6058     case $host_vendor in
6059       sni)
6060         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6061         hardcode_direct=yes # is this really true???
6062         ;;
6063       siemens)
6064         ## LD is ld it makes a PLAMLIB
6065         ## CC just makes a GrossModule.
6066         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6067         reload_cmds='$CC -r -o $output$reload_objs'
6068         hardcode_direct=no
6069         ;;
6070       motorola)
6071         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6073         ;;
6074     esac
6075     runpath_var='LD_RUN_PATH'
6076     hardcode_shlibpath_var=no
6077     ;;
6078
6079   sysv4.3*)
6080     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6081     hardcode_shlibpath_var=no
6082     export_dynamic_flag_spec='-Bexport'
6083     ;;
6084
6085   sysv5*)
6086     no_undefined_flag=' -z text'
6087     # $CC -shared without GNU ld will not create a library from C++
6088     # object files and a static libstdc++, better avoid it by now
6089     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6090     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6091                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6092     hardcode_libdir_flag_spec=
6093     hardcode_shlibpath_var=no
6094     runpath_var='LD_RUN_PATH'
6095     ;;
6096
6097   uts4*)
6098     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6099     hardcode_libdir_flag_spec='-L$libdir'
6100     hardcode_shlibpath_var=no
6101     ;;
6102
6103   dgux*)
6104     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6105     hardcode_libdir_flag_spec='-L$libdir'
6106     hardcode_shlibpath_var=no
6107     ;;
6108
6109   sysv4*MP*)
6110     if test -d /usr/nec; then
6111       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6112       hardcode_shlibpath_var=no
6113       runpath_var=LD_RUN_PATH
6114       hardcode_runpath_var=yes
6115       ld_shlibs=yes
6116     fi
6117     ;;
6118
6119   sysv4.2uw2*)
6120     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6121     hardcode_direct=yes
6122     hardcode_minus_L=no
6123     hardcode_shlibpath_var=no
6124     hardcode_runpath_var=yes
6125     runpath_var=LD_RUN_PATH
6126     ;;
6127
6128   sysv5uw7* | unixware7*)
6129     no_undefined_flag='${wl}-z ${wl}text'
6130     if test "$GCC" = yes; then
6131       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6132     else
6133       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6134     fi
6135     runpath_var='LD_RUN_PATH'
6136     hardcode_shlibpath_var=no
6137     ;;
6138
6139   *)
6140     ld_shlibs=no
6141     ;;
6142   esac
6143 fi
6144 echo "$ac_t""$ld_shlibs" 1>&6
6145 test "$ld_shlibs" = no && can_build_shared=no
6146
6147 # Check hardcoding attributes.
6148 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6149 echo "configure:6150: checking how to hardcode library paths into programs" >&5
6150 hardcode_action=
6151 if test -n "$hardcode_libdir_flag_spec" || \
6152    test -n "$runpath_var"; then
6153
6154   # We can hardcode non-existant directories.
6155   if test "$hardcode_direct" != no &&
6156      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6157      # have to relink, otherwise we might link with an installed library
6158      # when we should be linking with a yet-to-be-installed one
6159      ## test "$hardcode_shlibpath_var" != no &&
6160      test "$hardcode_minus_L" != no; then
6161     # Linking always hardcodes the temporary library directory.
6162     hardcode_action=relink
6163   else
6164     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6165     hardcode_action=immediate
6166   fi
6167 else
6168   # We cannot hardcode anything, or else we can only hardcode existing
6169   # directories.
6170   hardcode_action=unsupported
6171 fi
6172 echo "$ac_t""$hardcode_action" 1>&6
6173
6174 striplib=
6175 old_striplib=
6176 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6177 echo "configure:6178: checking whether stripping libraries is possible" >&5
6178 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6179   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6180   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6181   echo "$ac_t""yes" 1>&6
6182 else
6183   echo "$ac_t""no" 1>&6
6184 fi
6185
6186 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6187 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6188
6189 # PORTME Fill in your ld.so characteristics
6190 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6191 echo "configure:6192: checking dynamic linker characteristics" >&5
6192 library_names_spec=
6193 libname_spec='lib$name'
6194 soname_spec=
6195 postinstall_cmds=
6196 postuninstall_cmds=
6197 finish_cmds=
6198 finish_eval=
6199 shlibpath_var=
6200 shlibpath_overrides_runpath=unknown
6201 version_type=none
6202 dynamic_linker="$host_os ld.so"
6203 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6204 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6205
6206 case $host_os in
6207 aix3*)
6208   version_type=linux
6209   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6210   shlibpath_var=LIBPATH
6211
6212   # AIX has no versioning support, so we append a major version to the name.
6213   soname_spec='${libname}${release}.so$major'
6214   ;;
6215
6216 aix4* | aix5*)
6217   version_type=linux
6218   need_lib_prefix=no
6219   need_version=no
6220   hardcode_into_libs=yes
6221   if test "$host_cpu" = ia64; then
6222     # AIX 5 supports IA64
6223     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6224     shlibpath_var=LD_LIBRARY_PATH
6225   else
6226     # With GCC up to 2.95.x, collect2 would create an import file
6227     # for dependence libraries.  The import file would start with
6228     # the line `#! .'.  This would cause the generated library to
6229     # depend on `.', always an invalid library.  This was fixed in
6230     # development snapshots of GCC prior to 3.0.
6231     case $host_os in
6232       aix4 | aix4.[01] | aix4.[01].*)
6233         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6234              echo ' yes '
6235              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6236           :
6237         else
6238           can_build_shared=no
6239         fi
6240         ;;
6241     esac
6242     # AIX (on Power*) has no versioning support, so currently we can
6243     # not hardcode correct soname into executable. Probably we can
6244     # add versioning support to collect2, so additional links can
6245     # be useful in future.
6246     if test "$aix_use_runtimelinking" = yes; then
6247       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6248       # instead of lib<name>.a to let people know that these are not
6249       # typical AIX shared libraries.
6250       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6251     else
6252       # We preserve .a as extension for shared libraries through AIX4.2
6253       # and later when we are not doing run time linking.
6254       library_names_spec='${libname}${release}.a $libname.a'
6255       soname_spec='${libname}${release}.so$major'
6256     fi
6257     shlibpath_var=LIBPATH
6258   fi
6259   hardcode_into_libs=yes
6260   ;;
6261
6262 amigaos*)
6263   library_names_spec='$libname.ixlibrary $libname.a'
6264   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6265   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'
6266   ;;
6267
6268 beos*)
6269   library_names_spec='${libname}.so'
6270   dynamic_linker="$host_os ld.so"
6271   shlibpath_var=LIBRARY_PATH
6272   ;;
6273
6274 bsdi4*)
6275   version_type=linux
6276   need_version=no
6277   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6278   soname_spec='${libname}${release}.so$major'
6279   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6280   shlibpath_var=LD_LIBRARY_PATH
6281   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6282   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6283   export_dynamic_flag_spec=-rdynamic
6284   # the default ld.so.conf also contains /usr/contrib/lib and
6285   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6286   # libtool to hard-code these into programs
6287   ;;
6288
6289 cygwin* | mingw* | pw32*)
6290   version_type=windows
6291   need_version=no
6292   need_lib_prefix=no
6293   case $GCC,$host_os in
6294   yes,cygwin*)
6295     library_names_spec='$libname.dll.a'
6296     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6297     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6298       dldir=$destdir/`dirname \$dlpath`~
6299       test -d \$dldir || mkdir -p \$dldir~
6300       $install_prog .libs/$dlname \$dldir/$dlname'
6301     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6302       dlpath=$dir/\$dldll~
6303        $rm \$dlpath'
6304     ;;
6305   yes,mingw*)
6306     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6307     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6308     ;;
6309   yes,pw32*)
6310     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6311     ;;
6312   *)
6313     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6314     ;;
6315   esac
6316   dynamic_linker='Win32 ld.exe'
6317   # FIXME: first we should search . and the directory the executable is in
6318   shlibpath_var=PATH
6319   ;;
6320
6321 darwin* | rhapsody*)
6322   dynamic_linker="$host_os dyld"
6323   version_type=darwin
6324   need_lib_prefix=no
6325   need_version=no
6326   # FIXME: Relying on posixy $() will cause problems for
6327   #        cross-compilation, but unfortunately the echo tests do not
6328   #        yet detect zsh echo's removal of \ escapes.
6329   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)'
6330   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6331   shlibpath_overrides_runpath=yes
6332   shlibpath_var=DYLD_LIBRARY_PATH
6333   ;;
6334
6335 freebsd1*)
6336   dynamic_linker=no
6337   ;;
6338
6339 freebsd*)
6340   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6341   version_type=freebsd-$objformat
6342   case $version_type in
6343     freebsd-elf*)
6344       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6345       need_version=no
6346       need_lib_prefix=no
6347       ;;
6348     freebsd-*)
6349       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6350       need_version=yes
6351       ;;
6352   esac
6353   shlibpath_var=LD_LIBRARY_PATH
6354   case $host_os in
6355   freebsd2*)
6356     shlibpath_overrides_runpath=yes
6357     ;;
6358   *)
6359     shlibpath_overrides_runpath=no
6360     hardcode_into_libs=yes
6361     ;;
6362   esac
6363   ;;
6364
6365 gnu*)
6366   version_type=linux
6367   need_lib_prefix=no
6368   need_version=no
6369   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6370   soname_spec='${libname}${release}.so$major'
6371   shlibpath_var=LD_LIBRARY_PATH
6372   hardcode_into_libs=yes
6373   ;;
6374
6375 hpux9* | hpux10* | hpux11*)
6376   # Give a soname corresponding to the major version so that dld.sl refuses to
6377   # link against other versions.
6378   dynamic_linker="$host_os dld.sl"
6379   version_type=sunos
6380   need_lib_prefix=no
6381   need_version=no
6382   shlibpath_var=SHLIB_PATH
6383   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6384   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6385   soname_spec='${libname}${release}.sl$major'
6386   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6387   postinstall_cmds='chmod 555 $lib'
6388   ;;
6389
6390 irix5* | irix6* | nonstopux*)
6391   case $host_os in
6392     nonstopux*) version_type=nonstopux ;;
6393     *)          version_type=irix ;;
6394   esac
6395   need_lib_prefix=no
6396   need_version=no
6397   soname_spec='${libname}${release}.so$major'
6398   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6399   case $host_os in
6400   irix5* | nonstopux*)
6401     libsuff= shlibsuff=
6402     ;;
6403   *)
6404     case $LD in # libtool.m4 will add one of these switches to LD
6405     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6406     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6407     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6408     *) libsuff= shlibsuff= libmagic=never-match;;
6409     esac
6410     ;;
6411   esac
6412   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6413   shlibpath_overrides_runpath=no
6414   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6415   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6416   ;;
6417
6418 # No shared lib support for Linux oldld, aout, or coff.
6419 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6420   dynamic_linker=no
6421   ;;
6422
6423 # This must be Linux ELF.
6424 linux-gnu*)
6425   version_type=linux
6426   need_lib_prefix=no
6427   need_version=no
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6429   soname_spec='${libname}${release}.so$major'
6430   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   shlibpath_overrides_runpath=no
6433   # This implies no fast_install, which is unacceptable.
6434   # Some rework will be needed to allow for fast_install
6435   # before this can be enabled.
6436   hardcode_into_libs=yes
6437
6438   # We used to test for /lib/ld.so.1 and disable shared libraries on
6439   # powerpc, because MkLinux only supported shared libraries with the
6440   # GNU dynamic linker.  Since this was broken with cross compilers,
6441   # most powerpc-linux boxes support dynamic linking these days and
6442   # people can always --disable-shared, the test was removed, and we
6443   # assume the GNU/Linux dynamic linker is in use.
6444   dynamic_linker='GNU/Linux ld.so'
6445   ;;
6446
6447 netbsd*)
6448   version_type=sunos
6449   need_lib_prefix=no
6450   need_version=no
6451   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6452     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6453     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6454     dynamic_linker='NetBSD (a.out) ld.so'
6455   else
6456     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6457     soname_spec='${libname}${release}.so$major'
6458     dynamic_linker='NetBSD ld.elf_so'
6459   fi
6460   shlibpath_var=LD_LIBRARY_PATH
6461   shlibpath_overrides_runpath=yes
6462   hardcode_into_libs=yes
6463   ;;
6464
6465 newsos6)
6466   version_type=linux
6467   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6468   shlibpath_var=LD_LIBRARY_PATH
6469   shlibpath_overrides_runpath=yes
6470   ;;
6471
6472 openbsd*)
6473   version_type=sunos
6474   need_lib_prefix=no
6475   need_version=no
6476   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6477     case "$host_os" in
6478     openbsd2.[89] | openbsd2.[89].*)
6479       shlibpath_overrides_runpath=no
6480       ;;
6481     *)
6482       shlibpath_overrides_runpath=yes
6483       ;;
6484     esac
6485   else
6486     shlibpath_overrides_runpath=yes
6487   fi
6488   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6489   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   ;;
6492
6493 os2*)
6494   libname_spec='$name'
6495   need_lib_prefix=no
6496   library_names_spec='$libname.dll $libname.a'
6497   dynamic_linker='OS/2 ld.exe'
6498   shlibpath_var=LIBPATH
6499   ;;
6500
6501 osf3* | osf4* | osf5*)
6502   version_type=osf
6503   need_version=no
6504   soname_spec='${libname}${release}.so$major'
6505   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6506   shlibpath_var=LD_LIBRARY_PATH
6507   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6508   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6509   hardcode_into_libs=yes
6510   ;;
6511
6512 sco3.2v5*)
6513   version_type=osf
6514   soname_spec='${libname}${release}.so$major'
6515   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   ;;
6518
6519 solaris*)
6520   version_type=linux
6521   need_lib_prefix=no
6522   need_version=no
6523   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6524   soname_spec='${libname}${release}.so$major'
6525   shlibpath_var=LD_LIBRARY_PATH
6526   shlibpath_overrides_runpath=yes
6527   hardcode_into_libs=yes
6528   # ldd complains unless libraries are executable
6529   postinstall_cmds='chmod +x $lib'
6530   ;;
6531
6532 sunos4*)
6533   version_type=sunos
6534   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6535   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6536   shlibpath_var=LD_LIBRARY_PATH
6537   shlibpath_overrides_runpath=yes
6538   if test "$with_gnu_ld" = yes; then
6539     need_lib_prefix=no
6540   fi
6541   need_version=yes
6542   ;;
6543
6544 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6545   version_type=linux
6546   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6547   soname_spec='${libname}${release}.so$major'
6548   shlibpath_var=LD_LIBRARY_PATH
6549   case $host_vendor in
6550     sni)
6551       shlibpath_overrides_runpath=no
6552       need_lib_prefix=no
6553       export_dynamic_flag_spec='${wl}-Blargedynsym'
6554       runpath_var=LD_RUN_PATH
6555       ;;
6556     siemens)
6557       need_lib_prefix=no
6558       ;;
6559     motorola)
6560       need_lib_prefix=no
6561       need_version=no
6562       shlibpath_overrides_runpath=no
6563       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6564       ;;
6565   esac
6566   ;;
6567
6568 uts4*)
6569   version_type=linux
6570   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6571   soname_spec='${libname}${release}.so$major'
6572   shlibpath_var=LD_LIBRARY_PATH
6573   ;;
6574
6575 dgux*)
6576   version_type=linux
6577   need_lib_prefix=no
6578   need_version=no
6579   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6580   soname_spec='${libname}${release}.so$major'
6581   shlibpath_var=LD_LIBRARY_PATH
6582   ;;
6583
6584 sysv4*MP*)
6585   if test -d /usr/nec ;then
6586     version_type=linux
6587     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6588     soname_spec='$libname.so.$major'
6589     shlibpath_var=LD_LIBRARY_PATH
6590   fi
6591   ;;
6592
6593 *)
6594   dynamic_linker=no
6595   ;;
6596 esac
6597 echo "$ac_t""$dynamic_linker" 1>&6
6598 test "$dynamic_linker" = no && can_build_shared=no
6599
6600 # Report the final consequences.
6601 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6602 echo "configure:6603: checking if libtool supports shared libraries" >&5
6603 echo "$ac_t""$can_build_shared" 1>&6
6604
6605 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6606 echo "configure:6607: checking whether to build shared libraries" >&5
6607 test "$can_build_shared" = "no" && enable_shared=no
6608
6609 # On AIX, shared libraries and static libraries use the same namespace, and
6610 # are all built from PIC.
6611 case "$host_os" in
6612 aix3*)
6613   test "$enable_shared" = yes && enable_static=no
6614   if test -n "$RANLIB"; then
6615     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6616     postinstall_cmds='$RANLIB $lib'
6617   fi
6618   ;;
6619
6620 aix4*)
6621   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6622     test "$enable_shared" = yes && enable_static=no
6623   fi
6624   ;;
6625 esac
6626 echo "$ac_t""$enable_shared" 1>&6
6627
6628 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6629 echo "configure:6630: checking whether to build static libraries" >&5
6630 # Make sure either enable_shared or enable_static is yes.
6631 test "$enable_shared" = yes || enable_static=yes
6632 echo "$ac_t""$enable_static" 1>&6
6633
6634 if test "$hardcode_action" = relink; then
6635   # Fast installation is not supported
6636   enable_fast_install=no
6637 elif test "$shlibpath_overrides_runpath" = yes ||
6638      test "$enable_shared" = no; then
6639   # Fast installation is not necessary
6640   enable_fast_install=needless
6641 fi
6642
6643 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6644 if test "$GCC" = yes; then
6645   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6646 fi
6647
6648 if test "x$enable_dlopen" != xyes; then
6649   enable_dlopen=unknown
6650   enable_dlopen_self=unknown
6651   enable_dlopen_self_static=unknown
6652 else
6653   lt_cv_dlopen=no
6654   lt_cv_dlopen_libs=
6655
6656   case $host_os in
6657   beos*)
6658     lt_cv_dlopen="load_add_on"
6659     lt_cv_dlopen_libs=
6660     lt_cv_dlopen_self=yes
6661     ;;
6662
6663   cygwin* | mingw* | pw32*)
6664     lt_cv_dlopen="LoadLibrary"
6665     lt_cv_dlopen_libs=
6666    ;;
6667
6668   *)
6669     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6670 echo "configure:6671: checking for shl_load" >&5
6671 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* System header to define __stub macros and hopefully few prototypes,
6678     which can conflict with char shl_load(); below.  */
6679 #include <assert.h>
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 /* We use char because int might match the return type of a gcc2
6682     builtin and then its argument prototype would still apply.  */
6683 char shl_load();
6684 char (*f)();
6685
6686 int main() {
6687
6688 /* The GNU C library defines this for functions which it implements
6689     to always fail with ENOSYS.  Some functions are actually named
6690     something starting with __ and the normal name is an alias.  */
6691 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6692 choke me
6693 #else
6694 f = shl_load;
6695 #endif
6696
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   eval "ac_cv_func_shl_load=yes"
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   eval "ac_cv_func_shl_load=no"
6707 fi
6708 rm -f conftest*
6709 fi
6710
6711 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="shl_load"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6717 echo "configure:6718: checking for shl_load in -ldld" >&5
6718 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-ldld  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char shl_load();
6731
6732 int main() {
6733 shl_load()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6752 else
6753   echo "$ac_t""no" 1>&6
6754 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6755 echo "configure:6756: checking for dlopen" >&5
6756 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* System header to define __stub macros and hopefully few prototypes,
6763     which can conflict with char dlopen(); below.  */
6764 #include <assert.h>
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char dlopen();
6769 char (*f)();
6770
6771 int main() {
6772
6773 /* The GNU C library defines this for functions which it implements
6774     to always fail with ENOSYS.  Some functions are actually named
6775     something starting with __ and the normal name is an alias.  */
6776 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6777 choke me
6778 #else
6779 f = dlopen;
6780 #endif
6781
6782 ; return 0; }
6783 EOF
6784 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6785   rm -rf conftest*
6786   eval "ac_cv_func_dlopen=yes"
6787 else
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   eval "ac_cv_func_dlopen=no"
6792 fi
6793 rm -f conftest*
6794 fi
6795
6796 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6797   echo "$ac_t""yes" 1>&6
6798   lt_cv_dlopen="dlopen"
6799 else
6800   echo "$ac_t""no" 1>&6
6801 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6802 echo "configure:6803: checking for dlopen in -ldl" >&5
6803 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6805   echo $ac_n "(cached) $ac_c" 1>&6
6806 else
6807   ac_save_LIBS="$LIBS"
6808 LIBS="-ldl  $LIBS"
6809 cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char dlopen();
6816
6817 int main() {
6818 dlopen()
6819 ; return 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=yes"
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_lib_$ac_lib_var=no"
6829 fi
6830 rm -f conftest*
6831 LIBS="$ac_save_LIBS"
6832
6833 fi
6834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6837 else
6838   echo "$ac_t""no" 1>&6
6839 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6840 echo "configure:6841: checking for dlopen in -lsvld" >&5
6841 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6843   echo $ac_n "(cached) $ac_c" 1>&6
6844 else
6845   ac_save_LIBS="$LIBS"
6846 LIBS="-lsvld  $LIBS"
6847 cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char dlopen();
6854
6855 int main() {
6856 dlopen()
6857 ; return 0; }
6858 EOF
6859 if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6860   rm -rf conftest*
6861   eval "ac_cv_lib_$ac_lib_var=yes"
6862 else
6863   echo "configure: failed program was:" >&5
6864   cat conftest.$ac_ext >&5
6865   rm -rf conftest*
6866   eval "ac_cv_lib_$ac_lib_var=no"
6867 fi
6868 rm -f conftest*
6869 LIBS="$ac_save_LIBS"
6870
6871 fi
6872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6873   echo "$ac_t""yes" 1>&6
6874   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6875 else
6876   echo "$ac_t""no" 1>&6
6877 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6878 echo "configure:6879: checking for dld_link in -ldld" >&5
6879 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   ac_save_LIBS="$LIBS"
6884 LIBS="-ldld  $LIBS"
6885 cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 /* We use char because int might match the return type of a gcc2
6890     builtin and then its argument prototype would still apply.  */
6891 char dld_link();
6892
6893 int main() {
6894 dld_link()
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   eval "ac_cv_lib_$ac_lib_var=yes"
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   eval "ac_cv_lib_$ac_lib_var=no"
6905 fi
6906 rm -f conftest*
6907 LIBS="$ac_save_LIBS"
6908
6909 fi
6910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6911   echo "$ac_t""yes" 1>&6
6912   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6913 else
6914   echo "$ac_t""no" 1>&6
6915 fi
6916
6917               
6918 fi
6919
6920             
6921 fi
6922
6923           
6924 fi
6925
6926         
6927 fi
6928
6929       
6930 fi
6931
6932     ;;
6933   esac
6934
6935   if test "x$lt_cv_dlopen" != xno; then
6936     enable_dlopen=yes
6937   else
6938     enable_dlopen=no
6939   fi
6940
6941   case $lt_cv_dlopen in
6942   dlopen)
6943     save_CPPFLAGS="$CPPFLAGS"
6944         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6945
6946     save_LDFLAGS="$LDFLAGS"
6947     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6948
6949     save_LIBS="$LIBS"
6950     LIBS="$lt_cv_dlopen_libs $LIBS"
6951
6952     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6953 echo "configure:6954: checking whether a program can dlopen itself" >&5
6954 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6955   echo $ac_n "(cached) $ac_c" 1>&6
6956 else
6957           if test "$cross_compiling" = yes; then :
6958   lt_cv_dlopen_self=cross
6959 else
6960     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6961   lt_status=$lt_dlunknown
6962   cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965
6966 #if HAVE_DLFCN_H
6967 #include <dlfcn.h>
6968 #endif
6969
6970 #include <stdio.h>
6971
6972 #ifdef RTLD_GLOBAL
6973 #  define LT_DLGLOBAL           RTLD_GLOBAL
6974 #else
6975 #  ifdef DL_GLOBAL
6976 #    define LT_DLGLOBAL         DL_GLOBAL
6977 #  else
6978 #    define LT_DLGLOBAL         0
6979 #  endif
6980 #endif
6981
6982 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6983    find out it does not work in some platform. */
6984 #ifndef LT_DLLAZY_OR_NOW
6985 #  ifdef RTLD_LAZY
6986 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6987 #  else
6988 #    ifdef DL_LAZY
6989 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6990 #    else
6991 #      ifdef RTLD_NOW
6992 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6993 #      else
6994 #        ifdef DL_NOW
6995 #          define LT_DLLAZY_OR_NOW      DL_NOW
6996 #        else
6997 #          define LT_DLLAZY_OR_NOW      0
6998 #        endif
6999 #      endif
7000 #    endif
7001 #  endif
7002 #endif
7003
7004 #ifdef __cplusplus
7005 extern "C" void exit (int);
7006 #endif
7007
7008 void fnord() { int i=42;}
7009 int main ()
7010 {
7011   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7012   int status = $lt_dlunknown;
7013
7014   if (self)
7015     {
7016       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7017       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7018       /* dlclose (self); */
7019     }
7020
7021     exit (status);
7022 }
7023 EOF
7024   if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7025     (./conftest; exit; ) 2>/dev/null
7026     lt_status=$?
7027     case x$lt_status in
7028       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7029       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7030       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7031     esac
7032   else :
7033     # compilation failed
7034     lt_cv_dlopen_self=no
7035   fi
7036 fi
7037 rm -fr conftest*
7038
7039     
7040 fi
7041
7042 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7043
7044     if test "x$lt_cv_dlopen_self" = xyes; then
7045       LDFLAGS="$LDFLAGS $link_static_flag"
7046       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7047 echo "configure:7048: checking whether a statically linked program can dlopen itself" >&5
7048 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051           if test "$cross_compiling" = yes; then :
7052   lt_cv_dlopen_self_static=cross
7053 else
7054     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7055   lt_status=$lt_dlunknown
7056   cat > conftest.$ac_ext <<EOF
7057 #line 7058 "configure"
7058 #include "confdefs.h"
7059
7060 #if HAVE_DLFCN_H
7061 #include <dlfcn.h>
7062 #endif
7063
7064 #include <stdio.h>
7065
7066 #ifdef RTLD_GLOBAL
7067 #  define LT_DLGLOBAL           RTLD_GLOBAL
7068 #else
7069 #  ifdef DL_GLOBAL
7070 #    define LT_DLGLOBAL         DL_GLOBAL
7071 #  else
7072 #    define LT_DLGLOBAL         0
7073 #  endif
7074 #endif
7075
7076 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7077    find out it does not work in some platform. */
7078 #ifndef LT_DLLAZY_OR_NOW
7079 #  ifdef RTLD_LAZY
7080 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7081 #  else
7082 #    ifdef DL_LAZY
7083 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7084 #    else
7085 #      ifdef RTLD_NOW
7086 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7087 #      else
7088 #        ifdef DL_NOW
7089 #          define LT_DLLAZY_OR_NOW      DL_NOW
7090 #        else
7091 #          define LT_DLLAZY_OR_NOW      0
7092 #        endif
7093 #      endif
7094 #    endif
7095 #  endif
7096 #endif
7097
7098 #ifdef __cplusplus
7099 extern "C" void exit (int);
7100 #endif
7101
7102 void fnord() { int i=42;}
7103 int main ()
7104 {
7105   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7106   int status = $lt_dlunknown;
7107
7108   if (self)
7109     {
7110       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7111       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7112       /* dlclose (self); */
7113     }
7114
7115     exit (status);
7116 }
7117 EOF
7118   if { (eval echo configure:7119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7119     (./conftest; exit; ) 2>/dev/null
7120     lt_status=$?
7121     case x$lt_status in
7122       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7123       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7124       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7125     esac
7126   else :
7127     # compilation failed
7128     lt_cv_dlopen_self_static=no
7129   fi
7130 fi
7131 rm -fr conftest*
7132
7133       
7134 fi
7135
7136 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7137     fi
7138
7139     CPPFLAGS="$save_CPPFLAGS"
7140     LDFLAGS="$save_LDFLAGS"
7141     LIBS="$save_LIBS"
7142     ;;
7143   esac
7144
7145   case $lt_cv_dlopen_self in
7146   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7147   *) enable_dlopen_self=unknown ;;
7148   esac
7149
7150   case $lt_cv_dlopen_self_static in
7151   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7152   *) enable_dlopen_self_static=unknown ;;
7153   esac
7154 fi
7155
7156
7157 if test "$enable_shared" = yes && test "$GCC" = yes; then
7158   case $archive_cmds in
7159   *'~'*)
7160     # FIXME: we may have to deal with multi-command sequences.
7161     ;;
7162   '$CC '*)
7163     # Test whether the compiler implicitly links with -lc since on some
7164     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7165     # to ld, don't add -lc before -lgcc.
7166     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7167 echo "configure:7168: checking whether -lc should be explicitly linked in" >&5
7168     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7169   echo $ac_n "(cached) $ac_c" 1>&6
7170 else
7171   $rm conftest*
7172     echo 'static int dummy;' > conftest.$ac_ext
7173
7174     if { (eval echo configure:7175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7175       soname=conftest
7176       lib=conftest
7177       libobjs=conftest.$ac_objext
7178       deplibs=
7179       wl=$lt_cv_prog_cc_wl
7180       compiler_flags=-v
7181       linker_flags=-v
7182       verstring=
7183       output_objdir=.
7184       libname=conftest
7185       save_allow_undefined_flag=$allow_undefined_flag
7186       allow_undefined_flag=
7187       if { (eval echo configure:7188: \"$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; }
7188       then
7189         lt_cv_archive_cmds_need_lc=no
7190       else
7191         lt_cv_archive_cmds_need_lc=yes
7192       fi
7193       allow_undefined_flag=$save_allow_undefined_flag
7194     else
7195       cat conftest.err 1>&5
7196     fi
7197 fi
7198
7199     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7200     ;;
7201   esac
7202 fi
7203 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7204
7205 # The second clause should only fire when bootstrapping the
7206 # libtool distribution, otherwise you forgot to ship ltmain.sh
7207 # with your package, and you will get complaints that there are
7208 # no rules to generate ltmain.sh.
7209 if test -f "$ltmain"; then
7210   :
7211 else
7212   # If there is no Makefile yet, we rely on a make rule to execute
7213   # `config.status --recheck' to rerun these tests and create the
7214   # libtool script then.
7215   test -f Makefile && make "$ltmain"
7216 fi
7217
7218 if test -f "$ltmain"; then
7219   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7220   $rm -f "${ofile}T"
7221
7222   echo creating $ofile
7223
7224   # Now quote all the things that may contain metacharacters while being
7225   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7226   # variables and quote the copies for generation of the libtool script.
7227   for var in echo old_CC old_CFLAGS SED \
7228     AR AR_FLAGS CC LD LN_S NM SHELL \
7229     reload_flag reload_cmds wl \
7230     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7231     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7232     library_names_spec soname_spec \
7233     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7234     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7235     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7236     old_striplib striplib file_magic_cmd export_symbols_cmds \
7237     deplibs_check_method allow_undefined_flag no_undefined_flag \
7238     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7239     global_symbol_to_c_name_address \
7240     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7241     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7242     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7243
7244     case $var in
7245     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7246     old_postinstall_cmds | old_postuninstall_cmds | \
7247     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7248     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7249     postinstall_cmds | postuninstall_cmds | \
7250     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7251       # Double-quote double-evaled strings.
7252       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7253       ;;
7254     *)
7255       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7256       ;;
7257     esac
7258   done
7259
7260   cat <<__EOF__ > "${ofile}T"
7261 #! $SHELL
7262
7263 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7264 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7265 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7266 #
7267 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7268 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7269 #
7270 # This program is free software; you can redistribute it and/or modify
7271 # it under the terms of the GNU General Public License as published by
7272 # the Free Software Foundation; either version 2 of the License, or
7273 # (at your option) any later version.
7274 #
7275 # This program is distributed in the hope that it will be useful, but
7276 # WITHOUT ANY WARRANTY; without even the implied warranty of
7277 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7278 # General Public License for more details.
7279 #
7280 # You should have received a copy of the GNU General Public License
7281 # along with this program; if not, write to the Free Software
7282 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7283 #
7284 # As a special exception to the GNU General Public License, if you
7285 # distribute this file as part of a program that contains a
7286 # configuration script generated by Autoconf, you may include it under
7287 # the same distribution terms that you use for the rest of that program.
7288
7289 # A sed that does not truncate output.
7290 SED=$lt_SED
7291
7292 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7293 Xsed="${SED} -e s/^X//"
7294
7295 # The HP-UX ksh and POSIX shell print the target directory to stdout
7296 # if CDPATH is set.
7297 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7298
7299 # ### BEGIN LIBTOOL CONFIG
7300
7301 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7302
7303 # Shell to use when invoking shell scripts.
7304 SHELL=$lt_SHELL
7305
7306 # Whether or not to build shared libraries.
7307 build_libtool_libs=$enable_shared
7308
7309 # Whether or not to build static libraries.
7310 build_old_libs=$enable_static
7311
7312 # Whether or not to add -lc for building shared libraries.
7313 build_libtool_need_lc=$need_lc
7314
7315 # Whether or not to optimize for fast installation.
7316 fast_install=$enable_fast_install
7317
7318 # The host system.
7319 host_alias=$host_alias
7320 host=$host
7321
7322 # An echo program that does not interpret backslashes.
7323 echo=$lt_echo
7324
7325 # The archiver.
7326 AR=$lt_AR
7327 AR_FLAGS=$lt_AR_FLAGS
7328
7329 # The default C compiler.
7330 CC=$lt_CC
7331
7332 # Is the compiler the GNU C compiler?
7333 with_gcc=$GCC
7334
7335 # The linker used to build libraries.
7336 LD=$lt_LD
7337
7338 # Whether we need hard or soft links.
7339 LN_S=$lt_LN_S
7340
7341 # A BSD-compatible nm program.
7342 NM=$lt_NM
7343
7344 # A symbol stripping program
7345 STRIP=$STRIP
7346
7347 # Used to examine libraries when file_magic_cmd begins "file"
7348 MAGIC_CMD=$MAGIC_CMD
7349
7350 # Used on cygwin: DLL creation program.
7351 DLLTOOL="$DLLTOOL"
7352
7353 # Used on cygwin: object dumper.
7354 OBJDUMP="$OBJDUMP"
7355
7356 # Used on cygwin: assembler.
7357 AS="$AS"
7358
7359 # The name of the directory that contains temporary libtool files.
7360 objdir=$objdir
7361
7362 # How to create reloadable object files.
7363 reload_flag=$lt_reload_flag
7364 reload_cmds=$lt_reload_cmds
7365
7366 # How to pass a linker flag through the compiler.
7367 wl=$lt_wl
7368
7369 # Object file suffix (normally "o").
7370 objext="$ac_objext"
7371
7372 # Old archive suffix (normally "a").
7373 libext="$libext"
7374
7375 # Executable file suffix (normally "").
7376 exeext="$exeext"
7377
7378 # Additional compiler flags for building library objects.
7379 pic_flag=$lt_pic_flag
7380 pic_mode=$pic_mode
7381
7382 # Does compiler simultaneously support -c and -o options?
7383 compiler_c_o=$lt_compiler_c_o
7384
7385 # Can we write directly to a .lo ?
7386 compiler_o_lo=$lt_compiler_o_lo
7387
7388 # Must we lock files when doing compilation ?
7389 need_locks=$lt_need_locks
7390
7391 # Do we need the lib prefix for modules?
7392 need_lib_prefix=$need_lib_prefix
7393
7394 # Do we need a version for libraries?
7395 need_version=$need_version
7396
7397 # Whether dlopen is supported.
7398 dlopen_support=$enable_dlopen
7399
7400 # Whether dlopen of programs is supported.
7401 dlopen_self=$enable_dlopen_self
7402
7403 # Whether dlopen of statically linked programs is supported.
7404 dlopen_self_static=$enable_dlopen_self_static
7405
7406 # Compiler flag to prevent dynamic linking.
7407 link_static_flag=$lt_link_static_flag
7408
7409 # Compiler flag to turn off builtin functions.
7410 no_builtin_flag=$lt_no_builtin_flag
7411
7412 # Compiler flag to allow reflexive dlopens.
7413 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7414
7415 # Compiler flag to generate shared objects directly from archives.
7416 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7417
7418 # Compiler flag to generate thread-safe objects.
7419 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7420
7421 # Library versioning type.
7422 version_type=$version_type
7423
7424 # Format of library name prefix.
7425 libname_spec=$lt_libname_spec
7426
7427 # List of archive names.  First name is the real one, the rest are links.
7428 # The last name is the one that the linker finds with -lNAME.
7429 library_names_spec=$lt_library_names_spec
7430
7431 # The coded name of the library, if different from the real name.
7432 soname_spec=$lt_soname_spec
7433
7434 # Commands used to build and install an old-style archive.
7435 RANLIB=$lt_RANLIB
7436 old_archive_cmds=$lt_old_archive_cmds
7437 old_postinstall_cmds=$lt_old_postinstall_cmds
7438 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7439
7440 # Create an old-style archive from a shared archive.
7441 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7442
7443 # Create a temporary old-style archive to link instead of a shared archive.
7444 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7445
7446 # Commands used to build and install a shared archive.
7447 archive_cmds=$lt_archive_cmds
7448 archive_expsym_cmds=$lt_archive_expsym_cmds
7449 postinstall_cmds=$lt_postinstall_cmds
7450 postuninstall_cmds=$lt_postuninstall_cmds
7451
7452 # Commands to strip libraries.
7453 old_striplib=$lt_old_striplib
7454 striplib=$lt_striplib
7455
7456 # Method to check whether dependent libraries are shared objects.
7457 deplibs_check_method=$lt_deplibs_check_method
7458
7459 # Command to use when deplibs_check_method == file_magic.
7460 file_magic_cmd=$lt_file_magic_cmd
7461
7462 # Flag that allows shared libraries with undefined symbols to be built.
7463 allow_undefined_flag=$lt_allow_undefined_flag
7464
7465 # Flag that forces no undefined symbols.
7466 no_undefined_flag=$lt_no_undefined_flag
7467
7468 # Commands used to finish a libtool library installation in a directory.
7469 finish_cmds=$lt_finish_cmds
7470
7471 # Same as above, but a single script fragment to be evaled but not shown.
7472 finish_eval=$lt_finish_eval
7473
7474 # Take the output of nm and produce a listing of raw symbols and C names.
7475 global_symbol_pipe=$lt_global_symbol_pipe
7476
7477 # Transform the output of nm in a proper C declaration
7478 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7479
7480 # Transform the output of nm in a C name address pair
7481 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7482
7483 # This is the shared library runtime path variable.
7484 runpath_var=$runpath_var
7485
7486 # This is the shared library path variable.
7487 shlibpath_var=$shlibpath_var
7488
7489 # Is shlibpath searched before the hard-coded library search path?
7490 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7491
7492 # How to hardcode a shared library path into an executable.
7493 hardcode_action=$hardcode_action
7494
7495 # Whether we should hardcode library paths into libraries.
7496 hardcode_into_libs=$hardcode_into_libs
7497
7498 # Flag to hardcode \$libdir into a binary during linking.
7499 # This must work even if \$libdir does not exist.
7500 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7501
7502 # Whether we need a single -rpath flag with a separated argument.
7503 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7504
7505 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7506 # resulting binary.
7507 hardcode_direct=$hardcode_direct
7508
7509 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7510 # resulting binary.
7511 hardcode_minus_L=$hardcode_minus_L
7512
7513 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7514 # the resulting binary.
7515 hardcode_shlibpath_var=$hardcode_shlibpath_var
7516
7517 # Variables whose values should be saved in libtool wrapper scripts and
7518 # restored at relink time.
7519 variables_saved_for_relink="$variables_saved_for_relink"
7520
7521 # Whether libtool must link a program against all its dependency libraries.
7522 link_all_deplibs=$link_all_deplibs
7523
7524 # Compile-time system search path for libraries
7525 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7526
7527 # Run-time system search path for libraries
7528 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7529
7530 # Fix the shell variable \$srcfile for the compiler.
7531 fix_srcfile_path="$fix_srcfile_path"
7532
7533 # Set to yes if exported symbols are required.
7534 always_export_symbols=$always_export_symbols
7535
7536 # The commands to list exported symbols.
7537 export_symbols_cmds=$lt_export_symbols_cmds
7538
7539 # The commands to extract the exported symbol list from a shared archive.
7540 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7541
7542 # Symbols that should not be listed in the preloaded symbols.
7543 exclude_expsyms=$lt_exclude_expsyms
7544
7545 # Symbols that must always be exported.
7546 include_expsyms=$lt_include_expsyms
7547
7548 # ### END LIBTOOL CONFIG
7549
7550 __EOF__
7551
7552   case $host_os in
7553   aix3*)
7554     cat <<\EOF >> "${ofile}T"
7555
7556 # AIX sometimes has problems with the GCC collect2 program.  For some
7557 # reason, if we set the COLLECT_NAMES environment variable, the problems
7558 # vanish in a puff of smoke.
7559 if test "X${COLLECT_NAMES+set}" != Xset; then
7560   COLLECT_NAMES=
7561   export COLLECT_NAMES
7562 fi
7563 EOF
7564     ;;
7565   esac
7566
7567   case $host_os in
7568   cygwin* | mingw* | pw32* | os2*)
7569     cat <<'EOF' >> "${ofile}T"
7570       # This is a source program that is used to create dlls on Windows
7571       # Don't remove nor modify the starting and closing comments
7572 # /* ltdll.c starts here */
7573 # #define WIN32_LEAN_AND_MEAN
7574 # #include <windows.h>
7575 # #undef WIN32_LEAN_AND_MEAN
7576 # #include <stdio.h>
7577 #
7578 # #ifndef __CYGWIN__
7579 # #  ifdef __CYGWIN32__
7580 # #    define __CYGWIN__ __CYGWIN32__
7581 # #  endif
7582 # #endif
7583 #
7584 # #ifdef __cplusplus
7585 # extern "C" {
7586 # #endif
7587 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7588 # #ifdef __cplusplus
7589 # }
7590 # #endif
7591 #
7592 # #ifdef __CYGWIN__
7593 # #include <cygwin/cygwin_dll.h>
7594 # DECLARE_CYGWIN_DLL( DllMain );
7595 # #endif
7596 # HINSTANCE __hDllInstance_base;
7597 #
7598 # BOOL APIENTRY
7599 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7600 # {
7601 #   __hDllInstance_base = hInst;
7602 #   return TRUE;
7603 # }
7604 # /* ltdll.c ends here */
7605         # This is a source program that is used to create import libraries
7606         # on Windows for dlls which lack them. Don't remove nor modify the
7607         # starting and closing comments
7608 # /* impgen.c starts here */
7609 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7610 #
7611 #  This file is part of GNU libtool.
7612 #
7613 #  This program is free software; you can redistribute it and/or modify
7614 #  it under the terms of the GNU General Public License as published by
7615 #  the Free Software Foundation; either version 2 of the License, or
7616 #  (at your option) any later version.
7617 #
7618 #  This program is distributed in the hope that it will be useful,
7619 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7620 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7621 #  GNU General Public License for more details.
7622 #
7623 #  You should have received a copy of the GNU General Public License
7624 #  along with this program; if not, write to the Free Software
7625 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7626 #  */
7627 #
7628 # #include <stdio.h>            /* for printf() */
7629 # #include <unistd.h>           /* for open(), lseek(), read() */
7630 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7631 # #include <string.h>           /* for strdup() */
7632 #
7633 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7634 # #ifndef O_BINARY
7635 # #define O_BINARY 0
7636 # #endif
7637 #
7638 # static unsigned int
7639 # pe_get16 (fd, offset)
7640 #      int fd;
7641 #      int offset;
7642 # {
7643 #   unsigned char b[2];
7644 #   lseek (fd, offset, SEEK_SET);
7645 #   read (fd, b, 2);
7646 #   return b[0] + (b[1]<<8);
7647 # }
7648 #
7649 # static unsigned int
7650 # pe_get32 (fd, offset)
7651 #     int fd;
7652 #     int offset;
7653 # {
7654 #   unsigned char b[4];
7655 #   lseek (fd, offset, SEEK_SET);
7656 #   read (fd, b, 4);
7657 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7658 # }
7659 #
7660 # static unsigned int
7661 # pe_as32 (ptr)
7662 #      void *ptr;
7663 # {
7664 #   unsigned char *b = ptr;
7665 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7666 # }
7667 #
7668 # int
7669 # main (argc, argv)
7670 #     int argc;
7671 #     char *argv[];
7672 # {
7673 #     int dll;
7674 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7675 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7676 #     unsigned long name_rvas, nexp;
7677 #     unsigned char *expdata, *erva;
7678 #     char *filename, *dll_name;
7679 #
7680 #     filename = argv[1];
7681 #
7682 #     dll = open(filename, O_RDONLY|O_BINARY);
7683 #     if (dll < 1)
7684 #       return 1;
7685 #
7686 #     dll_name = filename;
7687 #
7688 #     for (i=0; filename[i]; i++)
7689 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7690 #           dll_name = filename + i +1;
7691 #
7692 #     pe_header_offset = pe_get32 (dll, 0x3c);
7693 #     opthdr_ofs = pe_header_offset + 4 + 20;
7694 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7695 #
7696 #     if (num_entries < 1) /* no exports */
7697 #       return 1;
7698 #
7699 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7700 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7701 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7702 #     secptr = (pe_header_offset + 4 + 20 +
7703 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7704 #
7705 #     expptr = 0;
7706 #     for (i = 0; i < nsections; i++)
7707 #     {
7708 #       char sname[8];
7709 #       unsigned long secptr1 = secptr + 40 * i;
7710 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7711 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7712 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7713 #       lseek(dll, secptr1, SEEK_SET);
7714 #       read(dll, sname, 8);
7715 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7716 #       {
7717 #           expptr = fptr + (export_rva - vaddr);
7718 #           if (export_rva + export_size > vaddr + vsize)
7719 #               export_size = vsize - (export_rva - vaddr);
7720 #           break;
7721 #       }
7722 #     }
7723 #
7724 #     expdata = (unsigned char*)malloc(export_size);
7725 #     lseek (dll, expptr, SEEK_SET);
7726 #     read (dll, expdata, export_size);
7727 #     erva = expdata - export_rva;
7728 #
7729 #     nexp = pe_as32 (expdata+24);
7730 #     name_rvas = pe_as32 (expdata+32);
7731 #
7732 #     printf ("EXPORTS\n");
7733 #     for (i = 0; i<nexp; i++)
7734 #     {
7735 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7736 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7737 #     }
7738 #
7739 #     return 0;
7740 # }
7741 # /* impgen.c ends here */
7742
7743 EOF
7744     ;;
7745   esac
7746
7747   # We use sed instead of cat because bash on DJGPP gets confused if
7748   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7749   # text mode, it properly converts lines to CR/LF.  This bash problem
7750   # is reportedly fixed, but why not run on old versions too?
7751   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7752
7753   mv -f "${ofile}T" "$ofile" || \
7754     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7755   chmod +x "$ofile"
7756 fi
7757
7758
7759
7760
7761
7762 # This can be used to rebuild libtool when needed
7763 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7764
7765 # Always use our own libtool.
7766 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7767
7768 # Prevent multiple expansion
7769
7770
7771
7772 # test for ln hardlink support
7773 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7774 echo "configure:7775: checking whether ln works" >&5
7775 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7776   echo $ac_n "(cached) $ac_c" 1>&6
7777 else
7778   rm -f conftest.src conftest.dst
7779 echo "conftest" > conftest.src
7780 if ln conftest.src conftest.dst 2>/dev/null
7781 then
7782   ol_cv_prog_LN_H="ln"
7783 else
7784   ol_cv_prog_LN_H="cp"
7785 fi
7786 rm -f conftest.src conftest.dst
7787
7788 fi
7789 LN_H="$ol_cv_prog_LN_H"
7790 if test "$ol_cv_prog_LN_H" = "ln"; then
7791         echo "$ac_t""yes" 1>&6
7792 else
7793         echo "$ac_t""no" 1>&6
7794 fi
7795
7796 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7797 echo "configure:7798: checking whether ln -s works" >&5
7798 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7799   echo $ac_n "(cached) $ac_c" 1>&6
7800 else
7801   rm -f conftestdata
7802 if ln -s X conftestdata 2>/dev/null
7803 then
7804   rm -f conftestdata
7805   ac_cv_prog_LN_S="ln -s"
7806 else
7807   ac_cv_prog_LN_S=ln
7808 fi
7809 fi
7810 LN_S="$ac_cv_prog_LN_S"
7811 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7812   echo "$ac_t""yes" 1>&6
7813 else
7814   echo "$ac_t""no" 1>&6
7815 fi
7816
7817
7818 ol_link_perl=no
7819 if test $ol_enable_perl != no ; then
7820         # Extract the first word of "perl", so it can be a program name with args.
7821 set dummy perl; ac_word=$2
7822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7823 echo "configure:7824: checking for $ac_word" >&5
7824 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   case "$PERLBIN" in
7828   /*)
7829   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7830   ;;
7831   ?:/*)
7832   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7833   ;;
7834   *)
7835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7836   ac_dummy="$PATH"
7837   for ac_dir in $ac_dummy; do 
7838     test -z "$ac_dir" && ac_dir=.
7839     if test -f $ac_dir/$ac_word; then
7840       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7841       break
7842     fi
7843   done
7844   IFS="$ac_save_ifs"
7845   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7846   ;;
7847 esac
7848 fi
7849 PERLBIN="$ac_cv_path_PERLBIN"
7850 if test -n "$PERLBIN"; then
7851   echo "$ac_t""$PERLBIN" 1>&6
7852 else
7853   echo "$ac_t""no" 1>&6
7854 fi
7855
7856
7857         if test "no$PERLBIN" = "no" ; then
7858                 if test $ol_enable_perl = yes ; then
7859                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7860                 fi
7861
7862         else
7863                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7864                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7865
7866                 if test x"$ol_with_perl_module" = "xstatic" ; then
7867                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7868                 else
7869                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7870                 fi
7871                                 ol_link_perl=yes
7872         fi
7873 fi
7874
7875 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7876 echo "configure:7877: checking how to run the C preprocessor" >&5
7877 # On Suns, sometimes $CPP names a directory.
7878 if test -n "$CPP" && test -d "$CPP"; then
7879   CPP=
7880 fi
7881 if test -z "$CPP"; then
7882 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7883   echo $ac_n "(cached) $ac_c" 1>&6
7884 else
7885     # This must be in double quotes, not single quotes, because CPP may get
7886   # substituted into the Makefile and "${CC-cc}" will confuse make.
7887   CPP="${CC-cc} -E"
7888   # On the NeXT, cc -E runs the code through the compiler's parser,
7889   # not just through cpp.
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 #include <assert.h>
7894 Syntax Error
7895 EOF
7896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7897 { (eval echo configure:7898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7899 if test -z "$ac_err"; then
7900   :
7901 else
7902   echo "$ac_err" >&5
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   CPP="${CC-cc} -E -traditional-cpp"
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 #include <assert.h>
7911 Syntax Error
7912 EOF
7913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7914 { (eval echo configure:7915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7916 if test -z "$ac_err"; then
7917   :
7918 else
7919   echo "$ac_err" >&5
7920   echo "configure: failed program was:" >&5
7921   cat conftest.$ac_ext >&5
7922   rm -rf conftest*
7923   CPP="${CC-cc} -nologo -E"
7924   cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 #include <assert.h>
7928 Syntax Error
7929 EOF
7930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7931 { (eval echo configure:7932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7933 if test -z "$ac_err"; then
7934   :
7935 else
7936   echo "$ac_err" >&5
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -rf conftest*
7940   CPP=/lib/cpp
7941 fi
7942 rm -f conftest*
7943 fi
7944 rm -f conftest*
7945 fi
7946 rm -f conftest*
7947   ac_cv_prog_CPP="$CPP"
7948 fi
7949   CPP="$ac_cv_prog_CPP"
7950 else
7951   ac_cv_prog_CPP="$CPP"
7952 fi
7953 echo "$ac_t""$CPP" 1>&6
7954
7955
7956 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7957         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7958
7959 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7960         echo "configure: warning: programs compiled here do run here..." 1>&2
7961         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7962
7963 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7964         echo "configure: warning: programs compiled here do not run here..." 1>&2
7965         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7966 fi
7967
7968
7969 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7970 echo "configure:7971: checking for Cygwin environment" >&5
7971 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7972   echo $ac_n "(cached) $ac_c" 1>&6
7973 else
7974   cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977
7978 int main() {
7979
7980 #ifndef __CYGWIN__
7981 #define __CYGWIN__ __CYGWIN32__
7982 #endif
7983 return __CYGWIN__;
7984 ; return 0; }
7985 EOF
7986 if { (eval echo configure:7987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7987   rm -rf conftest*
7988   ac_cv_cygwin=yes
7989 else
7990   echo "configure: failed program was:" >&5
7991   cat conftest.$ac_ext >&5
7992   rm -rf conftest*
7993   ac_cv_cygwin=no
7994 fi
7995 rm -f conftest*
7996 fi
7997
7998 echo "$ac_t""$ac_cv_cygwin" 1>&6
7999 CYGWIN=
8000 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8001 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8002 echo "configure:8003: checking for mingw32 environment" >&5
8003 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8004   echo $ac_n "(cached) $ac_c" 1>&6
8005 else
8006   cat > conftest.$ac_ext <<EOF
8007 #line 8008 "configure"
8008 #include "confdefs.h"
8009
8010 int main() {
8011 return __MINGW32__;
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8015   rm -rf conftest*
8016   ac_cv_mingw32=yes
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020   rm -rf conftest*
8021   ac_cv_mingw32=no
8022 fi
8023 rm -f conftest*
8024 fi
8025
8026 echo "$ac_t""$ac_cv_mingw32" 1>&6
8027 MINGW32=
8028 test "$ac_cv_mingw32" = yes && MINGW32=yes
8029
8030
8031
8032 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8033 echo "configure:8034: checking for executable suffix" >&5
8034 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8035   echo $ac_n "(cached) $ac_c" 1>&6
8036 else
8037   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8038   ac_cv_exeext=.exe
8039 else
8040   rm -f conftest*
8041   echo 'int main () { return 0; }' > conftest.$ac_ext
8042   ac_cv_exeext=
8043   if { (eval echo configure:8044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8044     for file in conftest.*; do
8045       case $file in
8046       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8047       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8048       esac
8049     done
8050   else
8051     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8052   fi
8053   rm -f conftest*
8054   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8055 fi
8056 fi
8057
8058 EXEEXT=""
8059 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8060 echo "$ac_t""${ac_cv_exeext}" 1>&6
8061 ac_exeext=$EXEEXT
8062
8063 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8064 echo "configure:8065: checking for object suffix" >&5
8065 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8066   echo $ac_n "(cached) $ac_c" 1>&6
8067 else
8068   rm -f conftest*
8069 echo 'int i = 1;' > conftest.$ac_ext
8070 if { (eval echo configure:8071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8071   for ac_file in conftest.*; do
8072     case $ac_file in
8073     *.c) ;;
8074     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8075     esac
8076   done
8077 else
8078   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8079 fi
8080 rm -f conftest*
8081 fi
8082
8083 echo "$ac_t""$ac_cv_objext" 1>&6
8084 OBJEXT=$ac_cv_objext
8085 ac_objext=$ac_cv_objext
8086
8087
8088 cat >> confdefs.h <<EOF
8089 #define EXEEXT "${EXEEXT}"
8090 EOF
8091
8092
8093 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8094 echo "configure:8095: checking for be_app in -lbe" >&5
8095 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8097   echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099   ac_save_LIBS="$LIBS"
8100 LIBS="-lbe -lroot -lnet $LIBS"
8101 cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 /* Override any gcc2 internal prototype to avoid an error.  */
8105 /* We use char because int might match the return type of a gcc2
8106     builtin and then its argument prototype would still apply.  */
8107 char be_app();
8108
8109 int main() {
8110 be_app()
8111 ; return 0; }
8112 EOF
8113 if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8114   rm -rf conftest*
8115   eval "ac_cv_lib_$ac_lib_var=yes"
8116 else
8117   echo "configure: failed program was:" >&5
8118   cat conftest.$ac_ext >&5
8119   rm -rf conftest*
8120   eval "ac_cv_lib_$ac_lib_var=no"
8121 fi
8122 rm -f conftest*
8123 LIBS="$ac_save_LIBS"
8124
8125 fi
8126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8127   echo "$ac_t""yes" 1>&6
8128   LIBS="$LIBS -lbe -lroot -lnet"
8129 else
8130   echo "$ac_t""no" 1>&6
8131 :
8132 fi
8133
8134
8135
8136
8137
8138 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8139 echo "configure:8140: checking for ${CC-cc} option to accept ANSI C" >&5
8140 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   am_cv_prog_cc_stdc=no
8144 ac_save_CC="$CC"
8145 # Don't try gcc -ansi; that turns off useful extensions and
8146 # breaks some systems' header files.
8147 # AIX                   -qlanglvl=ansi
8148 # Ultrix and OSF/1      -std1
8149 # HP-UX 10.20 and later -Ae
8150 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8151 # SVR4                  -Xc -D__EXTENSIONS__
8152 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8153 do
8154   CC="$ac_save_CC $ac_arg"
8155   cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 #include <stdarg.h>
8159 #include <stdio.h>
8160 #include <sys/types.h>
8161 #include <sys/stat.h>
8162 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8163 struct buf { int x; };
8164 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8165 static char *e (p, i)
8166      char **p;
8167      int i;
8168 {
8169   return p[i];
8170 }
8171 static char *f (char * (*g) (char **, int), char **p, ...)
8172 {
8173   char *s;
8174   va_list v;
8175   va_start (v,p);
8176   s = g (p, va_arg (v,int));
8177   va_end (v);
8178   return s;
8179 }
8180 int test (int i, double x);
8181 struct s1 {int (*f) (int a);};
8182 struct s2 {int (*f) (double a);};
8183 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8184 int argc;
8185 char **argv;
8186
8187 int main() {
8188
8189 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8190
8191 ; return 0; }
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8194   rm -rf conftest*
8195   am_cv_prog_cc_stdc="$ac_arg"; break
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199 fi
8200 rm -f conftest*
8201 done
8202 CC="$ac_save_CC"
8203
8204 fi
8205
8206 if test -z "$am_cv_prog_cc_stdc"; then
8207   echo "$ac_t""none needed" 1>&6
8208 else
8209   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8210 fi
8211 case "x$am_cv_prog_cc_stdc" in
8212   x|xno) ;;
8213   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8214 esac
8215
8216 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8217         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8218 fi
8219
8220 # test for make depend flag
8221 OL_MKDEP=
8222 OL_MKDEP_FLAGS=
8223 if test -z "${MKDEP}"; then
8224         OL_MKDEP="${CC-cc}"
8225         if test -z "${MKDEP_FLAGS}"; then
8226                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8227 echo "configure:8228: checking for ${OL_MKDEP} depend flag" >&5
8228 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8229   echo $ac_n "(cached) $ac_c" 1>&6
8230 else
8231   
8232                         ol_cv_mkdep=no
8233                         for flag in "-M" "-xM"; do
8234                                 cat > conftest.c <<EOF
8235  noCode;
8236 EOF
8237                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8238                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8239                                 then
8240                                         if test ! -f conftest."${ac_object}" ; then
8241                                                 ol_cv_mkdep=$flag
8242                                                 OL_MKDEP_FLAGS="$flag"
8243                                                 break
8244                                         fi
8245                                 fi
8246                         done
8247                         rm -f conftest*
8248                 
8249 fi
8250
8251 echo "$ac_t""$ol_cv_mkdep" 1>&6
8252         else
8253                 cc_cv_mkdep=yes
8254                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8255         fi
8256 else
8257         cc_cv_mkdep=yes
8258         OL_MKDEP="${MKDEP}"
8259         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8260 fi
8261
8262
8263
8264 if test "${ol_cv_mkdep}" = no ; then
8265         # this will soon become an error
8266         echo "configure: warning: do not know how to generate dependencies" 1>&2
8267 fi
8268
8269 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8270 echo "configure:8271: checking for afopen in -ls" >&5
8271 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   ac_save_LIBS="$LIBS"
8276 LIBS="-ls  $LIBS"
8277 cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* Override any gcc2 internal prototype to avoid an error.  */
8281 /* We use char because int might match the return type of a gcc2
8282     builtin and then its argument prototype would still apply.  */
8283 char afopen();
8284
8285 int main() {
8286 afopen()
8287 ; return 0; }
8288 EOF
8289 if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8290   rm -rf conftest*
8291   eval "ac_cv_lib_$ac_lib_var=yes"
8292 else
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -rf conftest*
8296   eval "ac_cv_lib_$ac_lib_var=no"
8297 fi
8298 rm -f conftest*
8299 LIBS="$ac_save_LIBS"
8300
8301 fi
8302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304   
8305         AUTH_LIBS=-ls
8306         cat >> confdefs.h <<\EOF
8307 #define HAVE_AIX_SECURITY 1
8308 EOF
8309
8310
8311 else
8312   echo "$ac_t""no" 1>&6
8313 fi
8314
8315
8316 case "$target" in
8317 *-ibm-openedition)
8318         ac_cv_func_getopt=no
8319         cat >> confdefs.h <<\EOF
8320 #define BOTH_STRINGS_H 1
8321 EOF
8322
8323         ;;
8324 esac
8325
8326 ol_link_modules=no
8327 if test $ol_enable_modules != no ; then
8328         for ac_hdr in ltdl.h
8329 do
8330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8332 echo "configure:8333: checking for $ac_hdr" >&5
8333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8334   echo $ac_n "(cached) $ac_c" 1>&6
8335 else
8336   cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 #include <$ac_hdr>
8340 EOF
8341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8342 { (eval echo configure:8343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8344 if test -z "$ac_err"; then
8345   rm -rf conftest*
8346   eval "ac_cv_header_$ac_safe=yes"
8347 else
8348   echo "$ac_err" >&5
8349   echo "configure: failed program was:" >&5
8350   cat conftest.$ac_ext >&5
8351   rm -rf conftest*
8352   eval "ac_cv_header_$ac_safe=no"
8353 fi
8354 rm -f conftest*
8355 fi
8356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8357   echo "$ac_t""yes" 1>&6
8358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8359   cat >> confdefs.h <<EOF
8360 #define $ac_tr_hdr 1
8361 EOF
8362  
8363 else
8364   echo "$ac_t""no" 1>&6
8365 fi
8366 done
8367
8368
8369         if test $ac_cv_header_ltdl_h = no ; then
8370                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8371         fi
8372
8373         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8374 echo "configure:8375: checking for lt_dlinit in -lltdl" >&5
8375 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8377   echo $ac_n "(cached) $ac_c" 1>&6
8378 else
8379   ac_save_LIBS="$LIBS"
8380 LIBS="-lltdl  $LIBS"
8381 cat > conftest.$ac_ext <<EOF
8382 #line 8383 "configure"
8383 #include "confdefs.h"
8384 /* Override any gcc2 internal prototype to avoid an error.  */
8385 /* We use char because int might match the return type of a gcc2
8386     builtin and then its argument prototype would still apply.  */
8387 char lt_dlinit();
8388
8389 int main() {
8390 lt_dlinit()
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   eval "ac_cv_lib_$ac_lib_var=yes"
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   eval "ac_cv_lib_$ac_lib_var=no"
8401 fi
8402 rm -f conftest*
8403 LIBS="$ac_save_LIBS"
8404
8405 fi
8406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8407   echo "$ac_t""yes" 1>&6
8408   
8409                 MODULES_LIBS=-lltdl
8410                 cat >> confdefs.h <<\EOF
8411 #define HAVE_LIBLTDL 1
8412 EOF
8413
8414         
8415 else
8416   echo "$ac_t""no" 1>&6
8417 fi
8418
8419
8420         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8421                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8422         fi
8423         ol_link_modules=yes
8424 else
8425         ol_with_bdb_module=static
8426         ol_with_dnssrv_module=static
8427         ol_with_hdb_module=static
8428         ol_with_ldap_module=static
8429         ol_with_ldbm_module=static
8430         ol_with_meta_module=static
8431         ol_with_monitor_module=static
8432         ol_with_null_module=static
8433         ol_with_passwd_module=static
8434         ol_with_perl_module=static
8435         ol_with_shell_module=static
8436         ol_with_sql_module=static
8437         if test $ol_with_dyngroup = mod ; then
8438                 echo "configure: warning: building static dyngroup overlay" 1>&2
8439                 ol_with_dyngroup = yes
8440         fi
8441         if test $ol_with_proxycache = mod ; then
8442                 echo "configure: warning: building static proxycache overlay" 1>&2
8443                 ol_with_proxycache = yes
8444         fi
8445 fi
8446
8447 # test for EBCDIC
8448 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8449 echo "configure:8450: checking for EBCDIC" >&5
8450 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   
8454         cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457
8458 #if !('M' == 0xd4)
8459 #include <__ASCII__/generate_error.h>
8460 #endif
8461
8462 EOF
8463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8464 { (eval echo configure:8465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8466 if test -z "$ac_err"; then
8467   rm -rf conftest*
8468   ol_cv_cpp_ebcdic=yes
8469 else
8470   echo "$ac_err" >&5
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -rf conftest*
8474   ol_cv_cpp_ebcdic=no
8475 fi
8476 rm -f conftest*
8477 fi
8478
8479 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8480 if test $ol_cv_cpp_ebcdic = yes ; then
8481         cat >> confdefs.h <<\EOF
8482 #define HAVE_EBCDIC 1
8483 EOF
8484
8485 fi
8486
8487 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8488 echo "configure:8489: checking for ANSI C header files" >&5
8489 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8490   echo $ac_n "(cached) $ac_c" 1>&6
8491 else
8492   cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <stdlib.h>
8496 #include <stdarg.h>
8497 #include <string.h>
8498 #include <float.h>
8499 EOF
8500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8501 { (eval echo configure:8502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8503 if test -z "$ac_err"; then
8504   rm -rf conftest*
8505   ol_cv_header_stdc=yes
8506 else
8507   echo "$ac_err" >&5
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -rf conftest*
8511   ol_cv_header_stdc=no
8512 fi
8513 rm -f conftest*
8514
8515 if test $ol_cv_header_stdc = yes; then
8516   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <string.h>
8521 EOF
8522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8523   egrep "memchr" >/dev/null 2>&1; then
8524   :
8525 else
8526   rm -rf conftest*
8527   ol_cv_header_stdc=no
8528 fi
8529 rm -f conftest*
8530
8531 fi
8532
8533 if test $ol_cv_header_stdc = yes; then
8534   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8535 cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <stdlib.h>
8539 EOF
8540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8541   egrep "free" >/dev/null 2>&1; then
8542   :
8543 else
8544   rm -rf conftest*
8545   ol_cv_header_stdc=no
8546 fi
8547 rm -f conftest*
8548
8549 fi
8550
8551 if test $ol_cv_header_stdc = yes; then
8552   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8553 if test "$cross_compiling" = yes; then
8554   :
8555 else
8556   cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <ctype.h>
8560 #ifndef HAVE_EBCDIC
8561 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8562 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8563 #else
8564 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8565                 || ('j' <= (c) && (c) <= 'r') \
8566                 || ('s' <= (c) && (c) <= 'z'))
8567 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8568 #endif
8569 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8570 int main () { int i; for (i = 0; i < 256; i++)
8571 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8572 exit (0); }
8573
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8576 then
8577   :
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -fr conftest*
8582   ol_cv_header_stdc=no
8583 fi
8584 rm -fr conftest*
8585 fi
8586
8587 fi
8588 fi
8589
8590 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8591 if test $ol_cv_header_stdc = yes; then
8592   cat >> confdefs.h <<\EOF
8593 #define STDC_HEADERS 1
8594 EOF
8595
8596 fi
8597 ac_cv_header_stdc=disable
8598
8599
8600 if test $ol_cv_header_stdc != yes; then
8601         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8602 fi
8603
8604 ac_header_dirent=no
8605 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8606 do
8607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8608 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8609 echo "configure:8610: checking for $ac_hdr that defines DIR" >&5
8610 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 #include <sys/types.h>
8617 #include <$ac_hdr>
8618 int main() {
8619 DIR *dirp = 0;
8620 ; return 0; }
8621 EOF
8622 if { (eval echo configure:8623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8623   rm -rf conftest*
8624   eval "ac_cv_header_dirent_$ac_safe=yes"
8625 else
8626   echo "configure: failed program was:" >&5
8627   cat conftest.$ac_ext >&5
8628   rm -rf conftest*
8629   eval "ac_cv_header_dirent_$ac_safe=no"
8630 fi
8631 rm -f conftest*
8632 fi
8633 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8634   echo "$ac_t""yes" 1>&6
8635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8636   cat >> confdefs.h <<EOF
8637 #define $ac_tr_hdr 1
8638 EOF
8639  ac_header_dirent=$ac_hdr; break
8640 else
8641   echo "$ac_t""no" 1>&6
8642 fi
8643 done
8644 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8645 if test $ac_header_dirent = dirent.h; then
8646 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8647 echo "configure:8648: checking for opendir in -ldir" >&5
8648 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8650   echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652   ac_save_LIBS="$LIBS"
8653 LIBS="-ldir  $LIBS"
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char opendir();
8661
8662 int main() {
8663 opendir()
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=no"
8674 fi
8675 rm -f conftest*
8676 LIBS="$ac_save_LIBS"
8677
8678 fi
8679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8680   echo "$ac_t""yes" 1>&6
8681   LIBS="$LIBS -ldir"
8682 else
8683   echo "$ac_t""no" 1>&6
8684 fi
8685
8686 else
8687 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8688 echo "configure:8689: checking for opendir in -lx" >&5
8689 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8691   echo $ac_n "(cached) $ac_c" 1>&6
8692 else
8693   ac_save_LIBS="$LIBS"
8694 LIBS="-lx  $LIBS"
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 /* Override any gcc2 internal prototype to avoid an error.  */
8699 /* We use char because int might match the return type of a gcc2
8700     builtin and then its argument prototype would still apply.  */
8701 char opendir();
8702
8703 int main() {
8704 opendir()
8705 ; return 0; }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=yes"
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=no"
8715 fi
8716 rm -f conftest*
8717 LIBS="$ac_save_LIBS"
8718
8719 fi
8720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8721   echo "$ac_t""yes" 1>&6
8722   LIBS="$LIBS -lx"
8723 else
8724   echo "$ac_t""no" 1>&6
8725 fi
8726
8727 fi
8728
8729 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8730 echo "configure:8731: checking for sys/wait.h that is POSIX.1 compatible" >&5
8731 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8732   echo $ac_n "(cached) $ac_c" 1>&6
8733 else
8734   cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 #include <sys/types.h>
8738 #include <sys/wait.h>
8739 #ifndef WEXITSTATUS
8740 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8741 #endif
8742 #ifndef WIFEXITED
8743 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8744 #endif
8745 int main() {
8746 int s;
8747 wait (&s);
8748 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8749 ; return 0; }
8750 EOF
8751 if { (eval echo configure:8752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8752   rm -rf conftest*
8753   ac_cv_header_sys_wait_h=yes
8754 else
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -rf conftest*
8758   ac_cv_header_sys_wait_h=no
8759 fi
8760 rm -f conftest*
8761 fi
8762
8763 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8764 if test $ac_cv_header_sys_wait_h = yes; then
8765   cat >> confdefs.h <<\EOF
8766 #define HAVE_SYS_WAIT_H 1
8767 EOF
8768
8769 fi
8770
8771 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8772 echo "configure:8773: checking POSIX termios" >&5
8773 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8774   echo $ac_n "(cached) $ac_c" 1>&6
8775 else
8776   cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 #include <sys/types.h>
8780 #include <unistd.h>
8781 #include <termios.h>
8782 int main() {
8783 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8784    tcgetattr(0, 0);
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8788   rm -rf conftest*
8789   am_cv_sys_posix_termios=yes
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   am_cv_sys_posix_termios=no
8795 fi
8796 rm -f conftest*
8797 fi
8798
8799 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8800
8801
8802  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8803 echo "configure:8804: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8804 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8808
8809   gwinsz_in_termios_h=no
8810   if test $am_cv_sys_posix_termios = yes; then
8811     cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 #include <sys/types.h>
8815 #     include <termios.h>
8816 #     ifdef TIOCGWINSZ
8817         yes
8818 #     endif
8819     
8820 EOF
8821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8822   egrep "yes" >/dev/null 2>&1; then
8823   rm -rf conftest*
8824   gwinsz_in_termios_h=yes
8825 fi
8826 rm -f conftest*
8827
8828   fi
8829
8830   if test $gwinsz_in_termios_h = no; then
8831     cat > conftest.$ac_ext <<EOF
8832 #line 8833 "configure"
8833 #include "confdefs.h"
8834 #include <sys/types.h>
8835 #     include <sys/ioctl.h>
8836 #     ifdef TIOCGWINSZ
8837         yes
8838 #     endif
8839     
8840 EOF
8841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8842   egrep "yes" >/dev/null 2>&1; then
8843   rm -rf conftest*
8844   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8845 fi
8846 rm -f conftest*
8847
8848   fi
8849   
8850 fi
8851
8852 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8853   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8854     cat >> confdefs.h <<\EOF
8855 #define GWINSZ_IN_SYS_IOCTL 1
8856 EOF
8857
8858   fi
8859
8860 if test $am_cv_sys_posix_termios = yes ; then
8861         cat >> confdefs.h <<\EOF
8862 #define HAVE_POSIX_TERMIOS 1
8863 EOF
8864
8865 fi
8866
8867 for ac_hdr in \
8868         arpa/inet.h             \
8869         arpa/nameser.h  \
8870         assert.h                \
8871         conio.h                 \
8872         crypt.h                 \
8873         direct.h                \
8874         errno.h                 \
8875         fcntl.h                 \
8876         filio.h                 \
8877         getopt.h                \
8878         grp.h                   \
8879         io.h                    \
8880         libutil.h               \
8881         limits.h                \
8882         locale.h                \
8883         netinet/tcp.h   \
8884         malloc.h                \
8885         memory.h                \
8886         psap.h                  \
8887         pwd.h                   \
8888         process.h               \
8889         resolv.h                \
8890         sgtty.h                 \
8891         shadow.h                \
8892         stddef.h                \
8893         string.h                \
8894         strings.h               \
8895         sysexits.h              \
8896         sys/file.h              \
8897         sys/filio.h             \
8898         sys/errno.h             \
8899         sys/ioctl.h             \
8900         sys/param.h             \
8901         sys/resource.h  \
8902         sys/select.h    \
8903         sys/socket.h    \
8904         sys/stat.h              \
8905         sys/syslog.h    \
8906         sys/time.h              \
8907         sys/types.h             \
8908         sys/ucred.h             \
8909         sys/uio.h               \
8910         syslog.h                \
8911         termios.h               \
8912         unistd.h                \
8913         winsock.h               \
8914         winsock2.h              \
8915
8916 do
8917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8919 echo "configure:8920: checking for $ac_hdr" >&5
8920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8921   echo $ac_n "(cached) $ac_c" 1>&6
8922 else
8923   cat > conftest.$ac_ext <<EOF
8924 #line 8925 "configure"
8925 #include "confdefs.h"
8926 #include <$ac_hdr>
8927 EOF
8928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8929 { (eval echo configure:8930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8931 if test -z "$ac_err"; then
8932   rm -rf conftest*
8933   eval "ac_cv_header_$ac_safe=yes"
8934 else
8935   echo "$ac_err" >&5
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   eval "ac_cv_header_$ac_safe=no"
8940 fi
8941 rm -f conftest*
8942 fi
8943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8944   echo "$ac_t""yes" 1>&6
8945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8946   cat >> confdefs.h <<EOF
8947 #define $ac_tr_hdr 1
8948 EOF
8949  
8950 else
8951   echo "$ac_t""no" 1>&6
8952 fi
8953 done
8954
8955
8956
8957
8958 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8959 echo "configure:8960: checking for dlopen" >&5
8960 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* System header to define __stub macros and hopefully few prototypes,
8967     which can conflict with char dlopen(); below.  */
8968 #include <assert.h>
8969 /* Override any gcc2 internal prototype to avoid an error.  */
8970 /* We use char because int might match the return type of a gcc2
8971     builtin and then its argument prototype would still apply.  */
8972 char dlopen();
8973 char (*f)();
8974
8975 int main() {
8976
8977 /* The GNU C library defines this for functions which it implements
8978     to always fail with ENOSYS.  Some functions are actually named
8979     something starting with __ and the normal name is an alias.  */
8980 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8981 choke me
8982 #else
8983 f = dlopen;
8984 #endif
8985
8986 ; return 0; }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8989   rm -rf conftest*
8990   eval "ac_cv_func_dlopen=yes"
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -rf conftest*
8995   eval "ac_cv_func_dlopen=no"
8996 fi
8997 rm -f conftest*
8998 fi
8999
9000 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9001   echo "$ac_t""yes" 1>&6
9002   :
9003 else
9004   echo "$ac_t""no" 1>&6
9005 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9006 echo "configure:9007: checking for dlopen in -ldl" >&5
9007 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9009   echo $ac_n "(cached) $ac_c" 1>&6
9010 else
9011   ac_save_LIBS="$LIBS"
9012 LIBS="-ldl  $LIBS"
9013 cat > conftest.$ac_ext <<EOF
9014 #line 9015 "configure"
9015 #include "confdefs.h"
9016 /* Override any gcc2 internal prototype to avoid an error.  */
9017 /* We use char because int might match the return type of a gcc2
9018     builtin and then its argument prototype would still apply.  */
9019 char dlopen();
9020
9021 int main() {
9022 dlopen()
9023 ; return 0; }
9024 EOF
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9026   rm -rf conftest*
9027   eval "ac_cv_lib_$ac_lib_var=yes"
9028 else
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   eval "ac_cv_lib_$ac_lib_var=no"
9033 fi
9034 rm -f conftest*
9035 LIBS="$ac_save_LIBS"
9036
9037 fi
9038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9039   echo "$ac_t""yes" 1>&6
9040     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9041     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9042   cat >> confdefs.h <<EOF
9043 #define $ac_tr_lib 1
9044 EOF
9045
9046   LIBS="-ldl $LIBS"
9047
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051
9052 fi
9053
9054
9055 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9056 echo "configure:9057: checking for sigset in -lV3" >&5
9057 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9059   echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061   ac_save_LIBS="$LIBS"
9062 LIBS="-lV3  $LIBS"
9063 cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066 /* Override any gcc2 internal prototype to avoid an error.  */
9067 /* We use char because int might match the return type of a gcc2
9068     builtin and then its argument prototype would still apply.  */
9069 char sigset();
9070
9071 int main() {
9072 sigset()
9073 ; return 0; }
9074 EOF
9075 if { (eval echo configure:9076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9076   rm -rf conftest*
9077   eval "ac_cv_lib_$ac_lib_var=yes"
9078 else
9079   echo "configure: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   rm -rf conftest*
9082   eval "ac_cv_lib_$ac_lib_var=no"
9083 fi
9084 rm -f conftest*
9085 LIBS="$ac_save_LIBS"
9086
9087 fi
9088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9089   echo "$ac_t""yes" 1>&6
9090     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9092   cat >> confdefs.h <<EOF
9093 #define $ac_tr_lib 1
9094 EOF
9095
9096   LIBS="-lV3 $LIBS"
9097
9098 else
9099   echo "$ac_t""no" 1>&6
9100 fi
9101
9102
9103 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9104 echo "configure:9105: checking for winsock" >&5
9105 save_LIBS="$LIBS"
9106 for curlib in ws2_32 wsock32; do
9107         LIBS="$LIBS -l$curlib"
9108         cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111
9112                         char socket@12();
9113                         char select@20();
9114                         char closesocket@4();
9115                         char gethostname@8();
9116                         
9117 int main() {
9118
9119                         socket@12();
9120                         select@20();
9121                         closesocket@4();
9122                         gethostname@8();
9123                         
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   have_winsock=yes
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   have_winsock=no
9134 fi
9135 rm -f conftest*
9136
9137         if test $have_winsock = yes; then
9138                 cat >> confdefs.h <<\EOF
9139 #define HAVE_WINSOCK 1
9140 EOF
9141
9142                 ac_cv_func_socket=yes
9143                 ac_cv_func_select=yes
9144                 ac_cv_func_closesocket=yes
9145                 ac_cv_func_gethostname=yes
9146                 if test $curlib = ws2_32; then
9147                         have_winsock=winsock2
9148                         cat >> confdefs.h <<\EOF
9149 #define HAVE_WINSOCK2 1
9150 EOF
9151
9152                 fi
9153                 break
9154         fi
9155         LIBS="$save_LIBS"
9156 done
9157 echo "$ac_t""$have_winsock" 1>&6
9158
9159
9160 echo $ac_n "checking for socket""... $ac_c" 1>&6
9161 echo "configure:9162: checking for socket" >&5
9162 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9163   echo $ac_n "(cached) $ac_c" 1>&6
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 /* System header to define __stub macros and hopefully few prototypes,
9169     which can conflict with char socket(); below.  */
9170 #include <assert.h>
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char socket();
9175 char (*f)();
9176
9177 int main() {
9178
9179 /* The GNU C library defines this for functions which it implements
9180     to always fail with ENOSYS.  Some functions are actually named
9181     something starting with __ and the normal name is an alias.  */
9182 #if defined (__stub_socket) || defined (__stub___socket)
9183 choke me
9184 #else
9185 f = socket;
9186 #endif
9187
9188 ; return 0; }
9189 EOF
9190 if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9191   rm -rf conftest*
9192   eval "ac_cv_func_socket=yes"
9193 else
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   eval "ac_cv_func_socket=no"
9198 fi
9199 rm -f conftest*
9200 fi
9201
9202 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9203   echo "$ac_t""yes" 1>&6
9204   :
9205 else
9206   echo "$ac_t""no" 1>&6
9207         
9208         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9209 echo "configure:9210: checking for main in -lsocket" >&5
9210 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9212   echo $ac_n "(cached) $ac_c" 1>&6
9213 else
9214   ac_save_LIBS="$LIBS"
9215 LIBS="-lsocket  $LIBS"
9216 cat > conftest.$ac_ext <<EOF
9217 #line 9218 "configure"
9218 #include "confdefs.h"
9219
9220 int main() {
9221 main()
9222 ; return 0; }
9223 EOF
9224 if { (eval echo configure:9225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9225   rm -rf conftest*
9226   eval "ac_cv_lib_$ac_lib_var=yes"
9227 else
9228   echo "configure: failed program was:" >&5
9229   cat conftest.$ac_ext >&5
9230   rm -rf conftest*
9231   eval "ac_cv_lib_$ac_lib_var=no"
9232 fi
9233 rm -f conftest*
9234 LIBS="$ac_save_LIBS"
9235
9236 fi
9237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9238   echo "$ac_t""yes" 1>&6
9239     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9240     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9241   cat >> confdefs.h <<EOF
9242 #define $ac_tr_lib 1
9243 EOF
9244
9245   LIBS="-lsocket $LIBS"
9246
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250
9251         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9252 echo "configure:9253: checking for main in -lnet" >&5
9253 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9255   echo $ac_n "(cached) $ac_c" 1>&6
9256 else
9257   ac_save_LIBS="$LIBS"
9258 LIBS="-lnet  $LIBS"
9259 cat > conftest.$ac_ext <<EOF
9260 #line 9261 "configure"
9261 #include "confdefs.h"
9262
9263 int main() {
9264 main()
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_lib_$ac_lib_var=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=no"
9275 fi
9276 rm -f conftest*
9277 LIBS="$ac_save_LIBS"
9278
9279 fi
9280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9281   echo "$ac_t""yes" 1>&6
9282     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9284   cat >> confdefs.h <<EOF
9285 #define $ac_tr_lib 1
9286 EOF
9287
9288   LIBS="-lnet $LIBS"
9289
9290 else
9291   echo "$ac_t""no" 1>&6
9292 fi
9293
9294         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9295 echo "configure:9296: checking for main in -lnsl_s" >&5
9296 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   ac_save_LIBS="$LIBS"
9301 LIBS="-lnsl_s  $LIBS"
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305
9306 int main() {
9307 main()
9308 ; return 0; }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=yes"
9313 else
9314   echo "configure: failed program was:" >&5
9315   cat conftest.$ac_ext >&5
9316   rm -rf conftest*
9317   eval "ac_cv_lib_$ac_lib_var=no"
9318 fi
9319 rm -f conftest*
9320 LIBS="$ac_save_LIBS"
9321
9322 fi
9323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9324   echo "$ac_t""yes" 1>&6
9325     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9327   cat >> confdefs.h <<EOF
9328 #define $ac_tr_lib 1
9329 EOF
9330
9331   LIBS="-lnsl_s $LIBS"
9332
9333 else
9334   echo "$ac_t""no" 1>&6
9335 fi
9336
9337         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9338 echo "configure:9339: checking for main in -lnsl" >&5
9339 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   ac_save_LIBS="$LIBS"
9344 LIBS="-lnsl  $LIBS"
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348
9349 int main() {
9350 main()
9351 ; return 0; }
9352 EOF
9353 if { (eval echo configure:9354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=yes"
9356 else
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359   rm -rf conftest*
9360   eval "ac_cv_lib_$ac_lib_var=no"
9361 fi
9362 rm -f conftest*
9363 LIBS="$ac_save_LIBS"
9364
9365 fi
9366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9367   echo "$ac_t""yes" 1>&6
9368     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9369     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9370   cat >> confdefs.h <<EOF
9371 #define $ac_tr_lib 1
9372 EOF
9373
9374   LIBS="-lnsl $LIBS"
9375
9376 else
9377   echo "$ac_t""no" 1>&6
9378 fi
9379
9380         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9381 echo "configure:9382: checking for socket in -linet" >&5
9382 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   ac_save_LIBS="$LIBS"
9387 LIBS="-linet  $LIBS"
9388 cat > conftest.$ac_ext <<EOF
9389 #line 9390 "configure"
9390 #include "confdefs.h"
9391 /* Override any gcc2 internal prototype to avoid an error.  */
9392 /* We use char because int might match the return type of a gcc2
9393     builtin and then its argument prototype would still apply.  */
9394 char socket();
9395
9396 int main() {
9397 socket()
9398 ; return 0; }
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9401   rm -rf conftest*
9402   eval "ac_cv_lib_$ac_lib_var=yes"
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -rf conftest*
9407   eval "ac_cv_lib_$ac_lib_var=no"
9408 fi
9409 rm -f conftest*
9410 LIBS="$ac_save_LIBS"
9411
9412 fi
9413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9414   echo "$ac_t""yes" 1>&6
9415     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9416     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9417   cat >> confdefs.h <<EOF
9418 #define $ac_tr_lib 1
9419 EOF
9420
9421   LIBS="-linet $LIBS"
9422
9423 else
9424   echo "$ac_t""no" 1>&6
9425 fi
9426
9427         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9428 echo "configure:9429: checking for main in -lgen" >&5
9429 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9431   echo $ac_n "(cached) $ac_c" 1>&6
9432 else
9433   ac_save_LIBS="$LIBS"
9434 LIBS="-lgen  $LIBS"
9435 cat > conftest.$ac_ext <<EOF
9436 #line 9437 "configure"
9437 #include "confdefs.h"
9438
9439 int main() {
9440 main()
9441 ; return 0; }
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9444   rm -rf conftest*
9445   eval "ac_cv_lib_$ac_lib_var=yes"
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -rf conftest*
9450   eval "ac_cv_lib_$ac_lib_var=no"
9451 fi
9452 rm -f conftest*
9453 LIBS="$ac_save_LIBS"
9454
9455 fi
9456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9457   echo "$ac_t""yes" 1>&6
9458     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9460   cat >> confdefs.h <<EOF
9461 #define $ac_tr_lib 1
9462 EOF
9463
9464   LIBS="-lgen $LIBS"
9465
9466 else
9467   echo "$ac_t""no" 1>&6
9468 fi
9469
9470
9471 fi
9472
9473
9474 echo $ac_n "checking for select""... $ac_c" 1>&6
9475 echo "configure:9476: checking for select" >&5
9476 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9477   echo $ac_n "(cached) $ac_c" 1>&6
9478 else
9479   cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 /* System header to define __stub macros and hopefully few prototypes,
9483     which can conflict with char select(); below.  */
9484 #include <assert.h>
9485 /* Override any gcc2 internal prototype to avoid an error.  */
9486 /* We use char because int might match the return type of a gcc2
9487     builtin and then its argument prototype would still apply.  */
9488 char select();
9489 char (*f)();
9490
9491 int main() {
9492
9493 /* The GNU C library defines this for functions which it implements
9494     to always fail with ENOSYS.  Some functions are actually named
9495     something starting with __ and the normal name is an alias.  */
9496 #if defined (__stub_select) || defined (__stub___select)
9497 choke me
9498 #else
9499 f = select;
9500 #endif
9501
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   eval "ac_cv_func_select=yes"
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_func_select=no"
9512 fi
9513 rm -f conftest*
9514 fi
9515
9516 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9517   echo "$ac_t""yes" 1>&6
9518   :
9519 else
9520   echo "$ac_t""no" 1>&6
9521 { echo "configure: error: select() required." 1>&2; exit 1; }
9522 fi
9523
9524
9525 if test "${ac_cv_header_winsock_h}" != yes; then
9526                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9527 echo "configure:9528: checking types of arguments for select()" >&5
9528  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9532   echo $ac_n "(cached) $ac_c" 1>&6
9533 else
9534     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9535   echo $ac_n "(cached) $ac_c" 1>&6
9536 else
9537      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9538      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9539       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9540        cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9543 #ifdef HAVE_SYS_TYPES_H
9544 #include <sys/types.h>
9545 #endif
9546 #ifdef HAVE_SYS_TIME_H
9547 #include <sys/time.h>
9548 #endif
9549 #ifdef HAVE_SYS_SELECT_H
9550 #include <sys/select.h>
9551 #endif
9552 #ifdef HAVE_SYS_SOCKET_H
9553 #include <sys/socket.h>
9554 #endif
9555 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);
9556 int main() {
9557
9558 ; return 0; }
9559 EOF
9560 if { (eval echo configure:9561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9561   rm -rf conftest*
9562           ac_not_found=no ; break 3
9563 else
9564   echo "configure: failed program was:" >&5
9565   cat conftest.$ac_ext >&5
9566   rm -rf conftest*
9567   ac_not_found=yes
9568 fi
9569 rm -f conftest*
9570       done
9571      done
9572     done
9573    
9574 fi
9575   
9576 fi
9577  
9578 fi
9579  if test "$ac_not_found" = yes; then
9580   ac_cv_func_select_arg1=int 
9581   ac_cv_func_select_arg234='int *' 
9582   ac_cv_func_select_arg5='struct timeval *'
9583  fi
9584  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9585  cat >> confdefs.h <<EOF
9586 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9587 EOF
9588
9589  cat >> confdefs.h <<EOF
9590 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9591 EOF
9592
9593  cat >> confdefs.h <<EOF
9594 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9595 EOF
9596
9597
9598 fi
9599
9600
9601 for ac_hdr in regex.h 
9602 do
9603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9605 echo "configure:9606: checking for $ac_hdr" >&5
9606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9607   echo $ac_n "(cached) $ac_c" 1>&6
9608 else
9609   cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <$ac_hdr>
9613 EOF
9614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9615 { (eval echo configure:9616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9617 if test -z "$ac_err"; then
9618   rm -rf conftest*
9619   eval "ac_cv_header_$ac_safe=yes"
9620 else
9621   echo "$ac_err" >&5
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   eval "ac_cv_header_$ac_safe=no"
9626 fi
9627 rm -f conftest*
9628 fi
9629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9630   echo "$ac_t""yes" 1>&6
9631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9632   cat >> confdefs.h <<EOF
9633 #define $ac_tr_hdr 1
9634 EOF
9635  
9636 else
9637   echo "$ac_t""no" 1>&6
9638 fi
9639 done
9640
9641 if test "$ac_cv_header_regex_h" != yes ; then
9642         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9643 fi
9644
9645 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9646 echo "configure:9647: checking for library containing regfree" >&5
9647 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   ac_func_search_save_LIBS="$LIBS"
9651 ac_cv_search_regfree="no"
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char regfree();
9659
9660 int main() {
9661 regfree()
9662 ; return 0; }
9663 EOF
9664 if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9665   rm -rf conftest*
9666   ac_cv_search_regfree="none required"
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest*
9672 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9673 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9674 cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 /* Override any gcc2 internal prototype to avoid an error.  */
9678 /* We use char because int might match the return type of a gcc2
9679     builtin and then its argument prototype would still apply.  */
9680 char regfree();
9681
9682 int main() {
9683 regfree()
9684 ; return 0; }
9685 EOF
9686 if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9687   rm -rf conftest*
9688   ac_cv_search_regfree="-l$ac_lib"
9689 break
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693 fi
9694 rm -f conftest*
9695 done
9696 LIBS="$ac_func_search_save_LIBS"
9697 fi
9698
9699 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9700 if test "$ac_cv_search_regfree" != "no"; then
9701   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9702   :
9703 else :
9704   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9705 fi
9706
9707
9708 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9709 echo "configure:9710: checking for compatible POSIX regex" >&5
9710 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   
9714         if test "$cross_compiling" = yes; then
9715   ol_cv_c_posix_regex=cross
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720
9721 #include <sys/types.h>
9722 #include <regex.h>
9723 static char *pattern, *string;
9724 main()
9725 {
9726         int rc;
9727         regex_t re;
9728
9729         pattern = "^A";
9730
9731         if(regcomp(&re, pattern, 0)) {
9732                 return -1;
9733         }
9734         
9735         string = "ALL MATCH";
9736         
9737         rc = regexec(&re, string, 0, (void*)0, 0);
9738
9739         regfree(&re);
9740
9741         return rc;
9742 }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9745 then
9746   ol_cv_c_posix_regex=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -fr conftest*
9751   ol_cv_c_posix_regex=no
9752 fi
9753 rm -fr conftest*
9754 fi
9755
9756 fi
9757
9758 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9759
9760 if test "$ol_cv_c_posix_regex" = no ; then
9761         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9762 fi
9763
9764
9765 have_uuid=no
9766 for ac_hdr in sys/uuid.h
9767 do
9768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9770 echo "configure:9771: checking for $ac_hdr" >&5
9771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 #include <$ac_hdr>
9778 EOF
9779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9780 { (eval echo configure:9781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9782 if test -z "$ac_err"; then
9783   rm -rf conftest*
9784   eval "ac_cv_header_$ac_safe=yes"
9785 else
9786   echo "$ac_err" >&5
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_header_$ac_safe=no"
9791 fi
9792 rm -f conftest*
9793 fi
9794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9795   echo "$ac_t""yes" 1>&6
9796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9797   cat >> confdefs.h <<EOF
9798 #define $ac_tr_hdr 1
9799 EOF
9800  
9801 else
9802   echo "$ac_t""no" 1>&6
9803 fi
9804 done
9805
9806 if test $ac_cv_header_sys_uuid_h = yes ; then
9807         save_LIBS="$LIBS"
9808         
9809 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9810 echo "configure:9811: checking for library containing uuid_to_str" >&5
9811 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9812   echo $ac_n "(cached) $ac_c" 1>&6
9813 else
9814   ac_func_search_save_LIBS="$LIBS"
9815 ac_cv_search_uuid_to_str="no"
9816 cat > conftest.$ac_ext <<EOF
9817 #line 9818 "configure"
9818 #include "confdefs.h"
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 /* We use char because int might match the return type of a gcc2
9821     builtin and then its argument prototype would still apply.  */
9822 char uuid_to_str();
9823
9824 int main() {
9825 uuid_to_str()
9826 ; return 0; }
9827 EOF
9828 if { (eval echo configure:9829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9829   rm -rf conftest*
9830   ac_cv_search_uuid_to_str="none required"
9831 else
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834 fi
9835 rm -f conftest*
9836 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9837 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9838 cat > conftest.$ac_ext <<EOF
9839 #line 9840 "configure"
9840 #include "confdefs.h"
9841 /* Override any gcc2 internal prototype to avoid an error.  */
9842 /* We use char because int might match the return type of a gcc2
9843     builtin and then its argument prototype would still apply.  */
9844 char uuid_to_str();
9845
9846 int main() {
9847 uuid_to_str()
9848 ; return 0; }
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9851   rm -rf conftest*
9852   ac_cv_search_uuid_to_str="-l$ac_lib"
9853 break
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857 fi
9858 rm -f conftest*
9859 done
9860 LIBS="$ac_func_search_save_LIBS"
9861 fi
9862
9863 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9864 if test "$ac_cv_search_uuid_to_str" != "no"; then
9865   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9866   have_uuid=yes
9867 else :
9868   :
9869 fi
9870         LIBS="$save_LIBS"
9871
9872         if test have_uuid = yes ; then
9873                 cat >> confdefs.h <<\EOF
9874 #define HAVE_UUID_TO_STR 1
9875 EOF
9876
9877
9878                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9879                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9880         fi
9881 fi
9882
9883 if test $have_uuid = no ; then
9884         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9885 echo "configure:9886: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9886         save_LIBS="$LIBS"
9887         LIBS="$LIBS -lrpcrt4"
9888         cat > conftest.$ac_ext <<EOF
9889 #line 9890 "configure"
9890 #include "confdefs.h"
9891
9892                 char UuidCreate@4();
9893                 char UuidToStringA@8();
9894                 
9895 int main() {
9896
9897                 UuidCreate@4();
9898                 UuidToStringA@8();
9899                 
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   need_rpcrt=yes
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -rf conftest*
9909   need_rpcrt=no
9910 fi
9911 rm -f conftest*
9912         if test $need_rpcrt = yes; then
9913                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9914         fi
9915         LIBS="$save_LIBS"
9916         echo "$ac_t""$need_rpcrt" 1>&6
9917 fi
9918
9919 ol_link_dnssrv=no
9920 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9921 echo "configure:9922: checking for res_query" >&5
9922 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9923   echo $ac_n "(cached) $ac_c" 1>&6
9924 else
9925   cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 /* System header to define __stub macros and hopefully few prototypes,
9929     which can conflict with char res_query(); below.  */
9930 #include <assert.h>
9931 /* Override any gcc2 internal prototype to avoid an error.  */
9932 /* We use char because int might match the return type of a gcc2
9933     builtin and then its argument prototype would still apply.  */
9934 char res_query();
9935 char (*f)();
9936
9937 int main() {
9938
9939 /* The GNU C library defines this for functions which it implements
9940     to always fail with ENOSYS.  Some functions are actually named
9941     something starting with __ and the normal name is an alias.  */
9942 #if defined (__stub_res_query) || defined (__stub___res_query)
9943 choke me
9944 #else
9945 f = res_query;
9946 #endif
9947
9948 ; return 0; }
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9951   rm -rf conftest*
9952   eval "ac_cv_func_res_query=yes"
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -rf conftest*
9957   eval "ac_cv_func_res_query=no"
9958 fi
9959 rm -f conftest*
9960 fi
9961
9962 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9963   echo "$ac_t""yes" 1>&6
9964   :
9965 else
9966   echo "$ac_t""no" 1>&6
9967 fi
9968
9969 if test $ac_cv_func_res_query = no ; then 
9970         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9971 echo "configure:9972: checking for __res_query" >&5
9972 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9973   echo $ac_n "(cached) $ac_c" 1>&6
9974 else
9975   cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* System header to define __stub macros and hopefully few prototypes,
9979     which can conflict with char __res_query(); below.  */
9980 #include <assert.h>
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 /* We use char because int might match the return type of a gcc2
9983     builtin and then its argument prototype would still apply.  */
9984 char __res_query();
9985 char (*f)();
9986
9987 int main() {
9988
9989 /* The GNU C library defines this for functions which it implements
9990     to always fail with ENOSYS.  Some functions are actually named
9991     something starting with __ and the normal name is an alias.  */
9992 #if defined (__stub___res_query) || defined (__stub_____res_query)
9993 choke me
9994 #else
9995 f = __res_query;
9996 #endif
9997
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10001   rm -rf conftest*
10002   eval "ac_cv_func___res_query=yes"
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   eval "ac_cv_func___res_query=no"
10008 fi
10009 rm -f conftest*
10010 fi
10011
10012 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10013   echo "$ac_t""yes" 1>&6
10014   :
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018
10019         ac_cv_func_res_query=$ac_cv_func___res_query
10020 fi
10021
10022 if test $ac_cv_func_res_query = no ; then 
10023         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10024 echo "configure:10025: checking for res_query in -lbind" >&5
10025 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   ac_save_LIBS="$LIBS"
10030 LIBS="-lbind  $LIBS"
10031 cat > conftest.$ac_ext <<EOF
10032 #line 10033 "configure"
10033 #include "confdefs.h"
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 /* We use char because int might match the return type of a gcc2
10036     builtin and then its argument prototype would still apply.  */
10037 char res_query();
10038
10039 int main() {
10040 res_query()
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=yes"
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=no"
10051 fi
10052 rm -f conftest*
10053 LIBS="$ac_save_LIBS"
10054
10055 fi
10056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10057   echo "$ac_t""yes" 1>&6
10058     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10060   cat >> confdefs.h <<EOF
10061 #define $ac_tr_lib 1
10062 EOF
10063
10064   LIBS="-lbind $LIBS"
10065
10066 else
10067   echo "$ac_t""no" 1>&6
10068 fi
10069
10070         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10071 fi
10072
10073 if test $ac_cv_func_res_query = no ; then 
10074         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10075 echo "configure:10076: checking for __res_query in -lbind" >&5
10076 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10078   echo $ac_n "(cached) $ac_c" 1>&6
10079 else
10080   ac_save_LIBS="$LIBS"
10081 LIBS="-lbind  $LIBS"
10082 cat > conftest.$ac_ext <<EOF
10083 #line 10084 "configure"
10084 #include "confdefs.h"
10085 /* Override any gcc2 internal prototype to avoid an error.  */
10086 /* We use char because int might match the return type of a gcc2
10087     builtin and then its argument prototype would still apply.  */
10088 char __res_query();
10089
10090 int main() {
10091 __res_query()
10092 ; return 0; }
10093 EOF
10094 if { (eval echo configure:10095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10095   rm -rf conftest*
10096   eval "ac_cv_lib_$ac_lib_var=yes"
10097 else
10098   echo "configure: failed program was:" >&5
10099   cat conftest.$ac_ext >&5
10100   rm -rf conftest*
10101   eval "ac_cv_lib_$ac_lib_var=no"
10102 fi
10103 rm -f conftest*
10104 LIBS="$ac_save_LIBS"
10105
10106 fi
10107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10108   echo "$ac_t""yes" 1>&6
10109     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10110     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10111   cat >> confdefs.h <<EOF
10112 #define $ac_tr_lib 1
10113 EOF
10114
10115   LIBS="-lbind $LIBS"
10116
10117 else
10118   echo "$ac_t""no" 1>&6
10119 fi
10120
10121         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10122 fi
10123
10124 if test $ac_cv_func_res_query = no ; then 
10125         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10126 echo "configure:10127: checking for res_query in -lresolv" >&5
10127 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10129   echo $ac_n "(cached) $ac_c" 1>&6
10130 else
10131   ac_save_LIBS="$LIBS"
10132 LIBS="-lresolv  $LIBS"
10133 cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 /* Override any gcc2 internal prototype to avoid an error.  */
10137 /* We use char because int might match the return type of a gcc2
10138     builtin and then its argument prototype would still apply.  */
10139 char res_query();
10140
10141 int main() {
10142 res_query()
10143 ; return 0; }
10144 EOF
10145 if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10146   rm -rf conftest*
10147   eval "ac_cv_lib_$ac_lib_var=yes"
10148 else
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -rf conftest*
10152   eval "ac_cv_lib_$ac_lib_var=no"
10153 fi
10154 rm -f conftest*
10155 LIBS="$ac_save_LIBS"
10156
10157 fi
10158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10162   cat >> confdefs.h <<EOF
10163 #define $ac_tr_lib 1
10164 EOF
10165
10166   LIBS="-lresolv $LIBS"
10167
10168 else
10169   echo "$ac_t""no" 1>&6
10170 fi
10171
10172         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10173 fi
10174
10175 if test $ac_cv_func_res_query = no ; then 
10176         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10177 echo "configure:10178: checking for __res_query in -lresolv" >&5
10178 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   ac_save_LIBS="$LIBS"
10183 LIBS="-lresolv  $LIBS"
10184 cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 /* Override any gcc2 internal prototype to avoid an error.  */
10188 /* We use char because int might match the return type of a gcc2
10189     builtin and then its argument prototype would still apply.  */
10190 char __res_query();
10191
10192 int main() {
10193 __res_query()
10194 ; return 0; }
10195 EOF
10196 if { (eval echo configure:10197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=yes"
10199 else
10200   echo "configure: failed program was:" >&5
10201   cat conftest.$ac_ext >&5
10202   rm -rf conftest*
10203   eval "ac_cv_lib_$ac_lib_var=no"
10204 fi
10205 rm -f conftest*
10206 LIBS="$ac_save_LIBS"
10207
10208 fi
10209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10210   echo "$ac_t""yes" 1>&6
10211     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10212     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10213   cat >> confdefs.h <<EOF
10214 #define $ac_tr_lib 1
10215 EOF
10216
10217   LIBS="-lresolv $LIBS"
10218
10219 else
10220   echo "$ac_t""no" 1>&6
10221 fi
10222
10223         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10224 fi
10225
10226 if test "$ac_cv_func_res_query" = yes ; then
10227         cat >> confdefs.h <<\EOF
10228 #define HAVE_RES_QUERY 1
10229 EOF
10230
10231
10232         if test $ol_enable_dnssrv != no ; then
10233                 ol_link_dnssrv=yes
10234         fi
10235 fi
10236
10237 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10238         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10239 fi
10240
10241 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10242 do
10243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10244 echo "configure:10245: checking for $ac_func" >&5
10245 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251 /* System header to define __stub macros and hopefully few prototypes,
10252     which can conflict with char $ac_func(); below.  */
10253 #include <assert.h>
10254 /* Override any gcc2 internal prototype to avoid an error.  */
10255 /* We use char because int might match the return type of a gcc2
10256     builtin and then its argument prototype would still apply.  */
10257 char $ac_func();
10258 char (*f)();
10259
10260 int main() {
10261
10262 /* The GNU C library defines this for functions which it implements
10263     to always fail with ENOSYS.  Some functions are actually named
10264     something starting with __ and the normal name is an alias.  */
10265 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10266 choke me
10267 #else
10268 f = $ac_func;
10269 #endif
10270
10271 ; return 0; }
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10274   rm -rf conftest*
10275   eval "ac_cv_func_$ac_func=yes"
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -rf conftest*
10280   eval "ac_cv_func_$ac_func=no"
10281 fi
10282 rm -f conftest*
10283 fi
10284
10285 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10286   echo "$ac_t""yes" 1>&6
10287     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10288   cat >> confdefs.h <<EOF
10289 #define $ac_tr_func 1
10290 EOF
10291  
10292 else
10293   echo "$ac_t""no" 1>&6
10294 fi
10295 done
10296
10297
10298 ol_link_ipv6=no
10299 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10300         if test $ol_enable_ipv6 = yes ; then
10301                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10302         fi
10303 elif test $ol_enable_ipv6 != no ; then
10304         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10305 echo "configure:10306: checking INET6_ADDRSTRLEN" >&5
10306 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   
10310                 cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313
10314 #                       include <netinet/in.h>
10315 #                       ifdef INET6_ADDRSTRLEN
10316                                 __has_inet6_addrstrlen__;
10317 #                       endif
10318                 
10319 EOF
10320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10321   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10322   rm -rf conftest*
10323   ol_cv_inet6_addrstrlen=yes
10324 else
10325   rm -rf conftest*
10326   ol_cv_inet6_addrstrlen=no
10327 fi
10328 rm -f conftest*
10329
10330 fi
10331
10332 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10333
10334
10335         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10336 echo "configure:10337: checking struct sockaddr_storage" >&5
10337 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10338   echo $ac_n "(cached) $ac_c" 1>&6
10339 else
10340   
10341                 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344
10345 #include <sys/types.h>
10346 #include <sys/socket.h>
10347
10348 int main() {
10349
10350                         struct sockaddr_storage ss;
10351
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10355   rm -rf conftest*
10356   ol_cv_struct_sockaddr_storage=yes
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   ol_cv_struct_sockaddr_storage=no
10362 fi
10363 rm -f conftest*
10364 fi
10365
10366 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10367
10368         if test $ol_cv_inet6_addrstrlen = yes \
10369                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10370                 ol_link_ipv6=yes
10371         elif test $ol_enable_ipv6 = yes \
10372                         -a $ol_cv_inet6_addrstrlen = no ; then
10373                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10374         elif test $ol_enable_ipv6 = yes \
10375                         -a $ol_cv_struct_sockaddr_storage = no ; then
10376                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10377         fi
10378 fi
10379
10380 if test $ol_enable_local != no ; then
10381         for ac_hdr in sys/un.h 
10382 do
10383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10385 echo "configure:10386: checking for $ac_hdr" >&5
10386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 #include <$ac_hdr>
10393 EOF
10394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10395 { (eval echo configure:10396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10397 if test -z "$ac_err"; then
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=yes"
10400 else
10401   echo "$ac_err" >&5
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_header_$ac_safe=no"
10406 fi
10407 rm -f conftest*
10408 fi
10409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10410   echo "$ac_t""yes" 1>&6
10411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10412   cat >> confdefs.h <<EOF
10413 #define $ac_tr_hdr 1
10414 EOF
10415  
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419 done
10420
10421
10422         if test $ol_enable_local = auto ; then
10423                 ol_enable_local=$ac_cv_header_sys_un_h
10424         elif test $ac_cv_header_sys_un_h = no ; then
10425                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10426         fi
10427 fi
10428
10429 ol_link_kbind=no
10430 ol_link_kpasswd=no
10431 ol_link_krb5=no
10432 ol_link_krb4=no
10433
10434 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10435         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10436         -o $ol_with_kerberos = k425 ; then
10437
10438         for ac_hdr in krb5.h
10439 do
10440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10442 echo "configure:10443: checking for $ac_hdr" >&5
10443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include <$ac_hdr>
10450 EOF
10451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10452 { (eval echo configure:10453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10454 if test -z "$ac_err"; then
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=yes"
10457 else
10458   echo "$ac_err" >&5
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=no"
10463 fi
10464 rm -f conftest*
10465 fi
10466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10467   echo "$ac_t""yes" 1>&6
10468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10469   cat >> confdefs.h <<EOF
10470 #define $ac_tr_hdr 1
10471 EOF
10472  
10473 else
10474   echo "$ac_t""no" 1>&6
10475 fi
10476 done
10477
10478
10479         if test $ac_cv_header_krb5_h = yes ; then
10480                                 for ac_hdr in heim_err.h
10481 do
10482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10484 echo "configure:10485: checking for $ac_hdr" >&5
10485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10486   echo $ac_n "(cached) $ac_c" 1>&6
10487 else
10488   cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491 #include <$ac_hdr>
10492 EOF
10493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10494 { (eval echo configure:10495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10496 if test -z "$ac_err"; then
10497   rm -rf conftest*
10498   eval "ac_cv_header_$ac_safe=yes"
10499 else
10500   echo "$ac_err" >&5
10501   echo "configure: failed program was:" >&5
10502   cat conftest.$ac_ext >&5
10503   rm -rf conftest*
10504   eval "ac_cv_header_$ac_safe=no"
10505 fi
10506 rm -f conftest*
10507 fi
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10511   cat >> confdefs.h <<EOF
10512 #define $ac_tr_hdr 1
10513 EOF
10514  
10515 else
10516   echo "$ac_t""no" 1>&6
10517 fi
10518 done
10519
10520                 if test $ac_cv_header_heim_err_h = yes ; then
10521                         krb5_impl=heimdal
10522                 else
10523                         krb5_impl=mit
10524                 fi
10525
10526                 if test $krb5_impl = mit; then
10527                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10528 echo "configure:10529: checking for main in -lk5crypto" >&5
10529 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   ac_save_LIBS="$LIBS"
10534 LIBS="-lk5crypto  $LIBS"
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538
10539 int main() {
10540 main()
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_lib_$ac_lib_var=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=no"
10551 fi
10552 rm -f conftest*
10553 LIBS="$ac_save_LIBS"
10554
10555 fi
10556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   krb5crypto=k5crypto
10559 else
10560   echo "$ac_t""no" 1>&6
10561 krb5crypto=crypto
10562 fi
10563
10564
10565                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10566 echo "configure:10567: checking for main in -lkrb5" >&5
10567 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   ac_save_LIBS="$LIBS"
10572 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10573 cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576
10577 int main() {
10578 main()
10579 ; return 0; }
10580 EOF
10581 if { (eval echo configure:10582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10582   rm -rf conftest*
10583   eval "ac_cv_lib_$ac_lib_var=yes"
10584 else
10585   echo "configure: failed program was:" >&5
10586   cat conftest.$ac_ext >&5
10587   rm -rf conftest*
10588   eval "ac_cv_lib_$ac_lib_var=no"
10589 fi
10590 rm -f conftest*
10591 LIBS="$ac_save_LIBS"
10592
10593 fi
10594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   have_krb5=yes
10597                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10598 else
10599   echo "$ac_t""no" 1>&6
10600 have_krb5=no
10601 fi
10602
10603
10604                 elif test $krb5_impl = heimdal; then
10605                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10606 echo "configure:10607: checking for main in -ldes" >&5
10607 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   ac_save_LIBS="$LIBS"
10612 LIBS="-ldes  $LIBS"
10613 cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616
10617 int main() {
10618 main()
10619 ; return 0; }
10620 EOF
10621 if { (eval echo configure:10622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10622   rm -rf conftest*
10623   eval "ac_cv_lib_$ac_lib_var=yes"
10624 else
10625   echo "configure: failed program was:" >&5
10626   cat conftest.$ac_ext >&5
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=no"
10629 fi
10630 rm -f conftest*
10631 LIBS="$ac_save_LIBS"
10632
10633 fi
10634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10635   echo "$ac_t""yes" 1>&6
10636   krb5crypto=des
10637 else
10638   echo "$ac_t""no" 1>&6
10639 krb5crypto=crypto
10640 fi
10641
10642
10643                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10644 echo "configure:10645: checking for main in -lkrb5" >&5
10645 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10647   echo $ac_n "(cached) $ac_c" 1>&6
10648 else
10649   ac_save_LIBS="$LIBS"
10650 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10651 cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654
10655 int main() {
10656 main()
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10660   rm -rf conftest*
10661   eval "ac_cv_lib_$ac_lib_var=yes"
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   eval "ac_cv_lib_$ac_lib_var=no"
10667 fi
10668 rm -f conftest*
10669 LIBS="$ac_save_LIBS"
10670
10671 fi
10672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10673   echo "$ac_t""yes" 1>&6
10674   have_krb5=yes
10675                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10676 else
10677   echo "$ac_t""no" 1>&6
10678 have_krb5=no
10679 fi
10680
10681
10682                         cat >> confdefs.h <<\EOF
10683 #define HAVE_HEIMDAL_KERBEROS 1
10684 EOF
10685
10686
10687                 else
10688                         have_krb5=no
10689                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10690                 fi
10691
10692                 if test $have_krb5 = yes ; then
10693                         ol_link_krb5=yes
10694
10695                         cat >> confdefs.h <<\EOF
10696 #define HAVE_KRB5 1
10697 EOF
10698
10699
10700                         if test $ol_enable_kpasswd != no ; then
10701                                 ol_link_kpasswd=yes;
10702                         fi
10703
10704                         if test $ol_with_kerberos = k5only ; then
10705                                 ol_with_kerberos=found
10706                         fi
10707
10708                 elif test $ol_with_kerberos != auto ; then
10709                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10710                 fi
10711
10712         fi
10713 fi
10714
10715 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10716         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10717
10718         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10719 do
10720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10722 echo "configure:10723: checking for $ac_hdr" >&5
10723 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10724   echo $ac_n "(cached) $ac_c" 1>&6
10725 else
10726   cat > conftest.$ac_ext <<EOF
10727 #line 10728 "configure"
10728 #include "confdefs.h"
10729 #include <$ac_hdr>
10730 EOF
10731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10732 { (eval echo configure:10733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10734 if test -z "$ac_err"; then
10735   rm -rf conftest*
10736   eval "ac_cv_header_$ac_safe=yes"
10737 else
10738   echo "$ac_err" >&5
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   eval "ac_cv_header_$ac_safe=no"
10743 fi
10744 rm -f conftest*
10745 fi
10746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10747   echo "$ac_t""yes" 1>&6
10748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10749   cat >> confdefs.h <<EOF
10750 #define $ac_tr_hdr 1
10751 EOF
10752  
10753 else
10754   echo "$ac_t""no" 1>&6
10755 fi
10756 done
10757
10758
10759         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10760                 if test $krb5_impl = mit; then
10761                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10762 echo "configure:10763: checking for main in -lkrb4" >&5
10763 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   ac_save_LIBS="$LIBS"
10768 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10769 cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772
10773 int main() {
10774 main()
10775 ; return 0; }
10776 EOF
10777 if { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10778   rm -rf conftest*
10779   eval "ac_cv_lib_$ac_lib_var=yes"
10780 else
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -rf conftest*
10784   eval "ac_cv_lib_$ac_lib_var=no"
10785 fi
10786 rm -f conftest*
10787 LIBS="$ac_save_LIBS"
10788
10789 fi
10790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10791   echo "$ac_t""yes" 1>&6
10792   have_k425=yes
10793                                 KRB4_LIBS="-lkrb4 -ldes425"
10794 else
10795   echo "$ac_t""no" 1>&6
10796 have_k425=no
10797 fi
10798
10799
10800                 elif test $krb5_impl = heimdal; then
10801                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10802 echo "configure:10803: checking for main in -lkrb4" >&5
10803 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10805   echo $ac_n "(cached) $ac_c" 1>&6
10806 else
10807   ac_save_LIBS="$LIBS"
10808 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10809 cat > conftest.$ac_ext <<EOF
10810 #line 10811 "configure"
10811 #include "confdefs.h"
10812
10813 int main() {
10814 main()
10815 ; return 0; }
10816 EOF
10817 if { (eval echo configure:10818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10818   rm -rf conftest*
10819   eval "ac_cv_lib_$ac_lib_var=yes"
10820 else
10821   echo "configure: failed program was:" >&5
10822   cat conftest.$ac_ext >&5
10823   rm -rf conftest*
10824   eval "ac_cv_lib_$ac_lib_var=no"
10825 fi
10826 rm -f conftest*
10827 LIBS="$ac_save_LIBS"
10828
10829 fi
10830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10831   echo "$ac_t""yes" 1>&6
10832   have_k425=yes
10833                                 KRB4_LIBS="-lkrb4"
10834 else
10835   echo "$ac_t""no" 1>&6
10836 have_k425=no
10837 fi
10838
10839
10840                 else
10841                         have_425=no
10842                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10843                 fi
10844
10845                 if test $have_k425 = yes ; then
10846                         ol_with_kerberos=found
10847                         ol_link_krb4=yes
10848
10849                         cat >> confdefs.h <<\EOF
10850 #define HAVE_KRB425 1
10851 EOF
10852
10853                         cat >> confdefs.h <<\EOF
10854 #define HAVE_KRB4 1
10855 EOF
10856
10857
10858                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10859 echo "configure:10860: checking for des_debug in Kerberos libraries" >&5
10860 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10861   echo $ac_n "(cached) $ac_c" 1>&6
10862 else
10863   
10864                                                                 save_LIBS="$LIBS"
10865                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10866                                 cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869
10870 #include <kerberosIV/krb.h>
10871 #include <kerberosIV/des.h>
10872 extern int des_debug;
10873
10874 int main() {
10875
10876 des_debug = 1;
10877
10878 ; return 0; }
10879 EOF
10880 if { (eval echo configure:10881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10881   rm -rf conftest*
10882   ol_cv_var_des_debug=yes
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   ol_cv_var_des_debug=no
10888 fi
10889 rm -f conftest*
10890                                                                 LIBS="$save_LIBS"
10891                         
10892 fi
10893
10894 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10895
10896                         if test $ol_cv_var_des_debug = yes ; then
10897                                 cat >> confdefs.h <<\EOF
10898 #define HAVE_DES_DEBUG 1
10899 EOF
10900
10901                         fi
10902
10903                         LIBS="$save_LIBS"
10904                 fi
10905         fi
10906 fi
10907
10908 if test $ol_link_krb5 = yes ; then
10909         ol_with_kerberos=found
10910 fi
10911
10912 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10913         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10914
10915         for ac_hdr in krb.h des.h krb-archaeology.h 
10916 do
10917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10919 echo "configure:10920: checking for $ac_hdr" >&5
10920 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 #include <$ac_hdr>
10927 EOF
10928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10929 { (eval echo configure:10930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10931 if test -z "$ac_err"; then
10932   rm -rf conftest*
10933   eval "ac_cv_header_$ac_safe=yes"
10934 else
10935   echo "$ac_err" >&5
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_header_$ac_safe=no"
10940 fi
10941 rm -f conftest*
10942 fi
10943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10946   cat >> confdefs.h <<EOF
10947 #define $ac_tr_hdr 1
10948 EOF
10949  
10950 else
10951   echo "$ac_t""no" 1>&6
10952 fi
10953 done
10954
10955
10956         if test $ac_cv_header_krb_h = yes ; then
10957                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10958 echo "configure:10959: checking for main in -lkrb" >&5
10959 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   ac_save_LIBS="$LIBS"
10964 LIBS="-lkrb -ldes $LIBS"
10965 cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968
10969 int main() {
10970 main()
10971 ; return 0; }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10974   rm -rf conftest*
10975   eval "ac_cv_lib_$ac_lib_var=yes"
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -rf conftest*
10980   eval "ac_cv_lib_$ac_lib_var=no"
10981 fi
10982 rm -f conftest*
10983 LIBS="$ac_save_LIBS"
10984
10985 fi
10986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988   have_k4=yes
10989 else
10990   echo "$ac_t""no" 1>&6
10991 have_k4=no
10992 fi
10993
10994
10995                 if test $have_k4 = yes ; then
10996                         ol_with_kerberos=found
10997                         ol_link_krb4=yes
10998
10999                         cat >> confdefs.h <<\EOF
11000 #define HAVE_KRB4 1
11001 EOF
11002
11003
11004                         KRB4_LIBS="-lkrb -ldes"
11005
11006                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11007                                 cat >> confdefs.h <<\EOF
11008 #define HAVE_KTH_KERBEROS 1
11009 EOF
11010
11011                         fi
11012                 fi
11013         fi
11014 fi
11015
11016 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11017         ol_link_kpasswd=yes
11018 fi
11019
11020 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11021         ol_link_kbind=yes
11022
11023 elif test $ol_enable_kbind = yes ; then
11024         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11025 fi
11026
11027 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11028         cat >> confdefs.h <<\EOF
11029 #define HAVE_KERBEROS 1
11030 EOF
11031
11032
11033 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11034         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11035 fi
11036
11037 ol_link_tls=no
11038 if test $ol_with_tls != no ; then
11039         for ac_hdr in openssl/ssl.h ssl.h
11040 do
11041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11043 echo "configure:11044: checking for $ac_hdr" >&5
11044 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 #include <$ac_hdr>
11051 EOF
11052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11053 { (eval echo configure:11054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11055 if test -z "$ac_err"; then
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=yes"
11058 else
11059   echo "$ac_err" >&5
11060   echo "configure: failed program was:" >&5
11061   cat conftest.$ac_ext >&5
11062   rm -rf conftest*
11063   eval "ac_cv_header_$ac_safe=no"
11064 fi
11065 rm -f conftest*
11066 fi
11067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11068   echo "$ac_t""yes" 1>&6
11069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11070   cat >> confdefs.h <<EOF
11071 #define $ac_tr_hdr 1
11072 EOF
11073  
11074 else
11075   echo "$ac_t""no" 1>&6
11076 fi
11077 done
11078
11079         
11080         if test $ac_cv_header_openssl_ssl_h = yes \
11081                 -o $ac_cv_header_ssl_h = yes ; then
11082                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11083 echo "configure:11084: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11084 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   ac_save_LIBS="$LIBS"
11089 LIBS="-lssl -lcrypto $LIBS"
11090 cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 /* Override any gcc2 internal prototype to avoid an error.  */
11094 /* We use char because int might match the return type of a gcc2
11095     builtin and then its argument prototype would still apply.  */
11096 char SSLeay_add_ssl_algorithms();
11097
11098 int main() {
11099 SSLeay_add_ssl_algorithms()
11100 ; return 0; }
11101 EOF
11102 if { (eval echo configure:11103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11103   rm -rf conftest*
11104   eval "ac_cv_lib_$ac_lib_var=yes"
11105 else
11106   echo "configure: failed program was:" >&5
11107   cat conftest.$ac_ext >&5
11108   rm -rf conftest*
11109   eval "ac_cv_lib_$ac_lib_var=no"
11110 fi
11111 rm -f conftest*
11112 LIBS="$ac_save_LIBS"
11113
11114 fi
11115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11116   echo "$ac_t""yes" 1>&6
11117   have_ssleay=yes
11118                         need_rsaref=no
11119 else
11120   echo "$ac_t""no" 1>&6
11121 have_ssleay=no
11122 fi
11123
11124                         
11125                 if test $have_ssleay = no ; then
11126                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11127 echo "configure:11128: checking for SSL_library_init in -lssl" >&5
11128 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11129 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   ac_save_LIBS="$LIBS"
11133 LIBS="-lssl -lcrypto $LIBS"
11134 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137 /* Override any gcc2 internal prototype to avoid an error.  */
11138 /* We use char because int might match the return type of a gcc2
11139     builtin and then its argument prototype would still apply.  */
11140 char SSL_library_init();
11141
11142 int main() {
11143 SSL_library_init()
11144 ; return 0; }
11145 EOF
11146 if { (eval echo configure:11147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11147   rm -rf conftest*
11148   eval "ac_cv_lib_$ac_lib_var=yes"
11149 else
11150   echo "configure: failed program was:" >&5
11151   cat conftest.$ac_ext >&5
11152   rm -rf conftest*
11153   eval "ac_cv_lib_$ac_lib_var=no"
11154 fi
11155 rm -f conftest*
11156 LIBS="$ac_save_LIBS"
11157
11158 fi
11159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11160   echo "$ac_t""yes" 1>&6
11161   have_ssleay=yes
11162                                 need_rsaref=no
11163 else
11164   echo "$ac_t""no" 1>&6
11165 have_ssleay=no
11166 fi
11167
11168                 fi
11169
11170                 if test $have_ssleay = no ; then
11171                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11172 echo "configure:11173: checking for ssl3_accept in -lssl" >&5
11173 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11175   echo $ac_n "(cached) $ac_c" 1>&6
11176 else
11177   ac_save_LIBS="$LIBS"
11178 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11179 cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 /* Override any gcc2 internal prototype to avoid an error.  */
11183 /* We use char because int might match the return type of a gcc2
11184     builtin and then its argument prototype would still apply.  */
11185 char ssl3_accept();
11186
11187 int main() {
11188 ssl3_accept()
11189 ; return 0; }
11190 EOF
11191 if { (eval echo configure:11192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11192   rm -rf conftest*
11193   eval "ac_cv_lib_$ac_lib_var=yes"
11194 else
11195   echo "configure: failed program was:" >&5
11196   cat conftest.$ac_ext >&5
11197   rm -rf conftest*
11198   eval "ac_cv_lib_$ac_lib_var=no"
11199 fi
11200 rm -f conftest*
11201 LIBS="$ac_save_LIBS"
11202
11203 fi
11204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11205   echo "$ac_t""yes" 1>&6
11206   have_ssleay=yes
11207                                 need_rsaref=yes
11208 else
11209   echo "$ac_t""no" 1>&6
11210 have_ssleay=no
11211 fi
11212
11213                 fi
11214
11215                 if test $have_ssleay = yes ; then
11216                         ol_with_tls=found
11217                         ol_link_tls=yes
11218
11219                         cat >> confdefs.h <<\EOF
11220 #define HAVE_SSLEAY 1
11221 EOF
11222
11223
11224                         if test $need_rsaref = yes; then
11225                                 cat >> confdefs.h <<\EOF
11226 #define HAVE_RSAREF 1
11227 EOF
11228
11229
11230                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11231                         else
11232                                 TLS_LIBS="-lssl -lcrypto"
11233                         fi
11234                 fi
11235         fi
11236
11237 else
11238         echo "configure: warning: TLS data protection not supported!" 1>&2
11239 fi
11240
11241 WITH_TLS=no
11242 if test $ol_link_tls = yes ; then
11243         cat >> confdefs.h <<\EOF
11244 #define HAVE_TLS 1
11245 EOF
11246
11247         WITH_TLS=yes
11248
11249 elif test $ol_with_tls = auto ; then
11250         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11251         echo "configure: warning: TLS data protection not supported!" 1>&2
11252
11253 elif test $ol_with_tls != no ; then
11254         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11255 fi
11256
11257 if test $ol_enable_lmpasswd != no; then
11258         if test $ol_link_tls != yes ; then
11259                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11260         fi
11261
11262         cat >> confdefs.h <<\EOF
11263 #define SLAPD_LMHASH 1
11264 EOF
11265
11266 fi
11267
11268 ol_link_threads=no
11269
11270 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11271         -o $ol_with_threads = nt ; then
11272
11273         
11274         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11275 echo "configure:11276: checking for _beginthread" >&5
11276 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11277   echo $ac_n "(cached) $ac_c" 1>&6
11278 else
11279   cat > conftest.$ac_ext <<EOF
11280 #line 11281 "configure"
11281 #include "confdefs.h"
11282 /* System header to define __stub macros and hopefully few prototypes,
11283     which can conflict with char _beginthread(); below.  */
11284 #include <assert.h>
11285 /* Override any gcc2 internal prototype to avoid an error.  */
11286 /* We use char because int might match the return type of a gcc2
11287     builtin and then its argument prototype would still apply.  */
11288 char _beginthread();
11289 char (*f)();
11290
11291 int main() {
11292
11293 /* The GNU C library defines this for functions which it implements
11294     to always fail with ENOSYS.  Some functions are actually named
11295     something starting with __ and the normal name is an alias.  */
11296 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11297 choke me
11298 #else
11299 f = _beginthread;
11300 #endif
11301
11302 ; return 0; }
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11305   rm -rf conftest*
11306   eval "ac_cv_func__beginthread=yes"
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_func__beginthread=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315
11316 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318   :
11319 else
11320   echo "$ac_t""no" 1>&6
11321 fi
11322
11323
11324         if test $ac_cv_func__beginthread = yes ; then
11325                 cat >> confdefs.h <<\EOF
11326 #define HAVE_NT_THREADS 1
11327 EOF
11328
11329                 ol_cv_nt_threads=yes
11330         fi
11331
11332
11333         if test "$ol_cv_nt_threads" = yes ; then
11334                 ol_link_threads=nt
11335                 ol_with_threads=found
11336                 ol_with_yielding_select=yes
11337
11338                 cat >> confdefs.h <<\EOF
11339 #define HAVE_NT_SERVICE_MANAGER 1
11340 EOF
11341
11342                 cat >> confdefs.h <<\EOF
11343 #define HAVE_NT_EVENT_LOG 1
11344 EOF
11345
11346         fi
11347
11348         if test $ol_with_threads = nt ; then
11349                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11350         fi
11351 fi
11352
11353 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11354         -o $ol_with_threads = posix ; then
11355
11356         for ac_hdr in pthread.h
11357 do
11358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11360 echo "configure:11361: checking for $ac_hdr" >&5
11361 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11362   echo $ac_n "(cached) $ac_c" 1>&6
11363 else
11364   cat > conftest.$ac_ext <<EOF
11365 #line 11366 "configure"
11366 #include "confdefs.h"
11367 #include <$ac_hdr>
11368 EOF
11369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11370 { (eval echo configure:11371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11372 if test -z "$ac_err"; then
11373   rm -rf conftest*
11374   eval "ac_cv_header_$ac_safe=yes"
11375 else
11376   echo "$ac_err" >&5
11377   echo "configure: failed program was:" >&5
11378   cat conftest.$ac_ext >&5
11379   rm -rf conftest*
11380   eval "ac_cv_header_$ac_safe=no"
11381 fi
11382 rm -f conftest*
11383 fi
11384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11385   echo "$ac_t""yes" 1>&6
11386     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11387   cat >> confdefs.h <<EOF
11388 #define $ac_tr_hdr 1
11389 EOF
11390  
11391 else
11392   echo "$ac_t""no" 1>&6
11393 fi
11394 done
11395
11396
11397         if test $ac_cv_header_pthread_h = yes ; then
11398                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11399 echo "configure:11400: checking POSIX thread version" >&5
11400 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11401   echo $ac_n "(cached) $ac_c" 1>&6
11402 else
11403   
11404         cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407
11408 #               include <pthread.h>
11409         
11410 int main() {
11411
11412                 int i = PTHREAD_CREATE_JOINABLE;
11413         
11414 ; return 0; }
11415 EOF
11416 if { (eval echo configure:11417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11417   rm -rf conftest*
11418   
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #include <pthread.h>
11423 EOF
11424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11425   egrep "pthread_detach" >/dev/null 2>&1; then
11426   rm -rf conftest*
11427   ol_cv_pthread_version=10
11428 else
11429   rm -rf conftest*
11430   ol_cv_pthread_version=8
11431 fi
11432 rm -f conftest*
11433
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   
11439         cat > conftest.$ac_ext <<EOF
11440 #line 11441 "configure"
11441 #include "confdefs.h"
11442
11443 #               include <pthread.h>
11444 #               ifdef PTHREAD_CREATE_UNDETACHED
11445                 draft7
11446 #               endif
11447         
11448 EOF
11449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11450   egrep "draft7" >/dev/null 2>&1; then
11451   rm -rf conftest*
11452   ol_cv_pthread_version=7
11453 else
11454   rm -rf conftest*
11455   
11456         cat > conftest.$ac_ext <<EOF
11457 #line 11458 "configure"
11458 #include "confdefs.h"
11459 #include <pthread.h>
11460 EOF
11461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11462   egrep "pthread_attr_init" >/dev/null 2>&1; then
11463   rm -rf conftest*
11464   ol_cv_pthread_version=6
11465 else
11466   rm -rf conftest*
11467   
11468         cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471
11472 #               include <pthread.h>
11473 #ifdef          PTHREAD_MUTEX_INITIALIZER
11474                 draft5
11475 #endif
11476         
11477 EOF
11478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11479   egrep "draft5" >/dev/null 2>&1; then
11480   rm -rf conftest*
11481   ol_cv_pthread_version=5
11482 else
11483   rm -rf conftest*
11484   ol_cv_pthread_version=4
11485 fi
11486 rm -f conftest*
11487  
11488 fi
11489 rm -f conftest*
11490  
11491 fi
11492 rm -f conftest*
11493  
11494 fi
11495 rm -f conftest*
11496
11497 fi
11498
11499 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11500
11501
11502                 if test $ol_cv_pthread_version != 0 ; then
11503                         cat >> confdefs.h <<EOF
11504 #define HAVE_PTHREADS $ol_cv_pthread_version
11505 EOF
11506
11507                 else
11508                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11509                 fi
11510
11511                 # consider threads found
11512                 ol_with_threads=found
11513
11514                 
11515         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11516 echo "configure:11517: checking for LinuxThreads pthread.h" >&5
11517 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11518   echo $ac_n "(cached) $ac_c" 1>&6
11519 else
11520   cat > conftest.$ac_ext <<EOF
11521 #line 11522 "configure"
11522 #include "confdefs.h"
11523 #include <pthread.h>
11524 EOF
11525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11526   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11527   rm -rf conftest*
11528   ol_cv_header_linux_threads=yes
11529 else
11530   rm -rf conftest*
11531   ol_cv_header_linux_threads=no
11532 fi
11533 rm -f conftest*
11534
11535                 
11536 fi
11537
11538 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11539         if test $ol_cv_header_linux_threads = yes; then
11540                 cat >> confdefs.h <<\EOF
11541 #define HAVE_LINUX_THREADS 1
11542 EOF
11543
11544         fi
11545
11546                 
11547         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11548 echo "configure:11549: checking for GNU Pth pthread.h" >&5
11549 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11550   echo $ac_n "(cached) $ac_c" 1>&6
11551 else
11552   cat > conftest.$ac_ext <<EOF
11553 #line 11554 "configure"
11554 #include "confdefs.h"
11555 #include <pthread.h>
11556 #ifdef _POSIX_THREAD_IS_GNU_PTH
11557         __gnu_pth__;
11558 #endif
11559
11560 EOF
11561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11562   egrep "__gnu_pth__" >/dev/null 2>&1; then
11563   rm -rf conftest*
11564   ol_cv_header_gnu_pth_pthread_h=yes
11565 else
11566   rm -rf conftest*
11567   ol_cv_header_gnu_pth_pthread_h=no
11568 fi
11569 rm -f conftest*
11570
11571                 
11572 fi
11573
11574 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11575
11576
11577                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11578                         for ac_hdr in sched.h
11579 do
11580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11582 echo "configure:11583: checking for $ac_hdr" >&5
11583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 #include <$ac_hdr>
11590 EOF
11591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11592 { (eval echo configure:11593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11594 if test -z "$ac_err"; then
11595   rm -rf conftest*
11596   eval "ac_cv_header_$ac_safe=yes"
11597 else
11598   echo "$ac_err" >&5
11599   echo "configure: failed program was:" >&5
11600   cat conftest.$ac_ext >&5
11601   rm -rf conftest*
11602   eval "ac_cv_header_$ac_safe=no"
11603 fi
11604 rm -f conftest*
11605 fi
11606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11607   echo "$ac_t""yes" 1>&6
11608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11609   cat >> confdefs.h <<EOF
11610 #define $ac_tr_hdr 1
11611 EOF
11612  
11613 else
11614   echo "$ac_t""no" 1>&6
11615 fi
11616 done
11617
11618                 fi
11619
11620                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11621                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11622 echo "configure:11623: checking for pthread_create in default libraries" >&5
11623 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11624   echo $ac_n "(cached) $ac_c" 1>&6
11625 else
11626   
11627                 if test "$cross_compiling" = yes; then
11628   cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 /* pthread test headers */
11632 #include <pthread.h>
11633 #if HAVE_PTHREADS < 7
11634 #include <errno.h>
11635 #endif
11636 #ifndef NULL
11637 #define NULL (void*)0
11638 #endif
11639
11640 static void *task(p)
11641         void *p;
11642 {
11643         return (void *) (p == NULL);
11644 }
11645
11646 int main() {
11647
11648         /* pthread test function */
11649 #ifndef PTHREAD_CREATE_DETACHED
11650 #define PTHREAD_CREATE_DETACHED 1
11651 #endif
11652         pthread_t t;
11653         int status;
11654         int detach = PTHREAD_CREATE_DETACHED;
11655
11656 #if HAVE_PTHREADS > 4
11657         /* Final pthreads */
11658         pthread_attr_t attr;
11659
11660         status = pthread_attr_init(&attr);
11661         if( status ) return status;
11662
11663 #if HAVE_PTHREADS < 7
11664         status = pthread_attr_setdetachstate(&attr, &detach);
11665         if( status < 0 ) status = errno;
11666 #else
11667         status = pthread_attr_setdetachstate(&attr, detach);
11668 #endif
11669         if( status ) return status;
11670         status = pthread_create( &t, &attr, task, NULL );
11671 #if HAVE_PTHREADS < 7
11672         if( status < 0 ) status = errno;
11673 #endif
11674         if( status ) return status;
11675 #else
11676         /* Draft 4 pthreads */
11677         status = pthread_create( &t, pthread_attr_default, task, NULL );
11678         if( status ) return errno;
11679
11680         /* give thread a chance to complete */
11681         /* it should remain joinable and hence detachable */
11682         sleep( 1 );
11683
11684         status = pthread_detach( &t );
11685         if( status ) return errno;
11686 #endif
11687
11688 #ifdef HAVE_LINUX_THREADS
11689         pthread_kill_other_threads_np();
11690 #endif
11691
11692         return 0;
11693
11694 ; return 0; }
11695 EOF
11696 if { (eval echo configure:11697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11697   rm -rf conftest*
11698   ol_cv_pthread_create=yes
11699 else
11700   echo "configure: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   rm -rf conftest*
11703   ol_cv_pthread_create=no
11704 fi
11705 rm -f conftest*
11706 else
11707   cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710 /* pthread test headers */
11711 #include <pthread.h>
11712 #if HAVE_PTHREADS < 7
11713 #include <errno.h>
11714 #endif
11715 #ifndef NULL
11716 #define NULL (void*)0
11717 #endif
11718
11719 static void *task(p)
11720         void *p;
11721 {
11722         return (void *) (p == NULL);
11723 }
11724
11725
11726 int main(argc, argv)
11727         int argc;
11728         char **argv;
11729 {
11730
11731         /* pthread test function */
11732 #ifndef PTHREAD_CREATE_DETACHED
11733 #define PTHREAD_CREATE_DETACHED 1
11734 #endif
11735         pthread_t t;
11736         int status;
11737         int detach = PTHREAD_CREATE_DETACHED;
11738
11739 #if HAVE_PTHREADS > 4
11740         /* Final pthreads */
11741         pthread_attr_t attr;
11742
11743         status = pthread_attr_init(&attr);
11744         if( status ) return status;
11745
11746 #if HAVE_PTHREADS < 7
11747         status = pthread_attr_setdetachstate(&attr, &detach);
11748         if( status < 0 ) status = errno;
11749 #else
11750         status = pthread_attr_setdetachstate(&attr, detach);
11751 #endif
11752         if( status ) return status;
11753         status = pthread_create( &t, &attr, task, NULL );
11754 #if HAVE_PTHREADS < 7
11755         if( status < 0 ) status = errno;
11756 #endif
11757         if( status ) return status;
11758 #else
11759         /* Draft 4 pthreads */
11760         status = pthread_create( &t, pthread_attr_default, task, NULL );
11761         if( status ) return errno;
11762
11763         /* give thread a chance to complete */
11764         /* it should remain joinable and hence detachable */
11765         sleep( 1 );
11766
11767         status = pthread_detach( &t );
11768         if( status ) return errno;
11769 #endif
11770
11771 #ifdef HAVE_LINUX_THREADS
11772         pthread_kill_other_threads_np();
11773 #endif
11774
11775         return 0;
11776
11777 }
11778
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11781 then
11782   ol_cv_pthread_create=yes
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -fr conftest*
11787   ol_cv_pthread_create=no
11788 fi
11789 rm -fr conftest*
11790 fi
11791
11792 fi
11793
11794 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11795
11796                 if test $ol_cv_pthread_create != no ; then
11797                         ol_link_threads=posix
11798                         ol_link_pthreads=""
11799                 fi
11800                 
11801                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11802 if test "$ol_link_threads" = no ; then
11803         # try -kthread
11804         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11805 echo "configure:11806: checking for pthread link with -kthread" >&5
11806 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   
11810                 # save the flags
11811                 ol_LIBS="$LIBS"
11812                 LIBS="-kthread $LIBS"
11813
11814                 if test "$cross_compiling" = yes; then
11815   cat > conftest.$ac_ext <<EOF
11816 #line 11817 "configure"
11817 #include "confdefs.h"
11818 /* pthread test headers */
11819 #include <pthread.h>
11820 #if HAVE_PTHREADS < 7
11821 #include <errno.h>
11822 #endif
11823 #ifndef NULL
11824 #define NULL (void*)0
11825 #endif
11826
11827 static void *task(p)
11828         void *p;
11829 {
11830         return (void *) (p == NULL);
11831 }
11832
11833 int main() {
11834
11835         /* pthread test function */
11836 #ifndef PTHREAD_CREATE_DETACHED
11837 #define PTHREAD_CREATE_DETACHED 1
11838 #endif
11839         pthread_t t;
11840         int status;
11841         int detach = PTHREAD_CREATE_DETACHED;
11842
11843 #if HAVE_PTHREADS > 4
11844         /* Final pthreads */
11845         pthread_attr_t attr;
11846
11847         status = pthread_attr_init(&attr);
11848         if( status ) return status;
11849
11850 #if HAVE_PTHREADS < 7
11851         status = pthread_attr_setdetachstate(&attr, &detach);
11852         if( status < 0 ) status = errno;
11853 #else
11854         status = pthread_attr_setdetachstate(&attr, detach);
11855 #endif
11856         if( status ) return status;
11857         status = pthread_create( &t, &attr, task, NULL );
11858 #if HAVE_PTHREADS < 7
11859         if( status < 0 ) status = errno;
11860 #endif
11861         if( status ) return status;
11862 #else
11863         /* Draft 4 pthreads */
11864         status = pthread_create( &t, pthread_attr_default, task, NULL );
11865         if( status ) return errno;
11866
11867         /* give thread a chance to complete */
11868         /* it should remain joinable and hence detachable */
11869         sleep( 1 );
11870
11871         status = pthread_detach( &t );
11872         if( status ) return errno;
11873 #endif
11874
11875 #ifdef HAVE_LINUX_THREADS
11876         pthread_kill_other_threads_np();
11877 #endif
11878
11879         return 0;
11880
11881 ; return 0; }
11882 EOF
11883 if { (eval echo configure:11884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11884   rm -rf conftest*
11885   ol_cv_pthread_kthread=yes
11886 else
11887   echo "configure: failed program was:" >&5
11888   cat conftest.$ac_ext >&5
11889   rm -rf conftest*
11890   ol_cv_pthread_kthread=no
11891 fi
11892 rm -f conftest*
11893 else
11894   cat > conftest.$ac_ext <<EOF
11895 #line 11896 "configure"
11896 #include "confdefs.h"
11897 /* pthread test headers */
11898 #include <pthread.h>
11899 #if HAVE_PTHREADS < 7
11900 #include <errno.h>
11901 #endif
11902 #ifndef NULL
11903 #define NULL (void*)0
11904 #endif
11905
11906 static void *task(p)
11907         void *p;
11908 {
11909         return (void *) (p == NULL);
11910 }
11911
11912
11913 int main(argc, argv)
11914         int argc;
11915         char **argv;
11916 {
11917
11918         /* pthread test function */
11919 #ifndef PTHREAD_CREATE_DETACHED
11920 #define PTHREAD_CREATE_DETACHED 1
11921 #endif
11922         pthread_t t;
11923         int status;
11924         int detach = PTHREAD_CREATE_DETACHED;
11925
11926 #if HAVE_PTHREADS > 4
11927         /* Final pthreads */
11928         pthread_attr_t attr;
11929
11930         status = pthread_attr_init(&attr);
11931         if( status ) return status;
11932
11933 #if HAVE_PTHREADS < 7
11934         status = pthread_attr_setdetachstate(&attr, &detach);
11935         if( status < 0 ) status = errno;
11936 #else
11937         status = pthread_attr_setdetachstate(&attr, detach);
11938 #endif
11939         if( status ) return status;
11940         status = pthread_create( &t, &attr, task, NULL );
11941 #if HAVE_PTHREADS < 7
11942         if( status < 0 ) status = errno;
11943 #endif
11944         if( status ) return status;
11945 #else
11946         /* Draft 4 pthreads */
11947         status = pthread_create( &t, pthread_attr_default, task, NULL );
11948         if( status ) return errno;
11949
11950         /* give thread a chance to complete */
11951         /* it should remain joinable and hence detachable */
11952         sleep( 1 );
11953
11954         status = pthread_detach( &t );
11955         if( status ) return errno;
11956 #endif
11957
11958 #ifdef HAVE_LINUX_THREADS
11959         pthread_kill_other_threads_np();
11960 #endif
11961
11962         return 0;
11963
11964 }
11965
11966 EOF
11967 if { (eval echo configure:11968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11968 then
11969   ol_cv_pthread_kthread=yes
11970 else
11971   echo "configure: failed program was:" >&5
11972   cat conftest.$ac_ext >&5
11973   rm -fr conftest*
11974   ol_cv_pthread_kthread=no
11975 fi
11976 rm -fr conftest*
11977 fi
11978
11979
11980                 # restore the LIBS
11981                 LIBS="$ol_LIBS"
11982         
11983 fi
11984
11985 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11986
11987         if test $ol_cv_pthread_kthread = yes ; then
11988                 ol_link_pthreads="-kthread"
11989                 ol_link_threads=posix
11990         fi
11991 fi
11992
11993                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11994 if test "$ol_link_threads" = no ; then
11995         # try -pthread
11996         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11997 echo "configure:11998: checking for pthread link with -pthread" >&5
11998 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11999   echo $ac_n "(cached) $ac_c" 1>&6
12000 else
12001   
12002                 # save the flags
12003                 ol_LIBS="$LIBS"
12004                 LIBS="-pthread $LIBS"
12005
12006                 if test "$cross_compiling" = yes; then
12007   cat > conftest.$ac_ext <<EOF
12008 #line 12009 "configure"
12009 #include "confdefs.h"
12010 /* pthread test headers */
12011 #include <pthread.h>
12012 #if HAVE_PTHREADS < 7
12013 #include <errno.h>
12014 #endif
12015 #ifndef NULL
12016 #define NULL (void*)0
12017 #endif
12018
12019 static void *task(p)
12020         void *p;
12021 {
12022         return (void *) (p == NULL);
12023 }
12024
12025 int main() {
12026
12027         /* pthread test function */
12028 #ifndef PTHREAD_CREATE_DETACHED
12029 #define PTHREAD_CREATE_DETACHED 1
12030 #endif
12031         pthread_t t;
12032         int status;
12033         int detach = PTHREAD_CREATE_DETACHED;
12034
12035 #if HAVE_PTHREADS > 4
12036         /* Final pthreads */
12037         pthread_attr_t attr;
12038
12039         status = pthread_attr_init(&attr);
12040         if( status ) return status;
12041
12042 #if HAVE_PTHREADS < 7
12043         status = pthread_attr_setdetachstate(&attr, &detach);
12044         if( status < 0 ) status = errno;
12045 #else
12046         status = pthread_attr_setdetachstate(&attr, detach);
12047 #endif
12048         if( status ) return status;
12049         status = pthread_create( &t, &attr, task, NULL );
12050 #if HAVE_PTHREADS < 7
12051         if( status < 0 ) status = errno;
12052 #endif
12053         if( status ) return status;
12054 #else
12055         /* Draft 4 pthreads */
12056         status = pthread_create( &t, pthread_attr_default, task, NULL );
12057         if( status ) return errno;
12058
12059         /* give thread a chance to complete */
12060         /* it should remain joinable and hence detachable */
12061         sleep( 1 );
12062
12063         status = pthread_detach( &t );
12064         if( status ) return errno;
12065 #endif
12066
12067 #ifdef HAVE_LINUX_THREADS
12068         pthread_kill_other_threads_np();
12069 #endif
12070
12071         return 0;
12072
12073 ; return 0; }
12074 EOF
12075 if { (eval echo configure:12076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12076   rm -rf conftest*
12077   ol_cv_pthread_pthread=yes
12078 else
12079   echo "configure: failed program was:" >&5
12080   cat conftest.$ac_ext >&5
12081   rm -rf conftest*
12082   ol_cv_pthread_pthread=no
12083 fi
12084 rm -f conftest*
12085 else
12086   cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* pthread test headers */
12090 #include <pthread.h>
12091 #if HAVE_PTHREADS < 7
12092 #include <errno.h>
12093 #endif
12094 #ifndef NULL
12095 #define NULL (void*)0
12096 #endif
12097
12098 static void *task(p)
12099         void *p;
12100 {
12101         return (void *) (p == NULL);
12102 }
12103
12104
12105 int main(argc, argv)
12106         int argc;
12107         char **argv;
12108 {
12109
12110         /* pthread test function */
12111 #ifndef PTHREAD_CREATE_DETACHED
12112 #define PTHREAD_CREATE_DETACHED 1
12113 #endif
12114         pthread_t t;
12115         int status;
12116         int detach = PTHREAD_CREATE_DETACHED;
12117
12118 #if HAVE_PTHREADS > 4
12119         /* Final pthreads */
12120         pthread_attr_t attr;
12121
12122         status = pthread_attr_init(&attr);
12123         if( status ) return status;
12124
12125 #if HAVE_PTHREADS < 7
12126         status = pthread_attr_setdetachstate(&attr, &detach);
12127         if( status < 0 ) status = errno;
12128 #else
12129         status = pthread_attr_setdetachstate(&attr, detach);
12130 #endif
12131         if( status ) return status;
12132         status = pthread_create( &t, &attr, task, NULL );
12133 #if HAVE_PTHREADS < 7
12134         if( status < 0 ) status = errno;
12135 #endif
12136         if( status ) return status;
12137 #else
12138         /* Draft 4 pthreads */
12139         status = pthread_create( &t, pthread_attr_default, task, NULL );
12140         if( status ) return errno;
12141
12142         /* give thread a chance to complete */
12143         /* it should remain joinable and hence detachable */
12144         sleep( 1 );
12145
12146         status = pthread_detach( &t );
12147         if( status ) return errno;
12148 #endif
12149
12150 #ifdef HAVE_LINUX_THREADS
12151         pthread_kill_other_threads_np();
12152 #endif
12153
12154         return 0;
12155
12156 }
12157
12158 EOF
12159 if { (eval echo configure:12160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12160 then
12161   ol_cv_pthread_pthread=yes
12162 else
12163   echo "configure: failed program was:" >&5
12164   cat conftest.$ac_ext >&5
12165   rm -fr conftest*
12166   ol_cv_pthread_pthread=no
12167 fi
12168 rm -fr conftest*
12169 fi
12170
12171
12172                 # restore the LIBS
12173                 LIBS="$ol_LIBS"
12174         
12175 fi
12176
12177 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12178
12179         if test $ol_cv_pthread_pthread = yes ; then
12180                 ol_link_pthreads="-pthread"
12181                 ol_link_threads=posix
12182         fi
12183 fi
12184
12185                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12186 if test "$ol_link_threads" = no ; then
12187         # try -pthreads
12188         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12189 echo "configure:12190: checking for pthread link with -pthreads" >&5
12190 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12191   echo $ac_n "(cached) $ac_c" 1>&6
12192 else
12193   
12194                 # save the flags
12195                 ol_LIBS="$LIBS"
12196                 LIBS="-pthreads $LIBS"
12197
12198                 if test "$cross_compiling" = yes; then
12199   cat > conftest.$ac_ext <<EOF
12200 #line 12201 "configure"
12201 #include "confdefs.h"
12202 /* pthread test headers */
12203 #include <pthread.h>
12204 #if HAVE_PTHREADS < 7
12205 #include <errno.h>
12206 #endif
12207 #ifndef NULL
12208 #define NULL (void*)0
12209 #endif
12210
12211 static void *task(p)
12212         void *p;
12213 {
12214         return (void *) (p == NULL);
12215 }
12216
12217 int main() {
12218
12219         /* pthread test function */
12220 #ifndef PTHREAD_CREATE_DETACHED
12221 #define PTHREAD_CREATE_DETACHED 1
12222 #endif
12223         pthread_t t;
12224         int status;
12225         int detach = PTHREAD_CREATE_DETACHED;
12226
12227 #if HAVE_PTHREADS > 4
12228         /* Final pthreads */
12229         pthread_attr_t attr;
12230
12231         status = pthread_attr_init(&attr);
12232         if( status ) return status;
12233
12234 #if HAVE_PTHREADS < 7
12235         status = pthread_attr_setdetachstate(&attr, &detach);
12236         if( status < 0 ) status = errno;
12237 #else
12238         status = pthread_attr_setdetachstate(&attr, detach);
12239 #endif
12240         if( status ) return status;
12241         status = pthread_create( &t, &attr, task, NULL );
12242 #if HAVE_PTHREADS < 7
12243         if( status < 0 ) status = errno;
12244 #endif
12245         if( status ) return status;
12246 #else
12247         /* Draft 4 pthreads */
12248         status = pthread_create( &t, pthread_attr_default, task, NULL );
12249         if( status ) return errno;
12250
12251         /* give thread a chance to complete */
12252         /* it should remain joinable and hence detachable */
12253         sleep( 1 );
12254
12255         status = pthread_detach( &t );
12256         if( status ) return errno;
12257 #endif
12258
12259 #ifdef HAVE_LINUX_THREADS
12260         pthread_kill_other_threads_np();
12261 #endif
12262
12263         return 0;
12264
12265 ; return 0; }
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12268   rm -rf conftest*
12269   ol_cv_pthread_pthreads=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   ol_cv_pthread_pthreads=no
12275 fi
12276 rm -f conftest*
12277 else
12278   cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281 /* pthread test headers */
12282 #include <pthread.h>
12283 #if HAVE_PTHREADS < 7
12284 #include <errno.h>
12285 #endif
12286 #ifndef NULL
12287 #define NULL (void*)0
12288 #endif
12289
12290 static void *task(p)
12291         void *p;
12292 {
12293         return (void *) (p == NULL);
12294 }
12295
12296
12297 int main(argc, argv)
12298         int argc;
12299         char **argv;
12300 {
12301
12302         /* pthread test function */
12303 #ifndef PTHREAD_CREATE_DETACHED
12304 #define PTHREAD_CREATE_DETACHED 1
12305 #endif
12306         pthread_t t;
12307         int status;
12308         int detach = PTHREAD_CREATE_DETACHED;
12309
12310 #if HAVE_PTHREADS > 4
12311         /* Final pthreads */
12312         pthread_attr_t attr;
12313
12314         status = pthread_attr_init(&attr);
12315         if( status ) return status;
12316
12317 #if HAVE_PTHREADS < 7
12318         status = pthread_attr_setdetachstate(&attr, &detach);
12319         if( status < 0 ) status = errno;
12320 #else
12321         status = pthread_attr_setdetachstate(&attr, detach);
12322 #endif
12323         if( status ) return status;
12324         status = pthread_create( &t, &attr, task, NULL );
12325 #if HAVE_PTHREADS < 7
12326         if( status < 0 ) status = errno;
12327 #endif
12328         if( status ) return status;
12329 #else
12330         /* Draft 4 pthreads */
12331         status = pthread_create( &t, pthread_attr_default, task, NULL );
12332         if( status ) return errno;
12333
12334         /* give thread a chance to complete */
12335         /* it should remain joinable and hence detachable */
12336         sleep( 1 );
12337
12338         status = pthread_detach( &t );
12339         if( status ) return errno;
12340 #endif
12341
12342 #ifdef HAVE_LINUX_THREADS
12343         pthread_kill_other_threads_np();
12344 #endif
12345
12346         return 0;
12347
12348 }
12349
12350 EOF
12351 if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12352 then
12353   ol_cv_pthread_pthreads=yes
12354 else
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -fr conftest*
12358   ol_cv_pthread_pthreads=no
12359 fi
12360 rm -fr conftest*
12361 fi
12362
12363
12364                 # restore the LIBS
12365                 LIBS="$ol_LIBS"
12366         
12367 fi
12368
12369 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12370
12371         if test $ol_cv_pthread_pthreads = yes ; then
12372                 ol_link_pthreads="-pthreads"
12373                 ol_link_threads=posix
12374         fi
12375 fi
12376
12377                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12378 if test "$ol_link_threads" = no ; then
12379         # try -mthreads
12380         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12381 echo "configure:12382: checking for pthread link with -mthreads" >&5
12382 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12383   echo $ac_n "(cached) $ac_c" 1>&6
12384 else
12385   
12386                 # save the flags
12387                 ol_LIBS="$LIBS"
12388                 LIBS="-mthreads $LIBS"
12389
12390                 if test "$cross_compiling" = yes; then
12391   cat > conftest.$ac_ext <<EOF
12392 #line 12393 "configure"
12393 #include "confdefs.h"
12394 /* pthread test headers */
12395 #include <pthread.h>
12396 #if HAVE_PTHREADS < 7
12397 #include <errno.h>
12398 #endif
12399 #ifndef NULL
12400 #define NULL (void*)0
12401 #endif
12402
12403 static void *task(p)
12404         void *p;
12405 {
12406         return (void *) (p == NULL);
12407 }
12408
12409 int main() {
12410
12411         /* pthread test function */
12412 #ifndef PTHREAD_CREATE_DETACHED
12413 #define PTHREAD_CREATE_DETACHED 1
12414 #endif
12415         pthread_t t;
12416         int status;
12417         int detach = PTHREAD_CREATE_DETACHED;
12418
12419 #if HAVE_PTHREADS > 4
12420         /* Final pthreads */
12421         pthread_attr_t attr;
12422
12423         status = pthread_attr_init(&attr);
12424         if( status ) return status;
12425
12426 #if HAVE_PTHREADS < 7
12427         status = pthread_attr_setdetachstate(&attr, &detach);
12428         if( status < 0 ) status = errno;
12429 #else
12430         status = pthread_attr_setdetachstate(&attr, detach);
12431 #endif
12432         if( status ) return status;
12433         status = pthread_create( &t, &attr, task, NULL );
12434 #if HAVE_PTHREADS < 7
12435         if( status < 0 ) status = errno;
12436 #endif
12437         if( status ) return status;
12438 #else
12439         /* Draft 4 pthreads */
12440         status = pthread_create( &t, pthread_attr_default, task, NULL );
12441         if( status ) return errno;
12442
12443         /* give thread a chance to complete */
12444         /* it should remain joinable and hence detachable */
12445         sleep( 1 );
12446
12447         status = pthread_detach( &t );
12448         if( status ) return errno;
12449 #endif
12450
12451 #ifdef HAVE_LINUX_THREADS
12452         pthread_kill_other_threads_np();
12453 #endif
12454
12455         return 0;
12456
12457 ; return 0; }
12458 EOF
12459 if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12460   rm -rf conftest*
12461   ol_cv_pthread_mthreads=yes
12462 else
12463   echo "configure: failed program was:" >&5
12464   cat conftest.$ac_ext >&5
12465   rm -rf conftest*
12466   ol_cv_pthread_mthreads=no
12467 fi
12468 rm -f conftest*
12469 else
12470   cat > conftest.$ac_ext <<EOF
12471 #line 12472 "configure"
12472 #include "confdefs.h"
12473 /* pthread test headers */
12474 #include <pthread.h>
12475 #if HAVE_PTHREADS < 7
12476 #include <errno.h>
12477 #endif
12478 #ifndef NULL
12479 #define NULL (void*)0
12480 #endif
12481
12482 static void *task(p)
12483         void *p;
12484 {
12485         return (void *) (p == NULL);
12486 }
12487
12488
12489 int main(argc, argv)
12490         int argc;
12491         char **argv;
12492 {
12493
12494         /* pthread test function */
12495 #ifndef PTHREAD_CREATE_DETACHED
12496 #define PTHREAD_CREATE_DETACHED 1
12497 #endif
12498         pthread_t t;
12499         int status;
12500         int detach = PTHREAD_CREATE_DETACHED;
12501
12502 #if HAVE_PTHREADS > 4
12503         /* Final pthreads */
12504         pthread_attr_t attr;
12505
12506         status = pthread_attr_init(&attr);
12507         if( status ) return status;
12508
12509 #if HAVE_PTHREADS < 7
12510         status = pthread_attr_setdetachstate(&attr, &detach);
12511         if( status < 0 ) status = errno;
12512 #else
12513         status = pthread_attr_setdetachstate(&attr, detach);
12514 #endif
12515         if( status ) return status;
12516         status = pthread_create( &t, &attr, task, NULL );
12517 #if HAVE_PTHREADS < 7
12518         if( status < 0 ) status = errno;
12519 #endif
12520         if( status ) return status;
12521 #else
12522         /* Draft 4 pthreads */
12523         status = pthread_create( &t, pthread_attr_default, task, NULL );
12524         if( status ) return errno;
12525
12526         /* give thread a chance to complete */
12527         /* it should remain joinable and hence detachable */
12528         sleep( 1 );
12529
12530         status = pthread_detach( &t );
12531         if( status ) return errno;
12532 #endif
12533
12534 #ifdef HAVE_LINUX_THREADS
12535         pthread_kill_other_threads_np();
12536 #endif
12537
12538         return 0;
12539
12540 }
12541
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12544 then
12545   ol_cv_pthread_mthreads=yes
12546 else
12547   echo "configure: failed program was:" >&5
12548   cat conftest.$ac_ext >&5
12549   rm -fr conftest*
12550   ol_cv_pthread_mthreads=no
12551 fi
12552 rm -fr conftest*
12553 fi
12554
12555
12556                 # restore the LIBS
12557                 LIBS="$ol_LIBS"
12558         
12559 fi
12560
12561 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12562
12563         if test $ol_cv_pthread_mthreads = yes ; then
12564                 ol_link_pthreads="-mthreads"
12565                 ol_link_threads=posix
12566         fi
12567 fi
12568
12569                 # Pthread try link: -thread (ol_cv_pthread_thread)
12570 if test "$ol_link_threads" = no ; then
12571         # try -thread
12572         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12573 echo "configure:12574: checking for pthread link with -thread" >&5
12574 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12575   echo $ac_n "(cached) $ac_c" 1>&6
12576 else
12577   
12578                 # save the flags
12579                 ol_LIBS="$LIBS"
12580                 LIBS="-thread $LIBS"
12581
12582                 if test "$cross_compiling" = yes; then
12583   cat > conftest.$ac_ext <<EOF
12584 #line 12585 "configure"
12585 #include "confdefs.h"
12586 /* pthread test headers */
12587 #include <pthread.h>
12588 #if HAVE_PTHREADS < 7
12589 #include <errno.h>
12590 #endif
12591 #ifndef NULL
12592 #define NULL (void*)0
12593 #endif
12594
12595 static void *task(p)
12596         void *p;
12597 {
12598         return (void *) (p == NULL);
12599 }
12600
12601 int main() {
12602
12603         /* pthread test function */
12604 #ifndef PTHREAD_CREATE_DETACHED
12605 #define PTHREAD_CREATE_DETACHED 1
12606 #endif
12607         pthread_t t;
12608         int status;
12609         int detach = PTHREAD_CREATE_DETACHED;
12610
12611 #if HAVE_PTHREADS > 4
12612         /* Final pthreads */
12613         pthread_attr_t attr;
12614
12615         status = pthread_attr_init(&attr);
12616         if( status ) return status;
12617
12618 #if HAVE_PTHREADS < 7
12619         status = pthread_attr_setdetachstate(&attr, &detach);
12620         if( status < 0 ) status = errno;
12621 #else
12622         status = pthread_attr_setdetachstate(&attr, detach);
12623 #endif
12624         if( status ) return status;
12625         status = pthread_create( &t, &attr, task, NULL );
12626 #if HAVE_PTHREADS < 7
12627         if( status < 0 ) status = errno;
12628 #endif
12629         if( status ) return status;
12630 #else
12631         /* Draft 4 pthreads */
12632         status = pthread_create( &t, pthread_attr_default, task, NULL );
12633         if( status ) return errno;
12634
12635         /* give thread a chance to complete */
12636         /* it should remain joinable and hence detachable */
12637         sleep( 1 );
12638
12639         status = pthread_detach( &t );
12640         if( status ) return errno;
12641 #endif
12642
12643 #ifdef HAVE_LINUX_THREADS
12644         pthread_kill_other_threads_np();
12645 #endif
12646
12647         return 0;
12648
12649 ; return 0; }
12650 EOF
12651 if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12652   rm -rf conftest*
12653   ol_cv_pthread_thread=yes
12654 else
12655   echo "configure: failed program was:" >&5
12656   cat conftest.$ac_ext >&5
12657   rm -rf conftest*
12658   ol_cv_pthread_thread=no
12659 fi
12660 rm -f conftest*
12661 else
12662   cat > conftest.$ac_ext <<EOF
12663 #line 12664 "configure"
12664 #include "confdefs.h"
12665 /* pthread test headers */
12666 #include <pthread.h>
12667 #if HAVE_PTHREADS < 7
12668 #include <errno.h>
12669 #endif
12670 #ifndef NULL
12671 #define NULL (void*)0
12672 #endif
12673
12674 static void *task(p)
12675         void *p;
12676 {
12677         return (void *) (p == NULL);
12678 }
12679
12680
12681 int main(argc, argv)
12682         int argc;
12683         char **argv;
12684 {
12685
12686         /* pthread test function */
12687 #ifndef PTHREAD_CREATE_DETACHED
12688 #define PTHREAD_CREATE_DETACHED 1
12689 #endif
12690         pthread_t t;
12691         int status;
12692         int detach = PTHREAD_CREATE_DETACHED;
12693
12694 #if HAVE_PTHREADS > 4
12695         /* Final pthreads */
12696         pthread_attr_t attr;
12697
12698         status = pthread_attr_init(&attr);
12699         if( status ) return status;
12700
12701 #if HAVE_PTHREADS < 7
12702         status = pthread_attr_setdetachstate(&attr, &detach);
12703         if( status < 0 ) status = errno;
12704 #else
12705         status = pthread_attr_setdetachstate(&attr, detach);
12706 #endif
12707         if( status ) return status;
12708         status = pthread_create( &t, &attr, task, NULL );
12709 #if HAVE_PTHREADS < 7
12710         if( status < 0 ) status = errno;
12711 #endif
12712         if( status ) return status;
12713 #else
12714         /* Draft 4 pthreads */
12715         status = pthread_create( &t, pthread_attr_default, task, NULL );
12716         if( status ) return errno;
12717
12718         /* give thread a chance to complete */
12719         /* it should remain joinable and hence detachable */
12720         sleep( 1 );
12721
12722         status = pthread_detach( &t );
12723         if( status ) return errno;
12724 #endif
12725
12726 #ifdef HAVE_LINUX_THREADS
12727         pthread_kill_other_threads_np();
12728 #endif
12729
12730         return 0;
12731
12732 }
12733
12734 EOF
12735 if { (eval echo configure:12736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12736 then
12737   ol_cv_pthread_thread=yes
12738 else
12739   echo "configure: failed program was:" >&5
12740   cat conftest.$ac_ext >&5
12741   rm -fr conftest*
12742   ol_cv_pthread_thread=no
12743 fi
12744 rm -fr conftest*
12745 fi
12746
12747
12748                 # restore the LIBS
12749                 LIBS="$ol_LIBS"
12750         
12751 fi
12752
12753 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12754
12755         if test $ol_cv_pthread_thread = yes ; then
12756                 ol_link_pthreads="-thread"
12757                 ol_link_threads=posix
12758         fi
12759 fi
12760
12761
12762                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12763 if test "$ol_link_threads" = no ; then
12764         # try -lpthread -lmach -lexc -lc_r
12765         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12766 echo "configure:12767: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12767 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12768   echo $ac_n "(cached) $ac_c" 1>&6
12769 else
12770   
12771                 # save the flags
12772                 ol_LIBS="$LIBS"
12773                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12774
12775                 if test "$cross_compiling" = yes; then
12776   cat > conftest.$ac_ext <<EOF
12777 #line 12778 "configure"
12778 #include "confdefs.h"
12779 /* pthread test headers */
12780 #include <pthread.h>
12781 #if HAVE_PTHREADS < 7
12782 #include <errno.h>
12783 #endif
12784 #ifndef NULL
12785 #define NULL (void*)0
12786 #endif
12787
12788 static void *task(p)
12789         void *p;
12790 {
12791         return (void *) (p == NULL);
12792 }
12793
12794 int main() {
12795
12796         /* pthread test function */
12797 #ifndef PTHREAD_CREATE_DETACHED
12798 #define PTHREAD_CREATE_DETACHED 1
12799 #endif
12800         pthread_t t;
12801         int status;
12802         int detach = PTHREAD_CREATE_DETACHED;
12803
12804 #if HAVE_PTHREADS > 4
12805         /* Final pthreads */
12806         pthread_attr_t attr;
12807
12808         status = pthread_attr_init(&attr);
12809         if( status ) return status;
12810
12811 #if HAVE_PTHREADS < 7
12812         status = pthread_attr_setdetachstate(&attr, &detach);
12813         if( status < 0 ) status = errno;
12814 #else
12815         status = pthread_attr_setdetachstate(&attr, detach);
12816 #endif
12817         if( status ) return status;
12818         status = pthread_create( &t, &attr, task, NULL );
12819 #if HAVE_PTHREADS < 7
12820         if( status < 0 ) status = errno;
12821 #endif
12822         if( status ) return status;
12823 #else
12824         /* Draft 4 pthreads */
12825         status = pthread_create( &t, pthread_attr_default, task, NULL );
12826         if( status ) return errno;
12827
12828         /* give thread a chance to complete */
12829         /* it should remain joinable and hence detachable */
12830         sleep( 1 );
12831
12832         status = pthread_detach( &t );
12833         if( status ) return errno;
12834 #endif
12835
12836 #ifdef HAVE_LINUX_THREADS
12837         pthread_kill_other_threads_np();
12838 #endif
12839
12840         return 0;
12841
12842 ; return 0; }
12843 EOF
12844 if { (eval echo configure:12845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12845   rm -rf conftest*
12846   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12847 else
12848   echo "configure: failed program was:" >&5
12849   cat conftest.$ac_ext >&5
12850   rm -rf conftest*
12851   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12852 fi
12853 rm -f conftest*
12854 else
12855   cat > conftest.$ac_ext <<EOF
12856 #line 12857 "configure"
12857 #include "confdefs.h"
12858 /* pthread test headers */
12859 #include <pthread.h>
12860 #if HAVE_PTHREADS < 7
12861 #include <errno.h>
12862 #endif
12863 #ifndef NULL
12864 #define NULL (void*)0
12865 #endif
12866
12867 static void *task(p)
12868         void *p;
12869 {
12870         return (void *) (p == NULL);
12871 }
12872
12873
12874 int main(argc, argv)
12875         int argc;
12876         char **argv;
12877 {
12878
12879         /* pthread test function */
12880 #ifndef PTHREAD_CREATE_DETACHED
12881 #define PTHREAD_CREATE_DETACHED 1
12882 #endif
12883         pthread_t t;
12884         int status;
12885         int detach = PTHREAD_CREATE_DETACHED;
12886
12887 #if HAVE_PTHREADS > 4
12888         /* Final pthreads */
12889         pthread_attr_t attr;
12890
12891         status = pthread_attr_init(&attr);
12892         if( status ) return status;
12893
12894 #if HAVE_PTHREADS < 7
12895         status = pthread_attr_setdetachstate(&attr, &detach);
12896         if( status < 0 ) status = errno;
12897 #else
12898         status = pthread_attr_setdetachstate(&attr, detach);
12899 #endif
12900         if( status ) return status;
12901         status = pthread_create( &t, &attr, task, NULL );
12902 #if HAVE_PTHREADS < 7
12903         if( status < 0 ) status = errno;
12904 #endif
12905         if( status ) return status;
12906 #else
12907         /* Draft 4 pthreads */
12908         status = pthread_create( &t, pthread_attr_default, task, NULL );
12909         if( status ) return errno;
12910
12911         /* give thread a chance to complete */
12912         /* it should remain joinable and hence detachable */
12913         sleep( 1 );
12914
12915         status = pthread_detach( &t );
12916         if( status ) return errno;
12917 #endif
12918
12919 #ifdef HAVE_LINUX_THREADS
12920         pthread_kill_other_threads_np();
12921 #endif
12922
12923         return 0;
12924
12925 }
12926
12927 EOF
12928 if { (eval echo configure:12929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12929 then
12930   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12931 else
12932   echo "configure: failed program was:" >&5
12933   cat conftest.$ac_ext >&5
12934   rm -fr conftest*
12935   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12936 fi
12937 rm -fr conftest*
12938 fi
12939
12940
12941                 # restore the LIBS
12942                 LIBS="$ol_LIBS"
12943         
12944 fi
12945
12946 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12947
12948         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12949                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12950                 ol_link_threads=posix
12951         fi
12952 fi
12953
12954                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12955 if test "$ol_link_threads" = no ; then
12956         # try -lpthread -lmach -lexc
12957         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12958 echo "configure:12959: checking for pthread link with -lpthread -lmach -lexc" >&5
12959 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12960   echo $ac_n "(cached) $ac_c" 1>&6
12961 else
12962   
12963                 # save the flags
12964                 ol_LIBS="$LIBS"
12965                 LIBS="-lpthread -lmach -lexc $LIBS"
12966
12967                 if test "$cross_compiling" = yes; then
12968   cat > conftest.$ac_ext <<EOF
12969 #line 12970 "configure"
12970 #include "confdefs.h"
12971 /* pthread test headers */
12972 #include <pthread.h>
12973 #if HAVE_PTHREADS < 7
12974 #include <errno.h>
12975 #endif
12976 #ifndef NULL
12977 #define NULL (void*)0
12978 #endif
12979
12980 static void *task(p)
12981         void *p;
12982 {
12983         return (void *) (p == NULL);
12984 }
12985
12986 int main() {
12987
12988         /* pthread test function */
12989 #ifndef PTHREAD_CREATE_DETACHED
12990 #define PTHREAD_CREATE_DETACHED 1
12991 #endif
12992         pthread_t t;
12993         int status;
12994         int detach = PTHREAD_CREATE_DETACHED;
12995
12996 #if HAVE_PTHREADS > 4
12997         /* Final pthreads */
12998         pthread_attr_t attr;
12999
13000         status = pthread_attr_init(&attr);
13001         if( status ) return status;
13002
13003 #if HAVE_PTHREADS < 7
13004         status = pthread_attr_setdetachstate(&attr, &detach);
13005         if( status < 0 ) status = errno;
13006 #else
13007         status = pthread_attr_setdetachstate(&attr, detach);
13008 #endif
13009         if( status ) return status;
13010         status = pthread_create( &t, &attr, task, NULL );
13011 #if HAVE_PTHREADS < 7
13012         if( status < 0 ) status = errno;
13013 #endif
13014         if( status ) return status;
13015 #else
13016         /* Draft 4 pthreads */
13017         status = pthread_create( &t, pthread_attr_default, task, NULL );
13018         if( status ) return errno;
13019
13020         /* give thread a chance to complete */
13021         /* it should remain joinable and hence detachable */
13022         sleep( 1 );
13023
13024         status = pthread_detach( &t );
13025         if( status ) return errno;
13026 #endif
13027
13028 #ifdef HAVE_LINUX_THREADS
13029         pthread_kill_other_threads_np();
13030 #endif
13031
13032         return 0;
13033
13034 ; return 0; }
13035 EOF
13036 if { (eval echo configure:13037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13037   rm -rf conftest*
13038   ol_cv_pthread_lpthread_lmach_lexc=yes
13039 else
13040   echo "configure: failed program was:" >&5
13041   cat conftest.$ac_ext >&5
13042   rm -rf conftest*
13043   ol_cv_pthread_lpthread_lmach_lexc=no
13044 fi
13045 rm -f conftest*
13046 else
13047   cat > conftest.$ac_ext <<EOF
13048 #line 13049 "configure"
13049 #include "confdefs.h"
13050 /* pthread test headers */
13051 #include <pthread.h>
13052 #if HAVE_PTHREADS < 7
13053 #include <errno.h>
13054 #endif
13055 #ifndef NULL
13056 #define NULL (void*)0
13057 #endif
13058
13059 static void *task(p)
13060         void *p;
13061 {
13062         return (void *) (p == NULL);
13063 }
13064
13065
13066 int main(argc, argv)
13067         int argc;
13068         char **argv;
13069 {
13070
13071         /* pthread test function */
13072 #ifndef PTHREAD_CREATE_DETACHED
13073 #define PTHREAD_CREATE_DETACHED 1
13074 #endif
13075         pthread_t t;
13076         int status;
13077         int detach = PTHREAD_CREATE_DETACHED;
13078
13079 #if HAVE_PTHREADS > 4
13080         /* Final pthreads */
13081         pthread_attr_t attr;
13082
13083         status = pthread_attr_init(&attr);
13084         if( status ) return status;
13085
13086 #if HAVE_PTHREADS < 7
13087         status = pthread_attr_setdetachstate(&attr, &detach);
13088         if( status < 0 ) status = errno;
13089 #else
13090         status = pthread_attr_setdetachstate(&attr, detach);
13091 #endif
13092         if( status ) return status;
13093         status = pthread_create( &t, &attr, task, NULL );
13094 #if HAVE_PTHREADS < 7
13095         if( status < 0 ) status = errno;
13096 #endif
13097         if( status ) return status;
13098 #else
13099         /* Draft 4 pthreads */
13100         status = pthread_create( &t, pthread_attr_default, task, NULL );
13101         if( status ) return errno;
13102
13103         /* give thread a chance to complete */
13104         /* it should remain joinable and hence detachable */
13105         sleep( 1 );
13106
13107         status = pthread_detach( &t );
13108         if( status ) return errno;
13109 #endif
13110
13111 #ifdef HAVE_LINUX_THREADS
13112         pthread_kill_other_threads_np();
13113 #endif
13114
13115         return 0;
13116
13117 }
13118
13119 EOF
13120 if { (eval echo configure:13121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13121 then
13122   ol_cv_pthread_lpthread_lmach_lexc=yes
13123 else
13124   echo "configure: failed program was:" >&5
13125   cat conftest.$ac_ext >&5
13126   rm -fr conftest*
13127   ol_cv_pthread_lpthread_lmach_lexc=no
13128 fi
13129 rm -fr conftest*
13130 fi
13131
13132
13133                 # restore the LIBS
13134                 LIBS="$ol_LIBS"
13135         
13136 fi
13137
13138 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13139
13140         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13141                 ol_link_pthreads="-lpthread -lmach -lexc"
13142                 ol_link_threads=posix
13143         fi
13144 fi
13145
13146
13147                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13148 if test "$ol_link_threads" = no ; then
13149         # try -lpthread -Wl,-woff,85
13150         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13151 echo "configure:13152: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13152 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13153   echo $ac_n "(cached) $ac_c" 1>&6
13154 else
13155   
13156                 # save the flags
13157                 ol_LIBS="$LIBS"
13158                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13159
13160                 if test "$cross_compiling" = yes; then
13161   cat > conftest.$ac_ext <<EOF
13162 #line 13163 "configure"
13163 #include "confdefs.h"
13164 /* pthread test headers */
13165 #include <pthread.h>
13166 #if HAVE_PTHREADS < 7
13167 #include <errno.h>
13168 #endif
13169 #ifndef NULL
13170 #define NULL (void*)0
13171 #endif
13172
13173 static void *task(p)
13174         void *p;
13175 {
13176         return (void *) (p == NULL);
13177 }
13178
13179 int main() {
13180
13181         /* pthread test function */
13182 #ifndef PTHREAD_CREATE_DETACHED
13183 #define PTHREAD_CREATE_DETACHED 1
13184 #endif
13185         pthread_t t;
13186         int status;
13187         int detach = PTHREAD_CREATE_DETACHED;
13188
13189 #if HAVE_PTHREADS > 4
13190         /* Final pthreads */
13191         pthread_attr_t attr;
13192
13193         status = pthread_attr_init(&attr);
13194         if( status ) return status;
13195
13196 #if HAVE_PTHREADS < 7
13197         status = pthread_attr_setdetachstate(&attr, &detach);
13198         if( status < 0 ) status = errno;
13199 #else
13200         status = pthread_attr_setdetachstate(&attr, detach);
13201 #endif
13202         if( status ) return status;
13203         status = pthread_create( &t, &attr, task, NULL );
13204 #if HAVE_PTHREADS < 7
13205         if( status < 0 ) status = errno;
13206 #endif
13207         if( status ) return status;
13208 #else
13209         /* Draft 4 pthreads */
13210         status = pthread_create( &t, pthread_attr_default, task, NULL );
13211         if( status ) return errno;
13212
13213         /* give thread a chance to complete */
13214         /* it should remain joinable and hence detachable */
13215         sleep( 1 );
13216
13217         status = pthread_detach( &t );
13218         if( status ) return errno;
13219 #endif
13220
13221 #ifdef HAVE_LINUX_THREADS
13222         pthread_kill_other_threads_np();
13223 #endif
13224
13225         return 0;
13226
13227 ; return 0; }
13228 EOF
13229 if { (eval echo configure:13230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13230   rm -rf conftest*
13231   ol_cv_pthread_lib_lpthread_woff=yes
13232 else
13233   echo "configure: failed program was:" >&5
13234   cat conftest.$ac_ext >&5
13235   rm -rf conftest*
13236   ol_cv_pthread_lib_lpthread_woff=no
13237 fi
13238 rm -f conftest*
13239 else
13240   cat > conftest.$ac_ext <<EOF
13241 #line 13242 "configure"
13242 #include "confdefs.h"
13243 /* pthread test headers */
13244 #include <pthread.h>
13245 #if HAVE_PTHREADS < 7
13246 #include <errno.h>
13247 #endif
13248 #ifndef NULL
13249 #define NULL (void*)0
13250 #endif
13251
13252 static void *task(p)
13253         void *p;
13254 {
13255         return (void *) (p == NULL);
13256 }
13257
13258
13259 int main(argc, argv)
13260         int argc;
13261         char **argv;
13262 {
13263
13264         /* pthread test function */
13265 #ifndef PTHREAD_CREATE_DETACHED
13266 #define PTHREAD_CREATE_DETACHED 1
13267 #endif
13268         pthread_t t;
13269         int status;
13270         int detach = PTHREAD_CREATE_DETACHED;
13271
13272 #if HAVE_PTHREADS > 4
13273         /* Final pthreads */
13274         pthread_attr_t attr;
13275
13276         status = pthread_attr_init(&attr);
13277         if( status ) return status;
13278
13279 #if HAVE_PTHREADS < 7
13280         status = pthread_attr_setdetachstate(&attr, &detach);
13281         if( status < 0 ) status = errno;
13282 #else
13283         status = pthread_attr_setdetachstate(&attr, detach);
13284 #endif
13285         if( status ) return status;
13286         status = pthread_create( &t, &attr, task, NULL );
13287 #if HAVE_PTHREADS < 7
13288         if( status < 0 ) status = errno;
13289 #endif
13290         if( status ) return status;
13291 #else
13292         /* Draft 4 pthreads */
13293         status = pthread_create( &t, pthread_attr_default, task, NULL );
13294         if( status ) return errno;
13295
13296         /* give thread a chance to complete */
13297         /* it should remain joinable and hence detachable */
13298         sleep( 1 );
13299
13300         status = pthread_detach( &t );
13301         if( status ) return errno;
13302 #endif
13303
13304 #ifdef HAVE_LINUX_THREADS
13305         pthread_kill_other_threads_np();
13306 #endif
13307
13308         return 0;
13309
13310 }
13311
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13314 then
13315   ol_cv_pthread_lib_lpthread_woff=yes
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -fr conftest*
13320   ol_cv_pthread_lib_lpthread_woff=no
13321 fi
13322 rm -fr conftest*
13323 fi
13324
13325
13326                 # restore the LIBS
13327                 LIBS="$ol_LIBS"
13328         
13329 fi
13330
13331 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13332
13333         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13334                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13335                 ol_link_threads=posix
13336         fi
13337 fi
13338
13339
13340                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13341 if test "$ol_link_threads" = no ; then
13342         # try -lpthread
13343         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13344 echo "configure:13345: checking for pthread link with -lpthread" >&5
13345 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13346   echo $ac_n "(cached) $ac_c" 1>&6
13347 else
13348   
13349                 # save the flags
13350                 ol_LIBS="$LIBS"
13351                 LIBS="-lpthread $LIBS"
13352
13353                 if test "$cross_compiling" = yes; then
13354   cat > conftest.$ac_ext <<EOF
13355 #line 13356 "configure"
13356 #include "confdefs.h"
13357 /* pthread test headers */
13358 #include <pthread.h>
13359 #if HAVE_PTHREADS < 7
13360 #include <errno.h>
13361 #endif
13362 #ifndef NULL
13363 #define NULL (void*)0
13364 #endif
13365
13366 static void *task(p)
13367         void *p;
13368 {
13369         return (void *) (p == NULL);
13370 }
13371
13372 int main() {
13373
13374         /* pthread test function */
13375 #ifndef PTHREAD_CREATE_DETACHED
13376 #define PTHREAD_CREATE_DETACHED 1
13377 #endif
13378         pthread_t t;
13379         int status;
13380         int detach = PTHREAD_CREATE_DETACHED;
13381
13382 #if HAVE_PTHREADS > 4
13383         /* Final pthreads */
13384         pthread_attr_t attr;
13385
13386         status = pthread_attr_init(&attr);
13387         if( status ) return status;
13388
13389 #if HAVE_PTHREADS < 7
13390         status = pthread_attr_setdetachstate(&attr, &detach);
13391         if( status < 0 ) status = errno;
13392 #else
13393         status = pthread_attr_setdetachstate(&attr, detach);
13394 #endif
13395         if( status ) return status;
13396         status = pthread_create( &t, &attr, task, NULL );
13397 #if HAVE_PTHREADS < 7
13398         if( status < 0 ) status = errno;
13399 #endif
13400         if( status ) return status;
13401 #else
13402         /* Draft 4 pthreads */
13403         status = pthread_create( &t, pthread_attr_default, task, NULL );
13404         if( status ) return errno;
13405
13406         /* give thread a chance to complete */
13407         /* it should remain joinable and hence detachable */
13408         sleep( 1 );
13409
13410         status = pthread_detach( &t );
13411         if( status ) return errno;
13412 #endif
13413
13414 #ifdef HAVE_LINUX_THREADS
13415         pthread_kill_other_threads_np();
13416 #endif
13417
13418         return 0;
13419
13420 ; return 0; }
13421 EOF
13422 if { (eval echo configure:13423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13423   rm -rf conftest*
13424   ol_cv_pthread_lpthread=yes
13425 else
13426   echo "configure: failed program was:" >&5
13427   cat conftest.$ac_ext >&5
13428   rm -rf conftest*
13429   ol_cv_pthread_lpthread=no
13430 fi
13431 rm -f conftest*
13432 else
13433   cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 /* pthread test headers */
13437 #include <pthread.h>
13438 #if HAVE_PTHREADS < 7
13439 #include <errno.h>
13440 #endif
13441 #ifndef NULL
13442 #define NULL (void*)0
13443 #endif
13444
13445 static void *task(p)
13446         void *p;
13447 {
13448         return (void *) (p == NULL);
13449 }
13450
13451
13452 int main(argc, argv)
13453         int argc;
13454         char **argv;
13455 {
13456
13457         /* pthread test function */
13458 #ifndef PTHREAD_CREATE_DETACHED
13459 #define PTHREAD_CREATE_DETACHED 1
13460 #endif
13461         pthread_t t;
13462         int status;
13463         int detach = PTHREAD_CREATE_DETACHED;
13464
13465 #if HAVE_PTHREADS > 4
13466         /* Final pthreads */
13467         pthread_attr_t attr;
13468
13469         status = pthread_attr_init(&attr);
13470         if( status ) return status;
13471
13472 #if HAVE_PTHREADS < 7
13473         status = pthread_attr_setdetachstate(&attr, &detach);
13474         if( status < 0 ) status = errno;
13475 #else
13476         status = pthread_attr_setdetachstate(&attr, detach);
13477 #endif
13478         if( status ) return status;
13479         status = pthread_create( &t, &attr, task, NULL );
13480 #if HAVE_PTHREADS < 7
13481         if( status < 0 ) status = errno;
13482 #endif
13483         if( status ) return status;
13484 #else
13485         /* Draft 4 pthreads */
13486         status = pthread_create( &t, pthread_attr_default, task, NULL );
13487         if( status ) return errno;
13488
13489         /* give thread a chance to complete */
13490         /* it should remain joinable and hence detachable */
13491         sleep( 1 );
13492
13493         status = pthread_detach( &t );
13494         if( status ) return errno;
13495 #endif
13496
13497 #ifdef HAVE_LINUX_THREADS
13498         pthread_kill_other_threads_np();
13499 #endif
13500
13501         return 0;
13502
13503 }
13504
13505 EOF
13506 if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13507 then
13508   ol_cv_pthread_lpthread=yes
13509 else
13510   echo "configure: failed program was:" >&5
13511   cat conftest.$ac_ext >&5
13512   rm -fr conftest*
13513   ol_cv_pthread_lpthread=no
13514 fi
13515 rm -fr conftest*
13516 fi
13517
13518
13519                 # restore the LIBS
13520                 LIBS="$ol_LIBS"
13521         
13522 fi
13523
13524 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13525
13526         if test $ol_cv_pthread_lpthread = yes ; then
13527                 ol_link_pthreads="-lpthread"
13528                 ol_link_threads=posix
13529         fi
13530 fi
13531
13532                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13533 if test "$ol_link_threads" = no ; then
13534         # try -lc_r
13535         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13536 echo "configure:13537: checking for pthread link with -lc_r" >&5
13537 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13538   echo $ac_n "(cached) $ac_c" 1>&6
13539 else
13540   
13541                 # save the flags
13542                 ol_LIBS="$LIBS"
13543                 LIBS="-lc_r $LIBS"
13544
13545                 if test "$cross_compiling" = yes; then
13546   cat > conftest.$ac_ext <<EOF
13547 #line 13548 "configure"
13548 #include "confdefs.h"
13549 /* pthread test headers */
13550 #include <pthread.h>
13551 #if HAVE_PTHREADS < 7
13552 #include <errno.h>
13553 #endif
13554 #ifndef NULL
13555 #define NULL (void*)0
13556 #endif
13557
13558 static void *task(p)
13559         void *p;
13560 {
13561         return (void *) (p == NULL);
13562 }
13563
13564 int main() {
13565
13566         /* pthread test function */
13567 #ifndef PTHREAD_CREATE_DETACHED
13568 #define PTHREAD_CREATE_DETACHED 1
13569 #endif
13570         pthread_t t;
13571         int status;
13572         int detach = PTHREAD_CREATE_DETACHED;
13573
13574 #if HAVE_PTHREADS > 4
13575         /* Final pthreads */
13576         pthread_attr_t attr;
13577
13578         status = pthread_attr_init(&attr);
13579         if( status ) return status;
13580
13581 #if HAVE_PTHREADS < 7
13582         status = pthread_attr_setdetachstate(&attr, &detach);
13583         if( status < 0 ) status = errno;
13584 #else
13585         status = pthread_attr_setdetachstate(&attr, detach);
13586 #endif
13587         if( status ) return status;
13588         status = pthread_create( &t, &attr, task, NULL );
13589 #if HAVE_PTHREADS < 7
13590         if( status < 0 ) status = errno;
13591 #endif
13592         if( status ) return status;
13593 #else
13594         /* Draft 4 pthreads */
13595         status = pthread_create( &t, pthread_attr_default, task, NULL );
13596         if( status ) return errno;
13597
13598         /* give thread a chance to complete */
13599         /* it should remain joinable and hence detachable */
13600         sleep( 1 );
13601
13602         status = pthread_detach( &t );
13603         if( status ) return errno;
13604 #endif
13605
13606 #ifdef HAVE_LINUX_THREADS
13607         pthread_kill_other_threads_np();
13608 #endif
13609
13610         return 0;
13611
13612 ; return 0; }
13613 EOF
13614 if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13615   rm -rf conftest*
13616   ol_cv_pthread_lc_r=yes
13617 else
13618   echo "configure: failed program was:" >&5
13619   cat conftest.$ac_ext >&5
13620   rm -rf conftest*
13621   ol_cv_pthread_lc_r=no
13622 fi
13623 rm -f conftest*
13624 else
13625   cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 /* pthread test headers */
13629 #include <pthread.h>
13630 #if HAVE_PTHREADS < 7
13631 #include <errno.h>
13632 #endif
13633 #ifndef NULL
13634 #define NULL (void*)0
13635 #endif
13636
13637 static void *task(p)
13638         void *p;
13639 {
13640         return (void *) (p == NULL);
13641 }
13642
13643
13644 int main(argc, argv)
13645         int argc;
13646         char **argv;
13647 {
13648
13649         /* pthread test function */
13650 #ifndef PTHREAD_CREATE_DETACHED
13651 #define PTHREAD_CREATE_DETACHED 1
13652 #endif
13653         pthread_t t;
13654         int status;
13655         int detach = PTHREAD_CREATE_DETACHED;
13656
13657 #if HAVE_PTHREADS > 4
13658         /* Final pthreads */
13659         pthread_attr_t attr;
13660
13661         status = pthread_attr_init(&attr);
13662         if( status ) return status;
13663
13664 #if HAVE_PTHREADS < 7
13665         status = pthread_attr_setdetachstate(&attr, &detach);
13666         if( status < 0 ) status = errno;
13667 #else
13668         status = pthread_attr_setdetachstate(&attr, detach);
13669 #endif
13670         if( status ) return status;
13671         status = pthread_create( &t, &attr, task, NULL );
13672 #if HAVE_PTHREADS < 7
13673         if( status < 0 ) status = errno;
13674 #endif
13675         if( status ) return status;
13676 #else
13677         /* Draft 4 pthreads */
13678         status = pthread_create( &t, pthread_attr_default, task, NULL );
13679         if( status ) return errno;
13680
13681         /* give thread a chance to complete */
13682         /* it should remain joinable and hence detachable */
13683         sleep( 1 );
13684
13685         status = pthread_detach( &t );
13686         if( status ) return errno;
13687 #endif
13688
13689 #ifdef HAVE_LINUX_THREADS
13690         pthread_kill_other_threads_np();
13691 #endif
13692
13693         return 0;
13694
13695 }
13696
13697 EOF
13698 if { (eval echo configure:13699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13699 then
13700   ol_cv_pthread_lc_r=yes
13701 else
13702   echo "configure: failed program was:" >&5
13703   cat conftest.$ac_ext >&5
13704   rm -fr conftest*
13705   ol_cv_pthread_lc_r=no
13706 fi
13707 rm -fr conftest*
13708 fi
13709
13710
13711                 # restore the LIBS
13712                 LIBS="$ol_LIBS"
13713         
13714 fi
13715
13716 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13717
13718         if test $ol_cv_pthread_lc_r = yes ; then
13719                 ol_link_pthreads="-lc_r"
13720                 ol_link_threads=posix
13721         fi
13722 fi
13723
13724
13725                 # Pthread try link: -threads (ol_cv_pthread_threads)
13726 if test "$ol_link_threads" = no ; then
13727         # try -threads
13728         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13729 echo "configure:13730: checking for pthread link with -threads" >&5
13730 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13731   echo $ac_n "(cached) $ac_c" 1>&6
13732 else
13733   
13734                 # save the flags
13735                 ol_LIBS="$LIBS"
13736                 LIBS="-threads $LIBS"
13737
13738                 if test "$cross_compiling" = yes; then
13739   cat > conftest.$ac_ext <<EOF
13740 #line 13741 "configure"
13741 #include "confdefs.h"
13742 /* pthread test headers */
13743 #include <pthread.h>
13744 #if HAVE_PTHREADS < 7
13745 #include <errno.h>
13746 #endif
13747 #ifndef NULL
13748 #define NULL (void*)0
13749 #endif
13750
13751 static void *task(p)
13752         void *p;
13753 {
13754         return (void *) (p == NULL);
13755 }
13756
13757 int main() {
13758
13759         /* pthread test function */
13760 #ifndef PTHREAD_CREATE_DETACHED
13761 #define PTHREAD_CREATE_DETACHED 1
13762 #endif
13763         pthread_t t;
13764         int status;
13765         int detach = PTHREAD_CREATE_DETACHED;
13766
13767 #if HAVE_PTHREADS > 4
13768         /* Final pthreads */
13769         pthread_attr_t attr;
13770
13771         status = pthread_attr_init(&attr);
13772         if( status ) return status;
13773
13774 #if HAVE_PTHREADS < 7
13775         status = pthread_attr_setdetachstate(&attr, &detach);
13776         if( status < 0 ) status = errno;
13777 #else
13778         status = pthread_attr_setdetachstate(&attr, detach);
13779 #endif
13780         if( status ) return status;
13781         status = pthread_create( &t, &attr, task, NULL );
13782 #if HAVE_PTHREADS < 7
13783         if( status < 0 ) status = errno;
13784 #endif
13785         if( status ) return status;
13786 #else
13787         /* Draft 4 pthreads */
13788         status = pthread_create( &t, pthread_attr_default, task, NULL );
13789         if( status ) return errno;
13790
13791         /* give thread a chance to complete */
13792         /* it should remain joinable and hence detachable */
13793         sleep( 1 );
13794
13795         status = pthread_detach( &t );
13796         if( status ) return errno;
13797 #endif
13798
13799 #ifdef HAVE_LINUX_THREADS
13800         pthread_kill_other_threads_np();
13801 #endif
13802
13803         return 0;
13804
13805 ; return 0; }
13806 EOF
13807 if { (eval echo configure:13808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13808   rm -rf conftest*
13809   ol_cv_pthread_threads=yes
13810 else
13811   echo "configure: failed program was:" >&5
13812   cat conftest.$ac_ext >&5
13813   rm -rf conftest*
13814   ol_cv_pthread_threads=no
13815 fi
13816 rm -f conftest*
13817 else
13818   cat > conftest.$ac_ext <<EOF
13819 #line 13820 "configure"
13820 #include "confdefs.h"
13821 /* pthread test headers */
13822 #include <pthread.h>
13823 #if HAVE_PTHREADS < 7
13824 #include <errno.h>
13825 #endif
13826 #ifndef NULL
13827 #define NULL (void*)0
13828 #endif
13829
13830 static void *task(p)
13831         void *p;
13832 {
13833         return (void *) (p == NULL);
13834 }
13835
13836
13837 int main(argc, argv)
13838         int argc;
13839         char **argv;
13840 {
13841
13842         /* pthread test function */
13843 #ifndef PTHREAD_CREATE_DETACHED
13844 #define PTHREAD_CREATE_DETACHED 1
13845 #endif
13846         pthread_t t;
13847         int status;
13848         int detach = PTHREAD_CREATE_DETACHED;
13849
13850 #if HAVE_PTHREADS > 4
13851         /* Final pthreads */
13852         pthread_attr_t attr;
13853
13854         status = pthread_attr_init(&attr);
13855         if( status ) return status;
13856
13857 #if HAVE_PTHREADS < 7
13858         status = pthread_attr_setdetachstate(&attr, &detach);
13859         if( status < 0 ) status = errno;
13860 #else
13861         status = pthread_attr_setdetachstate(&attr, detach);
13862 #endif
13863         if( status ) return status;
13864         status = pthread_create( &t, &attr, task, NULL );
13865 #if HAVE_PTHREADS < 7
13866         if( status < 0 ) status = errno;
13867 #endif
13868         if( status ) return status;
13869 #else
13870         /* Draft 4 pthreads */
13871         status = pthread_create( &t, pthread_attr_default, task, NULL );
13872         if( status ) return errno;
13873
13874         /* give thread a chance to complete */
13875         /* it should remain joinable and hence detachable */
13876         sleep( 1 );
13877
13878         status = pthread_detach( &t );
13879         if( status ) return errno;
13880 #endif
13881
13882 #ifdef HAVE_LINUX_THREADS
13883         pthread_kill_other_threads_np();
13884 #endif
13885
13886         return 0;
13887
13888 }
13889
13890 EOF
13891 if { (eval echo configure:13892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13892 then
13893   ol_cv_pthread_threads=yes
13894 else
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -fr conftest*
13898   ol_cv_pthread_threads=no
13899 fi
13900 rm -fr conftest*
13901 fi
13902
13903
13904                 # restore the LIBS
13905                 LIBS="$ol_LIBS"
13906         
13907 fi
13908
13909 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13910
13911         if test $ol_cv_pthread_threads = yes ; then
13912                 ol_link_pthreads="-threads"
13913                 ol_link_threads=posix
13914         fi
13915 fi
13916
13917
13918                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13919 if test "$ol_link_threads" = no ; then
13920         # try -lpthreads -lmach -lexc -lc_r
13921         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13922 echo "configure:13923: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13923 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13924   echo $ac_n "(cached) $ac_c" 1>&6
13925 else
13926   
13927                 # save the flags
13928                 ol_LIBS="$LIBS"
13929                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13930
13931                 if test "$cross_compiling" = yes; then
13932   cat > conftest.$ac_ext <<EOF
13933 #line 13934 "configure"
13934 #include "confdefs.h"
13935 /* pthread test headers */
13936 #include <pthread.h>
13937 #if HAVE_PTHREADS < 7
13938 #include <errno.h>
13939 #endif
13940 #ifndef NULL
13941 #define NULL (void*)0
13942 #endif
13943
13944 static void *task(p)
13945         void *p;
13946 {
13947         return (void *) (p == NULL);
13948 }
13949
13950 int main() {
13951
13952         /* pthread test function */
13953 #ifndef PTHREAD_CREATE_DETACHED
13954 #define PTHREAD_CREATE_DETACHED 1
13955 #endif
13956         pthread_t t;
13957         int status;
13958         int detach = PTHREAD_CREATE_DETACHED;
13959
13960 #if HAVE_PTHREADS > 4
13961         /* Final pthreads */
13962         pthread_attr_t attr;
13963
13964         status = pthread_attr_init(&attr);
13965         if( status ) return status;
13966
13967 #if HAVE_PTHREADS < 7
13968         status = pthread_attr_setdetachstate(&attr, &detach);
13969         if( status < 0 ) status = errno;
13970 #else
13971         status = pthread_attr_setdetachstate(&attr, detach);
13972 #endif
13973         if( status ) return status;
13974         status = pthread_create( &t, &attr, task, NULL );
13975 #if HAVE_PTHREADS < 7
13976         if( status < 0 ) status = errno;
13977 #endif
13978         if( status ) return status;
13979 #else
13980         /* Draft 4 pthreads */
13981         status = pthread_create( &t, pthread_attr_default, task, NULL );
13982         if( status ) return errno;
13983
13984         /* give thread a chance to complete */
13985         /* it should remain joinable and hence detachable */
13986         sleep( 1 );
13987
13988         status = pthread_detach( &t );
13989         if( status ) return errno;
13990 #endif
13991
13992 #ifdef HAVE_LINUX_THREADS
13993         pthread_kill_other_threads_np();
13994 #endif
13995
13996         return 0;
13997
13998 ; return 0; }
13999 EOF
14000 if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14001   rm -rf conftest*
14002   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14003 else
14004   echo "configure: failed program was:" >&5
14005   cat conftest.$ac_ext >&5
14006   rm -rf conftest*
14007   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14008 fi
14009 rm -f conftest*
14010 else
14011   cat > conftest.$ac_ext <<EOF
14012 #line 14013 "configure"
14013 #include "confdefs.h"
14014 /* pthread test headers */
14015 #include <pthread.h>
14016 #if HAVE_PTHREADS < 7
14017 #include <errno.h>
14018 #endif
14019 #ifndef NULL
14020 #define NULL (void*)0
14021 #endif
14022
14023 static void *task(p)
14024         void *p;
14025 {
14026         return (void *) (p == NULL);
14027 }
14028
14029
14030 int main(argc, argv)
14031         int argc;
14032         char **argv;
14033 {
14034
14035         /* pthread test function */
14036 #ifndef PTHREAD_CREATE_DETACHED
14037 #define PTHREAD_CREATE_DETACHED 1
14038 #endif
14039         pthread_t t;
14040         int status;
14041         int detach = PTHREAD_CREATE_DETACHED;
14042
14043 #if HAVE_PTHREADS > 4
14044         /* Final pthreads */
14045         pthread_attr_t attr;
14046
14047         status = pthread_attr_init(&attr);
14048         if( status ) return status;
14049
14050 #if HAVE_PTHREADS < 7
14051         status = pthread_attr_setdetachstate(&attr, &detach);
14052         if( status < 0 ) status = errno;
14053 #else
14054         status = pthread_attr_setdetachstate(&attr, detach);
14055 #endif
14056         if( status ) return status;
14057         status = pthread_create( &t, &attr, task, NULL );
14058 #if HAVE_PTHREADS < 7
14059         if( status < 0 ) status = errno;
14060 #endif
14061         if( status ) return status;
14062 #else
14063         /* Draft 4 pthreads */
14064         status = pthread_create( &t, pthread_attr_default, task, NULL );
14065         if( status ) return errno;
14066
14067         /* give thread a chance to complete */
14068         /* it should remain joinable and hence detachable */
14069         sleep( 1 );
14070
14071         status = pthread_detach( &t );
14072         if( status ) return errno;
14073 #endif
14074
14075 #ifdef HAVE_LINUX_THREADS
14076         pthread_kill_other_threads_np();
14077 #endif
14078
14079         return 0;
14080
14081 }
14082
14083 EOF
14084 if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14085 then
14086   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14087 else
14088   echo "configure: failed program was:" >&5
14089   cat conftest.$ac_ext >&5
14090   rm -fr conftest*
14091   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14092 fi
14093 rm -fr conftest*
14094 fi
14095
14096
14097                 # restore the LIBS
14098                 LIBS="$ol_LIBS"
14099         
14100 fi
14101
14102 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14103
14104         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14105                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14106                 ol_link_threads=posix
14107         fi
14108 fi
14109
14110                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14111 if test "$ol_link_threads" = no ; then
14112         # try -lpthreads -lmach -lexc
14113         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14114 echo "configure:14115: checking for pthread link with -lpthreads -lmach -lexc" >&5
14115 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14116   echo $ac_n "(cached) $ac_c" 1>&6
14117 else
14118   
14119                 # save the flags
14120                 ol_LIBS="$LIBS"
14121                 LIBS="-lpthreads -lmach -lexc $LIBS"
14122
14123                 if test "$cross_compiling" = yes; then
14124   cat > conftest.$ac_ext <<EOF
14125 #line 14126 "configure"
14126 #include "confdefs.h"
14127 /* pthread test headers */
14128 #include <pthread.h>
14129 #if HAVE_PTHREADS < 7
14130 #include <errno.h>
14131 #endif
14132 #ifndef NULL
14133 #define NULL (void*)0
14134 #endif
14135
14136 static void *task(p)
14137         void *p;
14138 {
14139         return (void *) (p == NULL);
14140 }
14141
14142 int main() {
14143
14144         /* pthread test function */
14145 #ifndef PTHREAD_CREATE_DETACHED
14146 #define PTHREAD_CREATE_DETACHED 1
14147 #endif
14148         pthread_t t;
14149         int status;
14150         int detach = PTHREAD_CREATE_DETACHED;
14151
14152 #if HAVE_PTHREADS > 4
14153         /* Final pthreads */
14154         pthread_attr_t attr;
14155
14156         status = pthread_attr_init(&attr);
14157         if( status ) return status;
14158
14159 #if HAVE_PTHREADS < 7
14160         status = pthread_attr_setdetachstate(&attr, &detach);
14161         if( status < 0 ) status = errno;
14162 #else
14163         status = pthread_attr_setdetachstate(&attr, detach);
14164 #endif
14165         if( status ) return status;
14166         status = pthread_create( &t, &attr, task, NULL );
14167 #if HAVE_PTHREADS < 7
14168         if( status < 0 ) status = errno;
14169 #endif
14170         if( status ) return status;
14171 #else
14172         /* Draft 4 pthreads */
14173         status = pthread_create( &t, pthread_attr_default, task, NULL );
14174         if( status ) return errno;
14175
14176         /* give thread a chance to complete */
14177         /* it should remain joinable and hence detachable */
14178         sleep( 1 );
14179
14180         status = pthread_detach( &t );
14181         if( status ) return errno;
14182 #endif
14183
14184 #ifdef HAVE_LINUX_THREADS
14185         pthread_kill_other_threads_np();
14186 #endif
14187
14188         return 0;
14189
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14193   rm -rf conftest*
14194   ol_cv_pthread_lpthreads_lmach_lexc=yes
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   ol_cv_pthread_lpthreads_lmach_lexc=no
14200 fi
14201 rm -f conftest*
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 /* pthread test headers */
14207 #include <pthread.h>
14208 #if HAVE_PTHREADS < 7
14209 #include <errno.h>
14210 #endif
14211 #ifndef NULL
14212 #define NULL (void*)0
14213 #endif
14214
14215 static void *task(p)
14216         void *p;
14217 {
14218         return (void *) (p == NULL);
14219 }
14220
14221
14222 int main(argc, argv)
14223         int argc;
14224         char **argv;
14225 {
14226
14227         /* pthread test function */
14228 #ifndef PTHREAD_CREATE_DETACHED
14229 #define PTHREAD_CREATE_DETACHED 1
14230 #endif
14231         pthread_t t;
14232         int status;
14233         int detach = PTHREAD_CREATE_DETACHED;
14234
14235 #if HAVE_PTHREADS > 4
14236         /* Final pthreads */
14237         pthread_attr_t attr;
14238
14239         status = pthread_attr_init(&attr);
14240         if( status ) return status;
14241
14242 #if HAVE_PTHREADS < 7
14243         status = pthread_attr_setdetachstate(&attr, &detach);
14244         if( status < 0 ) status = errno;
14245 #else
14246         status = pthread_attr_setdetachstate(&attr, detach);
14247 #endif
14248         if( status ) return status;
14249         status = pthread_create( &t, &attr, task, NULL );
14250 #if HAVE_PTHREADS < 7
14251         if( status < 0 ) status = errno;
14252 #endif
14253         if( status ) return status;
14254 #else
14255         /* Draft 4 pthreads */
14256         status = pthread_create( &t, pthread_attr_default, task, NULL );
14257         if( status ) return errno;
14258
14259         /* give thread a chance to complete */
14260         /* it should remain joinable and hence detachable */
14261         sleep( 1 );
14262
14263         status = pthread_detach( &t );
14264         if( status ) return errno;
14265 #endif
14266
14267 #ifdef HAVE_LINUX_THREADS
14268         pthread_kill_other_threads_np();
14269 #endif
14270
14271         return 0;
14272
14273 }
14274
14275 EOF
14276 if { (eval echo configure:14277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14277 then
14278   ol_cv_pthread_lpthreads_lmach_lexc=yes
14279 else
14280   echo "configure: failed program was:" >&5
14281   cat conftest.$ac_ext >&5
14282   rm -fr conftest*
14283   ol_cv_pthread_lpthreads_lmach_lexc=no
14284 fi
14285 rm -fr conftest*
14286 fi
14287
14288
14289                 # restore the LIBS
14290                 LIBS="$ol_LIBS"
14291         
14292 fi
14293
14294 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14295
14296         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14297                 ol_link_pthreads="-lpthreads -lmach -lexc"
14298                 ol_link_threads=posix
14299         fi
14300 fi
14301
14302                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14303 if test "$ol_link_threads" = no ; then
14304         # try -lpthreads -lexc
14305         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14306 echo "configure:14307: checking for pthread link with -lpthreads -lexc" >&5
14307 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14308   echo $ac_n "(cached) $ac_c" 1>&6
14309 else
14310   
14311                 # save the flags
14312                 ol_LIBS="$LIBS"
14313                 LIBS="-lpthreads -lexc $LIBS"
14314
14315                 if test "$cross_compiling" = yes; then
14316   cat > conftest.$ac_ext <<EOF
14317 #line 14318 "configure"
14318 #include "confdefs.h"
14319 /* pthread test headers */
14320 #include <pthread.h>
14321 #if HAVE_PTHREADS < 7
14322 #include <errno.h>
14323 #endif
14324 #ifndef NULL
14325 #define NULL (void*)0
14326 #endif
14327
14328 static void *task(p)
14329         void *p;
14330 {
14331         return (void *) (p == NULL);
14332 }
14333
14334 int main() {
14335
14336         /* pthread test function */
14337 #ifndef PTHREAD_CREATE_DETACHED
14338 #define PTHREAD_CREATE_DETACHED 1
14339 #endif
14340         pthread_t t;
14341         int status;
14342         int detach = PTHREAD_CREATE_DETACHED;
14343
14344 #if HAVE_PTHREADS > 4
14345         /* Final pthreads */
14346         pthread_attr_t attr;
14347
14348         status = pthread_attr_init(&attr);
14349         if( status ) return status;
14350
14351 #if HAVE_PTHREADS < 7
14352         status = pthread_attr_setdetachstate(&attr, &detach);
14353         if( status < 0 ) status = errno;
14354 #else
14355         status = pthread_attr_setdetachstate(&attr, detach);
14356 #endif
14357         if( status ) return status;
14358         status = pthread_create( &t, &attr, task, NULL );
14359 #if HAVE_PTHREADS < 7
14360         if( status < 0 ) status = errno;
14361 #endif
14362         if( status ) return status;
14363 #else
14364         /* Draft 4 pthreads */
14365         status = pthread_create( &t, pthread_attr_default, task, NULL );
14366         if( status ) return errno;
14367
14368         /* give thread a chance to complete */
14369         /* it should remain joinable and hence detachable */
14370         sleep( 1 );
14371
14372         status = pthread_detach( &t );
14373         if( status ) return errno;
14374 #endif
14375
14376 #ifdef HAVE_LINUX_THREADS
14377         pthread_kill_other_threads_np();
14378 #endif
14379
14380         return 0;
14381
14382 ; return 0; }
14383 EOF
14384 if { (eval echo configure:14385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14385   rm -rf conftest*
14386   ol_cv_pthread_lpthreads_lexc=yes
14387 else
14388   echo "configure: failed program was:" >&5
14389   cat conftest.$ac_ext >&5
14390   rm -rf conftest*
14391   ol_cv_pthread_lpthreads_lexc=no
14392 fi
14393 rm -f conftest*
14394 else
14395   cat > conftest.$ac_ext <<EOF
14396 #line 14397 "configure"
14397 #include "confdefs.h"
14398 /* pthread test headers */
14399 #include <pthread.h>
14400 #if HAVE_PTHREADS < 7
14401 #include <errno.h>
14402 #endif
14403 #ifndef NULL
14404 #define NULL (void*)0
14405 #endif
14406
14407 static void *task(p)
14408         void *p;
14409 {
14410         return (void *) (p == NULL);
14411 }
14412
14413
14414 int main(argc, argv)
14415         int argc;
14416         char **argv;
14417 {
14418
14419         /* pthread test function */
14420 #ifndef PTHREAD_CREATE_DETACHED
14421 #define PTHREAD_CREATE_DETACHED 1
14422 #endif
14423         pthread_t t;
14424         int status;
14425         int detach = PTHREAD_CREATE_DETACHED;
14426
14427 #if HAVE_PTHREADS > 4
14428         /* Final pthreads */
14429         pthread_attr_t attr;
14430
14431         status = pthread_attr_init(&attr);
14432         if( status ) return status;
14433
14434 #if HAVE_PTHREADS < 7
14435         status = pthread_attr_setdetachstate(&attr, &detach);
14436         if( status < 0 ) status = errno;
14437 #else
14438         status = pthread_attr_setdetachstate(&attr, detach);
14439 #endif
14440         if( status ) return status;
14441         status = pthread_create( &t, &attr, task, NULL );
14442 #if HAVE_PTHREADS < 7
14443         if( status < 0 ) status = errno;
14444 #endif
14445         if( status ) return status;
14446 #else
14447         /* Draft 4 pthreads */
14448         status = pthread_create( &t, pthread_attr_default, task, NULL );
14449         if( status ) return errno;
14450
14451         /* give thread a chance to complete */
14452         /* it should remain joinable and hence detachable */
14453         sleep( 1 );
14454
14455         status = pthread_detach( &t );
14456         if( status ) return errno;
14457 #endif
14458
14459 #ifdef HAVE_LINUX_THREADS
14460         pthread_kill_other_threads_np();
14461 #endif
14462
14463         return 0;
14464
14465 }
14466
14467 EOF
14468 if { (eval echo configure:14469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14469 then
14470   ol_cv_pthread_lpthreads_lexc=yes
14471 else
14472   echo "configure: failed program was:" >&5
14473   cat conftest.$ac_ext >&5
14474   rm -fr conftest*
14475   ol_cv_pthread_lpthreads_lexc=no
14476 fi
14477 rm -fr conftest*
14478 fi
14479
14480
14481                 # restore the LIBS
14482                 LIBS="$ol_LIBS"
14483         
14484 fi
14485
14486 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14487
14488         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14489                 ol_link_pthreads="-lpthreads -lexc"
14490                 ol_link_threads=posix
14491         fi
14492 fi
14493
14494
14495                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14496 if test "$ol_link_threads" = no ; then
14497         # try -lpthreads
14498         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14499 echo "configure:14500: checking for pthread link with -lpthreads" >&5
14500 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14501   echo $ac_n "(cached) $ac_c" 1>&6
14502 else
14503   
14504                 # save the flags
14505                 ol_LIBS="$LIBS"
14506                 LIBS="-lpthreads $LIBS"
14507
14508                 if test "$cross_compiling" = yes; then
14509   cat > conftest.$ac_ext <<EOF
14510 #line 14511 "configure"
14511 #include "confdefs.h"
14512 /* pthread test headers */
14513 #include <pthread.h>
14514 #if HAVE_PTHREADS < 7
14515 #include <errno.h>
14516 #endif
14517 #ifndef NULL
14518 #define NULL (void*)0
14519 #endif
14520
14521 static void *task(p)
14522         void *p;
14523 {
14524         return (void *) (p == NULL);
14525 }
14526
14527 int main() {
14528
14529         /* pthread test function */
14530 #ifndef PTHREAD_CREATE_DETACHED
14531 #define PTHREAD_CREATE_DETACHED 1
14532 #endif
14533         pthread_t t;
14534         int status;
14535         int detach = PTHREAD_CREATE_DETACHED;
14536
14537 #if HAVE_PTHREADS > 4
14538         /* Final pthreads */
14539         pthread_attr_t attr;
14540
14541         status = pthread_attr_init(&attr);
14542         if( status ) return status;
14543
14544 #if HAVE_PTHREADS < 7
14545         status = pthread_attr_setdetachstate(&attr, &detach);
14546         if( status < 0 ) status = errno;
14547 #else
14548         status = pthread_attr_setdetachstate(&attr, detach);
14549 #endif
14550         if( status ) return status;
14551         status = pthread_create( &t, &attr, task, NULL );
14552 #if HAVE_PTHREADS < 7
14553         if( status < 0 ) status = errno;
14554 #endif
14555         if( status ) return status;
14556 #else
14557         /* Draft 4 pthreads */
14558         status = pthread_create( &t, pthread_attr_default, task, NULL );
14559         if( status ) return errno;
14560
14561         /* give thread a chance to complete */
14562         /* it should remain joinable and hence detachable */
14563         sleep( 1 );
14564
14565         status = pthread_detach( &t );
14566         if( status ) return errno;
14567 #endif
14568
14569 #ifdef HAVE_LINUX_THREADS
14570         pthread_kill_other_threads_np();
14571 #endif
14572
14573         return 0;
14574
14575 ; return 0; }
14576 EOF
14577 if { (eval echo configure:14578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14578   rm -rf conftest*
14579   ol_cv_pthread_lib_lpthreads=yes
14580 else
14581   echo "configure: failed program was:" >&5
14582   cat conftest.$ac_ext >&5
14583   rm -rf conftest*
14584   ol_cv_pthread_lib_lpthreads=no
14585 fi
14586 rm -f conftest*
14587 else
14588   cat > conftest.$ac_ext <<EOF
14589 #line 14590 "configure"
14590 #include "confdefs.h"
14591 /* pthread test headers */
14592 #include <pthread.h>
14593 #if HAVE_PTHREADS < 7
14594 #include <errno.h>
14595 #endif
14596 #ifndef NULL
14597 #define NULL (void*)0
14598 #endif
14599
14600 static void *task(p)
14601         void *p;
14602 {
14603         return (void *) (p == NULL);
14604 }
14605
14606
14607 int main(argc, argv)
14608         int argc;
14609         char **argv;
14610 {
14611
14612         /* pthread test function */
14613 #ifndef PTHREAD_CREATE_DETACHED
14614 #define PTHREAD_CREATE_DETACHED 1
14615 #endif
14616         pthread_t t;
14617         int status;
14618         int detach = PTHREAD_CREATE_DETACHED;
14619
14620 #if HAVE_PTHREADS > 4
14621         /* Final pthreads */
14622         pthread_attr_t attr;
14623
14624         status = pthread_attr_init(&attr);
14625         if( status ) return status;
14626
14627 #if HAVE_PTHREADS < 7
14628         status = pthread_attr_setdetachstate(&attr, &detach);
14629         if( status < 0 ) status = errno;
14630 #else
14631         status = pthread_attr_setdetachstate(&attr, detach);
14632 #endif
14633         if( status ) return status;
14634         status = pthread_create( &t, &attr, task, NULL );
14635 #if HAVE_PTHREADS < 7
14636         if( status < 0 ) status = errno;
14637 #endif
14638         if( status ) return status;
14639 #else
14640         /* Draft 4 pthreads */
14641         status = pthread_create( &t, pthread_attr_default, task, NULL );
14642         if( status ) return errno;
14643
14644         /* give thread a chance to complete */
14645         /* it should remain joinable and hence detachable */
14646         sleep( 1 );
14647
14648         status = pthread_detach( &t );
14649         if( status ) return errno;
14650 #endif
14651
14652 #ifdef HAVE_LINUX_THREADS
14653         pthread_kill_other_threads_np();
14654 #endif
14655
14656         return 0;
14657
14658 }
14659
14660 EOF
14661 if { (eval echo configure:14662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14662 then
14663   ol_cv_pthread_lib_lpthreads=yes
14664 else
14665   echo "configure: failed program was:" >&5
14666   cat conftest.$ac_ext >&5
14667   rm -fr conftest*
14668   ol_cv_pthread_lib_lpthreads=no
14669 fi
14670 rm -fr conftest*
14671 fi
14672
14673
14674                 # restore the LIBS
14675                 LIBS="$ol_LIBS"
14676         
14677 fi
14678
14679 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14680
14681         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14682                 ol_link_pthreads="-lpthreads"
14683                 ol_link_threads=posix
14684         fi
14685 fi
14686
14687
14688                 if test $ol_link_threads != no ; then
14689                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14690
14691                                                 save_CPPFLAGS="$CPPFLAGS"
14692                         save_LIBS="$LIBS"
14693                         LIBS="$LTHREAD_LIBS $LIBS"
14694
14695                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14696 do
14697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14698 echo "configure:14699: checking for $ac_func" >&5
14699 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14700   echo $ac_n "(cached) $ac_c" 1>&6
14701 else
14702   cat > conftest.$ac_ext <<EOF
14703 #line 14704 "configure"
14704 #include "confdefs.h"
14705 /* System header to define __stub macros and hopefully few prototypes,
14706     which can conflict with char $ac_func(); below.  */
14707 #include <assert.h>
14708 /* Override any gcc2 internal prototype to avoid an error.  */
14709 /* We use char because int might match the return type of a gcc2
14710     builtin and then its argument prototype would still apply.  */
14711 char $ac_func();
14712 char (*f)();
14713
14714 int main() {
14715
14716 /* The GNU C library defines this for functions which it implements
14717     to always fail with ENOSYS.  Some functions are actually named
14718     something starting with __ and the normal name is an alias.  */
14719 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14720 choke me
14721 #else
14722 f = $ac_func;
14723 #endif
14724
14725 ; return 0; }
14726 EOF
14727 if { (eval echo configure:14728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14728   rm -rf conftest*
14729   eval "ac_cv_func_$ac_func=yes"
14730 else
14731   echo "configure: failed program was:" >&5
14732   cat conftest.$ac_ext >&5
14733   rm -rf conftest*
14734   eval "ac_cv_func_$ac_func=no"
14735 fi
14736 rm -f conftest*
14737 fi
14738
14739 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14740   echo "$ac_t""yes" 1>&6
14741     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14742   cat >> confdefs.h <<EOF
14743 #define $ac_tr_func 1
14744 EOF
14745  
14746 else
14747   echo "$ac_t""no" 1>&6
14748 fi
14749 done
14750
14751
14752                         if test $ac_cv_func_sched_yield = no -a \
14753                                 $ac_cv_func_pthread_yield = no -a \
14754                                 $ac_cv_func_thr_yield = no ; then
14755                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14756 echo "configure:14757: checking for sched_yield in -lrt" >&5
14757 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14758 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14759   echo $ac_n "(cached) $ac_c" 1>&6
14760 else
14761   ac_save_LIBS="$LIBS"
14762 LIBS="-lrt  $LIBS"
14763 cat > conftest.$ac_ext <<EOF
14764 #line 14765 "configure"
14765 #include "confdefs.h"
14766 /* Override any gcc2 internal prototype to avoid an error.  */
14767 /* We use char because int might match the return type of a gcc2
14768     builtin and then its argument prototype would still apply.  */
14769 char sched_yield();
14770
14771 int main() {
14772 sched_yield()
14773 ; return 0; }
14774 EOF
14775 if { (eval echo configure:14776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14776   rm -rf conftest*
14777   eval "ac_cv_lib_$ac_lib_var=yes"
14778 else
14779   echo "configure: failed program was:" >&5
14780   cat conftest.$ac_ext >&5
14781   rm -rf conftest*
14782   eval "ac_cv_lib_$ac_lib_var=no"
14783 fi
14784 rm -f conftest*
14785 LIBS="$ac_save_LIBS"
14786
14787 fi
14788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14789   echo "$ac_t""yes" 1>&6
14790   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14791                                         cat >> confdefs.h <<\EOF
14792 #define HAVE_SCHED_YIELD 1
14793 EOF
14794
14795                                         ac_cv_func_sched_yield=yes
14796 else
14797   echo "$ac_t""no" 1>&6
14798 ac_cv_func_sched_yield=no
14799 fi
14800
14801                         fi
14802                         if test $ac_cv_func_sched_yield = no -a \
14803                                 $ac_cv_func_pthread_yield = no -a \
14804                                 "$ac_cv_func_thr_yield" = no ; then
14805                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14806                         fi
14807
14808                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14809 do
14810 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14811 echo "configure:14812: checking for $ac_func" >&5
14812 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14813   echo $ac_n "(cached) $ac_c" 1>&6
14814 else
14815   cat > conftest.$ac_ext <<EOF
14816 #line 14817 "configure"
14817 #include "confdefs.h"
14818 /* System header to define __stub macros and hopefully few prototypes,
14819     which can conflict with char $ac_func(); below.  */
14820 #include <assert.h>
14821 /* Override any gcc2 internal prototype to avoid an error.  */
14822 /* We use char because int might match the return type of a gcc2
14823     builtin and then its argument prototype would still apply.  */
14824 char $ac_func();
14825 char (*f)();
14826
14827 int main() {
14828
14829 /* The GNU C library defines this for functions which it implements
14830     to always fail with ENOSYS.  Some functions are actually named
14831     something starting with __ and the normal name is an alias.  */
14832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14833 choke me
14834 #else
14835 f = $ac_func;
14836 #endif
14837
14838 ; return 0; }
14839 EOF
14840 if { (eval echo configure:14841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14841   rm -rf conftest*
14842   eval "ac_cv_func_$ac_func=yes"
14843 else
14844   echo "configure: failed program was:" >&5
14845   cat conftest.$ac_ext >&5
14846   rm -rf conftest*
14847   eval "ac_cv_func_$ac_func=no"
14848 fi
14849 rm -f conftest*
14850 fi
14851
14852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14853   echo "$ac_t""yes" 1>&6
14854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14855   cat >> confdefs.h <<EOF
14856 #define $ac_tr_func 1
14857 EOF
14858  
14859 else
14860   echo "$ac_t""no" 1>&6
14861 fi
14862 done
14863
14864
14865                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14866 echo "configure:14867: checking for pthread_detach with <pthread.h>" >&5
14867 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14868   echo $ac_n "(cached) $ac_c" 1>&6
14869 else
14870   
14871                                                                 cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874
14875 #include <pthread.h>
14876 #ifndef NULL
14877 #define NULL (void*)0
14878 #endif
14879
14880 int main() {
14881 pthread_detach(NULL);
14882 ; return 0; }
14883 EOF
14884 if { (eval echo configure:14885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14885   rm -rf conftest*
14886   ol_cv_func_pthread_detach=yes
14887 else
14888   echo "configure: failed program was:" >&5
14889   cat conftest.$ac_ext >&5
14890   rm -rf conftest*
14891   ol_cv_func_pthread_detach=no
14892 fi
14893 rm -f conftest*
14894                         
14895 fi
14896
14897 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14898
14899                         if test $ol_cv_func_pthread_detach = no ; then
14900                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14901                         fi
14902
14903                         cat >> confdefs.h <<\EOF
14904 #define HAVE_PTHREAD_DETACH 1
14905 EOF
14906
14907
14908                                                 for ac_func in \
14909                                 pthread_setconcurrency \
14910                                 pthread_getconcurrency \
14911                                 thr_setconcurrency \
14912                                 thr_getconcurrency \
14913                         
14914 do
14915 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14916 echo "configure:14917: checking for $ac_func" >&5
14917 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14918   echo $ac_n "(cached) $ac_c" 1>&6
14919 else
14920   cat > conftest.$ac_ext <<EOF
14921 #line 14922 "configure"
14922 #include "confdefs.h"
14923 /* System header to define __stub macros and hopefully few prototypes,
14924     which can conflict with char $ac_func(); below.  */
14925 #include <assert.h>
14926 /* Override any gcc2 internal prototype to avoid an error.  */
14927 /* We use char because int might match the return type of a gcc2
14928     builtin and then its argument prototype would still apply.  */
14929 char $ac_func();
14930 char (*f)();
14931
14932 int main() {
14933
14934 /* The GNU C library defines this for functions which it implements
14935     to always fail with ENOSYS.  Some functions are actually named
14936     something starting with __ and the normal name is an alias.  */
14937 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14938 choke me
14939 #else
14940 f = $ac_func;
14941 #endif
14942
14943 ; return 0; }
14944 EOF
14945 if { (eval echo configure:14946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14946   rm -rf conftest*
14947   eval "ac_cv_func_$ac_func=yes"
14948 else
14949   echo "configure: failed program was:" >&5
14950   cat conftest.$ac_ext >&5
14951   rm -rf conftest*
14952   eval "ac_cv_func_$ac_func=no"
14953 fi
14954 rm -f conftest*
14955 fi
14956
14957 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14958   echo "$ac_t""yes" 1>&6
14959     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14960   cat >> confdefs.h <<EOF
14961 #define $ac_tr_func 1
14962 EOF
14963  
14964 else
14965   echo "$ac_t""no" 1>&6
14966 fi
14967 done
14968
14969
14970                         
14971         for ac_func in pthread_kill_other_threads_np
14972 do
14973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14974 echo "configure:14975: checking for $ac_func" >&5
14975 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14976   echo $ac_n "(cached) $ac_c" 1>&6
14977 else
14978   cat > conftest.$ac_ext <<EOF
14979 #line 14980 "configure"
14980 #include "confdefs.h"
14981 /* System header to define __stub macros and hopefully few prototypes,
14982     which can conflict with char $ac_func(); below.  */
14983 #include <assert.h>
14984 /* Override any gcc2 internal prototype to avoid an error.  */
14985 /* We use char because int might match the return type of a gcc2
14986     builtin and then its argument prototype would still apply.  */
14987 char $ac_func();
14988 char (*f)();
14989
14990 int main() {
14991
14992 /* The GNU C library defines this for functions which it implements
14993     to always fail with ENOSYS.  Some functions are actually named
14994     something starting with __ and the normal name is an alias.  */
14995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14996 choke me
14997 #else
14998 f = $ac_func;
14999 #endif
15000
15001 ; return 0; }
15002 EOF
15003 if { (eval echo configure:15004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15004   rm -rf conftest*
15005   eval "ac_cv_func_$ac_func=yes"
15006 else
15007   echo "configure: failed program was:" >&5
15008   cat conftest.$ac_ext >&5
15009   rm -rf conftest*
15010   eval "ac_cv_func_$ac_func=no"
15011 fi
15012 rm -f conftest*
15013 fi
15014
15015 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15016   echo "$ac_t""yes" 1>&6
15017     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15018   cat >> confdefs.h <<EOF
15019 #define $ac_tr_func 1
15020 EOF
15021  
15022 else
15023   echo "$ac_t""no" 1>&6
15024 fi
15025 done
15026
15027         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15028 echo "configure:15029: checking for LinuxThreads implementation" >&5
15029 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15030   echo $ac_n "(cached) $ac_c" 1>&6
15031 else
15032   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15033 fi
15034
15035 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15036
15037                         
15038         
15039         
15040         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15041 echo "configure:15042: checking for LinuxThreads consistency" >&5
15042 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15043   echo $ac_n "(cached) $ac_c" 1>&6
15044 else
15045   
15046                 if test $ol_cv_header_linux_threads = yes -a \
15047                         $ol_cv_sys_linux_threads = yes; then
15048                         ol_cv_linux_threads=yes
15049                 elif test $ol_cv_header_linux_threads = no -a \
15050                         $ol_cv_sys_linux_threads = no; then
15051                         ol_cv_linux_threads=no
15052                 else
15053                         ol_cv_linux_threads=error
15054                 fi
15055         
15056 fi
15057
15058 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15059
15060
15061                         if test $ol_cv_linux_threads = error; then
15062                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15063                         fi
15064
15065                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15066 echo "configure:15067: checking if pthread_create() works" >&5
15067 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15068   echo $ac_n "(cached) $ac_c" 1>&6
15069 else
15070   
15071                         if test "$cross_compiling" = yes; then
15072                                 ol_cv_pthread_create_works=yes
15073 else
15074   cat > conftest.$ac_ext <<EOF
15075 #line 15076 "configure"
15076 #include "confdefs.h"
15077 /* pthread test headers */
15078 #include <pthread.h>
15079 #if HAVE_PTHREADS < 7
15080 #include <errno.h>
15081 #endif
15082 #ifndef NULL
15083 #define NULL (void*)0
15084 #endif
15085
15086 static void *task(p)
15087         void *p;
15088 {
15089         return (void *) (p == NULL);
15090 }
15091
15092
15093 int main(argc, argv)
15094         int argc;
15095         char **argv;
15096 {
15097
15098         /* pthread test function */
15099 #ifndef PTHREAD_CREATE_DETACHED
15100 #define PTHREAD_CREATE_DETACHED 1
15101 #endif
15102         pthread_t t;
15103         int status;
15104         int detach = PTHREAD_CREATE_DETACHED;
15105
15106 #if HAVE_PTHREADS > 4
15107         /* Final pthreads */
15108         pthread_attr_t attr;
15109
15110         status = pthread_attr_init(&attr);
15111         if( status ) return status;
15112
15113 #if HAVE_PTHREADS < 7
15114         status = pthread_attr_setdetachstate(&attr, &detach);
15115         if( status < 0 ) status = errno;
15116 #else
15117         status = pthread_attr_setdetachstate(&attr, detach);
15118 #endif
15119         if( status ) return status;
15120         status = pthread_create( &t, &attr, task, NULL );
15121 #if HAVE_PTHREADS < 7
15122         if( status < 0 ) status = errno;
15123 #endif
15124         if( status ) return status;
15125 #else
15126         /* Draft 4 pthreads */
15127         status = pthread_create( &t, pthread_attr_default, task, NULL );
15128         if( status ) return errno;
15129
15130         /* give thread a chance to complete */
15131         /* it should remain joinable and hence detachable */
15132         sleep( 1 );
15133
15134         status = pthread_detach( &t );
15135         if( status ) return errno;
15136 #endif
15137
15138 #ifdef HAVE_LINUX_THREADS
15139         pthread_kill_other_threads_np();
15140 #endif
15141
15142         return 0;
15143
15144 }
15145
15146 EOF
15147 if { (eval echo configure:15148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15148 then
15149   ol_cv_pthread_create_works=yes
15150 else
15151   echo "configure: failed program was:" >&5
15152   cat conftest.$ac_ext >&5
15153   rm -fr conftest*
15154   ol_cv_pthread_create_works=no
15155 fi
15156 rm -fr conftest*
15157 fi
15158
15159 fi
15160
15161 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15162
15163                         if test $ol_cv_pthread_create_works = no ; then
15164                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15165                         fi
15166
15167                                                 if test $ol_with_yielding_select = auto ; then
15168                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15169 echo "configure:15170: checking if select yields when using pthreads" >&5
15170 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15171   echo $ac_n "(cached) $ac_c" 1>&6
15172 else
15173   
15174                                 if test "$cross_compiling" = yes; then
15175   ol_cv_pthread_select_yields=cross
15176 else
15177   cat > conftest.$ac_ext <<EOF
15178 #line 15179 "configure"
15179 #include "confdefs.h"
15180
15181 #include <sys/types.h>
15182 #include <sys/time.h>
15183 #include <unistd.h>
15184 #include <pthread.h>
15185 #ifndef NULL
15186 #define NULL (void*) 0
15187 #endif
15188
15189 static int fildes[2];
15190
15191 static void *task(p)
15192         void *p;
15193 {
15194         int i;
15195         struct timeval tv;
15196
15197         fd_set rfds;
15198
15199         tv.tv_sec=10;
15200         tv.tv_usec=0;
15201
15202         FD_ZERO(&rfds);
15203         FD_SET(fildes[0], &rfds);
15204
15205         /* we're not interested in any fds */
15206         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15207
15208         if(i < 0) {
15209                 perror("select");
15210                 exit(10);
15211         }
15212
15213         exit(0); /* if we exit here, the select blocked the whole process */
15214 }
15215
15216 int main(argc, argv)
15217         int argc;
15218         char **argv;
15219 {
15220         pthread_t t;
15221
15222         /* create a pipe to select */
15223         if(pipe(&fildes[0])) {
15224                 perror("select");
15225                 exit(1);
15226         }
15227
15228 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15229         (void) pthread_setconcurrency(2);
15230 #else
15231 #ifdef HAVE_THR_SETCONCURRENCY
15232         /* Set Solaris LWP concurrency to 2 */
15233         thr_setconcurrency(2);
15234 #endif
15235 #endif
15236
15237 #if HAVE_PTHREADS < 6
15238         pthread_create(&t, pthread_attr_default, task, NULL);
15239 #else
15240         pthread_create(&t, NULL, task, NULL);
15241 #endif
15242
15243         /* make sure task runs first */
15244 #if HAVE_THR_YIELD
15245         thr_yield();
15246 #elif defined( HAVE_SCHED_YIELD )
15247         sched_yield();
15248 #elif defined( HAVE_PTHREAD_YIELD )
15249         pthread_yield();
15250 #endif
15251
15252         exit(2);
15253 }
15254 EOF
15255 if { (eval echo configure:15256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15256 then
15257   ol_cv_pthread_select_yields=no
15258 else
15259   echo "configure: failed program was:" >&5
15260   cat conftest.$ac_ext >&5
15261   rm -fr conftest*
15262   ol_cv_pthread_select_yields=yes
15263 fi
15264 rm -fr conftest*
15265 fi
15266
15267 fi
15268
15269 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15270
15271                                 if test $ol_cv_pthread_select_yields = cross ; then
15272                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15273                                 fi
15274
15275                                 if test $ol_cv_pthread_select_yields = yes ; then
15276                                         ol_with_yielding_select=yes
15277                                 fi
15278                         fi
15279
15280                                                 CPPFLAGS="$save_CPPFLAGS"
15281                         LIBS="$save_LIBS"
15282                 else
15283                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15284                 fi
15285         fi
15286
15287         if test $ol_with_threads = posix ; then
15288                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15289         fi
15290 fi
15291
15292 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15293         -o $ol_with_threads = mach ; then
15294
15295                 for ac_hdr in mach/cthreads.h cthreads.h
15296 do
15297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15299 echo "configure:15300: checking for $ac_hdr" >&5
15300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15301   echo $ac_n "(cached) $ac_c" 1>&6
15302 else
15303   cat > conftest.$ac_ext <<EOF
15304 #line 15305 "configure"
15305 #include "confdefs.h"
15306 #include <$ac_hdr>
15307 EOF
15308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15309 { (eval echo configure:15310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15311 if test -z "$ac_err"; then
15312   rm -rf conftest*
15313   eval "ac_cv_header_$ac_safe=yes"
15314 else
15315   echo "$ac_err" >&5
15316   echo "configure: failed program was:" >&5
15317   cat conftest.$ac_ext >&5
15318   rm -rf conftest*
15319   eval "ac_cv_header_$ac_safe=no"
15320 fi
15321 rm -f conftest*
15322 fi
15323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15324   echo "$ac_t""yes" 1>&6
15325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15326   cat >> confdefs.h <<EOF
15327 #define $ac_tr_hdr 1
15328 EOF
15329  
15330 else
15331   echo "$ac_t""no" 1>&6
15332 fi
15333 done
15334
15335         if test $ac_cv_header_mach_cthreads_h = yes ; then
15336                 ol_with_threads=found
15337
15338                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15339 echo "configure:15340: checking for cthread_fork" >&5
15340 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15341   echo $ac_n "(cached) $ac_c" 1>&6
15342 else
15343   cat > conftest.$ac_ext <<EOF
15344 #line 15345 "configure"
15345 #include "confdefs.h"
15346 /* System header to define __stub macros and hopefully few prototypes,
15347     which can conflict with char cthread_fork(); below.  */
15348 #include <assert.h>
15349 /* Override any gcc2 internal prototype to avoid an error.  */
15350 /* We use char because int might match the return type of a gcc2
15351     builtin and then its argument prototype would still apply.  */
15352 char cthread_fork();
15353 char (*f)();
15354
15355 int main() {
15356
15357 /* The GNU C library defines this for functions which it implements
15358     to always fail with ENOSYS.  Some functions are actually named
15359     something starting with __ and the normal name is an alias.  */
15360 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15361 choke me
15362 #else
15363 f = cthread_fork;
15364 #endif
15365
15366 ; return 0; }
15367 EOF
15368 if { (eval echo configure:15369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15369   rm -rf conftest*
15370   eval "ac_cv_func_cthread_fork=yes"
15371 else
15372   echo "configure: failed program was:" >&5
15373   cat conftest.$ac_ext >&5
15374   rm -rf conftest*
15375   eval "ac_cv_func_cthread_fork=no"
15376 fi
15377 rm -f conftest*
15378 fi
15379
15380 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15381   echo "$ac_t""yes" 1>&6
15382   ol_link_threads=yes
15383 else
15384   echo "$ac_t""no" 1>&6
15385 fi
15386
15387
15388                 if test $ol_link_threads = no ; then
15389                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15390 echo "configure:15391: checking for cthread_fork with -all_load" >&5
15391 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15392   echo $ac_n "(cached) $ac_c" 1>&6
15393 else
15394   
15395                                                                 save_LIBS="$LIBS"
15396                                 LIBS="-all_load $LIBS"
15397                                 cat > conftest.$ac_ext <<EOF
15398 #line 15399 "configure"
15399 #include "confdefs.h"
15400 #include <mach/cthreads.h>
15401 int main() {
15402
15403                                         cthread_fork((void *)0, (void *)0);
15404                                         
15405 ; return 0; }
15406 EOF
15407 if { (eval echo configure:15408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15408   rm -rf conftest*
15409   ol_cv_cthread_all_load=yes
15410 else
15411   echo "configure: failed program was:" >&5
15412   cat conftest.$ac_ext >&5
15413   rm -rf conftest*
15414   ol_cv_cthread_all_load=no
15415 fi
15416 rm -f conftest*
15417                                                                 LIBS="$save_LIBS"
15418                         
15419 fi
15420
15421 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15422
15423                         if test $ol_cv_cthread_all_load = yes ; then
15424                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15425                                 ol_link_threads=mach
15426                                 ol_with_threads=found
15427                         fi
15428                 fi
15429
15430         elif test $ac_cv_header_cthreads_h = yes ; then
15431                                 
15432                 ol_with_threads=found
15433  
15434                                 save_LIBS="$LIBS"
15435                 LIBS="$LIBS -lthreads"
15436                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15437 echo "configure:15438: checking for cthread_fork" >&5
15438 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15439   echo $ac_n "(cached) $ac_c" 1>&6
15440 else
15441   cat > conftest.$ac_ext <<EOF
15442 #line 15443 "configure"
15443 #include "confdefs.h"
15444 /* System header to define __stub macros and hopefully few prototypes,
15445     which can conflict with char cthread_fork(); below.  */
15446 #include <assert.h>
15447 /* Override any gcc2 internal prototype to avoid an error.  */
15448 /* We use char because int might match the return type of a gcc2
15449     builtin and then its argument prototype would still apply.  */
15450 char cthread_fork();
15451 char (*f)();
15452
15453 int main() {
15454
15455 /* The GNU C library defines this for functions which it implements
15456     to always fail with ENOSYS.  Some functions are actually named
15457     something starting with __ and the normal name is an alias.  */
15458 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15459 choke me
15460 #else
15461 f = cthread_fork;
15462 #endif
15463
15464 ; return 0; }
15465 EOF
15466 if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15467   rm -rf conftest*
15468   eval "ac_cv_func_cthread_fork=yes"
15469 else
15470   echo "configure: failed program was:" >&5
15471   cat conftest.$ac_ext >&5
15472   rm -rf conftest*
15473   eval "ac_cv_func_cthread_fork=no"
15474 fi
15475 rm -f conftest*
15476 fi
15477
15478 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15479   echo "$ac_t""yes" 1>&6
15480   ol_link_threads=yes
15481 else
15482   echo "$ac_t""no" 1>&6
15483 fi
15484
15485                 LIBS="$save_LIBS"
15486
15487                 if test $ol_link_threads = yes ; then
15488                         LTHREAD_LIBS="-lthreads"
15489                         ol_link_threads=mach
15490                         ol_with_threads=found
15491                 else
15492                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15493                 fi
15494
15495         elif test $ol_with_threads = mach ; then
15496                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15497         fi
15498
15499         if test $ol_link_threads = mach ; then
15500                 cat >> confdefs.h <<\EOF
15501 #define HAVE_MACH_CTHREADS 1
15502 EOF
15503
15504         elif test $ol_with_threads = found ; then
15505                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15506         fi
15507 fi
15508
15509 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15510         -o $ol_with_threads = pth ; then
15511
15512         for ac_hdr in pth.h
15513 do
15514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15516 echo "configure:15517: checking for $ac_hdr" >&5
15517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15518   echo $ac_n "(cached) $ac_c" 1>&6
15519 else
15520   cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 #include <$ac_hdr>
15524 EOF
15525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15526 { (eval echo configure:15527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15528 if test -z "$ac_err"; then
15529   rm -rf conftest*
15530   eval "ac_cv_header_$ac_safe=yes"
15531 else
15532   echo "$ac_err" >&5
15533   echo "configure: failed program was:" >&5
15534   cat conftest.$ac_ext >&5
15535   rm -rf conftest*
15536   eval "ac_cv_header_$ac_safe=no"
15537 fi
15538 rm -f conftest*
15539 fi
15540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15541   echo "$ac_t""yes" 1>&6
15542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15543   cat >> confdefs.h <<EOF
15544 #define $ac_tr_hdr 1
15545 EOF
15546  
15547 else
15548   echo "$ac_t""no" 1>&6
15549 fi
15550 done
15551
15552
15553         if test $ac_cv_header_pth_h = yes ; then
15554                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15555 echo "configure:15556: checking for pth_version in -lpth" >&5
15556 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15558   echo $ac_n "(cached) $ac_c" 1>&6
15559 else
15560   ac_save_LIBS="$LIBS"
15561 LIBS="-lpth  $LIBS"
15562 cat > conftest.$ac_ext <<EOF
15563 #line 15564 "configure"
15564 #include "confdefs.h"
15565 /* Override any gcc2 internal prototype to avoid an error.  */
15566 /* We use char because int might match the return type of a gcc2
15567     builtin and then its argument prototype would still apply.  */
15568 char pth_version();
15569
15570 int main() {
15571 pth_version()
15572 ; return 0; }
15573 EOF
15574 if { (eval echo configure:15575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15575   rm -rf conftest*
15576   eval "ac_cv_lib_$ac_lib_var=yes"
15577 else
15578   echo "configure: failed program was:" >&5
15579   cat conftest.$ac_ext >&5
15580   rm -rf conftest*
15581   eval "ac_cv_lib_$ac_lib_var=no"
15582 fi
15583 rm -f conftest*
15584 LIBS="$ac_save_LIBS"
15585
15586 fi
15587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15588   echo "$ac_t""yes" 1>&6
15589   have_pth=yes
15590 else
15591   echo "$ac_t""no" 1>&6
15592 have_pth=no
15593 fi
15594
15595
15596                 if test $have_pth = yes ; then
15597                         cat >> confdefs.h <<\EOF
15598 #define HAVE_GNU_PTH 1
15599 EOF
15600
15601                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15602                         ol_link_threads=pth
15603                         ol_with_threads=found
15604
15605                         if test $ol_with_yielding_select = auto ; then
15606                                 ol_with_yielding_select=yes
15607                         fi
15608                 fi
15609         fi
15610 fi
15611
15612 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15613         -o $ol_with_threads = lwp ; then
15614
15615                 for ac_hdr in thread.h synch.h
15616 do
15617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15619 echo "configure:15620: checking for $ac_hdr" >&5
15620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15621   echo $ac_n "(cached) $ac_c" 1>&6
15622 else
15623   cat > conftest.$ac_ext <<EOF
15624 #line 15625 "configure"
15625 #include "confdefs.h"
15626 #include <$ac_hdr>
15627 EOF
15628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15629 { (eval echo configure:15630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15631 if test -z "$ac_err"; then
15632   rm -rf conftest*
15633   eval "ac_cv_header_$ac_safe=yes"
15634 else
15635   echo "$ac_err" >&5
15636   echo "configure: failed program was:" >&5
15637   cat conftest.$ac_ext >&5
15638   rm -rf conftest*
15639   eval "ac_cv_header_$ac_safe=no"
15640 fi
15641 rm -f conftest*
15642 fi
15643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15644   echo "$ac_t""yes" 1>&6
15645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15646   cat >> confdefs.h <<EOF
15647 #define $ac_tr_hdr 1
15648 EOF
15649  
15650 else
15651   echo "$ac_t""no" 1>&6
15652 fi
15653 done
15654
15655         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15656                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15657 echo "configure:15658: checking for thr_create in -lthread" >&5
15658 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15660   echo $ac_n "(cached) $ac_c" 1>&6
15661 else
15662   ac_save_LIBS="$LIBS"
15663 LIBS="-lthread  $LIBS"
15664 cat > conftest.$ac_ext <<EOF
15665 #line 15666 "configure"
15666 #include "confdefs.h"
15667 /* Override any gcc2 internal prototype to avoid an error.  */
15668 /* We use char because int might match the return type of a gcc2
15669     builtin and then its argument prototype would still apply.  */
15670 char thr_create();
15671
15672 int main() {
15673 thr_create()
15674 ; return 0; }
15675 EOF
15676 if { (eval echo configure:15677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15677   rm -rf conftest*
15678   eval "ac_cv_lib_$ac_lib_var=yes"
15679 else
15680   echo "configure: failed program was:" >&5
15681   cat conftest.$ac_ext >&5
15682   rm -rf conftest*
15683   eval "ac_cv_lib_$ac_lib_var=no"
15684 fi
15685 rm -f conftest*
15686 LIBS="$ac_save_LIBS"
15687
15688 fi
15689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15690   echo "$ac_t""yes" 1>&6
15691   have_thr=yes
15692 else
15693   echo "$ac_t""no" 1>&6
15694 have_thr=no
15695 fi
15696
15697
15698                 if test $have_thr = yes ; then
15699                         cat >> confdefs.h <<\EOF
15700 #define HAVE_THR 1
15701 EOF
15702
15703                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15704                         ol_link_threads=thr
15705
15706                         if test $ol_with_yielding_select = auto ; then
15707                                 ol_with_yielding_select=yes
15708                         fi
15709
15710                                                 for ac_func in \
15711                                 thr_setconcurrency \
15712                                 thr_getconcurrency \
15713                         
15714 do
15715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15716 echo "configure:15717: checking for $ac_func" >&5
15717 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15718   echo $ac_n "(cached) $ac_c" 1>&6
15719 else
15720   cat > conftest.$ac_ext <<EOF
15721 #line 15722 "configure"
15722 #include "confdefs.h"
15723 /* System header to define __stub macros and hopefully few prototypes,
15724     which can conflict with char $ac_func(); below.  */
15725 #include <assert.h>
15726 /* Override any gcc2 internal prototype to avoid an error.  */
15727 /* We use char because int might match the return type of a gcc2
15728     builtin and then its argument prototype would still apply.  */
15729 char $ac_func();
15730 char (*f)();
15731
15732 int main() {
15733
15734 /* The GNU C library defines this for functions which it implements
15735     to always fail with ENOSYS.  Some functions are actually named
15736     something starting with __ and the normal name is an alias.  */
15737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15738 choke me
15739 #else
15740 f = $ac_func;
15741 #endif
15742
15743 ; return 0; }
15744 EOF
15745 if { (eval echo configure:15746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15746   rm -rf conftest*
15747   eval "ac_cv_func_$ac_func=yes"
15748 else
15749   echo "configure: failed program was:" >&5
15750   cat conftest.$ac_ext >&5
15751   rm -rf conftest*
15752   eval "ac_cv_func_$ac_func=no"
15753 fi
15754 rm -f conftest*
15755 fi
15756
15757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15758   echo "$ac_t""yes" 1>&6
15759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15760   cat >> confdefs.h <<EOF
15761 #define $ac_tr_func 1
15762 EOF
15763  
15764 else
15765   echo "$ac_t""no" 1>&6
15766 fi
15767 done
15768
15769                 fi
15770         fi
15771
15772                 for ac_hdr in lwp/lwp.h
15773 do
15774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15776 echo "configure:15777: checking for $ac_hdr" >&5
15777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15778   echo $ac_n "(cached) $ac_c" 1>&6
15779 else
15780   cat > conftest.$ac_ext <<EOF
15781 #line 15782 "configure"
15782 #include "confdefs.h"
15783 #include <$ac_hdr>
15784 EOF
15785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15786 { (eval echo configure:15787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15788 if test -z "$ac_err"; then
15789   rm -rf conftest*
15790   eval "ac_cv_header_$ac_safe=yes"
15791 else
15792   echo "$ac_err" >&5
15793   echo "configure: failed program was:" >&5
15794   cat conftest.$ac_ext >&5
15795   rm -rf conftest*
15796   eval "ac_cv_header_$ac_safe=no"
15797 fi
15798 rm -f conftest*
15799 fi
15800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15801   echo "$ac_t""yes" 1>&6
15802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15803   cat >> confdefs.h <<EOF
15804 #define $ac_tr_hdr 1
15805 EOF
15806  
15807 else
15808   echo "$ac_t""no" 1>&6
15809 fi
15810 done
15811
15812         if test $ac_cv_header_lwp_lwp_h = yes ; then
15813                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15814 echo "configure:15815: checking for lwp_create in -llwp" >&5
15815 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15816 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15817   echo $ac_n "(cached) $ac_c" 1>&6
15818 else
15819   ac_save_LIBS="$LIBS"
15820 LIBS="-llwp  $LIBS"
15821 cat > conftest.$ac_ext <<EOF
15822 #line 15823 "configure"
15823 #include "confdefs.h"
15824 /* Override any gcc2 internal prototype to avoid an error.  */
15825 /* We use char because int might match the return type of a gcc2
15826     builtin and then its argument prototype would still apply.  */
15827 char lwp_create();
15828
15829 int main() {
15830 lwp_create()
15831 ; return 0; }
15832 EOF
15833 if { (eval echo configure:15834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15834   rm -rf conftest*
15835   eval "ac_cv_lib_$ac_lib_var=yes"
15836 else
15837   echo "configure: failed program was:" >&5
15838   cat conftest.$ac_ext >&5
15839   rm -rf conftest*
15840   eval "ac_cv_lib_$ac_lib_var=no"
15841 fi
15842 rm -f conftest*
15843 LIBS="$ac_save_LIBS"
15844
15845 fi
15846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15847   echo "$ac_t""yes" 1>&6
15848   have_lwp=yes
15849 else
15850   echo "$ac_t""no" 1>&6
15851 have_lwp=no
15852 fi
15853
15854
15855                 if test $have_lwp = yes ; then
15856                         cat >> confdefs.h <<\EOF
15857 #define HAVE_LWP 1
15858 EOF
15859
15860                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15861                         ol_link_threads=lwp
15862
15863                         if test $ol_with_yielding_select = auto ; then
15864                                 ol_with_yielding_select=no
15865                         fi
15866                 fi
15867         fi
15868 fi
15869
15870 if test $ol_with_yielding_select = yes ; then
15871         cat >> confdefs.h <<\EOF
15872 #define HAVE_YIELDING_SELECT 1
15873 EOF
15874
15875 fi
15876
15877 if test $ol_with_threads = manual ; then
15878                 ol_link_threads=yes
15879
15880         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15881
15882         for ac_hdr in pthread.h sched.h
15883 do
15884 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15885 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15886 echo "configure:15887: checking for $ac_hdr" >&5
15887 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15888   echo $ac_n "(cached) $ac_c" 1>&6
15889 else
15890   cat > conftest.$ac_ext <<EOF
15891 #line 15892 "configure"
15892 #include "confdefs.h"
15893 #include <$ac_hdr>
15894 EOF
15895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15896 { (eval echo configure:15897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15898 if test -z "$ac_err"; then
15899   rm -rf conftest*
15900   eval "ac_cv_header_$ac_safe=yes"
15901 else
15902   echo "$ac_err" >&5
15903   echo "configure: failed program was:" >&5
15904   cat conftest.$ac_ext >&5
15905   rm -rf conftest*
15906   eval "ac_cv_header_$ac_safe=no"
15907 fi
15908 rm -f conftest*
15909 fi
15910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15911   echo "$ac_t""yes" 1>&6
15912     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15913   cat >> confdefs.h <<EOF
15914 #define $ac_tr_hdr 1
15915 EOF
15916  
15917 else
15918   echo "$ac_t""no" 1>&6
15919 fi
15920 done
15921
15922         for ac_func in sched_yield pthread_yield
15923 do
15924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15925 echo "configure:15926: checking for $ac_func" >&5
15926 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15927   echo $ac_n "(cached) $ac_c" 1>&6
15928 else
15929   cat > conftest.$ac_ext <<EOF
15930 #line 15931 "configure"
15931 #include "confdefs.h"
15932 /* System header to define __stub macros and hopefully few prototypes,
15933     which can conflict with char $ac_func(); below.  */
15934 #include <assert.h>
15935 /* Override any gcc2 internal prototype to avoid an error.  */
15936 /* We use char because int might match the return type of a gcc2
15937     builtin and then its argument prototype would still apply.  */
15938 char $ac_func();
15939 char (*f)();
15940
15941 int main() {
15942
15943 /* The GNU C library defines this for functions which it implements
15944     to always fail with ENOSYS.  Some functions are actually named
15945     something starting with __ and the normal name is an alias.  */
15946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15947 choke me
15948 #else
15949 f = $ac_func;
15950 #endif
15951
15952 ; return 0; }
15953 EOF
15954 if { (eval echo configure:15955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15955   rm -rf conftest*
15956   eval "ac_cv_func_$ac_func=yes"
15957 else
15958   echo "configure: failed program was:" >&5
15959   cat conftest.$ac_ext >&5
15960   rm -rf conftest*
15961   eval "ac_cv_func_$ac_func=no"
15962 fi
15963 rm -f conftest*
15964 fi
15965
15966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15967   echo "$ac_t""yes" 1>&6
15968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15969   cat >> confdefs.h <<EOF
15970 #define $ac_tr_func 1
15971 EOF
15972  
15973 else
15974   echo "$ac_t""no" 1>&6
15975 fi
15976 done
15977
15978         
15979         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15980 echo "configure:15981: checking for LinuxThreads pthread.h" >&5
15981 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15982   echo $ac_n "(cached) $ac_c" 1>&6
15983 else
15984   cat > conftest.$ac_ext <<EOF
15985 #line 15986 "configure"
15986 #include "confdefs.h"
15987 #include <pthread.h>
15988 EOF
15989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15990   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15991   rm -rf conftest*
15992   ol_cv_header_linux_threads=yes
15993 else
15994   rm -rf conftest*
15995   ol_cv_header_linux_threads=no
15996 fi
15997 rm -f conftest*
15998
15999                 
16000 fi
16001
16002 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16003         if test $ol_cv_header_linux_threads = yes; then
16004                 cat >> confdefs.h <<\EOF
16005 #define HAVE_LINUX_THREADS 1
16006 EOF
16007
16008         fi
16009
16010
16011         for ac_hdr in mach/cthreads.h
16012 do
16013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16015 echo "configure:16016: checking for $ac_hdr" >&5
16016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16017   echo $ac_n "(cached) $ac_c" 1>&6
16018 else
16019   cat > conftest.$ac_ext <<EOF
16020 #line 16021 "configure"
16021 #include "confdefs.h"
16022 #include <$ac_hdr>
16023 EOF
16024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16025 { (eval echo configure:16026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16027 if test -z "$ac_err"; then
16028   rm -rf conftest*
16029   eval "ac_cv_header_$ac_safe=yes"
16030 else
16031   echo "$ac_err" >&5
16032   echo "configure: failed program was:" >&5
16033   cat conftest.$ac_ext >&5
16034   rm -rf conftest*
16035   eval "ac_cv_header_$ac_safe=no"
16036 fi
16037 rm -f conftest*
16038 fi
16039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16040   echo "$ac_t""yes" 1>&6
16041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16042   cat >> confdefs.h <<EOF
16043 #define $ac_tr_hdr 1
16044 EOF
16045  
16046 else
16047   echo "$ac_t""no" 1>&6
16048 fi
16049 done
16050
16051         for ac_hdr in lwp/lwp.h
16052 do
16053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16055 echo "configure:16056: checking for $ac_hdr" >&5
16056 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16057   echo $ac_n "(cached) $ac_c" 1>&6
16058 else
16059   cat > conftest.$ac_ext <<EOF
16060 #line 16061 "configure"
16061 #include "confdefs.h"
16062 #include <$ac_hdr>
16063 EOF
16064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16065 { (eval echo configure:16066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16067 if test -z "$ac_err"; then
16068   rm -rf conftest*
16069   eval "ac_cv_header_$ac_safe=yes"
16070 else
16071   echo "$ac_err" >&5
16072   echo "configure: failed program was:" >&5
16073   cat conftest.$ac_ext >&5
16074   rm -rf conftest*
16075   eval "ac_cv_header_$ac_safe=no"
16076 fi
16077 rm -f conftest*
16078 fi
16079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16080   echo "$ac_t""yes" 1>&6
16081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16082   cat >> confdefs.h <<EOF
16083 #define $ac_tr_hdr 1
16084 EOF
16085  
16086 else
16087   echo "$ac_t""no" 1>&6
16088 fi
16089 done
16090
16091         for ac_hdr in thread.h synch.h
16092 do
16093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16095 echo "configure:16096: checking for $ac_hdr" >&5
16096 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16097   echo $ac_n "(cached) $ac_c" 1>&6
16098 else
16099   cat > conftest.$ac_ext <<EOF
16100 #line 16101 "configure"
16101 #include "confdefs.h"
16102 #include <$ac_hdr>
16103 EOF
16104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16105 { (eval echo configure:16106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16107 if test -z "$ac_err"; then
16108   rm -rf conftest*
16109   eval "ac_cv_header_$ac_safe=yes"
16110 else
16111   echo "$ac_err" >&5
16112   echo "configure: failed program was:" >&5
16113   cat conftest.$ac_ext >&5
16114   rm -rf conftest*
16115   eval "ac_cv_header_$ac_safe=no"
16116 fi
16117 rm -f conftest*
16118 fi
16119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16120   echo "$ac_t""yes" 1>&6
16121     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16122   cat >> confdefs.h <<EOF
16123 #define $ac_tr_hdr 1
16124 EOF
16125  
16126 else
16127   echo "$ac_t""no" 1>&6
16128 fi
16129 done
16130
16131 fi
16132
16133 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16134                         cat >> confdefs.h <<\EOF
16135 #define REENTRANT 1
16136 EOF
16137
16138         cat >> confdefs.h <<\EOF
16139 #define _REENTRANT 1
16140 EOF
16141
16142         cat >> confdefs.h <<\EOF
16143 #define THREAD_SAFE 1
16144 EOF
16145
16146         cat >> confdefs.h <<\EOF
16147 #define _THREAD_SAFE 1
16148 EOF
16149
16150         cat >> confdefs.h <<\EOF
16151 #define THREADSAFE 1
16152 EOF
16153
16154         cat >> confdefs.h <<\EOF
16155 #define _THREADSAFE 1
16156 EOF
16157
16158         cat >> confdefs.h <<\EOF
16159 #define _SGI_MP_SOURCE 1
16160 EOF
16161
16162
16163                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16164 echo "configure:16165: checking for thread specific errno" >&5
16165 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16166   echo $ac_n "(cached) $ac_c" 1>&6
16167 else
16168   
16169                 cat > conftest.$ac_ext <<EOF
16170 #line 16171 "configure"
16171 #include "confdefs.h"
16172 #include <errno.h>
16173 int main() {
16174 errno = 0;
16175 ; return 0; }
16176 EOF
16177 if { (eval echo configure:16178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16178   rm -rf conftest*
16179   ol_cv_errno_thread_specific=yes
16180 else
16181   echo "configure: failed program was:" >&5
16182   cat conftest.$ac_ext >&5
16183   rm -rf conftest*
16184   ol_cv_errno_thread_specific=no
16185 fi
16186 rm -f conftest*
16187         
16188 fi
16189
16190 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16191
16192                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16193 echo "configure:16194: checking for thread specific h_errno" >&5
16194 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16195   echo $ac_n "(cached) $ac_c" 1>&6
16196 else
16197   
16198                 cat > conftest.$ac_ext <<EOF
16199 #line 16200 "configure"
16200 #include "confdefs.h"
16201 #include <netdb.h>
16202 int main() {
16203 h_errno = 0;
16204 ; return 0; }
16205 EOF
16206 if { (eval echo configure:16207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16207   rm -rf conftest*
16208   ol_cv_h_errno_thread_specific=yes
16209 else
16210   echo "configure: failed program was:" >&5
16211   cat conftest.$ac_ext >&5
16212   rm -rf conftest*
16213   ol_cv_h_errno_thread_specific=no
16214 fi
16215 rm -f conftest*
16216         
16217 fi
16218
16219 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16220
16221         if test $ol_cv_errno_thread_specific != yes \
16222                 -o $ol_cv_h_errno_thread_specific != yes ; then
16223                 LIBS="$LTHREAD_LIBS $LIBS"
16224                 LTHREAD_LIBS=""
16225         fi
16226
16227 fi  
16228
16229 if test $ol_link_threads = no ; then
16230         if test $ol_with_threads = yes ; then
16231                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16232         fi
16233
16234         if test $ol_with_threads = auto ; then
16235                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16236                 ol_with_threads=no
16237         fi
16238
16239         cat >> confdefs.h <<\EOF
16240 #define NO_THREADS 1
16241 EOF
16242
16243         LTHREAD_LIBS=""
16244 fi
16245
16246 if test $ol_link_threads != no ; then
16247         cat >> confdefs.h <<\EOF
16248 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16249 EOF
16250
16251 fi
16252
16253 for ac_func in \
16254         ctime_r                 \
16255         gethostbyname_r gethostbyaddr_r \
16256
16257 do
16258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16259 echo "configure:16260: checking for $ac_func" >&5
16260 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16261   echo $ac_n "(cached) $ac_c" 1>&6
16262 else
16263   cat > conftest.$ac_ext <<EOF
16264 #line 16265 "configure"
16265 #include "confdefs.h"
16266 /* System header to define __stub macros and hopefully few prototypes,
16267     which can conflict with char $ac_func(); below.  */
16268 #include <assert.h>
16269 /* Override any gcc2 internal prototype to avoid an error.  */
16270 /* We use char because int might match the return type of a gcc2
16271     builtin and then its argument prototype would still apply.  */
16272 char $ac_func();
16273 char (*f)();
16274
16275 int main() {
16276
16277 /* The GNU C library defines this for functions which it implements
16278     to always fail with ENOSYS.  Some functions are actually named
16279     something starting with __ and the normal name is an alias.  */
16280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16281 choke me
16282 #else
16283 f = $ac_func;
16284 #endif
16285
16286 ; return 0; }
16287 EOF
16288 if { (eval echo configure:16289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16289   rm -rf conftest*
16290   eval "ac_cv_func_$ac_func=yes"
16291 else
16292   echo "configure: failed program was:" >&5
16293   cat conftest.$ac_ext >&5
16294   rm -rf conftest*
16295   eval "ac_cv_func_$ac_func=no"
16296 fi
16297 rm -f conftest*
16298 fi
16299
16300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16301   echo "$ac_t""yes" 1>&6
16302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16303   cat >> confdefs.h <<EOF
16304 #define $ac_tr_func 1
16305 EOF
16306  
16307 else
16308   echo "$ac_t""no" 1>&6
16309 fi
16310 done
16311
16312
16313 if test "$ac_cv_func_ctime_r" = no ; then
16314         ol_cv_func_ctime_r_nargs=0
16315 else
16316         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16317 echo "configure:16318: checking number of arguments of ctime_r" >&5
16318 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16319   echo $ac_n "(cached) $ac_c" 1>&6
16320 else
16321   cat > conftest.$ac_ext <<EOF
16322 #line 16323 "configure"
16323 #include "confdefs.h"
16324 #include <time.h>
16325 int main() {
16326 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16330   rm -rf conftest*
16331   ol_cv_func_ctime_r_nargs3=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_func_ctime_r_nargs3=no
16337 fi
16338 rm -f conftest*
16339
16340         cat > conftest.$ac_ext <<EOF
16341 #line 16342 "configure"
16342 #include "confdefs.h"
16343 #include <time.h>
16344 int main() {
16345 time_t ti; char *buffer; ctime_r(&ti,buffer);
16346 ; return 0; }
16347 EOF
16348 if { (eval echo configure:16349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16349   rm -rf conftest*
16350   ol_cv_func_ctime_r_nargs2=yes
16351 else
16352   echo "configure: failed program was:" >&5
16353   cat conftest.$ac_ext >&5
16354   rm -rf conftest*
16355   ol_cv_func_ctime_r_nargs2=no
16356 fi
16357 rm -f conftest*
16358
16359         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16360                 $ol_cv_func_ctime_r_nargs2 = no ; then
16361
16362                 ol_cv_func_ctime_r_nargs=3
16363
16364         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16365                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16366
16367                 ol_cv_func_ctime_r_nargs=2
16368
16369         else
16370                 ol_cv_func_ctime_r_nargs=0
16371         fi
16372   
16373 fi
16374
16375 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16376
16377   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16378         cat >> confdefs.h <<EOF
16379 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16380 EOF
16381
16382   fi
16383
16384 fi
16385
16386 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16387         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16388 echo "configure:16389: checking number of arguments of gethostbyname_r" >&5
16389 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16390   echo $ac_n "(cached) $ac_c" 1>&6
16391 else
16392   cat > conftest.$ac_ext <<EOF
16393 #line 16394 "configure"
16394 #include "confdefs.h"
16395 #include <sys/types.h>
16396 #include <sys/socket.h>
16397 #include <netinet/in.h>
16398 #include <netdb.h>
16399 #define BUFSIZE (sizeof(struct hostent)+10)
16400 int main() {
16401 struct hostent hent; char buffer[BUFSIZE];
16402                 int bufsize=BUFSIZE;int h_errno;
16403                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16404                         buffer, bufsize, &h_errno);
16405 ; return 0; }
16406 EOF
16407 if { (eval echo configure:16408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16408   rm -rf conftest*
16409   ol_cv_func_gethostbyname_r_nargs5=yes
16410 else
16411   echo "configure: failed program was:" >&5
16412   cat conftest.$ac_ext >&5
16413   rm -rf conftest*
16414   ol_cv_func_gethostbyname_r_nargs5=no
16415 fi
16416 rm -f conftest*
16417
16418         cat > conftest.$ac_ext <<EOF
16419 #line 16420 "configure"
16420 #include "confdefs.h"
16421 #include <sys/types.h>
16422 #include <sys/socket.h>
16423 #include <netinet/in.h>
16424 #include <netdb.h>
16425 #define BUFSIZE (sizeof(struct hostent)+10)
16426 int main() {
16427 struct hostent hent;struct hostent *rhent;
16428                 char buffer[BUFSIZE];
16429                 int bufsize=BUFSIZE;int h_errno;
16430                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16431                         &rhent, &h_errno);
16432 ; return 0; }
16433 EOF
16434 if { (eval echo configure:16435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16435   rm -rf conftest*
16436   ol_cv_func_gethostbyname_r_nargs6=yes
16437 else
16438   echo "configure: failed program was:" >&5
16439   cat conftest.$ac_ext >&5
16440   rm -rf conftest*
16441   ol_cv_func_gethostbyname_r_nargs6=no
16442 fi
16443 rm -f conftest*
16444
16445         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16446                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16447
16448                 ol_cv_func_gethostbyname_r_nargs=5
16449
16450         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16451                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16452
16453                 ol_cv_func_gethostbyname_r_nargs=6
16454
16455         else
16456                 ol_cv_func_gethostbyname_r_nargs=0
16457         fi
16458   
16459 fi
16460
16461 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16462   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16463         cat >> confdefs.h <<EOF
16464 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16465 EOF
16466
16467   fi
16468
16469 else
16470         ol_cv_func_gethostbyname_r_nargs=0
16471 fi
16472  
16473 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16474         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16475 echo "configure:16476: checking number of arguments of gethostbyaddr_r" >&5
16476 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16477   echo $ac_n "(cached) $ac_c" 1>&6
16478 else
16479   cat > conftest.$ac_ext <<EOF
16480 #line 16481 "configure"
16481 #include "confdefs.h"
16482 #include <sys/types.h>
16483 #include <sys/socket.h>
16484 #include <netinet/in.h>
16485 #include <netdb.h>
16486 #define BUFSIZE (sizeof(struct hostent)+10)
16487 int main() {
16488 struct hostent hent; char buffer[BUFSIZE]; 
16489             struct in_addr add;
16490             size_t alen=sizeof(struct in_addr);
16491             int bufsize=BUFSIZE;int h_errno;
16492                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16493                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16494 ; return 0; }
16495 EOF
16496 if { (eval echo configure:16497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16497   rm -rf conftest*
16498   ol_cv_func_gethostbyaddr_r_nargs7=yes
16499 else
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   ol_cv_func_gethostbyaddr_r_nargs7=no
16504 fi
16505 rm -f conftest*
16506
16507         cat > conftest.$ac_ext <<EOF
16508 #line 16509 "configure"
16509 #include "confdefs.h"
16510 #include <sys/types.h>
16511 #include <sys/socket.h>
16512 #include <netinet/in.h>
16513 #include <netdb.h>
16514 #define BUFSIZE (sizeof(struct hostent)+10)
16515 int main() {
16516 struct hostent hent;
16517                 struct hostent *rhent; char buffer[BUFSIZE]; 
16518                 struct in_addr add;
16519                 size_t alen=sizeof(struct in_addr);
16520                 int bufsize=BUFSIZE;int h_errno;
16521                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16522                         alen, AF_INET, &hent, buffer, bufsize, 
16523                         &rhent, &h_errno);
16524 ; return 0; }
16525 EOF
16526 if { (eval echo configure:16527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16527   rm -rf conftest*
16528   ol_cv_func_gethostbyaddr_r_nargs8=yes
16529 else
16530   echo "configure: failed program was:" >&5
16531   cat conftest.$ac_ext >&5
16532   rm -rf conftest*
16533   ol_cv_func_gethostbyaddr_r_nargs8=no
16534 fi
16535 rm -f conftest*
16536
16537         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16538                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16539
16540                 ol_cv_func_gethostbyaddr_r_nargs=7
16541
16542         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16543                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16544
16545                 ol_cv_func_gethostbyaddr_r_nargs=8
16546
16547         else
16548                 ol_cv_func_gethostbyaddr_r_nargs=0
16549         fi
16550   
16551 fi
16552
16553 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16554   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16555     cat >> confdefs.h <<EOF
16556 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16557 EOF
16558
16559   fi
16560
16561 else
16562         ol_cv_func_gethostbyaddr_r_nargs=0
16563 fi
16564
16565 ol_link_ldbm=no 
16566
16567 if test $ol_with_ldbm_api = auto \
16568         -o $ol_with_ldbm_api = berkeley \
16569         -o $ol_with_ldbm_api = bcompat ; then
16570
16571         if test $ol_with_ldbm_api = bcompat; then \
16572                 for ac_hdr in db_185.h db.h
16573 do
16574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16576 echo "configure:16577: checking for $ac_hdr" >&5
16577 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16578   echo $ac_n "(cached) $ac_c" 1>&6
16579 else
16580   cat > conftest.$ac_ext <<EOF
16581 #line 16582 "configure"
16582 #include "confdefs.h"
16583 #include <$ac_hdr>
16584 EOF
16585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16586 { (eval echo configure:16587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16588 if test -z "$ac_err"; then
16589   rm -rf conftest*
16590   eval "ac_cv_header_$ac_safe=yes"
16591 else
16592   echo "$ac_err" >&5
16593   echo "configure: failed program was:" >&5
16594   cat conftest.$ac_ext >&5
16595   rm -rf conftest*
16596   eval "ac_cv_header_$ac_safe=no"
16597 fi
16598 rm -f conftest*
16599 fi
16600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16601   echo "$ac_t""yes" 1>&6
16602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16603   cat >> confdefs.h <<EOF
16604 #define $ac_tr_hdr 1
16605 EOF
16606  
16607 else
16608   echo "$ac_t""no" 1>&6
16609 fi
16610 done
16611
16612 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16613         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16614 echo "configure:16615: checking if Berkeley DB header compatibility" >&5
16615 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16616   echo $ac_n "(cached) $ac_c" 1>&6
16617 else
16618   
16619                 cat > conftest.$ac_ext <<EOF
16620 #line 16621 "configure"
16621 #include "confdefs.h"
16622
16623 #if HAVE_DB_185_H
16624 #       include <db_185.h>
16625 #else
16626 #       include <db.h>
16627 #endif
16628
16629  /* this check could be improved */
16630 #ifndef DB_VERSION_MAJOR
16631 #       define DB_VERSION_MAJOR 1
16632 #endif
16633
16634 #if DB_VERSION_MAJOR == 1 
16635         __db_version_1
16636 #endif
16637
16638 EOF
16639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16640   egrep "__db_version_1" >/dev/null 2>&1; then
16641   rm -rf conftest*
16642   ol_cv_header_db1=yes
16643 else
16644   rm -rf conftest*
16645   ol_cv_header_db1=no
16646 fi
16647 rm -f conftest*
16648
16649 fi
16650
16651 echo "$ac_t""$ol_cv_header_db1" 1>&6
16652
16653         if test $ol_cv_header_db1 = yes ; then
16654                 ol_cv_lib_db=no
16655 if test $ol_cv_lib_db = no ; then
16656         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16657 echo "configure:16658: checking for Berkeley DB link (default)" >&5
16658 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16659   echo $ac_n "(cached) $ac_c" 1>&6
16660 else
16661   
16662         ol_DB_LIB=
16663         ol_LIBS=$LIBS
16664         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16665
16666         cat > conftest.$ac_ext <<EOF
16667 #line 16668 "configure"
16668 #include "confdefs.h"
16669
16670 #ifdef HAVE_DB_185_H
16671 # include <db_185.h>
16672 #else
16673 # include <db.h>
16674 #endif
16675
16676 #ifndef DB_VERSION_MAJOR
16677 # define DB_VERSION_MAJOR 1
16678 #endif
16679
16680 #ifndef NULL
16681 #define NULL ((void*)0)
16682 #endif
16683
16684 int main() {
16685
16686 #if DB_VERSION_MAJOR > 1
16687         {
16688                 char *version;
16689                 int major, minor, patch;
16690
16691                 version = db_version( &major, &minor, &patch );
16692
16693                 if( major != DB_VERSION_MAJOR ||
16694                         minor < DB_VERSION_MINOR )
16695                 {
16696                         printf("Berkeley DB version mismatch\n"
16697                                 "\texpected: %s\n\tgot: %s\n",
16698                                 DB_VERSION_STRING, version);
16699                         return 1;
16700                 }
16701         }
16702 #endif
16703
16704 #if DB_VERSION_MAJOR > 2
16705         db_env_create( NULL, 0 );
16706 #elif DB_VERSION_MAJOR > 1
16707         db_appexit( NULL );
16708 #else
16709         (void) dbopen( NULL, 0, 0, 0, NULL);
16710 #endif
16711
16712 ; return 0; }
16713 EOF
16714 if { (eval echo configure:16715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16715   rm -rf conftest*
16716   ol_cv_db_none=yes
16717 else
16718   echo "configure: failed program was:" >&5
16719   cat conftest.$ac_ext >&5
16720   rm -rf conftest*
16721   ol_cv_db_none=no
16722 fi
16723 rm -f conftest*
16724
16725         LIBS="$ol_LIBS"
16726
16727 fi
16728
16729 echo "$ac_t""$ol_cv_db_none" 1>&6
16730
16731         if test $ol_cv_db_none = yes ; then
16732                 ol_cv_lib_db=yes
16733         fi
16734 fi
16735
16736 if test $ol_cv_lib_db = no ; then
16737         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16738 echo "configure:16739: checking for Berkeley DB link (-ldb42)" >&5
16739 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16740   echo $ac_n "(cached) $ac_c" 1>&6
16741 else
16742   
16743         ol_DB_LIB=-ldb42
16744         ol_LIBS=$LIBS
16745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16746
16747         cat > conftest.$ac_ext <<EOF
16748 #line 16749 "configure"
16749 #include "confdefs.h"
16750
16751 #ifdef HAVE_DB_185_H
16752 # include <db_185.h>
16753 #else
16754 # include <db.h>
16755 #endif
16756
16757 #ifndef DB_VERSION_MAJOR
16758 # define DB_VERSION_MAJOR 1
16759 #endif
16760
16761 #ifndef NULL
16762 #define NULL ((void*)0)
16763 #endif
16764
16765 int main() {
16766
16767 #if DB_VERSION_MAJOR > 1
16768         {
16769                 char *version;
16770                 int major, minor, patch;
16771
16772                 version = db_version( &major, &minor, &patch );
16773
16774                 if( major != DB_VERSION_MAJOR ||
16775                         minor < DB_VERSION_MINOR )
16776                 {
16777                         printf("Berkeley DB version mismatch\n"
16778                                 "\texpected: %s\n\tgot: %s\n",
16779                                 DB_VERSION_STRING, version);
16780                         return 1;
16781                 }
16782         }
16783 #endif
16784
16785 #if DB_VERSION_MAJOR > 2
16786         db_env_create( NULL, 0 );
16787 #elif DB_VERSION_MAJOR > 1
16788         db_appexit( NULL );
16789 #else
16790         (void) dbopen( NULL, 0, 0, 0, NULL);
16791 #endif
16792
16793 ; return 0; }
16794 EOF
16795 if { (eval echo configure:16796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16796   rm -rf conftest*
16797   ol_cv_db_db42=yes
16798 else
16799   echo "configure: failed program was:" >&5
16800   cat conftest.$ac_ext >&5
16801   rm -rf conftest*
16802   ol_cv_db_db42=no
16803 fi
16804 rm -f conftest*
16805
16806         LIBS="$ol_LIBS"
16807
16808 fi
16809
16810 echo "$ac_t""$ol_cv_db_db42" 1>&6
16811
16812         if test $ol_cv_db_db42 = yes ; then
16813                 ol_cv_lib_db=-ldb42
16814         fi
16815 fi
16816
16817 if test $ol_cv_lib_db = no ; then
16818         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16819 echo "configure:16820: checking for Berkeley DB link (-ldb-42)" >&5
16820 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16821   echo $ac_n "(cached) $ac_c" 1>&6
16822 else
16823   
16824         ol_DB_LIB=-ldb-42
16825         ol_LIBS=$LIBS
16826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16827
16828         cat > conftest.$ac_ext <<EOF
16829 #line 16830 "configure"
16830 #include "confdefs.h"
16831
16832 #ifdef HAVE_DB_185_H
16833 # include <db_185.h>
16834 #else
16835 # include <db.h>
16836 #endif
16837
16838 #ifndef DB_VERSION_MAJOR
16839 # define DB_VERSION_MAJOR 1
16840 #endif
16841
16842 #ifndef NULL
16843 #define NULL ((void*)0)
16844 #endif
16845
16846 int main() {
16847
16848 #if DB_VERSION_MAJOR > 1
16849         {
16850                 char *version;
16851                 int major, minor, patch;
16852
16853                 version = db_version( &major, &minor, &patch );
16854
16855                 if( major != DB_VERSION_MAJOR ||
16856                         minor < DB_VERSION_MINOR )
16857                 {
16858                         printf("Berkeley DB version mismatch\n"
16859                                 "\texpected: %s\n\tgot: %s\n",
16860                                 DB_VERSION_STRING, version);
16861                         return 1;
16862                 }
16863         }
16864 #endif
16865
16866 #if DB_VERSION_MAJOR > 2
16867         db_env_create( NULL, 0 );
16868 #elif DB_VERSION_MAJOR > 1
16869         db_appexit( NULL );
16870 #else
16871         (void) dbopen( NULL, 0, 0, 0, NULL);
16872 #endif
16873
16874 ; return 0; }
16875 EOF
16876 if { (eval echo configure:16877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16877   rm -rf conftest*
16878   ol_cv_db_db_42=yes
16879 else
16880   echo "configure: failed program was:" >&5
16881   cat conftest.$ac_ext >&5
16882   rm -rf conftest*
16883   ol_cv_db_db_42=no
16884 fi
16885 rm -f conftest*
16886
16887         LIBS="$ol_LIBS"
16888
16889 fi
16890
16891 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16892
16893         if test $ol_cv_db_db_42 = yes ; then
16894                 ol_cv_lib_db=-ldb-42
16895         fi
16896 fi
16897
16898 if test $ol_cv_lib_db = no ; then
16899         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16900 echo "configure:16901: checking for Berkeley DB link (-ldb-4.2)" >&5
16901 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16902   echo $ac_n "(cached) $ac_c" 1>&6
16903 else
16904   
16905         ol_DB_LIB=-ldb-4.2
16906         ol_LIBS=$LIBS
16907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16908
16909         cat > conftest.$ac_ext <<EOF
16910 #line 16911 "configure"
16911 #include "confdefs.h"
16912
16913 #ifdef HAVE_DB_185_H
16914 # include <db_185.h>
16915 #else
16916 # include <db.h>
16917 #endif
16918
16919 #ifndef DB_VERSION_MAJOR
16920 # define DB_VERSION_MAJOR 1
16921 #endif
16922
16923 #ifndef NULL
16924 #define NULL ((void*)0)
16925 #endif
16926
16927 int main() {
16928
16929 #if DB_VERSION_MAJOR > 1
16930         {
16931                 char *version;
16932                 int major, minor, patch;
16933
16934                 version = db_version( &major, &minor, &patch );
16935
16936                 if( major != DB_VERSION_MAJOR ||
16937                         minor < DB_VERSION_MINOR )
16938                 {
16939                         printf("Berkeley DB version mismatch\n"
16940                                 "\texpected: %s\n\tgot: %s\n",
16941                                 DB_VERSION_STRING, version);
16942                         return 1;
16943                 }
16944         }
16945 #endif
16946
16947 #if DB_VERSION_MAJOR > 2
16948         db_env_create( NULL, 0 );
16949 #elif DB_VERSION_MAJOR > 1
16950         db_appexit( NULL );
16951 #else
16952         (void) dbopen( NULL, 0, 0, 0, NULL);
16953 #endif
16954
16955 ; return 0; }
16956 EOF
16957 if { (eval echo configure:16958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16958   rm -rf conftest*
16959   ol_cv_db_db_4_dot_2=yes
16960 else
16961   echo "configure: failed program was:" >&5
16962   cat conftest.$ac_ext >&5
16963   rm -rf conftest*
16964   ol_cv_db_db_4_dot_2=no
16965 fi
16966 rm -f conftest*
16967
16968         LIBS="$ol_LIBS"
16969
16970 fi
16971
16972 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16973
16974         if test $ol_cv_db_db_4_dot_2 = yes ; then
16975                 ol_cv_lib_db=-ldb-4.2
16976         fi
16977 fi
16978
16979 if test $ol_cv_lib_db = no ; then
16980         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16981 echo "configure:16982: checking for Berkeley DB link (-ldb-4-2)" >&5
16982 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16983   echo $ac_n "(cached) $ac_c" 1>&6
16984 else
16985   
16986         ol_DB_LIB=-ldb-4-2
16987         ol_LIBS=$LIBS
16988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16989
16990         cat > conftest.$ac_ext <<EOF
16991 #line 16992 "configure"
16992 #include "confdefs.h"
16993
16994 #ifdef HAVE_DB_185_H
16995 # include <db_185.h>
16996 #else
16997 # include <db.h>
16998 #endif
16999
17000 #ifndef DB_VERSION_MAJOR
17001 # define DB_VERSION_MAJOR 1
17002 #endif
17003
17004 #ifndef NULL
17005 #define NULL ((void*)0)
17006 #endif
17007
17008 int main() {
17009
17010 #if DB_VERSION_MAJOR > 1
17011         {
17012                 char *version;
17013                 int major, minor, patch;
17014
17015                 version = db_version( &major, &minor, &patch );
17016
17017                 if( major != DB_VERSION_MAJOR ||
17018                         minor < DB_VERSION_MINOR )
17019                 {
17020                         printf("Berkeley DB version mismatch\n"
17021                                 "\texpected: %s\n\tgot: %s\n",
17022                                 DB_VERSION_STRING, version);
17023                         return 1;
17024                 }
17025         }
17026 #endif
17027
17028 #if DB_VERSION_MAJOR > 2
17029         db_env_create( NULL, 0 );
17030 #elif DB_VERSION_MAJOR > 1
17031         db_appexit( NULL );
17032 #else
17033         (void) dbopen( NULL, 0, 0, 0, NULL);
17034 #endif
17035
17036 ; return 0; }
17037 EOF
17038 if { (eval echo configure:17039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17039   rm -rf conftest*
17040   ol_cv_db_db_4_2=yes
17041 else
17042   echo "configure: failed program was:" >&5
17043   cat conftest.$ac_ext >&5
17044   rm -rf conftest*
17045   ol_cv_db_db_4_2=no
17046 fi
17047 rm -f conftest*
17048
17049         LIBS="$ol_LIBS"
17050
17051 fi
17052
17053 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17054
17055         if test $ol_cv_db_db_4_2 = yes ; then
17056                 ol_cv_lib_db=-ldb-4-2
17057         fi
17058 fi
17059
17060 if test $ol_cv_lib_db = no ; then
17061         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17062 echo "configure:17063: checking for Berkeley DB link (-ldb-4)" >&5
17063 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17064   echo $ac_n "(cached) $ac_c" 1>&6
17065 else
17066   
17067         ol_DB_LIB=-ldb-4
17068         ol_LIBS=$LIBS
17069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17070
17071         cat > conftest.$ac_ext <<EOF
17072 #line 17073 "configure"
17073 #include "confdefs.h"
17074
17075 #ifdef HAVE_DB_185_H
17076 # include <db_185.h>
17077 #else
17078 # include <db.h>
17079 #endif
17080
17081 #ifndef DB_VERSION_MAJOR
17082 # define DB_VERSION_MAJOR 1
17083 #endif
17084
17085 #ifndef NULL
17086 #define NULL ((void*)0)
17087 #endif
17088
17089 int main() {
17090
17091 #if DB_VERSION_MAJOR > 1
17092         {
17093                 char *version;
17094                 int major, minor, patch;
17095
17096                 version = db_version( &major, &minor, &patch );
17097
17098                 if( major != DB_VERSION_MAJOR ||
17099                         minor < DB_VERSION_MINOR )
17100                 {
17101                         printf("Berkeley DB version mismatch\n"
17102                                 "\texpected: %s\n\tgot: %s\n",
17103                                 DB_VERSION_STRING, version);
17104                         return 1;
17105                 }
17106         }
17107 #endif
17108
17109 #if DB_VERSION_MAJOR > 2
17110         db_env_create( NULL, 0 );
17111 #elif DB_VERSION_MAJOR > 1
17112         db_appexit( NULL );
17113 #else
17114         (void) dbopen( NULL, 0, 0, 0, NULL);
17115 #endif
17116
17117 ; return 0; }
17118 EOF
17119 if { (eval echo configure:17120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17120   rm -rf conftest*
17121   ol_cv_db_db_4=yes
17122 else
17123   echo "configure: failed program was:" >&5
17124   cat conftest.$ac_ext >&5
17125   rm -rf conftest*
17126   ol_cv_db_db_4=no
17127 fi
17128 rm -f conftest*
17129
17130         LIBS="$ol_LIBS"
17131
17132 fi
17133
17134 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17135
17136         if test $ol_cv_db_db_4 = yes ; then
17137                 ol_cv_lib_db=-ldb-4
17138         fi
17139 fi
17140
17141 if test $ol_cv_lib_db = no ; then
17142         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17143 echo "configure:17144: checking for Berkeley DB link (-ldb4)" >&5
17144 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17145   echo $ac_n "(cached) $ac_c" 1>&6
17146 else
17147   
17148         ol_DB_LIB=-ldb4
17149         ol_LIBS=$LIBS
17150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17151
17152         cat > conftest.$ac_ext <<EOF
17153 #line 17154 "configure"
17154 #include "confdefs.h"
17155
17156 #ifdef HAVE_DB_185_H
17157 # include <db_185.h>
17158 #else
17159 # include <db.h>
17160 #endif
17161
17162 #ifndef DB_VERSION_MAJOR
17163 # define DB_VERSION_MAJOR 1
17164 #endif
17165
17166 #ifndef NULL
17167 #define NULL ((void*)0)
17168 #endif
17169
17170 int main() {
17171
17172 #if DB_VERSION_MAJOR > 1
17173         {
17174                 char *version;
17175                 int major, minor, patch;
17176
17177                 version = db_version( &major, &minor, &patch );
17178
17179                 if( major != DB_VERSION_MAJOR ||
17180                         minor < DB_VERSION_MINOR )
17181                 {
17182                         printf("Berkeley DB version mismatch\n"
17183                                 "\texpected: %s\n\tgot: %s\n",
17184                                 DB_VERSION_STRING, version);
17185                         return 1;
17186                 }
17187         }
17188 #endif
17189
17190 #if DB_VERSION_MAJOR > 2
17191         db_env_create( NULL, 0 );
17192 #elif DB_VERSION_MAJOR > 1
17193         db_appexit( NULL );
17194 #else
17195         (void) dbopen( NULL, 0, 0, 0, NULL);
17196 #endif
17197
17198 ; return 0; }
17199 EOF
17200 if { (eval echo configure:17201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17201   rm -rf conftest*
17202   ol_cv_db_db4=yes
17203 else
17204   echo "configure: failed program was:" >&5
17205   cat conftest.$ac_ext >&5
17206   rm -rf conftest*
17207   ol_cv_db_db4=no
17208 fi
17209 rm -f conftest*
17210
17211         LIBS="$ol_LIBS"
17212
17213 fi
17214
17215 echo "$ac_t""$ol_cv_db_db4" 1>&6
17216
17217         if test $ol_cv_db_db4 = yes ; then
17218                 ol_cv_lib_db=-ldb4
17219         fi
17220 fi
17221
17222 if test $ol_cv_lib_db = no ; then
17223         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17224 echo "configure:17225: checking for Berkeley DB link (-ldb)" >&5
17225 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17226   echo $ac_n "(cached) $ac_c" 1>&6
17227 else
17228   
17229         ol_DB_LIB=-ldb
17230         ol_LIBS=$LIBS
17231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17232
17233         cat > conftest.$ac_ext <<EOF
17234 #line 17235 "configure"
17235 #include "confdefs.h"
17236
17237 #ifdef HAVE_DB_185_H
17238 # include <db_185.h>
17239 #else
17240 # include <db.h>
17241 #endif
17242
17243 #ifndef DB_VERSION_MAJOR
17244 # define DB_VERSION_MAJOR 1
17245 #endif
17246
17247 #ifndef NULL
17248 #define NULL ((void*)0)
17249 #endif
17250
17251 int main() {
17252
17253 #if DB_VERSION_MAJOR > 1
17254         {
17255                 char *version;
17256                 int major, minor, patch;
17257
17258                 version = db_version( &major, &minor, &patch );
17259
17260                 if( major != DB_VERSION_MAJOR ||
17261                         minor < DB_VERSION_MINOR )
17262                 {
17263                         printf("Berkeley DB version mismatch\n"
17264                                 "\texpected: %s\n\tgot: %s\n",
17265                                 DB_VERSION_STRING, version);
17266                         return 1;
17267                 }
17268         }
17269 #endif
17270
17271 #if DB_VERSION_MAJOR > 2
17272         db_env_create( NULL, 0 );
17273 #elif DB_VERSION_MAJOR > 1
17274         db_appexit( NULL );
17275 #else
17276         (void) dbopen( NULL, 0, 0, 0, NULL);
17277 #endif
17278
17279 ; return 0; }
17280 EOF
17281 if { (eval echo configure:17282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17282   rm -rf conftest*
17283   ol_cv_db_db=yes
17284 else
17285   echo "configure: failed program was:" >&5
17286   cat conftest.$ac_ext >&5
17287   rm -rf conftest*
17288   ol_cv_db_db=no
17289 fi
17290 rm -f conftest*
17291
17292         LIBS="$ol_LIBS"
17293
17294 fi
17295
17296 echo "$ac_t""$ol_cv_db_db" 1>&6
17297
17298         if test $ol_cv_db_db = yes ; then
17299                 ol_cv_lib_db=-ldb
17300         fi
17301 fi
17302
17303 if test $ol_cv_lib_db = no ; then
17304         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17305 echo "configure:17306: checking for Berkeley DB link (-ldb41)" >&5
17306 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17307   echo $ac_n "(cached) $ac_c" 1>&6
17308 else
17309   
17310         ol_DB_LIB=-ldb41
17311         ol_LIBS=$LIBS
17312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17313
17314         cat > conftest.$ac_ext <<EOF
17315 #line 17316 "configure"
17316 #include "confdefs.h"
17317
17318 #ifdef HAVE_DB_185_H
17319 # include <db_185.h>
17320 #else
17321 # include <db.h>
17322 #endif
17323
17324 #ifndef DB_VERSION_MAJOR
17325 # define DB_VERSION_MAJOR 1
17326 #endif
17327
17328 #ifndef NULL
17329 #define NULL ((void*)0)
17330 #endif
17331
17332 int main() {
17333
17334 #if DB_VERSION_MAJOR > 1
17335         {
17336                 char *version;
17337                 int major, minor, patch;
17338
17339                 version = db_version( &major, &minor, &patch );
17340
17341                 if( major != DB_VERSION_MAJOR ||
17342                         minor < DB_VERSION_MINOR )
17343                 {
17344                         printf("Berkeley DB version mismatch\n"
17345                                 "\texpected: %s\n\tgot: %s\n",
17346                                 DB_VERSION_STRING, version);
17347                         return 1;
17348                 }
17349         }
17350 #endif
17351
17352 #if DB_VERSION_MAJOR > 2
17353         db_env_create( NULL, 0 );
17354 #elif DB_VERSION_MAJOR > 1
17355         db_appexit( NULL );
17356 #else
17357         (void) dbopen( NULL, 0, 0, 0, NULL);
17358 #endif
17359
17360 ; return 0; }
17361 EOF
17362 if { (eval echo configure:17363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17363   rm -rf conftest*
17364   ol_cv_db_db41=yes
17365 else
17366   echo "configure: failed program was:" >&5
17367   cat conftest.$ac_ext >&5
17368   rm -rf conftest*
17369   ol_cv_db_db41=no
17370 fi
17371 rm -f conftest*
17372
17373         LIBS="$ol_LIBS"
17374
17375 fi
17376
17377 echo "$ac_t""$ol_cv_db_db41" 1>&6
17378
17379         if test $ol_cv_db_db41 = yes ; then
17380                 ol_cv_lib_db=-ldb41
17381         fi
17382 fi
17383
17384 if test $ol_cv_lib_db = no ; then
17385         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17386 echo "configure:17387: checking for Berkeley DB link (-ldb-41)" >&5
17387 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17388   echo $ac_n "(cached) $ac_c" 1>&6
17389 else
17390   
17391         ol_DB_LIB=-ldb-41
17392         ol_LIBS=$LIBS
17393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17394
17395         cat > conftest.$ac_ext <<EOF
17396 #line 17397 "configure"
17397 #include "confdefs.h"
17398
17399 #ifdef HAVE_DB_185_H
17400 # include <db_185.h>
17401 #else
17402 # include <db.h>
17403 #endif
17404
17405 #ifndef DB_VERSION_MAJOR
17406 # define DB_VERSION_MAJOR 1
17407 #endif
17408
17409 #ifndef NULL
17410 #define NULL ((void*)0)
17411 #endif
17412
17413 int main() {
17414
17415 #if DB_VERSION_MAJOR > 1
17416         {
17417                 char *version;
17418                 int major, minor, patch;
17419
17420                 version = db_version( &major, &minor, &patch );
17421
17422                 if( major != DB_VERSION_MAJOR ||
17423                         minor < DB_VERSION_MINOR )
17424                 {
17425                         printf("Berkeley DB version mismatch\n"
17426                                 "\texpected: %s\n\tgot: %s\n",
17427                                 DB_VERSION_STRING, version);
17428                         return 1;
17429                 }
17430         }
17431 #endif
17432
17433 #if DB_VERSION_MAJOR > 2
17434         db_env_create( NULL, 0 );
17435 #elif DB_VERSION_MAJOR > 1
17436         db_appexit( NULL );
17437 #else
17438         (void) dbopen( NULL, 0, 0, 0, NULL);
17439 #endif
17440
17441 ; return 0; }
17442 EOF
17443 if { (eval echo configure:17444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17444   rm -rf conftest*
17445   ol_cv_db_db_41=yes
17446 else
17447   echo "configure: failed program was:" >&5
17448   cat conftest.$ac_ext >&5
17449   rm -rf conftest*
17450   ol_cv_db_db_41=no
17451 fi
17452 rm -f conftest*
17453
17454         LIBS="$ol_LIBS"
17455
17456 fi
17457
17458 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17459
17460         if test $ol_cv_db_db_41 = yes ; then
17461                 ol_cv_lib_db=-ldb-41
17462         fi
17463 fi
17464
17465 if test $ol_cv_lib_db = no ; then
17466         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17467 echo "configure:17468: checking for Berkeley DB link (-ldb-4.1)" >&5
17468 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17469   echo $ac_n "(cached) $ac_c" 1>&6
17470 else
17471   
17472         ol_DB_LIB=-ldb-4.1
17473         ol_LIBS=$LIBS
17474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17475
17476         cat > conftest.$ac_ext <<EOF
17477 #line 17478 "configure"
17478 #include "confdefs.h"
17479
17480 #ifdef HAVE_DB_185_H
17481 # include <db_185.h>
17482 #else
17483 # include <db.h>
17484 #endif
17485
17486 #ifndef DB_VERSION_MAJOR
17487 # define DB_VERSION_MAJOR 1
17488 #endif
17489
17490 #ifndef NULL
17491 #define NULL ((void*)0)
17492 #endif
17493
17494 int main() {
17495
17496 #if DB_VERSION_MAJOR > 1
17497         {
17498                 char *version;
17499                 int major, minor, patch;
17500
17501                 version = db_version( &major, &minor, &patch );
17502
17503                 if( major != DB_VERSION_MAJOR ||
17504                         minor < DB_VERSION_MINOR )
17505                 {
17506                         printf("Berkeley DB version mismatch\n"
17507                                 "\texpected: %s\n\tgot: %s\n",
17508                                 DB_VERSION_STRING, version);
17509                         return 1;
17510                 }
17511         }
17512 #endif
17513
17514 #if DB_VERSION_MAJOR > 2
17515         db_env_create( NULL, 0 );
17516 #elif DB_VERSION_MAJOR > 1
17517         db_appexit( NULL );
17518 #else
17519         (void) dbopen( NULL, 0, 0, 0, NULL);
17520 #endif
17521
17522 ; return 0; }
17523 EOF
17524 if { (eval echo configure:17525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17525   rm -rf conftest*
17526   ol_cv_db_db_4_dot_1=yes
17527 else
17528   echo "configure: failed program was:" >&5
17529   cat conftest.$ac_ext >&5
17530   rm -rf conftest*
17531   ol_cv_db_db_4_dot_1=no
17532 fi
17533 rm -f conftest*
17534
17535         LIBS="$ol_LIBS"
17536
17537 fi
17538
17539 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17540
17541         if test $ol_cv_db_db_4_dot_1 = yes ; then
17542                 ol_cv_lib_db=-ldb-4.1
17543         fi
17544 fi
17545
17546 if test $ol_cv_lib_db = no ; then
17547         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17548 echo "configure:17549: checking for Berkeley DB link (-ldb-4-1)" >&5
17549 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17550   echo $ac_n "(cached) $ac_c" 1>&6
17551 else
17552   
17553         ol_DB_LIB=-ldb-4-1
17554         ol_LIBS=$LIBS
17555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17556
17557         cat > conftest.$ac_ext <<EOF
17558 #line 17559 "configure"
17559 #include "confdefs.h"
17560
17561 #ifdef HAVE_DB_185_H
17562 # include <db_185.h>
17563 #else
17564 # include <db.h>
17565 #endif
17566
17567 #ifndef DB_VERSION_MAJOR
17568 # define DB_VERSION_MAJOR 1
17569 #endif
17570
17571 #ifndef NULL
17572 #define NULL ((void*)0)
17573 #endif
17574
17575 int main() {
17576
17577 #if DB_VERSION_MAJOR > 1
17578         {
17579                 char *version;
17580                 int major, minor, patch;
17581
17582                 version = db_version( &major, &minor, &patch );
17583
17584                 if( major != DB_VERSION_MAJOR ||
17585                         minor < DB_VERSION_MINOR )
17586                 {
17587                         printf("Berkeley DB version mismatch\n"
17588                                 "\texpected: %s\n\tgot: %s\n",
17589                                 DB_VERSION_STRING, version);
17590                         return 1;
17591                 }
17592         }
17593 #endif
17594
17595 #if DB_VERSION_MAJOR > 2
17596         db_env_create( NULL, 0 );
17597 #elif DB_VERSION_MAJOR > 1
17598         db_appexit( NULL );
17599 #else
17600         (void) dbopen( NULL, 0, 0, 0, NULL);
17601 #endif
17602
17603 ; return 0; }
17604 EOF
17605 if { (eval echo configure:17606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17606   rm -rf conftest*
17607   ol_cv_db_db_4_1=yes
17608 else
17609   echo "configure: failed program was:" >&5
17610   cat conftest.$ac_ext >&5
17611   rm -rf conftest*
17612   ol_cv_db_db_4_1=no
17613 fi
17614 rm -f conftest*
17615
17616         LIBS="$ol_LIBS"
17617
17618 fi
17619
17620 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17621
17622         if test $ol_cv_db_db_4_1 = yes ; then
17623                 ol_cv_lib_db=-ldb-4-1
17624         fi
17625 fi
17626
17627 if test $ol_cv_lib_db = no ; then
17628         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17629 echo "configure:17630: checking for Berkeley DB link (-ldb3)" >&5
17630 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17631   echo $ac_n "(cached) $ac_c" 1>&6
17632 else
17633   
17634         ol_DB_LIB=-ldb3
17635         ol_LIBS=$LIBS
17636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17637
17638         cat > conftest.$ac_ext <<EOF
17639 #line 17640 "configure"
17640 #include "confdefs.h"
17641
17642 #ifdef HAVE_DB_185_H
17643 # include <db_185.h>
17644 #else
17645 # include <db.h>
17646 #endif
17647
17648 #ifndef DB_VERSION_MAJOR
17649 # define DB_VERSION_MAJOR 1
17650 #endif
17651
17652 #ifndef NULL
17653 #define NULL ((void*)0)
17654 #endif
17655
17656 int main() {
17657
17658 #if DB_VERSION_MAJOR > 1
17659         {
17660                 char *version;
17661                 int major, minor, patch;
17662
17663                 version = db_version( &major, &minor, &patch );
17664
17665                 if( major != DB_VERSION_MAJOR ||
17666                         minor < DB_VERSION_MINOR )
17667                 {
17668                         printf("Berkeley DB version mismatch\n"
17669                                 "\texpected: %s\n\tgot: %s\n",
17670                                 DB_VERSION_STRING, version);
17671                         return 1;
17672                 }
17673         }
17674 #endif
17675
17676 #if DB_VERSION_MAJOR > 2
17677         db_env_create( NULL, 0 );
17678 #elif DB_VERSION_MAJOR > 1
17679         db_appexit( NULL );
17680 #else
17681         (void) dbopen( NULL, 0, 0, 0, NULL);
17682 #endif
17683
17684 ; return 0; }
17685 EOF
17686 if { (eval echo configure:17687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17687   rm -rf conftest*
17688   ol_cv_db_db3=yes
17689 else
17690   echo "configure: failed program was:" >&5
17691   cat conftest.$ac_ext >&5
17692   rm -rf conftest*
17693   ol_cv_db_db3=no
17694 fi
17695 rm -f conftest*
17696
17697         LIBS="$ol_LIBS"
17698
17699 fi
17700
17701 echo "$ac_t""$ol_cv_db_db3" 1>&6
17702
17703         if test $ol_cv_db_db3 = yes ; then
17704                 ol_cv_lib_db=-ldb3
17705         fi
17706 fi
17707
17708 if test $ol_cv_lib_db = no ; then
17709         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17710 echo "configure:17711: checking for Berkeley DB link (-ldb-3)" >&5
17711 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17712   echo $ac_n "(cached) $ac_c" 1>&6
17713 else
17714   
17715         ol_DB_LIB=-ldb-3
17716         ol_LIBS=$LIBS
17717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17718
17719         cat > conftest.$ac_ext <<EOF
17720 #line 17721 "configure"
17721 #include "confdefs.h"
17722
17723 #ifdef HAVE_DB_185_H
17724 # include <db_185.h>
17725 #else
17726 # include <db.h>
17727 #endif
17728
17729 #ifndef DB_VERSION_MAJOR
17730 # define DB_VERSION_MAJOR 1
17731 #endif
17732
17733 #ifndef NULL
17734 #define NULL ((void*)0)
17735 #endif
17736
17737 int main() {
17738
17739 #if DB_VERSION_MAJOR > 1
17740         {
17741                 char *version;
17742                 int major, minor, patch;
17743
17744                 version = db_version( &major, &minor, &patch );
17745
17746                 if( major != DB_VERSION_MAJOR ||
17747                         minor < DB_VERSION_MINOR )
17748                 {
17749                         printf("Berkeley DB version mismatch\n"
17750                                 "\texpected: %s\n\tgot: %s\n",
17751                                 DB_VERSION_STRING, version);
17752                         return 1;
17753                 }
17754         }
17755 #endif
17756
17757 #if DB_VERSION_MAJOR > 2
17758         db_env_create( NULL, 0 );
17759 #elif DB_VERSION_MAJOR > 1
17760         db_appexit( NULL );
17761 #else
17762         (void) dbopen( NULL, 0, 0, 0, NULL);
17763 #endif
17764
17765 ; return 0; }
17766 EOF
17767 if { (eval echo configure:17768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17768   rm -rf conftest*
17769   ol_cv_db_db_3=yes
17770 else
17771   echo "configure: failed program was:" >&5
17772   cat conftest.$ac_ext >&5
17773   rm -rf conftest*
17774   ol_cv_db_db_3=no
17775 fi
17776 rm -f conftest*
17777
17778         LIBS="$ol_LIBS"
17779
17780 fi
17781
17782 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17783
17784         if test $ol_cv_db_db_3 = yes ; then
17785                 ol_cv_lib_db=-ldb-3
17786         fi
17787 fi
17788
17789 if test $ol_cv_lib_db = no ; then
17790         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17791 echo "configure:17792: checking for Berkeley DB link (-ldb2)" >&5
17792 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17793   echo $ac_n "(cached) $ac_c" 1>&6
17794 else
17795   
17796         ol_DB_LIB=-ldb2
17797         ol_LIBS=$LIBS
17798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17799
17800         cat > conftest.$ac_ext <<EOF
17801 #line 17802 "configure"
17802 #include "confdefs.h"
17803
17804 #ifdef HAVE_DB_185_H
17805 # include <db_185.h>
17806 #else
17807 # include <db.h>
17808 #endif
17809
17810 #ifndef DB_VERSION_MAJOR
17811 # define DB_VERSION_MAJOR 1
17812 #endif
17813
17814 #ifndef NULL
17815 #define NULL ((void*)0)
17816 #endif
17817
17818 int main() {
17819
17820 #if DB_VERSION_MAJOR > 1
17821         {
17822                 char *version;
17823                 int major, minor, patch;
17824
17825                 version = db_version( &major, &minor, &patch );
17826
17827                 if( major != DB_VERSION_MAJOR ||
17828                         minor < DB_VERSION_MINOR )
17829                 {
17830                         printf("Berkeley DB version mismatch\n"
17831                                 "\texpected: %s\n\tgot: %s\n",
17832                                 DB_VERSION_STRING, version);
17833                         return 1;
17834                 }
17835         }
17836 #endif
17837
17838 #if DB_VERSION_MAJOR > 2
17839         db_env_create( NULL, 0 );
17840 #elif DB_VERSION_MAJOR > 1
17841         db_appexit( NULL );
17842 #else
17843         (void) dbopen( NULL, 0, 0, 0, NULL);
17844 #endif
17845
17846 ; return 0; }
17847 EOF
17848 if { (eval echo configure:17849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17849   rm -rf conftest*
17850   ol_cv_db_db2=yes
17851 else
17852   echo "configure: failed program was:" >&5
17853   cat conftest.$ac_ext >&5
17854   rm -rf conftest*
17855   ol_cv_db_db2=no
17856 fi
17857 rm -f conftest*
17858
17859         LIBS="$ol_LIBS"
17860
17861 fi
17862
17863 echo "$ac_t""$ol_cv_db_db2" 1>&6
17864
17865         if test $ol_cv_db_db2 = yes ; then
17866                 ol_cv_lib_db=-ldb2
17867         fi
17868 fi
17869
17870 if test $ol_cv_lib_db = no ; then
17871         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17872 echo "configure:17873: checking for Berkeley DB link (-ldb-2)" >&5
17873 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17874   echo $ac_n "(cached) $ac_c" 1>&6
17875 else
17876   
17877         ol_DB_LIB=-ldb-2
17878         ol_LIBS=$LIBS
17879         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17880
17881         cat > conftest.$ac_ext <<EOF
17882 #line 17883 "configure"
17883 #include "confdefs.h"
17884
17885 #ifdef HAVE_DB_185_H
17886 # include <db_185.h>
17887 #else
17888 # include <db.h>
17889 #endif
17890
17891 #ifndef DB_VERSION_MAJOR
17892 # define DB_VERSION_MAJOR 1
17893 #endif
17894
17895 #ifndef NULL
17896 #define NULL ((void*)0)
17897 #endif
17898
17899 int main() {
17900
17901 #if DB_VERSION_MAJOR > 1
17902         {
17903                 char *version;
17904                 int major, minor, patch;
17905
17906                 version = db_version( &major, &minor, &patch );
17907
17908                 if( major != DB_VERSION_MAJOR ||
17909                         minor < DB_VERSION_MINOR )
17910                 {
17911                         printf("Berkeley DB version mismatch\n"
17912                                 "\texpected: %s\n\tgot: %s\n",
17913                                 DB_VERSION_STRING, version);
17914                         return 1;
17915                 }
17916         }
17917 #endif
17918
17919 #if DB_VERSION_MAJOR > 2
17920         db_env_create( NULL, 0 );
17921 #elif DB_VERSION_MAJOR > 1
17922         db_appexit( NULL );
17923 #else
17924         (void) dbopen( NULL, 0, 0, 0, NULL);
17925 #endif
17926
17927 ; return 0; }
17928 EOF
17929 if { (eval echo configure:17930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17930   rm -rf conftest*
17931   ol_cv_db_db_2=yes
17932 else
17933   echo "configure: failed program was:" >&5
17934   cat conftest.$ac_ext >&5
17935   rm -rf conftest*
17936   ol_cv_db_db_2=no
17937 fi
17938 rm -f conftest*
17939
17940         LIBS="$ol_LIBS"
17941
17942 fi
17943
17944 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17945
17946         if test $ol_cv_db_db_2 = yes ; then
17947                 ol_cv_lib_db=-ldb-2
17948         fi
17949 fi
17950
17951 if test $ol_cv_lib_db = no ; then
17952         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17953 echo "configure:17954: checking for Berkeley DB link (-ldb1)" >&5
17954 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17955   echo $ac_n "(cached) $ac_c" 1>&6
17956 else
17957   
17958         ol_DB_LIB=-ldb1
17959         ol_LIBS=$LIBS
17960         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17961
17962         cat > conftest.$ac_ext <<EOF
17963 #line 17964 "configure"
17964 #include "confdefs.h"
17965
17966 #ifdef HAVE_DB_185_H
17967 # include <db_185.h>
17968 #else
17969 # include <db.h>
17970 #endif
17971
17972 #ifndef DB_VERSION_MAJOR
17973 # define DB_VERSION_MAJOR 1
17974 #endif
17975
17976 #ifndef NULL
17977 #define NULL ((void*)0)
17978 #endif
17979
17980 int main() {
17981
17982 #if DB_VERSION_MAJOR > 1
17983         {
17984                 char *version;
17985                 int major, minor, patch;
17986
17987                 version = db_version( &major, &minor, &patch );
17988
17989                 if( major != DB_VERSION_MAJOR ||
17990                         minor < DB_VERSION_MINOR )
17991                 {
17992                         printf("Berkeley DB version mismatch\n"
17993                                 "\texpected: %s\n\tgot: %s\n",
17994                                 DB_VERSION_STRING, version);
17995                         return 1;
17996                 }
17997         }
17998 #endif
17999
18000 #if DB_VERSION_MAJOR > 2
18001         db_env_create( NULL, 0 );
18002 #elif DB_VERSION_MAJOR > 1
18003         db_appexit( NULL );
18004 #else
18005         (void) dbopen( NULL, 0, 0, 0, NULL);
18006 #endif
18007
18008 ; return 0; }
18009 EOF
18010 if { (eval echo configure:18011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18011   rm -rf conftest*
18012   ol_cv_db_db1=yes
18013 else
18014   echo "configure: failed program was:" >&5
18015   cat conftest.$ac_ext >&5
18016   rm -rf conftest*
18017   ol_cv_db_db1=no
18018 fi
18019 rm -f conftest*
18020
18021         LIBS="$ol_LIBS"
18022
18023 fi
18024
18025 echo "$ac_t""$ol_cv_db_db1" 1>&6
18026
18027         if test $ol_cv_db_db1 = yes ; then
18028                 ol_cv_lib_db=-ldb1
18029         fi
18030 fi
18031
18032 if test $ol_cv_lib_db = no ; then
18033         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18034 echo "configure:18035: checking for Berkeley DB link (-ldb-1)" >&5
18035 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18036   echo $ac_n "(cached) $ac_c" 1>&6
18037 else
18038   
18039         ol_DB_LIB=-ldb-1
18040         ol_LIBS=$LIBS
18041         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18042
18043         cat > conftest.$ac_ext <<EOF
18044 #line 18045 "configure"
18045 #include "confdefs.h"
18046
18047 #ifdef HAVE_DB_185_H
18048 # include <db_185.h>
18049 #else
18050 # include <db.h>
18051 #endif
18052
18053 #ifndef DB_VERSION_MAJOR
18054 # define DB_VERSION_MAJOR 1
18055 #endif
18056
18057 #ifndef NULL
18058 #define NULL ((void*)0)
18059 #endif
18060
18061 int main() {
18062
18063 #if DB_VERSION_MAJOR > 1
18064         {
18065                 char *version;
18066                 int major, minor, patch;
18067
18068                 version = db_version( &major, &minor, &patch );
18069
18070                 if( major != DB_VERSION_MAJOR ||
18071                         minor < DB_VERSION_MINOR )
18072                 {
18073                         printf("Berkeley DB version mismatch\n"
18074                                 "\texpected: %s\n\tgot: %s\n",
18075                                 DB_VERSION_STRING, version);
18076                         return 1;
18077                 }
18078         }
18079 #endif
18080
18081 #if DB_VERSION_MAJOR > 2
18082         db_env_create( NULL, 0 );
18083 #elif DB_VERSION_MAJOR > 1
18084         db_appexit( NULL );
18085 #else
18086         (void) dbopen( NULL, 0, 0, 0, NULL);
18087 #endif
18088
18089 ; return 0; }
18090 EOF
18091 if { (eval echo configure:18092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18092   rm -rf conftest*
18093   ol_cv_db_db_1=yes
18094 else
18095   echo "configure: failed program was:" >&5
18096   cat conftest.$ac_ext >&5
18097   rm -rf conftest*
18098   ol_cv_db_db_1=no
18099 fi
18100 rm -f conftest*
18101
18102         LIBS="$ol_LIBS"
18103
18104 fi
18105
18106 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18107
18108         if test $ol_cv_db_db_1 = yes ; then
18109                 ol_cv_lib_db=-ldb-1
18110         fi
18111 fi
18112
18113
18114                 if test "$ol_cv_lib_db" != no ; then
18115                         ol_cv_berkeley_db=yes
18116                 fi
18117         fi
18118 fi
18119
18120         else
18121                 ol_cv_berkeley_db=no
18122 for ac_hdr in db.h
18123 do
18124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18126 echo "configure:18127: checking for $ac_hdr" >&5
18127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18128   echo $ac_n "(cached) $ac_c" 1>&6
18129 else
18130   cat > conftest.$ac_ext <<EOF
18131 #line 18132 "configure"
18132 #include "confdefs.h"
18133 #include <$ac_hdr>
18134 EOF
18135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18136 { (eval echo configure:18137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18138 if test -z "$ac_err"; then
18139   rm -rf conftest*
18140   eval "ac_cv_header_$ac_safe=yes"
18141 else
18142   echo "$ac_err" >&5
18143   echo "configure: failed program was:" >&5
18144   cat conftest.$ac_ext >&5
18145   rm -rf conftest*
18146   eval "ac_cv_header_$ac_safe=no"
18147 fi
18148 rm -f conftest*
18149 fi
18150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18151   echo "$ac_t""yes" 1>&6
18152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18153   cat >> confdefs.h <<EOF
18154 #define $ac_tr_hdr 1
18155 EOF
18156  
18157 else
18158   echo "$ac_t""no" 1>&6
18159 fi
18160 done
18161
18162 if test $ac_cv_header_db_h = yes; then
18163         ol_cv_lib_db=no
18164 if test $ol_cv_lib_db = no ; then
18165         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18166 echo "configure:18167: checking for Berkeley DB link (default)" >&5
18167 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18168   echo $ac_n "(cached) $ac_c" 1>&6
18169 else
18170   
18171         ol_DB_LIB=
18172         ol_LIBS=$LIBS
18173         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18174
18175         cat > conftest.$ac_ext <<EOF
18176 #line 18177 "configure"
18177 #include "confdefs.h"
18178
18179 #ifdef HAVE_DB_185_H
18180 # include <db_185.h>
18181 #else
18182 # include <db.h>
18183 #endif
18184
18185 #ifndef DB_VERSION_MAJOR
18186 # define DB_VERSION_MAJOR 1
18187 #endif
18188
18189 #ifndef NULL
18190 #define NULL ((void*)0)
18191 #endif
18192
18193 int main() {
18194
18195 #if DB_VERSION_MAJOR > 1
18196         {
18197                 char *version;
18198                 int major, minor, patch;
18199
18200                 version = db_version( &major, &minor, &patch );
18201
18202                 if( major != DB_VERSION_MAJOR ||
18203                         minor < DB_VERSION_MINOR )
18204                 {
18205                         printf("Berkeley DB version mismatch\n"
18206                                 "\texpected: %s\n\tgot: %s\n",
18207                                 DB_VERSION_STRING, version);
18208                         return 1;
18209                 }
18210         }
18211 #endif
18212
18213 #if DB_VERSION_MAJOR > 2
18214         db_env_create( NULL, 0 );
18215 #elif DB_VERSION_MAJOR > 1
18216         db_appexit( NULL );
18217 #else
18218         (void) dbopen( NULL, 0, 0, 0, NULL);
18219 #endif
18220
18221 ; return 0; }
18222 EOF
18223 if { (eval echo configure:18224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18224   rm -rf conftest*
18225   ol_cv_db_none=yes
18226 else
18227   echo "configure: failed program was:" >&5
18228   cat conftest.$ac_ext >&5
18229   rm -rf conftest*
18230   ol_cv_db_none=no
18231 fi
18232 rm -f conftest*
18233
18234         LIBS="$ol_LIBS"
18235
18236 fi
18237
18238 echo "$ac_t""$ol_cv_db_none" 1>&6
18239
18240         if test $ol_cv_db_none = yes ; then
18241                 ol_cv_lib_db=yes
18242         fi
18243 fi
18244
18245 if test $ol_cv_lib_db = no ; then
18246         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18247 echo "configure:18248: checking for Berkeley DB link (-ldb42)" >&5
18248 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18249   echo $ac_n "(cached) $ac_c" 1>&6
18250 else
18251   
18252         ol_DB_LIB=-ldb42
18253         ol_LIBS=$LIBS
18254         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18255
18256         cat > conftest.$ac_ext <<EOF
18257 #line 18258 "configure"
18258 #include "confdefs.h"
18259
18260 #ifdef HAVE_DB_185_H
18261 # include <db_185.h>
18262 #else
18263 # include <db.h>
18264 #endif
18265
18266 #ifndef DB_VERSION_MAJOR
18267 # define DB_VERSION_MAJOR 1
18268 #endif
18269
18270 #ifndef NULL
18271 #define NULL ((void*)0)
18272 #endif
18273
18274 int main() {
18275
18276 #if DB_VERSION_MAJOR > 1
18277         {
18278                 char *version;
18279                 int major, minor, patch;
18280
18281                 version = db_version( &major, &minor, &patch );
18282
18283                 if( major != DB_VERSION_MAJOR ||
18284                         minor < DB_VERSION_MINOR )
18285                 {
18286                         printf("Berkeley DB version mismatch\n"
18287                                 "\texpected: %s\n\tgot: %s\n",
18288                                 DB_VERSION_STRING, version);
18289                         return 1;
18290                 }
18291         }
18292 #endif
18293
18294 #if DB_VERSION_MAJOR > 2
18295         db_env_create( NULL, 0 );
18296 #elif DB_VERSION_MAJOR > 1
18297         db_appexit( NULL );
18298 #else
18299         (void) dbopen( NULL, 0, 0, 0, NULL);
18300 #endif
18301
18302 ; return 0; }
18303 EOF
18304 if { (eval echo configure:18305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18305   rm -rf conftest*
18306   ol_cv_db_db42=yes
18307 else
18308   echo "configure: failed program was:" >&5
18309   cat conftest.$ac_ext >&5
18310   rm -rf conftest*
18311   ol_cv_db_db42=no
18312 fi
18313 rm -f conftest*
18314
18315         LIBS="$ol_LIBS"
18316
18317 fi
18318
18319 echo "$ac_t""$ol_cv_db_db42" 1>&6
18320
18321         if test $ol_cv_db_db42 = yes ; then
18322                 ol_cv_lib_db=-ldb42
18323         fi
18324 fi
18325
18326 if test $ol_cv_lib_db = no ; then
18327         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18328 echo "configure:18329: checking for Berkeley DB link (-ldb-42)" >&5
18329 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18330   echo $ac_n "(cached) $ac_c" 1>&6
18331 else
18332   
18333         ol_DB_LIB=-ldb-42
18334         ol_LIBS=$LIBS
18335         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18336
18337         cat > conftest.$ac_ext <<EOF
18338 #line 18339 "configure"
18339 #include "confdefs.h"
18340
18341 #ifdef HAVE_DB_185_H
18342 # include <db_185.h>
18343 #else
18344 # include <db.h>
18345 #endif
18346
18347 #ifndef DB_VERSION_MAJOR
18348 # define DB_VERSION_MAJOR 1
18349 #endif
18350
18351 #ifndef NULL
18352 #define NULL ((void*)0)
18353 #endif
18354
18355 int main() {
18356
18357 #if DB_VERSION_MAJOR > 1
18358         {
18359                 char *version;
18360                 int major, minor, patch;
18361
18362                 version = db_version( &major, &minor, &patch );
18363
18364                 if( major != DB_VERSION_MAJOR ||
18365                         minor < DB_VERSION_MINOR )
18366                 {
18367                         printf("Berkeley DB version mismatch\n"
18368                                 "\texpected: %s\n\tgot: %s\n",
18369                                 DB_VERSION_STRING, version);
18370                         return 1;
18371                 }
18372         }
18373 #endif
18374
18375 #if DB_VERSION_MAJOR > 2
18376         db_env_create( NULL, 0 );
18377 #elif DB_VERSION_MAJOR > 1
18378         db_appexit( NULL );
18379 #else
18380         (void) dbopen( NULL, 0, 0, 0, NULL);
18381 #endif
18382
18383 ; return 0; }
18384 EOF
18385 if { (eval echo configure:18386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18386   rm -rf conftest*
18387   ol_cv_db_db_42=yes
18388 else
18389   echo "configure: failed program was:" >&5
18390   cat conftest.$ac_ext >&5
18391   rm -rf conftest*
18392   ol_cv_db_db_42=no
18393 fi
18394 rm -f conftest*
18395
18396         LIBS="$ol_LIBS"
18397
18398 fi
18399
18400 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18401
18402         if test $ol_cv_db_db_42 = yes ; then
18403                 ol_cv_lib_db=-ldb-42
18404         fi
18405 fi
18406
18407 if test $ol_cv_lib_db = no ; then
18408         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18409 echo "configure:18410: checking for Berkeley DB link (-ldb-4.2)" >&5
18410 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18411   echo $ac_n "(cached) $ac_c" 1>&6
18412 else
18413   
18414         ol_DB_LIB=-ldb-4.2
18415         ol_LIBS=$LIBS
18416         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18417
18418         cat > conftest.$ac_ext <<EOF
18419 #line 18420 "configure"
18420 #include "confdefs.h"
18421
18422 #ifdef HAVE_DB_185_H
18423 # include <db_185.h>
18424 #else
18425 # include <db.h>
18426 #endif
18427
18428 #ifndef DB_VERSION_MAJOR
18429 # define DB_VERSION_MAJOR 1
18430 #endif
18431
18432 #ifndef NULL
18433 #define NULL ((void*)0)
18434 #endif
18435
18436 int main() {
18437
18438 #if DB_VERSION_MAJOR > 1
18439         {
18440                 char *version;
18441                 int major, minor, patch;
18442
18443                 version = db_version( &major, &minor, &patch );
18444
18445                 if( major != DB_VERSION_MAJOR ||
18446                         minor < DB_VERSION_MINOR )
18447                 {
18448                         printf("Berkeley DB version mismatch\n"
18449                                 "\texpected: %s\n\tgot: %s\n",
18450                                 DB_VERSION_STRING, version);
18451                         return 1;
18452                 }
18453         }
18454 #endif
18455
18456 #if DB_VERSION_MAJOR > 2
18457         db_env_create( NULL, 0 );
18458 #elif DB_VERSION_MAJOR > 1
18459         db_appexit( NULL );
18460 #else
18461         (void) dbopen( NULL, 0, 0, 0, NULL);
18462 #endif
18463
18464 ; return 0; }
18465 EOF
18466 if { (eval echo configure:18467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18467   rm -rf conftest*
18468   ol_cv_db_db_4_dot_2=yes
18469 else
18470   echo "configure: failed program was:" >&5
18471   cat conftest.$ac_ext >&5
18472   rm -rf conftest*
18473   ol_cv_db_db_4_dot_2=no
18474 fi
18475 rm -f conftest*
18476
18477         LIBS="$ol_LIBS"
18478
18479 fi
18480
18481 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18482
18483         if test $ol_cv_db_db_4_dot_2 = yes ; then
18484                 ol_cv_lib_db=-ldb-4.2
18485         fi
18486 fi
18487
18488 if test $ol_cv_lib_db = no ; then
18489         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18490 echo "configure:18491: checking for Berkeley DB link (-ldb-4-2)" >&5
18491 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18492   echo $ac_n "(cached) $ac_c" 1>&6
18493 else
18494   
18495         ol_DB_LIB=-ldb-4-2
18496         ol_LIBS=$LIBS
18497         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18498
18499         cat > conftest.$ac_ext <<EOF
18500 #line 18501 "configure"
18501 #include "confdefs.h"
18502
18503 #ifdef HAVE_DB_185_H
18504 # include <db_185.h>
18505 #else
18506 # include <db.h>
18507 #endif
18508
18509 #ifndef DB_VERSION_MAJOR
18510 # define DB_VERSION_MAJOR 1
18511 #endif
18512
18513 #ifndef NULL
18514 #define NULL ((void*)0)
18515 #endif
18516
18517 int main() {
18518
18519 #if DB_VERSION_MAJOR > 1
18520         {
18521                 char *version;
18522                 int major, minor, patch;
18523
18524                 version = db_version( &major, &minor, &patch );
18525
18526                 if( major != DB_VERSION_MAJOR ||
18527                         minor < DB_VERSION_MINOR )
18528                 {
18529                         printf("Berkeley DB version mismatch\n"
18530                                 "\texpected: %s\n\tgot: %s\n",
18531                                 DB_VERSION_STRING, version);
18532                         return 1;
18533                 }
18534         }
18535 #endif
18536
18537 #if DB_VERSION_MAJOR > 2
18538         db_env_create( NULL, 0 );
18539 #elif DB_VERSION_MAJOR > 1
18540         db_appexit( NULL );
18541 #else
18542         (void) dbopen( NULL, 0, 0, 0, NULL);
18543 #endif
18544
18545 ; return 0; }
18546 EOF
18547 if { (eval echo configure:18548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18548   rm -rf conftest*
18549   ol_cv_db_db_4_2=yes
18550 else
18551   echo "configure: failed program was:" >&5
18552   cat conftest.$ac_ext >&5
18553   rm -rf conftest*
18554   ol_cv_db_db_4_2=no
18555 fi
18556 rm -f conftest*
18557
18558         LIBS="$ol_LIBS"
18559
18560 fi
18561
18562 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18563
18564         if test $ol_cv_db_db_4_2 = yes ; then
18565                 ol_cv_lib_db=-ldb-4-2
18566         fi
18567 fi
18568
18569 if test $ol_cv_lib_db = no ; then
18570         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18571 echo "configure:18572: checking for Berkeley DB link (-ldb-4)" >&5
18572 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18573   echo $ac_n "(cached) $ac_c" 1>&6
18574 else
18575   
18576         ol_DB_LIB=-ldb-4
18577         ol_LIBS=$LIBS
18578         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18579
18580         cat > conftest.$ac_ext <<EOF
18581 #line 18582 "configure"
18582 #include "confdefs.h"
18583
18584 #ifdef HAVE_DB_185_H
18585 # include <db_185.h>
18586 #else
18587 # include <db.h>
18588 #endif
18589
18590 #ifndef DB_VERSION_MAJOR
18591 # define DB_VERSION_MAJOR 1
18592 #endif
18593
18594 #ifndef NULL
18595 #define NULL ((void*)0)
18596 #endif
18597
18598 int main() {
18599
18600 #if DB_VERSION_MAJOR > 1
18601         {
18602                 char *version;
18603                 int major, minor, patch;
18604
18605                 version = db_version( &major, &minor, &patch );
18606
18607                 if( major != DB_VERSION_MAJOR ||
18608                         minor < DB_VERSION_MINOR )
18609                 {
18610                         printf("Berkeley DB version mismatch\n"
18611                                 "\texpected: %s\n\tgot: %s\n",
18612                                 DB_VERSION_STRING, version);
18613                         return 1;
18614                 }
18615         }
18616 #endif
18617
18618 #if DB_VERSION_MAJOR > 2
18619         db_env_create( NULL, 0 );
18620 #elif DB_VERSION_MAJOR > 1
18621         db_appexit( NULL );
18622 #else
18623         (void) dbopen( NULL, 0, 0, 0, NULL);
18624 #endif
18625
18626 ; return 0; }
18627 EOF
18628 if { (eval echo configure:18629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18629   rm -rf conftest*
18630   ol_cv_db_db_4=yes
18631 else
18632   echo "configure: failed program was:" >&5
18633   cat conftest.$ac_ext >&5
18634   rm -rf conftest*
18635   ol_cv_db_db_4=no
18636 fi
18637 rm -f conftest*
18638
18639         LIBS="$ol_LIBS"
18640
18641 fi
18642
18643 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18644
18645         if test $ol_cv_db_db_4 = yes ; then
18646                 ol_cv_lib_db=-ldb-4
18647         fi
18648 fi
18649
18650 if test $ol_cv_lib_db = no ; then
18651         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18652 echo "configure:18653: checking for Berkeley DB link (-ldb4)" >&5
18653 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18654   echo $ac_n "(cached) $ac_c" 1>&6
18655 else
18656   
18657         ol_DB_LIB=-ldb4
18658         ol_LIBS=$LIBS
18659         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18660
18661         cat > conftest.$ac_ext <<EOF
18662 #line 18663 "configure"
18663 #include "confdefs.h"
18664
18665 #ifdef HAVE_DB_185_H
18666 # include <db_185.h>
18667 #else
18668 # include <db.h>
18669 #endif
18670
18671 #ifndef DB_VERSION_MAJOR
18672 # define DB_VERSION_MAJOR 1
18673 #endif
18674
18675 #ifndef NULL
18676 #define NULL ((void*)0)
18677 #endif
18678
18679 int main() {
18680
18681 #if DB_VERSION_MAJOR > 1
18682         {
18683                 char *version;
18684                 int major, minor, patch;
18685
18686                 version = db_version( &major, &minor, &patch );
18687
18688                 if( major != DB_VERSION_MAJOR ||
18689                         minor < DB_VERSION_MINOR )
18690                 {
18691                         printf("Berkeley DB version mismatch\n"
18692                                 "\texpected: %s\n\tgot: %s\n",
18693                                 DB_VERSION_STRING, version);
18694                         return 1;
18695                 }
18696         }
18697 #endif
18698
18699 #if DB_VERSION_MAJOR > 2
18700         db_env_create( NULL, 0 );
18701 #elif DB_VERSION_MAJOR > 1
18702         db_appexit( NULL );
18703 #else
18704         (void) dbopen( NULL, 0, 0, 0, NULL);
18705 #endif
18706
18707 ; return 0; }
18708 EOF
18709 if { (eval echo configure:18710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18710   rm -rf conftest*
18711   ol_cv_db_db4=yes
18712 else
18713   echo "configure: failed program was:" >&5
18714   cat conftest.$ac_ext >&5
18715   rm -rf conftest*
18716   ol_cv_db_db4=no
18717 fi
18718 rm -f conftest*
18719
18720         LIBS="$ol_LIBS"
18721
18722 fi
18723
18724 echo "$ac_t""$ol_cv_db_db4" 1>&6
18725
18726         if test $ol_cv_db_db4 = yes ; then
18727                 ol_cv_lib_db=-ldb4
18728         fi
18729 fi
18730
18731 if test $ol_cv_lib_db = no ; then
18732         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18733 echo "configure:18734: checking for Berkeley DB link (-ldb)" >&5
18734 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18735   echo $ac_n "(cached) $ac_c" 1>&6
18736 else
18737   
18738         ol_DB_LIB=-ldb
18739         ol_LIBS=$LIBS
18740         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18741
18742         cat > conftest.$ac_ext <<EOF
18743 #line 18744 "configure"
18744 #include "confdefs.h"
18745
18746 #ifdef HAVE_DB_185_H
18747 # include <db_185.h>
18748 #else
18749 # include <db.h>
18750 #endif
18751
18752 #ifndef DB_VERSION_MAJOR
18753 # define DB_VERSION_MAJOR 1
18754 #endif
18755
18756 #ifndef NULL
18757 #define NULL ((void*)0)
18758 #endif
18759
18760 int main() {
18761
18762 #if DB_VERSION_MAJOR > 1
18763         {
18764                 char *version;
18765                 int major, minor, patch;
18766
18767                 version = db_version( &major, &minor, &patch );
18768
18769                 if( major != DB_VERSION_MAJOR ||
18770                         minor < DB_VERSION_MINOR )
18771                 {
18772                         printf("Berkeley DB version mismatch\n"
18773                                 "\texpected: %s\n\tgot: %s\n",
18774                                 DB_VERSION_STRING, version);
18775                         return 1;
18776                 }
18777         }
18778 #endif
18779
18780 #if DB_VERSION_MAJOR > 2
18781         db_env_create( NULL, 0 );
18782 #elif DB_VERSION_MAJOR > 1
18783         db_appexit( NULL );
18784 #else
18785         (void) dbopen( NULL, 0, 0, 0, NULL);
18786 #endif
18787
18788 ; return 0; }
18789 EOF
18790 if { (eval echo configure:18791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18791   rm -rf conftest*
18792   ol_cv_db_db=yes
18793 else
18794   echo "configure: failed program was:" >&5
18795   cat conftest.$ac_ext >&5
18796   rm -rf conftest*
18797   ol_cv_db_db=no
18798 fi
18799 rm -f conftest*
18800
18801         LIBS="$ol_LIBS"
18802
18803 fi
18804
18805 echo "$ac_t""$ol_cv_db_db" 1>&6
18806
18807         if test $ol_cv_db_db = yes ; then
18808                 ol_cv_lib_db=-ldb
18809         fi
18810 fi
18811
18812 if test $ol_cv_lib_db = no ; then
18813         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18814 echo "configure:18815: checking for Berkeley DB link (-ldb41)" >&5
18815 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18816   echo $ac_n "(cached) $ac_c" 1>&6
18817 else
18818   
18819         ol_DB_LIB=-ldb41
18820         ol_LIBS=$LIBS
18821         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18822
18823         cat > conftest.$ac_ext <<EOF
18824 #line 18825 "configure"
18825 #include "confdefs.h"
18826
18827 #ifdef HAVE_DB_185_H
18828 # include <db_185.h>
18829 #else
18830 # include <db.h>
18831 #endif
18832
18833 #ifndef DB_VERSION_MAJOR
18834 # define DB_VERSION_MAJOR 1
18835 #endif
18836
18837 #ifndef NULL
18838 #define NULL ((void*)0)
18839 #endif
18840
18841 int main() {
18842
18843 #if DB_VERSION_MAJOR > 1
18844         {
18845                 char *version;
18846                 int major, minor, patch;
18847
18848                 version = db_version( &major, &minor, &patch );
18849
18850                 if( major != DB_VERSION_MAJOR ||
18851                         minor < DB_VERSION_MINOR )
18852                 {
18853                         printf("Berkeley DB version mismatch\n"
18854                                 "\texpected: %s\n\tgot: %s\n",
18855                                 DB_VERSION_STRING, version);
18856                         return 1;
18857                 }
18858         }
18859 #endif
18860
18861 #if DB_VERSION_MAJOR > 2
18862         db_env_create( NULL, 0 );
18863 #elif DB_VERSION_MAJOR > 1
18864         db_appexit( NULL );
18865 #else
18866         (void) dbopen( NULL, 0, 0, 0, NULL);
18867 #endif
18868
18869 ; return 0; }
18870 EOF
18871 if { (eval echo configure:18872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18872   rm -rf conftest*
18873   ol_cv_db_db41=yes
18874 else
18875   echo "configure: failed program was:" >&5
18876   cat conftest.$ac_ext >&5
18877   rm -rf conftest*
18878   ol_cv_db_db41=no
18879 fi
18880 rm -f conftest*
18881
18882         LIBS="$ol_LIBS"
18883
18884 fi
18885
18886 echo "$ac_t""$ol_cv_db_db41" 1>&6
18887
18888         if test $ol_cv_db_db41 = yes ; then
18889                 ol_cv_lib_db=-ldb41
18890         fi
18891 fi
18892
18893 if test $ol_cv_lib_db = no ; then
18894         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18895 echo "configure:18896: checking for Berkeley DB link (-ldb-41)" >&5
18896 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18897   echo $ac_n "(cached) $ac_c" 1>&6
18898 else
18899   
18900         ol_DB_LIB=-ldb-41
18901         ol_LIBS=$LIBS
18902         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18903
18904         cat > conftest.$ac_ext <<EOF
18905 #line 18906 "configure"
18906 #include "confdefs.h"
18907
18908 #ifdef HAVE_DB_185_H
18909 # include <db_185.h>
18910 #else
18911 # include <db.h>
18912 #endif
18913
18914 #ifndef DB_VERSION_MAJOR
18915 # define DB_VERSION_MAJOR 1
18916 #endif
18917
18918 #ifndef NULL
18919 #define NULL ((void*)0)
18920 #endif
18921
18922 int main() {
18923
18924 #if DB_VERSION_MAJOR > 1
18925         {
18926                 char *version;
18927                 int major, minor, patch;
18928
18929                 version = db_version( &major, &minor, &patch );
18930
18931                 if( major != DB_VERSION_MAJOR ||
18932                         minor < DB_VERSION_MINOR )
18933                 {
18934                         printf("Berkeley DB version mismatch\n"
18935                                 "\texpected: %s\n\tgot: %s\n",
18936                                 DB_VERSION_STRING, version);
18937                         return 1;
18938                 }
18939         }
18940 #endif
18941
18942 #if DB_VERSION_MAJOR > 2
18943         db_env_create( NULL, 0 );
18944 #elif DB_VERSION_MAJOR > 1
18945         db_appexit( NULL );
18946 #else
18947         (void) dbopen( NULL, 0, 0, 0, NULL);
18948 #endif
18949
18950 ; return 0; }
18951 EOF
18952 if { (eval echo configure:18953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18953   rm -rf conftest*
18954   ol_cv_db_db_41=yes
18955 else
18956   echo "configure: failed program was:" >&5
18957   cat conftest.$ac_ext >&5
18958   rm -rf conftest*
18959   ol_cv_db_db_41=no
18960 fi
18961 rm -f conftest*
18962
18963         LIBS="$ol_LIBS"
18964
18965 fi
18966
18967 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18968
18969         if test $ol_cv_db_db_41 = yes ; then
18970                 ol_cv_lib_db=-ldb-41
18971         fi
18972 fi
18973
18974 if test $ol_cv_lib_db = no ; then
18975         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18976 echo "configure:18977: checking for Berkeley DB link (-ldb-4.1)" >&5
18977 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18978   echo $ac_n "(cached) $ac_c" 1>&6
18979 else
18980   
18981         ol_DB_LIB=-ldb-4.1
18982         ol_LIBS=$LIBS
18983         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18984
18985         cat > conftest.$ac_ext <<EOF
18986 #line 18987 "configure"
18987 #include "confdefs.h"
18988
18989 #ifdef HAVE_DB_185_H
18990 # include <db_185.h>
18991 #else
18992 # include <db.h>
18993 #endif
18994
18995 #ifndef DB_VERSION_MAJOR
18996 # define DB_VERSION_MAJOR 1
18997 #endif
18998
18999 #ifndef NULL
19000 #define NULL ((void*)0)
19001 #endif
19002
19003 int main() {
19004
19005 #if DB_VERSION_MAJOR > 1
19006         {
19007                 char *version;
19008                 int major, minor, patch;
19009
19010                 version = db_version( &major, &minor, &patch );
19011
19012                 if( major != DB_VERSION_MAJOR ||
19013                         minor < DB_VERSION_MINOR )
19014                 {
19015                         printf("Berkeley DB version mismatch\n"
19016                                 "\texpected: %s\n\tgot: %s\n",
19017                                 DB_VERSION_STRING, version);
19018                         return 1;
19019                 }
19020         }
19021 #endif
19022
19023 #if DB_VERSION_MAJOR > 2
19024         db_env_create( NULL, 0 );
19025 #elif DB_VERSION_MAJOR > 1
19026         db_appexit( NULL );
19027 #else
19028         (void) dbopen( NULL, 0, 0, 0, NULL);
19029 #endif
19030
19031 ; return 0; }
19032 EOF
19033 if { (eval echo configure:19034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19034   rm -rf conftest*
19035   ol_cv_db_db_4_dot_1=yes
19036 else
19037   echo "configure: failed program was:" >&5
19038   cat conftest.$ac_ext >&5
19039   rm -rf conftest*
19040   ol_cv_db_db_4_dot_1=no
19041 fi
19042 rm -f conftest*
19043
19044         LIBS="$ol_LIBS"
19045
19046 fi
19047
19048 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19049
19050         if test $ol_cv_db_db_4_dot_1 = yes ; then
19051                 ol_cv_lib_db=-ldb-4.1
19052         fi
19053 fi
19054
19055 if test $ol_cv_lib_db = no ; then
19056         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19057 echo "configure:19058: checking for Berkeley DB link (-ldb-4-1)" >&5
19058 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19059   echo $ac_n "(cached) $ac_c" 1>&6
19060 else
19061   
19062         ol_DB_LIB=-ldb-4-1
19063         ol_LIBS=$LIBS
19064         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19065
19066         cat > conftest.$ac_ext <<EOF
19067 #line 19068 "configure"
19068 #include "confdefs.h"
19069
19070 #ifdef HAVE_DB_185_H
19071 # include <db_185.h>
19072 #else
19073 # include <db.h>
19074 #endif
19075
19076 #ifndef DB_VERSION_MAJOR
19077 # define DB_VERSION_MAJOR 1
19078 #endif
19079
19080 #ifndef NULL
19081 #define NULL ((void*)0)
19082 #endif
19083
19084 int main() {
19085
19086 #if DB_VERSION_MAJOR > 1
19087         {
19088                 char *version;
19089                 int major, minor, patch;
19090
19091                 version = db_version( &major, &minor, &patch );
19092
19093                 if( major != DB_VERSION_MAJOR ||
19094                         minor < DB_VERSION_MINOR )
19095                 {
19096                         printf("Berkeley DB version mismatch\n"
19097                                 "\texpected: %s\n\tgot: %s\n",
19098                                 DB_VERSION_STRING, version);
19099                         return 1;
19100                 }
19101         }
19102 #endif
19103
19104 #if DB_VERSION_MAJOR > 2
19105         db_env_create( NULL, 0 );
19106 #elif DB_VERSION_MAJOR > 1
19107         db_appexit( NULL );
19108 #else
19109         (void) dbopen( NULL, 0, 0, 0, NULL);
19110 #endif
19111
19112 ; return 0; }
19113 EOF
19114 if { (eval echo configure:19115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19115   rm -rf conftest*
19116   ol_cv_db_db_4_1=yes
19117 else
19118   echo "configure: failed program was:" >&5
19119   cat conftest.$ac_ext >&5
19120   rm -rf conftest*
19121   ol_cv_db_db_4_1=no
19122 fi
19123 rm -f conftest*
19124
19125         LIBS="$ol_LIBS"
19126
19127 fi
19128
19129 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19130
19131         if test $ol_cv_db_db_4_1 = yes ; then
19132                 ol_cv_lib_db=-ldb-4-1
19133         fi
19134 fi
19135
19136 if test $ol_cv_lib_db = no ; then
19137         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19138 echo "configure:19139: checking for Berkeley DB link (-ldb3)" >&5
19139 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19140   echo $ac_n "(cached) $ac_c" 1>&6
19141 else
19142   
19143         ol_DB_LIB=-ldb3
19144         ol_LIBS=$LIBS
19145         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19146
19147         cat > conftest.$ac_ext <<EOF
19148 #line 19149 "configure"
19149 #include "confdefs.h"
19150
19151 #ifdef HAVE_DB_185_H
19152 # include <db_185.h>
19153 #else
19154 # include <db.h>
19155 #endif
19156
19157 #ifndef DB_VERSION_MAJOR
19158 # define DB_VERSION_MAJOR 1
19159 #endif
19160
19161 #ifndef NULL
19162 #define NULL ((void*)0)
19163 #endif
19164
19165 int main() {
19166
19167 #if DB_VERSION_MAJOR > 1
19168         {
19169                 char *version;
19170                 int major, minor, patch;
19171
19172                 version = db_version( &major, &minor, &patch );
19173
19174                 if( major != DB_VERSION_MAJOR ||
19175                         minor < DB_VERSION_MINOR )
19176                 {
19177                         printf("Berkeley DB version mismatch\n"
19178                                 "\texpected: %s\n\tgot: %s\n",
19179                                 DB_VERSION_STRING, version);
19180                         return 1;
19181                 }
19182         }
19183 #endif
19184
19185 #if DB_VERSION_MAJOR > 2
19186         db_env_create( NULL, 0 );
19187 #elif DB_VERSION_MAJOR > 1
19188         db_appexit( NULL );
19189 #else
19190         (void) dbopen( NULL, 0, 0, 0, NULL);
19191 #endif
19192
19193 ; return 0; }
19194 EOF
19195 if { (eval echo configure:19196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19196   rm -rf conftest*
19197   ol_cv_db_db3=yes
19198 else
19199   echo "configure: failed program was:" >&5
19200   cat conftest.$ac_ext >&5
19201   rm -rf conftest*
19202   ol_cv_db_db3=no
19203 fi
19204 rm -f conftest*
19205
19206         LIBS="$ol_LIBS"
19207
19208 fi
19209
19210 echo "$ac_t""$ol_cv_db_db3" 1>&6
19211
19212         if test $ol_cv_db_db3 = yes ; then
19213                 ol_cv_lib_db=-ldb3
19214         fi
19215 fi
19216
19217 if test $ol_cv_lib_db = no ; then
19218         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19219 echo "configure:19220: checking for Berkeley DB link (-ldb-3)" >&5
19220 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19221   echo $ac_n "(cached) $ac_c" 1>&6
19222 else
19223   
19224         ol_DB_LIB=-ldb-3
19225         ol_LIBS=$LIBS
19226         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19227
19228         cat > conftest.$ac_ext <<EOF
19229 #line 19230 "configure"
19230 #include "confdefs.h"
19231
19232 #ifdef HAVE_DB_185_H
19233 # include <db_185.h>
19234 #else
19235 # include <db.h>
19236 #endif
19237
19238 #ifndef DB_VERSION_MAJOR
19239 # define DB_VERSION_MAJOR 1
19240 #endif
19241
19242 #ifndef NULL
19243 #define NULL ((void*)0)
19244 #endif
19245
19246 int main() {
19247
19248 #if DB_VERSION_MAJOR > 1
19249         {
19250                 char *version;
19251                 int major, minor, patch;
19252
19253                 version = db_version( &major, &minor, &patch );
19254
19255                 if( major != DB_VERSION_MAJOR ||
19256                         minor < DB_VERSION_MINOR )
19257                 {
19258                         printf("Berkeley DB version mismatch\n"
19259                                 "\texpected: %s\n\tgot: %s\n",
19260                                 DB_VERSION_STRING, version);
19261                         return 1;
19262                 }
19263         }
19264 #endif
19265
19266 #if DB_VERSION_MAJOR > 2
19267         db_env_create( NULL, 0 );
19268 #elif DB_VERSION_MAJOR > 1
19269         db_appexit( NULL );
19270 #else
19271         (void) dbopen( NULL, 0, 0, 0, NULL);
19272 #endif
19273
19274 ; return 0; }
19275 EOF
19276 if { (eval echo configure:19277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19277   rm -rf conftest*
19278   ol_cv_db_db_3=yes
19279 else
19280   echo "configure: failed program was:" >&5
19281   cat conftest.$ac_ext >&5
19282   rm -rf conftest*
19283   ol_cv_db_db_3=no
19284 fi
19285 rm -f conftest*
19286
19287         LIBS="$ol_LIBS"
19288
19289 fi
19290
19291 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19292
19293         if test $ol_cv_db_db_3 = yes ; then
19294                 ol_cv_lib_db=-ldb-3
19295         fi
19296 fi
19297
19298 if test $ol_cv_lib_db = no ; then
19299         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19300 echo "configure:19301: checking for Berkeley DB link (-ldb2)" >&5
19301 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19302   echo $ac_n "(cached) $ac_c" 1>&6
19303 else
19304   
19305         ol_DB_LIB=-ldb2
19306         ol_LIBS=$LIBS
19307         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19308
19309         cat > conftest.$ac_ext <<EOF
19310 #line 19311 "configure"
19311 #include "confdefs.h"
19312
19313 #ifdef HAVE_DB_185_H
19314 # include <db_185.h>
19315 #else
19316 # include <db.h>
19317 #endif
19318
19319 #ifndef DB_VERSION_MAJOR
19320 # define DB_VERSION_MAJOR 1
19321 #endif
19322
19323 #ifndef NULL
19324 #define NULL ((void*)0)
19325 #endif
19326
19327 int main() {
19328
19329 #if DB_VERSION_MAJOR > 1
19330         {
19331                 char *version;
19332                 int major, minor, patch;
19333
19334                 version = db_version( &major, &minor, &patch );
19335
19336                 if( major != DB_VERSION_MAJOR ||
19337                         minor < DB_VERSION_MINOR )
19338                 {
19339                         printf("Berkeley DB version mismatch\n"
19340                                 "\texpected: %s\n\tgot: %s\n",
19341                                 DB_VERSION_STRING, version);
19342                         return 1;
19343                 }
19344         }
19345 #endif
19346
19347 #if DB_VERSION_MAJOR > 2
19348         db_env_create( NULL, 0 );
19349 #elif DB_VERSION_MAJOR > 1
19350         db_appexit( NULL );
19351 #else
19352         (void) dbopen( NULL, 0, 0, 0, NULL);
19353 #endif
19354
19355 ; return 0; }
19356 EOF
19357 if { (eval echo configure:19358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19358   rm -rf conftest*
19359   ol_cv_db_db2=yes
19360 else
19361   echo "configure: failed program was:" >&5
19362   cat conftest.$ac_ext >&5
19363   rm -rf conftest*
19364   ol_cv_db_db2=no
19365 fi
19366 rm -f conftest*
19367
19368         LIBS="$ol_LIBS"
19369
19370 fi
19371
19372 echo "$ac_t""$ol_cv_db_db2" 1>&6
19373
19374         if test $ol_cv_db_db2 = yes ; then
19375                 ol_cv_lib_db=-ldb2
19376         fi
19377 fi
19378
19379 if test $ol_cv_lib_db = no ; then
19380         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19381 echo "configure:19382: checking for Berkeley DB link (-ldb-2)" >&5
19382 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19383   echo $ac_n "(cached) $ac_c" 1>&6
19384 else
19385   
19386         ol_DB_LIB=-ldb-2
19387         ol_LIBS=$LIBS
19388         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19389
19390         cat > conftest.$ac_ext <<EOF
19391 #line 19392 "configure"
19392 #include "confdefs.h"
19393
19394 #ifdef HAVE_DB_185_H
19395 # include <db_185.h>
19396 #else
19397 # include <db.h>
19398 #endif
19399
19400 #ifndef DB_VERSION_MAJOR
19401 # define DB_VERSION_MAJOR 1
19402 #endif
19403
19404 #ifndef NULL
19405 #define NULL ((void*)0)
19406 #endif
19407
19408 int main() {
19409
19410 #if DB_VERSION_MAJOR > 1
19411         {
19412                 char *version;
19413                 int major, minor, patch;
19414
19415                 version = db_version( &major, &minor, &patch );
19416
19417                 if( major != DB_VERSION_MAJOR ||
19418                         minor < DB_VERSION_MINOR )
19419                 {
19420                         printf("Berkeley DB version mismatch\n"
19421                                 "\texpected: %s\n\tgot: %s\n",
19422                                 DB_VERSION_STRING, version);
19423                         return 1;
19424                 }
19425         }
19426 #endif
19427
19428 #if DB_VERSION_MAJOR > 2
19429         db_env_create( NULL, 0 );
19430 #elif DB_VERSION_MAJOR > 1
19431         db_appexit( NULL );
19432 #else
19433         (void) dbopen( NULL, 0, 0, 0, NULL);
19434 #endif
19435
19436 ; return 0; }
19437 EOF
19438 if { (eval echo configure:19439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19439   rm -rf conftest*
19440   ol_cv_db_db_2=yes
19441 else
19442   echo "configure: failed program was:" >&5
19443   cat conftest.$ac_ext >&5
19444   rm -rf conftest*
19445   ol_cv_db_db_2=no
19446 fi
19447 rm -f conftest*
19448
19449         LIBS="$ol_LIBS"
19450
19451 fi
19452
19453 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19454
19455         if test $ol_cv_db_db_2 = yes ; then
19456                 ol_cv_lib_db=-ldb-2
19457         fi
19458 fi
19459
19460 if test $ol_cv_lib_db = no ; then
19461         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19462 echo "configure:19463: checking for Berkeley DB link (-ldb1)" >&5
19463 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19464   echo $ac_n "(cached) $ac_c" 1>&6
19465 else
19466   
19467         ol_DB_LIB=-ldb1
19468         ol_LIBS=$LIBS
19469         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19470
19471         cat > conftest.$ac_ext <<EOF
19472 #line 19473 "configure"
19473 #include "confdefs.h"
19474
19475 #ifdef HAVE_DB_185_H
19476 # include <db_185.h>
19477 #else
19478 # include <db.h>
19479 #endif
19480
19481 #ifndef DB_VERSION_MAJOR
19482 # define DB_VERSION_MAJOR 1
19483 #endif
19484
19485 #ifndef NULL
19486 #define NULL ((void*)0)
19487 #endif
19488
19489 int main() {
19490
19491 #if DB_VERSION_MAJOR > 1
19492         {
19493                 char *version;
19494                 int major, minor, patch;
19495
19496                 version = db_version( &major, &minor, &patch );
19497
19498                 if( major != DB_VERSION_MAJOR ||
19499                         minor < DB_VERSION_MINOR )
19500                 {
19501                         printf("Berkeley DB version mismatch\n"
19502                                 "\texpected: %s\n\tgot: %s\n",
19503                                 DB_VERSION_STRING, version);
19504                         return 1;
19505                 }
19506         }
19507 #endif
19508
19509 #if DB_VERSION_MAJOR > 2
19510         db_env_create( NULL, 0 );
19511 #elif DB_VERSION_MAJOR > 1
19512         db_appexit( NULL );
19513 #else
19514         (void) dbopen( NULL, 0, 0, 0, NULL);
19515 #endif
19516
19517 ; return 0; }
19518 EOF
19519 if { (eval echo configure:19520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19520   rm -rf conftest*
19521   ol_cv_db_db1=yes
19522 else
19523   echo "configure: failed program was:" >&5
19524   cat conftest.$ac_ext >&5
19525   rm -rf conftest*
19526   ol_cv_db_db1=no
19527 fi
19528 rm -f conftest*
19529
19530         LIBS="$ol_LIBS"
19531
19532 fi
19533
19534 echo "$ac_t""$ol_cv_db_db1" 1>&6
19535
19536         if test $ol_cv_db_db1 = yes ; then
19537                 ol_cv_lib_db=-ldb1
19538         fi
19539 fi
19540
19541 if test $ol_cv_lib_db = no ; then
19542         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19543 echo "configure:19544: checking for Berkeley DB link (-ldb-1)" >&5
19544 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19545   echo $ac_n "(cached) $ac_c" 1>&6
19546 else
19547   
19548         ol_DB_LIB=-ldb-1
19549         ol_LIBS=$LIBS
19550         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19551
19552         cat > conftest.$ac_ext <<EOF
19553 #line 19554 "configure"
19554 #include "confdefs.h"
19555
19556 #ifdef HAVE_DB_185_H
19557 # include <db_185.h>
19558 #else
19559 # include <db.h>
19560 #endif
19561
19562 #ifndef DB_VERSION_MAJOR
19563 # define DB_VERSION_MAJOR 1
19564 #endif
19565
19566 #ifndef NULL
19567 #define NULL ((void*)0)
19568 #endif
19569
19570 int main() {
19571
19572 #if DB_VERSION_MAJOR > 1
19573         {
19574                 char *version;
19575                 int major, minor, patch;
19576
19577                 version = db_version( &major, &minor, &patch );
19578
19579                 if( major != DB_VERSION_MAJOR ||
19580                         minor < DB_VERSION_MINOR )
19581                 {
19582                         printf("Berkeley DB version mismatch\n"
19583                                 "\texpected: %s\n\tgot: %s\n",
19584                                 DB_VERSION_STRING, version);
19585                         return 1;
19586                 }
19587         }
19588 #endif
19589
19590 #if DB_VERSION_MAJOR > 2
19591         db_env_create( NULL, 0 );
19592 #elif DB_VERSION_MAJOR > 1
19593         db_appexit( NULL );
19594 #else
19595         (void) dbopen( NULL, 0, 0, 0, NULL);
19596 #endif
19597
19598 ; return 0; }
19599 EOF
19600 if { (eval echo configure:19601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19601   rm -rf conftest*
19602   ol_cv_db_db_1=yes
19603 else
19604   echo "configure: failed program was:" >&5
19605   cat conftest.$ac_ext >&5
19606   rm -rf conftest*
19607   ol_cv_db_db_1=no
19608 fi
19609 rm -f conftest*
19610
19611         LIBS="$ol_LIBS"
19612
19613 fi
19614
19615 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19616
19617         if test $ol_cv_db_db_1 = yes ; then
19618                 ol_cv_lib_db=-ldb-1
19619         fi
19620 fi
19621
19622
19623         if test "$ol_cv_lib_db" != no ; then
19624                 ol_cv_berkeley_db=yes
19625                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19626 echo "configure:19627: checking for Berkeley DB thread support" >&5
19627 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19628   echo $ac_n "(cached) $ac_c" 1>&6
19629 else
19630   
19631         ol_LIBS="$LIBS"
19632         LIBS="$LTHREAD_LIBS $LIBS"
19633         if test $ol_cv_lib_db != yes ; then
19634                 LIBS="$ol_cv_lib_db $LIBS"
19635         fi
19636
19637         if test "$cross_compiling" = yes; then
19638   ol_cv_berkeley_db_thread=cross
19639 else
19640   cat > conftest.$ac_ext <<EOF
19641 #line 19642 "configure"
19642 #include "confdefs.h"
19643
19644 #ifdef HAVE_DB_185_H
19645         choke me;
19646 #else
19647 #include <db.h>
19648 #endif
19649 #ifndef NULL
19650 #define NULL ((void *)0)
19651 #endif
19652 main()
19653 {
19654         int rc;
19655         u_int32_t flags = DB_CREATE |
19656 #ifdef DB_PRIVATE
19657                 DB_PRIVATE |
19658 #endif
19659                 DB_THREAD;
19660
19661 #if DB_VERSION_MAJOR > 2
19662         DB_ENV *env = NULL;
19663
19664         rc = db_env_create( &env, 0 );
19665
19666         flags |= DB_INIT_MPOOL;
19667 #ifdef DB_MPOOL_PRIVATE
19668         flags |= DB_MPOOL_PRIVATE;
19669 #endif
19670
19671         if( rc ) {
19672                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19673                 return rc;
19674         }
19675
19676 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19677         rc = env->open( env, NULL, flags, 0 );
19678 #else
19679         rc = env->open( env, NULL, NULL, flags, 0 );
19680 #endif
19681
19682         if ( rc == 0 ) {
19683                 rc = env->close( env, 0 );
19684         }
19685
19686         if( rc ) {
19687                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19688                 return rc;
19689         }
19690
19691 #else
19692         DB_ENV env;
19693         memset( &env, '\0', sizeof(env) );
19694
19695         rc = db_appinit( NULL, NULL, &env, flags );
19696
19697         if( rc == 0 ) {
19698                 db_appexit( &env );
19699         }
19700
19701         unlink("__db_mpool.share");
19702         unlink("__db_lock.share");
19703 #endif
19704
19705         return rc;
19706 }
19707 EOF
19708 if { (eval echo configure:19709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19709 then
19710   ol_cv_berkeley_db_thread=yes
19711 else
19712   echo "configure: failed program was:" >&5
19713   cat conftest.$ac_ext >&5
19714   rm -fr conftest*
19715   ol_cv_berkeley_db_thread=no
19716 fi
19717 rm -fr conftest*
19718 fi
19719
19720
19721         LIBS="$ol_LIBS"
19722
19723 fi
19724
19725 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19726
19727         if test $ol_cv_berkeley_db_thread != no ; then
19728                 cat >> confdefs.h <<\EOF
19729 #define HAVE_BERKELEY_DB_THREAD 1
19730 EOF
19731
19732         fi
19733
19734         fi
19735 fi
19736
19737         fi
19738
19739         if test $ol_cv_berkeley_db != no ; then
19740                 cat >> confdefs.h <<\EOF
19741 #define HAVE_BERKELEY_DB 1
19742 EOF
19743
19744
19745                 ol_link_ldbm=berkeley
19746                 ol_with_ldbm_api=berkeley
19747
19748                 if test $ol_with_ldbm_type = hash ; then
19749                         cat >> confdefs.h <<\EOF
19750 #define LDBM_USE_DBHASH 1
19751 EOF
19752
19753                 else
19754                         cat >> confdefs.h <<\EOF
19755 #define LDBM_USE_DBBTREE 1
19756 EOF
19757
19758                 fi
19759
19760                                                 if test $ol_cv_lib_db != yes ; then
19761                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19762                 fi
19763         fi
19764 fi
19765
19766 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19767         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19768 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19769         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19770 echo "configure:19771: checking Berkeley DB version for BDB backend" >&5
19771 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19772   echo $ac_n "(cached) $ac_c" 1>&6
19773 else
19774   
19775         cat > conftest.$ac_ext <<EOF
19776 #line 19777 "configure"
19777 #include "confdefs.h"
19778
19779 #include <db.h>
19780
19781  /* this check could be improved */
19782 #ifndef DB_VERSION_MAJOR
19783 #       define DB_VERSION_MAJOR 1
19784 #endif
19785 #ifndef DB_VERSION_MINOR
19786 #       define DB_VERSION_MINOR 0
19787 #endif
19788
19789 /* require 4.2 or later */
19790 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19791         __db_version_compat
19792 #endif
19793         
19794 EOF
19795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19796   egrep "__db_version_compat" >/dev/null 2>&1; then
19797   rm -rf conftest*
19798   ol_cv_bdb_compat=yes
19799 else
19800   rm -rf conftest*
19801   ol_cv_bdb_compat=no
19802 fi
19803 rm -f conftest*
19804
19805 fi
19806
19807 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19808
19809
19810         if test $ol_cv_bdb_compat = yes ; then
19811                 ol_enable_bdb=yes
19812         elif test $ol_enable_bdb = yes ; then
19813                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19814         else
19815                 ol_enable_bdb=no
19816         fi
19817 fi
19818 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19819         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19820 fi
19821
19822 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19823         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19824         ol_with_ldbm_api=none
19825 fi
19826
19827 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19828         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19829 echo "configure:19830: checking for MDBM library" >&5
19830 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19831   echo $ac_n "(cached) $ac_c" 1>&6
19832 else
19833         ol_LIBS="$LIBS"
19834         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19835 echo "configure:19836: checking for mdbm_set_chain" >&5
19836 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19837   echo $ac_n "(cached) $ac_c" 1>&6
19838 else
19839   cat > conftest.$ac_ext <<EOF
19840 #line 19841 "configure"
19841 #include "confdefs.h"
19842 /* System header to define __stub macros and hopefully few prototypes,
19843     which can conflict with char mdbm_set_chain(); below.  */
19844 #include <assert.h>
19845 /* Override any gcc2 internal prototype to avoid an error.  */
19846 /* We use char because int might match the return type of a gcc2
19847     builtin and then its argument prototype would still apply.  */
19848 char mdbm_set_chain();
19849 char (*f)();
19850
19851 int main() {
19852
19853 /* The GNU C library defines this for functions which it implements
19854     to always fail with ENOSYS.  Some functions are actually named
19855     something starting with __ and the normal name is an alias.  */
19856 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19857 choke me
19858 #else
19859 f = mdbm_set_chain;
19860 #endif
19861
19862 ; return 0; }
19863 EOF
19864 if { (eval echo configure:19865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19865   rm -rf conftest*
19866   eval "ac_cv_func_mdbm_set_chain=yes"
19867 else
19868   echo "configure: failed program was:" >&5
19869   cat conftest.$ac_ext >&5
19870   rm -rf conftest*
19871   eval "ac_cv_func_mdbm_set_chain=no"
19872 fi
19873 rm -f conftest*
19874 fi
19875
19876 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19877   echo "$ac_t""yes" 1>&6
19878   ol_cv_lib_mdbm=yes
19879 else
19880   echo "$ac_t""no" 1>&6
19881
19882                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19883 echo "configure:19884: checking for mdbm_set_chain in -lmdbm" >&5
19884 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19886   echo $ac_n "(cached) $ac_c" 1>&6
19887 else
19888   ac_save_LIBS="$LIBS"
19889 LIBS="-lmdbm  $LIBS"
19890 cat > conftest.$ac_ext <<EOF
19891 #line 19892 "configure"
19892 #include "confdefs.h"
19893 /* Override any gcc2 internal prototype to avoid an error.  */
19894 /* We use char because int might match the return type of a gcc2
19895     builtin and then its argument prototype would still apply.  */
19896 char mdbm_set_chain();
19897
19898 int main() {
19899 mdbm_set_chain()
19900 ; return 0; }
19901 EOF
19902 if { (eval echo configure:19903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19903   rm -rf conftest*
19904   eval "ac_cv_lib_$ac_lib_var=yes"
19905 else
19906   echo "configure: failed program was:" >&5
19907   cat conftest.$ac_ext >&5
19908   rm -rf conftest*
19909   eval "ac_cv_lib_$ac_lib_var=no"
19910 fi
19911 rm -f conftest*
19912 LIBS="$ac_save_LIBS"
19913
19914 fi
19915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19916   echo "$ac_t""yes" 1>&6
19917   ol_cv_lib_mdbm=-lmdbm
19918 else
19919   echo "$ac_t""no" 1>&6
19920 ol_cv_lib_mdbm=no
19921 fi
19922
19923         
19924 fi
19925
19926         LIBS="$ol_LIBS"
19927
19928 fi
19929
19930 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19931
19932
19933  for ac_hdr in mdbm.h
19934 do
19935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19937 echo "configure:19938: checking for $ac_hdr" >&5
19938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19939   echo $ac_n "(cached) $ac_c" 1>&6
19940 else
19941   cat > conftest.$ac_ext <<EOF
19942 #line 19943 "configure"
19943 #include "confdefs.h"
19944 #include <$ac_hdr>
19945 EOF
19946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19947 { (eval echo configure:19948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19949 if test -z "$ac_err"; then
19950   rm -rf conftest*
19951   eval "ac_cv_header_$ac_safe=yes"
19952 else
19953   echo "$ac_err" >&5
19954   echo "configure: failed program was:" >&5
19955   cat conftest.$ac_ext >&5
19956   rm -rf conftest*
19957   eval "ac_cv_header_$ac_safe=no"
19958 fi
19959 rm -f conftest*
19960 fi
19961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19962   echo "$ac_t""yes" 1>&6
19963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19964   cat >> confdefs.h <<EOF
19965 #define $ac_tr_hdr 1
19966 EOF
19967  
19968 else
19969   echo "$ac_t""no" 1>&6
19970 fi
19971 done
19972
19973  echo $ac_n "checking for db""... $ac_c" 1>&6
19974 echo "configure:19975: checking for db" >&5
19975 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19976   echo $ac_n "(cached) $ac_c" 1>&6
19977 else
19978   
19979         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19980                 ol_cv_mdbm=no
19981         else
19982                 ol_cv_mdbm=yes
19983         fi
19984
19985 fi
19986
19987 echo "$ac_t""$ol_cv_mdbm" 1>&6
19988  if test $ol_cv_mdbm = yes ; then
19989         cat >> confdefs.h <<\EOF
19990 #define HAVE_MDBM 1
19991 EOF
19992
19993  fi
19994
19995
19996         if test $ol_cv_mdbm = yes ; then
19997                 ol_link_ldbm=mdbm
19998                 ol_with_ldbm_api=mdbm
19999                 if test $ol_cv_lib_mdbm != yes ; then
20000                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20001                 fi
20002         fi
20003 fi
20004
20005 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20006         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20007 echo "configure:20008: checking for GDBM library" >&5
20008 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20009   echo $ac_n "(cached) $ac_c" 1>&6
20010 else
20011         ol_LIBS="$LIBS"
20012         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20013 echo "configure:20014: checking for gdbm_open" >&5
20014 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20015   echo $ac_n "(cached) $ac_c" 1>&6
20016 else
20017   cat > conftest.$ac_ext <<EOF
20018 #line 20019 "configure"
20019 #include "confdefs.h"
20020 /* System header to define __stub macros and hopefully few prototypes,
20021     which can conflict with char gdbm_open(); below.  */
20022 #include <assert.h>
20023 /* Override any gcc2 internal prototype to avoid an error.  */
20024 /* We use char because int might match the return type of a gcc2
20025     builtin and then its argument prototype would still apply.  */
20026 char gdbm_open();
20027 char (*f)();
20028
20029 int main() {
20030
20031 /* The GNU C library defines this for functions which it implements
20032     to always fail with ENOSYS.  Some functions are actually named
20033     something starting with __ and the normal name is an alias.  */
20034 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20035 choke me
20036 #else
20037 f = gdbm_open;
20038 #endif
20039
20040 ; return 0; }
20041 EOF
20042 if { (eval echo configure:20043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20043   rm -rf conftest*
20044   eval "ac_cv_func_gdbm_open=yes"
20045 else
20046   echo "configure: failed program was:" >&5
20047   cat conftest.$ac_ext >&5
20048   rm -rf conftest*
20049   eval "ac_cv_func_gdbm_open=no"
20050 fi
20051 rm -f conftest*
20052 fi
20053
20054 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20055   echo "$ac_t""yes" 1>&6
20056   ol_cv_lib_gdbm=yes
20057 else
20058   echo "$ac_t""no" 1>&6
20059
20060                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20061 echo "configure:20062: checking for gdbm_open in -lgdbm" >&5
20062 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20064   echo $ac_n "(cached) $ac_c" 1>&6
20065 else
20066   ac_save_LIBS="$LIBS"
20067 LIBS="-lgdbm  $LIBS"
20068 cat > conftest.$ac_ext <<EOF
20069 #line 20070 "configure"
20070 #include "confdefs.h"
20071 /* Override any gcc2 internal prototype to avoid an error.  */
20072 /* We use char because int might match the return type of a gcc2
20073     builtin and then its argument prototype would still apply.  */
20074 char gdbm_open();
20075
20076 int main() {
20077 gdbm_open()
20078 ; return 0; }
20079 EOF
20080 if { (eval echo configure:20081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20081   rm -rf conftest*
20082   eval "ac_cv_lib_$ac_lib_var=yes"
20083 else
20084   echo "configure: failed program was:" >&5
20085   cat conftest.$ac_ext >&5
20086   rm -rf conftest*
20087   eval "ac_cv_lib_$ac_lib_var=no"
20088 fi
20089 rm -f conftest*
20090 LIBS="$ac_save_LIBS"
20091
20092 fi
20093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20094   echo "$ac_t""yes" 1>&6
20095   ol_cv_lib_gdbm=-lgdbm
20096 else
20097   echo "$ac_t""no" 1>&6
20098 ol_cv_lib_gdbm=no
20099 fi
20100
20101         
20102 fi
20103
20104         LIBS="$ol_LIBS"
20105
20106 fi
20107
20108 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20109
20110
20111  for ac_hdr in gdbm.h
20112 do
20113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20115 echo "configure:20116: checking for $ac_hdr" >&5
20116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20117   echo $ac_n "(cached) $ac_c" 1>&6
20118 else
20119   cat > conftest.$ac_ext <<EOF
20120 #line 20121 "configure"
20121 #include "confdefs.h"
20122 #include <$ac_hdr>
20123 EOF
20124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20125 { (eval echo configure:20126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20127 if test -z "$ac_err"; then
20128   rm -rf conftest*
20129   eval "ac_cv_header_$ac_safe=yes"
20130 else
20131   echo "$ac_err" >&5
20132   echo "configure: failed program was:" >&5
20133   cat conftest.$ac_ext >&5
20134   rm -rf conftest*
20135   eval "ac_cv_header_$ac_safe=no"
20136 fi
20137 rm -f conftest*
20138 fi
20139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20140   echo "$ac_t""yes" 1>&6
20141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20142   cat >> confdefs.h <<EOF
20143 #define $ac_tr_hdr 1
20144 EOF
20145  
20146 else
20147   echo "$ac_t""no" 1>&6
20148 fi
20149 done
20150
20151  echo $ac_n "checking for db""... $ac_c" 1>&6
20152 echo "configure:20153: checking for db" >&5
20153 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20154   echo $ac_n "(cached) $ac_c" 1>&6
20155 else
20156   
20157         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20158                 ol_cv_gdbm=no
20159         else
20160                 ol_cv_gdbm=yes
20161         fi
20162
20163 fi
20164
20165 echo "$ac_t""$ol_cv_gdbm" 1>&6
20166  if test $ol_cv_gdbm = yes ; then
20167         cat >> confdefs.h <<\EOF
20168 #define HAVE_GDBM 1
20169 EOF
20170
20171  fi
20172
20173
20174         if test $ol_cv_gdbm = yes ; then
20175                 ol_link_ldbm=gdbm
20176                 ol_with_ldbm_api=gdbm
20177
20178                 if test $ol_cv_lib_gdbm != yes ; then
20179                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20180                 fi
20181         fi
20182 fi
20183
20184 if test $ol_with_ldbm_api = ndbm ; then
20185         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20186 echo "configure:20187: checking for NDBM library" >&5
20187 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20188   echo $ac_n "(cached) $ac_c" 1>&6
20189 else
20190         ol_LIBS="$LIBS"
20191         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20192 echo "configure:20193: checking for dbm_open" >&5
20193 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20194   echo $ac_n "(cached) $ac_c" 1>&6
20195 else
20196   cat > conftest.$ac_ext <<EOF
20197 #line 20198 "configure"
20198 #include "confdefs.h"
20199 /* System header to define __stub macros and hopefully few prototypes,
20200     which can conflict with char dbm_open(); below.  */
20201 #include <assert.h>
20202 /* Override any gcc2 internal prototype to avoid an error.  */
20203 /* We use char because int might match the return type of a gcc2
20204     builtin and then its argument prototype would still apply.  */
20205 char dbm_open();
20206 char (*f)();
20207
20208 int main() {
20209
20210 /* The GNU C library defines this for functions which it implements
20211     to always fail with ENOSYS.  Some functions are actually named
20212     something starting with __ and the normal name is an alias.  */
20213 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20214 choke me
20215 #else
20216 f = dbm_open;
20217 #endif
20218
20219 ; return 0; }
20220 EOF
20221 if { (eval echo configure:20222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20222   rm -rf conftest*
20223   eval "ac_cv_func_dbm_open=yes"
20224 else
20225   echo "configure: failed program was:" >&5
20226   cat conftest.$ac_ext >&5
20227   rm -rf conftest*
20228   eval "ac_cv_func_dbm_open=no"
20229 fi
20230 rm -f conftest*
20231 fi
20232
20233 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20234   echo "$ac_t""yes" 1>&6
20235   ol_cv_lib_ndbm=yes
20236 else
20237   echo "$ac_t""no" 1>&6
20238
20239                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20240 echo "configure:20241: checking for dbm_open in -lndbm" >&5
20241 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20243   echo $ac_n "(cached) $ac_c" 1>&6
20244 else
20245   ac_save_LIBS="$LIBS"
20246 LIBS="-lndbm  $LIBS"
20247 cat > conftest.$ac_ext <<EOF
20248 #line 20249 "configure"
20249 #include "confdefs.h"
20250 /* Override any gcc2 internal prototype to avoid an error.  */
20251 /* We use char because int might match the return type of a gcc2
20252     builtin and then its argument prototype would still apply.  */
20253 char dbm_open();
20254
20255 int main() {
20256 dbm_open()
20257 ; return 0; }
20258 EOF
20259 if { (eval echo configure:20260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20260   rm -rf conftest*
20261   eval "ac_cv_lib_$ac_lib_var=yes"
20262 else
20263   echo "configure: failed program was:" >&5
20264   cat conftest.$ac_ext >&5
20265   rm -rf conftest*
20266   eval "ac_cv_lib_$ac_lib_var=no"
20267 fi
20268 rm -f conftest*
20269 LIBS="$ac_save_LIBS"
20270
20271 fi
20272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20273   echo "$ac_t""yes" 1>&6
20274   ol_cv_lib_ndbm=-lndbm
20275 else
20276   echo "$ac_t""no" 1>&6
20277
20278                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20279 echo "configure:20280: checking for dbm_open in -ldbm" >&5
20280 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20282   echo $ac_n "(cached) $ac_c" 1>&6
20283 else
20284   ac_save_LIBS="$LIBS"
20285 LIBS="-ldbm  $LIBS"
20286 cat > conftest.$ac_ext <<EOF
20287 #line 20288 "configure"
20288 #include "confdefs.h"
20289 /* Override any gcc2 internal prototype to avoid an error.  */
20290 /* We use char because int might match the return type of a gcc2
20291     builtin and then its argument prototype would still apply.  */
20292 char dbm_open();
20293
20294 int main() {
20295 dbm_open()
20296 ; return 0; }
20297 EOF
20298 if { (eval echo configure:20299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20299   rm -rf conftest*
20300   eval "ac_cv_lib_$ac_lib_var=yes"
20301 else
20302   echo "configure: failed program was:" >&5
20303   cat conftest.$ac_ext >&5
20304   rm -rf conftest*
20305   eval "ac_cv_lib_$ac_lib_var=no"
20306 fi
20307 rm -f conftest*
20308 LIBS="$ac_save_LIBS"
20309
20310 fi
20311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20312   echo "$ac_t""yes" 1>&6
20313   ol_cv_lib_ndbm=-ldbm
20314 else
20315   echo "$ac_t""no" 1>&6
20316 ol_cv_lib_ndbm=no
20317 fi
20318                 
20319 fi
20320
20321         
20322 fi
20323
20324         LIBS="$ol_LIBS"
20325
20326 fi
20327
20328 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20329
20330
20331  for ac_hdr in ndbm.h
20332 do
20333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20335 echo "configure:20336: checking for $ac_hdr" >&5
20336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20337   echo $ac_n "(cached) $ac_c" 1>&6
20338 else
20339   cat > conftest.$ac_ext <<EOF
20340 #line 20341 "configure"
20341 #include "confdefs.h"
20342 #include <$ac_hdr>
20343 EOF
20344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20345 { (eval echo configure:20346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20347 if test -z "$ac_err"; then
20348   rm -rf conftest*
20349   eval "ac_cv_header_$ac_safe=yes"
20350 else
20351   echo "$ac_err" >&5
20352   echo "configure: failed program was:" >&5
20353   cat conftest.$ac_ext >&5
20354   rm -rf conftest*
20355   eval "ac_cv_header_$ac_safe=no"
20356 fi
20357 rm -f conftest*
20358 fi
20359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20360   echo "$ac_t""yes" 1>&6
20361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20362   cat >> confdefs.h <<EOF
20363 #define $ac_tr_hdr 1
20364 EOF
20365  
20366 else
20367   echo "$ac_t""no" 1>&6
20368 fi
20369 done
20370
20371  echo $ac_n "checking for db""... $ac_c" 1>&6
20372 echo "configure:20373: checking for db" >&5
20373 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20374   echo $ac_n "(cached) $ac_c" 1>&6
20375 else
20376   
20377         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20378                 ol_cv_ndbm=no
20379         else
20380                 ol_cv_ndbm=yes
20381         fi
20382
20383 fi
20384
20385 echo "$ac_t""$ol_cv_ndbm" 1>&6
20386  if test $ol_cv_ndbm = yes ; then
20387         cat >> confdefs.h <<\EOF
20388 #define HAVE_NDBM 1
20389 EOF
20390
20391  fi
20392
20393
20394         if test $ol_cv_ndbm = yes ; then
20395                 ol_link_ldbm=ndbm
20396                 ol_with_ldbm_api=ndbm
20397
20398                 if test $ol_cv_lib_ndbm != yes ; then
20399                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20400                 fi
20401         fi
20402 fi
20403
20404 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20405         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20406         if test $ol_enable_ldbm = yes ; then
20407                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20408         fi
20409
20410         echo "configure: warning: disabling LDBM" 1>&2
20411         ol_enable_ldbm=no
20412 fi
20413
20414
20415 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20416         BUILD_LIBS_DYNAMIC=shared
20417         cat >> confdefs.h <<\EOF
20418 #define LDAP_LIBS_DYNAMIC 1
20419 EOF
20420
20421         LTSTATIC=""
20422 else
20423         BUILD_LIBS_DYNAMIC=static
20424         LTSTATIC="-static"
20425 fi
20426
20427 if test $ol_enable_wrappers != no ; then
20428         for ac_hdr in tcpd.h
20429 do
20430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20432 echo "configure:20433: checking for $ac_hdr" >&5
20433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20434   echo $ac_n "(cached) $ac_c" 1>&6
20435 else
20436   cat > conftest.$ac_ext <<EOF
20437 #line 20438 "configure"
20438 #include "confdefs.h"
20439 #include <$ac_hdr>
20440 EOF
20441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20442 { (eval echo configure:20443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20444 if test -z "$ac_err"; then
20445   rm -rf conftest*
20446   eval "ac_cv_header_$ac_safe=yes"
20447 else
20448   echo "$ac_err" >&5
20449   echo "configure: failed program was:" >&5
20450   cat conftest.$ac_ext >&5
20451   rm -rf conftest*
20452   eval "ac_cv_header_$ac_safe=no"
20453 fi
20454 rm -f conftest*
20455 fi
20456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20457   echo "$ac_t""yes" 1>&6
20458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20459   cat >> confdefs.h <<EOF
20460 #define $ac_tr_hdr 1
20461 EOF
20462  
20463                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20464 echo "configure:20465: checking for TCP wrappers library" >&5
20465                 save_LIBS="$LIBS"
20466                 LIBS="$LIBS -lwrap"
20467                 cat > conftest.$ac_ext <<EOF
20468 #line 20469 "configure"
20469 #include "confdefs.h"
20470
20471 #include <tcpd.h>
20472 int allow_severity = 0;
20473 int deny_severity  = 0;
20474
20475 struct request_info *req;
20476                 
20477 int main() {
20478
20479 hosts_access(req)
20480                 
20481 ; return 0; }
20482 EOF
20483 if { (eval echo configure:20484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20484   rm -rf conftest*
20485   echo "$ac_t""-lwrap" 1>&6
20486                 have_wrappers=yes
20487                 LIBS="$save_LIBS"
20488 else
20489   echo "configure: failed program was:" >&5
20490   cat conftest.$ac_ext >&5
20491   rm -rf conftest*
20492   
20493                                 LIBS="$LIBS -lnsl"
20494                 cat > conftest.$ac_ext <<EOF
20495 #line 20496 "configure"
20496 #include "confdefs.h"
20497
20498 #include <tcpd.h>
20499 int allow_severity = 0;
20500 int deny_severity  = 0;
20501
20502 struct request_info *req;
20503                 
20504 int main() {
20505
20506 hosts_access(req)
20507                 
20508 ; return 0; }
20509 EOF
20510 if { (eval echo configure:20511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20511   rm -rf conftest*
20512   echo "$ac_t""-lwrap -lnsl" 1>&6
20513                 have_wrappers=yes
20514                 LIBS="$save_LIBS -lnsl"
20515 else
20516   echo "configure: failed program was:" >&5
20517   cat conftest.$ac_ext >&5
20518   rm -rf conftest*
20519   
20520                 echo "$ac_t""no" 1>&6
20521                 have_wrappers=no
20522                 LIBS=$save_LIBS
20523 fi
20524 rm -f conftest*
20525 fi
20526 rm -f conftest*
20527 else
20528   echo "$ac_t""no" 1>&6
20529 have_wrappers=no
20530 fi
20531 done
20532
20533
20534         if test $have_wrappers = yes ; then
20535                 cat >> confdefs.h <<\EOF
20536 #define HAVE_TCPD 1
20537 EOF
20538
20539                 WRAP_LIBS="-lwrap"
20540         elif test $ol_enable_wrappers = yes ; then
20541                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20542         else
20543                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20544                 WRAP_LIBS=""
20545         fi
20546 fi
20547
20548 if test $ol_enable_syslog != no ; then
20549         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20550 echo "configure:20551: checking for openlog" >&5
20551 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20552   echo $ac_n "(cached) $ac_c" 1>&6
20553 else
20554   cat > conftest.$ac_ext <<EOF
20555 #line 20556 "configure"
20556 #include "confdefs.h"
20557 /* System header to define __stub macros and hopefully few prototypes,
20558     which can conflict with char openlog(); below.  */
20559 #include <assert.h>
20560 /* Override any gcc2 internal prototype to avoid an error.  */
20561 /* We use char because int might match the return type of a gcc2
20562     builtin and then its argument prototype would still apply.  */
20563 char openlog();
20564 char (*f)();
20565
20566 int main() {
20567
20568 /* The GNU C library defines this for functions which it implements
20569     to always fail with ENOSYS.  Some functions are actually named
20570     something starting with __ and the normal name is an alias.  */
20571 #if defined (__stub_openlog) || defined (__stub___openlog)
20572 choke me
20573 #else
20574 f = openlog;
20575 #endif
20576
20577 ; return 0; }
20578 EOF
20579 if { (eval echo configure:20580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20580   rm -rf conftest*
20581   eval "ac_cv_func_openlog=yes"
20582 else
20583   echo "configure: failed program was:" >&5
20584   cat conftest.$ac_ext >&5
20585   rm -rf conftest*
20586   eval "ac_cv_func_openlog=no"
20587 fi
20588 rm -f conftest*
20589 fi
20590
20591 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20592   echo "$ac_t""yes" 1>&6
20593   :
20594 else
20595   echo "$ac_t""no" 1>&6
20596 fi
20597
20598         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20599                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20600         fi
20601         ol_enable_syslog=$ac_cv_func_openlog
20602 fi
20603
20604
20605 ol_link_sql=no
20606 if test $ol_enable_sql != no ; then
20607         for ac_hdr in sql.h sqlext.h
20608 do
20609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20611 echo "configure:20612: checking for $ac_hdr" >&5
20612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20613   echo $ac_n "(cached) $ac_c" 1>&6
20614 else
20615   cat > conftest.$ac_ext <<EOF
20616 #line 20617 "configure"
20617 #include "confdefs.h"
20618 #include <$ac_hdr>
20619 EOF
20620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20621 { (eval echo configure:20622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20623 if test -z "$ac_err"; then
20624   rm -rf conftest*
20625   eval "ac_cv_header_$ac_safe=yes"
20626 else
20627   echo "$ac_err" >&5
20628   echo "configure: failed program was:" >&5
20629   cat conftest.$ac_ext >&5
20630   rm -rf conftest*
20631   eval "ac_cv_header_$ac_safe=no"
20632 fi
20633 rm -f conftest*
20634 fi
20635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20636   echo "$ac_t""yes" 1>&6
20637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20638   cat >> confdefs.h <<EOF
20639 #define $ac_tr_hdr 1
20640 EOF
20641  
20642 else
20643   echo "$ac_t""no" 1>&6
20644 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20645         
20646 fi
20647 done
20648
20649
20650         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20651 echo "configure:20652: checking for SQLDriverConnect in -liodbc" >&5
20652 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20654   echo $ac_n "(cached) $ac_c" 1>&6
20655 else
20656   ac_save_LIBS="$LIBS"
20657 LIBS="-liodbc  $LIBS"
20658 cat > conftest.$ac_ext <<EOF
20659 #line 20660 "configure"
20660 #include "confdefs.h"
20661 /* Override any gcc2 internal prototype to avoid an error.  */
20662 /* We use char because int might match the return type of a gcc2
20663     builtin and then its argument prototype would still apply.  */
20664 char SQLDriverConnect();
20665
20666 int main() {
20667 SQLDriverConnect()
20668 ; return 0; }
20669 EOF
20670 if { (eval echo configure:20671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20671   rm -rf conftest*
20672   eval "ac_cv_lib_$ac_lib_var=yes"
20673 else
20674   echo "configure: failed program was:" >&5
20675   cat conftest.$ac_ext >&5
20676   rm -rf conftest*
20677   eval "ac_cv_lib_$ac_lib_var=no"
20678 fi
20679 rm -f conftest*
20680 LIBS="$ac_save_LIBS"
20681
20682 fi
20683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20684   echo "$ac_t""yes" 1>&6
20685   have_iodbc=yes
20686 else
20687   echo "$ac_t""no" 1>&6
20688 have_iodbc=no
20689 fi
20690
20691         if test $have_iodbc = yes ; then
20692                 ol_link_sql="-liodbc"
20693         else
20694                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20695 echo "configure:20696: checking for SQLDriverConnect in -lodbc" >&5
20696 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20698   echo $ac_n "(cached) $ac_c" 1>&6
20699 else
20700   ac_save_LIBS="$LIBS"
20701 LIBS="-lodbc  $LIBS"
20702 cat > conftest.$ac_ext <<EOF
20703 #line 20704 "configure"
20704 #include "confdefs.h"
20705 /* Override any gcc2 internal prototype to avoid an error.  */
20706 /* We use char because int might match the return type of a gcc2
20707     builtin and then its argument prototype would still apply.  */
20708 char SQLDriverConnect();
20709
20710 int main() {
20711 SQLDriverConnect()
20712 ; return 0; }
20713 EOF
20714 if { (eval echo configure:20715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20715   rm -rf conftest*
20716   eval "ac_cv_lib_$ac_lib_var=yes"
20717 else
20718   echo "configure: failed program was:" >&5
20719   cat conftest.$ac_ext >&5
20720   rm -rf conftest*
20721   eval "ac_cv_lib_$ac_lib_var=no"
20722 fi
20723 rm -f conftest*
20724 LIBS="$ac_save_LIBS"
20725
20726 fi
20727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20728   echo "$ac_t""yes" 1>&6
20729   have_odbc=yes
20730 else
20731   echo "$ac_t""no" 1>&6
20732 have_odbc=no
20733 fi
20734
20735                 if test $have_odbc = yes ; then
20736                         ol_link_sql="-lodbc"
20737                 fi
20738         fi
20739
20740         if test $ol_link_sql != no ; then
20741                 SLAPD_SQL_LIBS="$ol_link_sql"
20742
20743         elif test $ol_enable_sql != auto ; then
20744                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20745         fi
20746 fi
20747
20748 ol_link_termcap=no
20749 for ac_hdr in termcap.h ncurses.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 $ol_link_termcap = no ; then
20791         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20792 echo "configure:20793: checking for tputs in -ltermcap" >&5
20793 ac_lib_var=`echo termcap'_'tputs | 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="-ltermcap  $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 tputs();
20806
20807 int main() {
20808 tputs()
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   have_termcap=yes
20827 else
20828   echo "$ac_t""no" 1>&6
20829 have_termcap=no
20830 fi
20831
20832         if test $have_termcap = yes ; then
20833                 cat >> confdefs.h <<\EOF
20834 #define HAVE_TERMCAP 1
20835 EOF
20836
20837                 ol_link_termcap=yes
20838                 TERMCAP_LIBS=-ltermcap
20839         fi
20840 fi
20841
20842 if test $ol_link_termcap = no ; then
20843         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20844 echo "configure:20845: checking for initscr in -lncurses" >&5
20845 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20846 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20847   echo $ac_n "(cached) $ac_c" 1>&6
20848 else
20849   ac_save_LIBS="$LIBS"
20850 LIBS="-lncurses  $LIBS"
20851 cat > conftest.$ac_ext <<EOF
20852 #line 20853 "configure"
20853 #include "confdefs.h"
20854 /* Override any gcc2 internal prototype to avoid an error.  */
20855 /* We use char because int might match the return type of a gcc2
20856     builtin and then its argument prototype would still apply.  */
20857 char initscr();
20858
20859 int main() {
20860 initscr()
20861 ; return 0; }
20862 EOF
20863 if { (eval echo configure:20864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20864   rm -rf conftest*
20865   eval "ac_cv_lib_$ac_lib_var=yes"
20866 else
20867   echo "configure: failed program was:" >&5
20868   cat conftest.$ac_ext >&5
20869   rm -rf conftest*
20870   eval "ac_cv_lib_$ac_lib_var=no"
20871 fi
20872 rm -f conftest*
20873 LIBS="$ac_save_LIBS"
20874
20875 fi
20876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20877   echo "$ac_t""yes" 1>&6
20878   have_ncurses=yes
20879 else
20880   echo "$ac_t""no" 1>&6
20881 have_ncurses=no
20882 fi
20883
20884         if test $have_ncurses = yes ; then
20885                 cat >> confdefs.h <<\EOF
20886 #define HAVE_NCURSES 1
20887 EOF
20888
20889                 ol_link_termcap=yes
20890                 TERMCAP_LIBS=-lncurses
20891         fi
20892 fi
20893
20894 if test $ol_link_termcap = no ; then
20895         cat >> confdefs.h <<\EOF
20896 #define NO_TERMCAP 1
20897 EOF
20898
20899         TERMCAP_LIBS=
20900 fi
20901
20902 ol_link_sasl=no
20903 ol_link_spasswd=no
20904 if test $ol_with_cyrus_sasl != no ; then
20905         for ac_hdr in sasl/sasl.h sasl.h
20906 do
20907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20909 echo "configure:20910: checking for $ac_hdr" >&5
20910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20911   echo $ac_n "(cached) $ac_c" 1>&6
20912 else
20913   cat > conftest.$ac_ext <<EOF
20914 #line 20915 "configure"
20915 #include "confdefs.h"
20916 #include <$ac_hdr>
20917 EOF
20918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20919 { (eval echo configure:20920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20921 if test -z "$ac_err"; then
20922   rm -rf conftest*
20923   eval "ac_cv_header_$ac_safe=yes"
20924 else
20925   echo "$ac_err" >&5
20926   echo "configure: failed program was:" >&5
20927   cat conftest.$ac_ext >&5
20928   rm -rf conftest*
20929   eval "ac_cv_header_$ac_safe=no"
20930 fi
20931 rm -f conftest*
20932 fi
20933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20934   echo "$ac_t""yes" 1>&6
20935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20936   cat >> confdefs.h <<EOF
20937 #define $ac_tr_hdr 1
20938 EOF
20939  
20940 else
20941   echo "$ac_t""no" 1>&6
20942 fi
20943 done
20944
20945
20946         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20947                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20948 echo "configure:20949: checking for sasl_client_init in -lsasl2" >&5
20949 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20951   echo $ac_n "(cached) $ac_c" 1>&6
20952 else
20953   ac_save_LIBS="$LIBS"
20954 LIBS="-lsasl2  $LIBS"
20955 cat > conftest.$ac_ext <<EOF
20956 #line 20957 "configure"
20957 #include "confdefs.h"
20958 /* Override any gcc2 internal prototype to avoid an error.  */
20959 /* We use char because int might match the return type of a gcc2
20960     builtin and then its argument prototype would still apply.  */
20961 char sasl_client_init();
20962
20963 int main() {
20964 sasl_client_init()
20965 ; return 0; }
20966 EOF
20967 if { (eval echo configure:20968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20968   rm -rf conftest*
20969   eval "ac_cv_lib_$ac_lib_var=yes"
20970 else
20971   echo "configure: failed program was:" >&5
20972   cat conftest.$ac_ext >&5
20973   rm -rf conftest*
20974   eval "ac_cv_lib_$ac_lib_var=no"
20975 fi
20976 rm -f conftest*
20977 LIBS="$ac_save_LIBS"
20978
20979 fi
20980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20981   echo "$ac_t""yes" 1>&6
20982   ol_link_sasl="-lsasl2"
20983 else
20984   echo "$ac_t""no" 1>&6
20985 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20986 echo "configure:20987: checking for sasl_client_init in -lsasl" >&5
20987 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20989   echo $ac_n "(cached) $ac_c" 1>&6
20990 else
20991   ac_save_LIBS="$LIBS"
20992 LIBS="-lsasl  $LIBS"
20993 cat > conftest.$ac_ext <<EOF
20994 #line 20995 "configure"
20995 #include "confdefs.h"
20996 /* Override any gcc2 internal prototype to avoid an error.  */
20997 /* We use char because int might match the return type of a gcc2
20998     builtin and then its argument prototype would still apply.  */
20999 char sasl_client_init();
21000
21001 int main() {
21002 sasl_client_init()
21003 ; return 0; }
21004 EOF
21005 if { (eval echo configure:21006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21006   rm -rf conftest*
21007   eval "ac_cv_lib_$ac_lib_var=yes"
21008 else
21009   echo "configure: failed program was:" >&5
21010   cat conftest.$ac_ext >&5
21011   rm -rf conftest*
21012   eval "ac_cv_lib_$ac_lib_var=no"
21013 fi
21014 rm -f conftest*
21015 LIBS="$ac_save_LIBS"
21016
21017 fi
21018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21019   echo "$ac_t""yes" 1>&6
21020   ol_link_sasl="-lsasl"
21021 else
21022   echo "$ac_t""no" 1>&6
21023 fi
21024
21025 fi
21026
21027         fi
21028
21029         if test $ol_link_sasl = no ; then
21030                 if test $ol_with_cyrus_sasl != auto ; then
21031                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21032                 else
21033                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21034                         echo "configure: warning: SASL authentication not supported!" 1>&2
21035                         if test $ol_link_tls = no ; then
21036                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21037                         fi
21038                 fi
21039         else
21040                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21041 echo "configure:21042: checking Cyrus SASL library version" >&5
21042 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21043   echo $ac_n "(cached) $ac_c" 1>&6
21044 else
21045   
21046         cat > conftest.$ac_ext <<EOF
21047 #line 21048 "configure"
21048 #include "confdefs.h"
21049
21050 #ifdef HAVE_SASL_SASL_H
21051 #include <sasl/sasl.h>
21052 #else
21053 #include <sasl.h>
21054 #endif
21055
21056 /* require 2.1.3 or later */
21057 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21058         char *__sasl_compat = "2.2+ or better okay (we guess)";
21059 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21060         && SASL_VERSION_STEP >=3
21061         char *__sasl_compat = "2.1.3+ or better okay";
21062 #endif
21063         
21064 EOF
21065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21066   egrep "__sasl_compat" >/dev/null 2>&1; then
21067   rm -rf conftest*
21068   ol_cv_sasl_compat=yes
21069 else
21070   rm -rf conftest*
21071   ol_cv_sasl_compat=no
21072 fi
21073 rm -f conftest*
21074
21075 fi
21076
21077 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21078
21079                 if test $ol_cv_sasl_compat = no ; then
21080                         ol_link_sasl=no
21081                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21082                 fi
21083
21084                 cat >> confdefs.h <<\EOF
21085 #define HAVE_CYRUS_SASL 1
21086 EOF
21087
21088                 SASL_LIBS="$ol_link_sasl"
21089                 if test $ol_enable_spasswd != no ; then
21090                         ol_link_spasswd=yes
21091                 fi
21092
21093                 ac_save_LIBS="$LIBS"
21094                 LIBS="$LIBS $ol_link_sasl"
21095                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21096 echo "configure:21097: checking for sasl_version" >&5
21097 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21098   echo $ac_n "(cached) $ac_c" 1>&6
21099 else
21100   cat > conftest.$ac_ext <<EOF
21101 #line 21102 "configure"
21102 #include "confdefs.h"
21103 /* System header to define __stub macros and hopefully few prototypes,
21104     which can conflict with char sasl_version(); below.  */
21105 #include <assert.h>
21106 /* Override any gcc2 internal prototype to avoid an error.  */
21107 /* We use char because int might match the return type of a gcc2
21108     builtin and then its argument prototype would still apply.  */
21109 char sasl_version();
21110 char (*f)();
21111
21112 int main() {
21113
21114 /* The GNU C library defines this for functions which it implements
21115     to always fail with ENOSYS.  Some functions are actually named
21116     something starting with __ and the normal name is an alias.  */
21117 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21118 choke me
21119 #else
21120 f = sasl_version;
21121 #endif
21122
21123 ; return 0; }
21124 EOF
21125 if { (eval echo configure:21126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21126   rm -rf conftest*
21127   eval "ac_cv_func_sasl_version=yes"
21128 else
21129   echo "configure: failed program was:" >&5
21130   cat conftest.$ac_ext >&5
21131   rm -rf conftest*
21132   eval "ac_cv_func_sasl_version=no"
21133 fi
21134 rm -f conftest*
21135 fi
21136
21137 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21138   echo "$ac_t""yes" 1>&6
21139   cat >> confdefs.h <<\EOF
21140 #define HAVE_SASL_VERSION 1
21141 EOF
21142
21143 else
21144   echo "$ac_t""no" 1>&6
21145 fi
21146
21147                 LIBS="$ac_save_LIBS"
21148         fi
21149
21150 else
21151         echo "configure: warning: SASL authentication not supported!" 1>&2
21152         if test $ol_link_tls = no ; then
21153                 echo "configure: warning: Strong authentication not supported!" 1>&2
21154         fi
21155 fi
21156
21157 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21158         dev=no
21159         if test -r /dev/urandom ; then
21160                 dev="/dev/urandom";
21161         elif test -r /idev/urandom ; then
21162                 dev="/idev/urandom";
21163         elif test -r /dev/srandom ; then
21164                 dev="/dev/srandom";
21165         elif test -r /dev/random ; then
21166                 dev="/dev/random";
21167         elif test -r /idev/random ; then
21168                 dev="/idev/random";
21169         fi
21170
21171         if test $dev != no ; then
21172                 cat >> confdefs.h <<EOF
21173 #define URANDOM_DEVICE "$dev"
21174 EOF
21175
21176         fi
21177 fi
21178
21179 ol_link_fetch=no
21180 if test $ol_with_fetch != no ; then
21181         ol_LIBS=$LIBS
21182 LIBS="-lfetch -lcom_err $LIBS"
21183 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21184 echo "configure:21185: checking fetch(3) library" >&5
21185 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21186   echo $ac_n "(cached) $ac_c" 1>&6
21187 else
21188   
21189         cat > conftest.$ac_ext <<EOF
21190 #line 21191 "configure"
21191 #include "confdefs.h"
21192
21193 #include <sys/param.h>
21194 #include <stdio.h>
21195 #include <fetch.h>
21196 int main() {
21197 struct url *u = fetchParseURL("file:///"); 
21198 ; return 0; }
21199 EOF
21200 if { (eval echo configure:21201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21201   rm -rf conftest*
21202   ol_cv_lib_fetch=yes
21203 else
21204   echo "configure: failed program was:" >&5
21205   cat conftest.$ac_ext >&5
21206   rm -rf conftest*
21207   ol_cv_lib_fetch=no
21208 fi
21209 rm -f conftest*
21210 fi
21211
21212 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21213 LIBS=$ol_LIBS
21214 if test $ol_cv_lib_fetch != no ; then
21215         ol_link_fetch="-lfetch -lcom_err"
21216         cat >> confdefs.h <<\EOF
21217 #define HAVE_FETCH 1
21218 EOF
21219
21220 fi
21221
21222
21223         if test $ol_cv_lib_fetch != no ; then
21224                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21225                 ol_link_fetch=freebsd
21226
21227         elif test $ol_with_fetch != auto ; then
21228                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21229         fi 
21230 fi
21231
21232 if test $ol_enable_crypt != no ; then
21233         save_LIBS="$LIBS"
21234         LIBS="$TLS_LIBS $LIBS"
21235
21236         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21237 echo "configure:21238: checking for crypt" >&5
21238 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21239   echo $ac_n "(cached) $ac_c" 1>&6
21240 else
21241   cat > conftest.$ac_ext <<EOF
21242 #line 21243 "configure"
21243 #include "confdefs.h"
21244 /* System header to define __stub macros and hopefully few prototypes,
21245     which can conflict with char crypt(); below.  */
21246 #include <assert.h>
21247 /* Override any gcc2 internal prototype to avoid an error.  */
21248 /* We use char because int might match the return type of a gcc2
21249     builtin and then its argument prototype would still apply.  */
21250 char crypt();
21251 char (*f)();
21252
21253 int main() {
21254
21255 /* The GNU C library defines this for functions which it implements
21256     to always fail with ENOSYS.  Some functions are actually named
21257     something starting with __ and the normal name is an alias.  */
21258 #if defined (__stub_crypt) || defined (__stub___crypt)
21259 choke me
21260 #else
21261 f = crypt;
21262 #endif
21263
21264 ; return 0; }
21265 EOF
21266 if { (eval echo configure:21267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21267   rm -rf conftest*
21268   eval "ac_cv_func_crypt=yes"
21269 else
21270   echo "configure: failed program was:" >&5
21271   cat conftest.$ac_ext >&5
21272   rm -rf conftest*
21273   eval "ac_cv_func_crypt=no"
21274 fi
21275 rm -f conftest*
21276 fi
21277
21278 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21279   echo "$ac_t""yes" 1>&6
21280   have_crypt=yes
21281 else
21282   echo "$ac_t""no" 1>&6
21283
21284                 LIBS="$save_LIBS"
21285                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21286 echo "configure:21287: checking for crypt in -lcrypt" >&5
21287 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21289   echo $ac_n "(cached) $ac_c" 1>&6
21290 else
21291   ac_save_LIBS="$LIBS"
21292 LIBS="-lcrypt  $LIBS"
21293 cat > conftest.$ac_ext <<EOF
21294 #line 21295 "configure"
21295 #include "confdefs.h"
21296 /* Override any gcc2 internal prototype to avoid an error.  */
21297 /* We use char because int might match the return type of a gcc2
21298     builtin and then its argument prototype would still apply.  */
21299 char crypt();
21300
21301 int main() {
21302 crypt()
21303 ; return 0; }
21304 EOF
21305 if { (eval echo configure:21306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21306   rm -rf conftest*
21307   eval "ac_cv_lib_$ac_lib_var=yes"
21308 else
21309   echo "configure: failed program was:" >&5
21310   cat conftest.$ac_ext >&5
21311   rm -rf conftest*
21312   eval "ac_cv_lib_$ac_lib_var=no"
21313 fi
21314 rm -f conftest*
21315 LIBS="$ac_save_LIBS"
21316
21317 fi
21318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21319   echo "$ac_t""yes" 1>&6
21320   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21321                         have_crypt=yes
21322 else
21323   echo "$ac_t""no" 1>&6
21324 have_crypt=no
21325 fi
21326
21327 fi
21328
21329
21330         LIBS="$save_LIBS"
21331
21332         if test $have_crypt = yes ; then
21333                 cat >> confdefs.h <<\EOF
21334 #define HAVE_CRYPT 1
21335 EOF
21336
21337         else
21338                 echo "configure: warning: could not find crypt" 1>&2
21339                 if test $ol_enable_crypt = yes ; then
21340                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21341                 fi
21342
21343                 echo "configure: warning: disabling crypt support" 1>&2
21344                 ol_enable_crypt=no
21345         fi
21346 fi
21347
21348 if test $ol_enable_proctitle != no ; then
21349         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21350 echo "configure:21351: checking for setproctitle" >&5
21351 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21352   echo $ac_n "(cached) $ac_c" 1>&6
21353 else
21354   cat > conftest.$ac_ext <<EOF
21355 #line 21356 "configure"
21356 #include "confdefs.h"
21357 /* System header to define __stub macros and hopefully few prototypes,
21358     which can conflict with char setproctitle(); below.  */
21359 #include <assert.h>
21360 /* Override any gcc2 internal prototype to avoid an error.  */
21361 /* We use char because int might match the return type of a gcc2
21362     builtin and then its argument prototype would still apply.  */
21363 char setproctitle();
21364 char (*f)();
21365
21366 int main() {
21367
21368 /* The GNU C library defines this for functions which it implements
21369     to always fail with ENOSYS.  Some functions are actually named
21370     something starting with __ and the normal name is an alias.  */
21371 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21372 choke me
21373 #else
21374 f = setproctitle;
21375 #endif
21376
21377 ; return 0; }
21378 EOF
21379 if { (eval echo configure:21380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21380   rm -rf conftest*
21381   eval "ac_cv_func_setproctitle=yes"
21382 else
21383   echo "configure: failed program was:" >&5
21384   cat conftest.$ac_ext >&5
21385   rm -rf conftest*
21386   eval "ac_cv_func_setproctitle=no"
21387 fi
21388 rm -f conftest*
21389 fi
21390
21391 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21392   echo "$ac_t""yes" 1>&6
21393   have_setproctitle=yes
21394 else
21395   echo "$ac_t""no" 1>&6
21396
21397                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21398 echo "configure:21399: checking for setproctitle in -lutil" >&5
21399 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21401   echo $ac_n "(cached) $ac_c" 1>&6
21402 else
21403   ac_save_LIBS="$LIBS"
21404 LIBS="-lutil  $LIBS"
21405 cat > conftest.$ac_ext <<EOF
21406 #line 21407 "configure"
21407 #include "confdefs.h"
21408 /* Override any gcc2 internal prototype to avoid an error.  */
21409 /* We use char because int might match the return type of a gcc2
21410     builtin and then its argument prototype would still apply.  */
21411 char setproctitle();
21412
21413 int main() {
21414 setproctitle()
21415 ; return 0; }
21416 EOF
21417 if { (eval echo configure:21418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21418   rm -rf conftest*
21419   eval "ac_cv_lib_$ac_lib_var=yes"
21420 else
21421   echo "configure: failed program was:" >&5
21422   cat conftest.$ac_ext >&5
21423   rm -rf conftest*
21424   eval "ac_cv_lib_$ac_lib_var=no"
21425 fi
21426 rm -f conftest*
21427 LIBS="$ac_save_LIBS"
21428
21429 fi
21430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21431   echo "$ac_t""yes" 1>&6
21432   have_setproctitle=yes
21433                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21434 else
21435   echo "$ac_t""no" 1>&6
21436 have_setproctitle=no
21437                         LIBOBJS="$LIBOBJS setproctitle.o"
21438                         LIBSRCS="$LIBSRCS setproctitle.c"
21439 fi
21440
21441 fi
21442
21443
21444         if test $have_setproctitle = yes ; then
21445                 cat >> confdefs.h <<\EOF
21446 #define HAVE_SETPROCTITLE 1
21447 EOF
21448
21449         fi
21450 fi
21451
21452 if test $ol_enable_slp != no ; then
21453         for ac_hdr in slp.h 
21454 do
21455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21457 echo "configure:21458: checking for $ac_hdr" >&5
21458 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21459   echo $ac_n "(cached) $ac_c" 1>&6
21460 else
21461   cat > conftest.$ac_ext <<EOF
21462 #line 21463 "configure"
21463 #include "confdefs.h"
21464 #include <$ac_hdr>
21465 EOF
21466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21467 { (eval echo configure:21468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21469 if test -z "$ac_err"; then
21470   rm -rf conftest*
21471   eval "ac_cv_header_$ac_safe=yes"
21472 else
21473   echo "$ac_err" >&5
21474   echo "configure: failed program was:" >&5
21475   cat conftest.$ac_ext >&5
21476   rm -rf conftest*
21477   eval "ac_cv_header_$ac_safe=no"
21478 fi
21479 rm -f conftest*
21480 fi
21481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21482   echo "$ac_t""yes" 1>&6
21483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21484   cat >> confdefs.h <<EOF
21485 #define $ac_tr_hdr 1
21486 EOF
21487  
21488 else
21489   echo "$ac_t""no" 1>&6
21490 fi
21491 done
21492
21493
21494         if test $ac_cv_header_slp_h = yes ; then
21495                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21496 echo "configure:21497: checking for SLPOpen in -lslp" >&5
21497 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21499   echo $ac_n "(cached) $ac_c" 1>&6
21500 else
21501   ac_save_LIBS="$LIBS"
21502 LIBS="-lslp  $LIBS"
21503 cat > conftest.$ac_ext <<EOF
21504 #line 21505 "configure"
21505 #include "confdefs.h"
21506 /* Override any gcc2 internal prototype to avoid an error.  */
21507 /* We use char because int might match the return type of a gcc2
21508     builtin and then its argument prototype would still apply.  */
21509 char SLPOpen();
21510
21511 int main() {
21512 SLPOpen()
21513 ; return 0; }
21514 EOF
21515 if { (eval echo configure:21516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21516   rm -rf conftest*
21517   eval "ac_cv_lib_$ac_lib_var=yes"
21518 else
21519   echo "configure: failed program was:" >&5
21520   cat conftest.$ac_ext >&5
21521   rm -rf conftest*
21522   eval "ac_cv_lib_$ac_lib_var=no"
21523 fi
21524 rm -f conftest*
21525 LIBS="$ac_save_LIBS"
21526
21527 fi
21528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21529   echo "$ac_t""yes" 1>&6
21530   have_slp=yes
21531 else
21532   echo "$ac_t""no" 1>&6
21533 have_slp=no
21534 fi
21535
21536                 if test $have_slp = yes ; then
21537                         cat >> confdefs.h <<\EOF
21538 #define HAVE_SLP 1
21539 EOF
21540
21541                         SLAPD_SLP_LIBS=-lslp
21542                 fi
21543
21544         elif test $ol_enable_slp = yes ; then
21545                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21546         fi
21547 fi
21548
21549
21550 echo $ac_n "checking long long""... $ac_c" 1>&6
21551 echo "configure:21552: checking long long" >&5
21552 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21553   echo $ac_n "(cached) $ac_c" 1>&6
21554 else
21555   
21556         cat > conftest.$ac_ext <<EOF
21557 #line 21558 "configure"
21558 #include "confdefs.h"
21559
21560 int main() {
21561 long long x;
21562 ; return 0; }
21563 EOF
21564 if { (eval echo configure:21565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21565   rm -rf conftest*
21566   ol_cv_type_long_long=yes
21567 else
21568   echo "configure: failed program was:" >&5
21569   cat conftest.$ac_ext >&5
21570   rm -rf conftest*
21571   ol_cv_type_long_long=no
21572 fi
21573 rm -f conftest*
21574 fi
21575
21576 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21577 if test $ol_cv_type_long_long = yes; then
21578         cat >> confdefs.h <<\EOF
21579 #define HAVE_LONG_LONG 1
21580 EOF
21581
21582 fi
21583
21584 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21585 echo "configure:21586: checking for ANSI C header files" >&5
21586 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21587   echo $ac_n "(cached) $ac_c" 1>&6
21588 else
21589   cat > conftest.$ac_ext <<EOF
21590 #line 21591 "configure"
21591 #include "confdefs.h"
21592 #include <stdlib.h>
21593 #include <stdarg.h>
21594 #include <string.h>
21595 #include <float.h>
21596 EOF
21597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21598 { (eval echo configure:21599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21600 if test -z "$ac_err"; then
21601   rm -rf conftest*
21602   ac_cv_header_stdc=yes
21603 else
21604   echo "$ac_err" >&5
21605   echo "configure: failed program was:" >&5
21606   cat conftest.$ac_ext >&5
21607   rm -rf conftest*
21608   ac_cv_header_stdc=no
21609 fi
21610 rm -f conftest*
21611
21612 if test $ac_cv_header_stdc = yes; then
21613   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21614 cat > conftest.$ac_ext <<EOF
21615 #line 21616 "configure"
21616 #include "confdefs.h"
21617 #include <string.h>
21618 EOF
21619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21620   egrep "memchr" >/dev/null 2>&1; then
21621   :
21622 else
21623   rm -rf conftest*
21624   ac_cv_header_stdc=no
21625 fi
21626 rm -f conftest*
21627
21628 fi
21629
21630 if test $ac_cv_header_stdc = yes; then
21631   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21632 cat > conftest.$ac_ext <<EOF
21633 #line 21634 "configure"
21634 #include "confdefs.h"
21635 #include <stdlib.h>
21636 EOF
21637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21638   egrep "free" >/dev/null 2>&1; then
21639   :
21640 else
21641   rm -rf conftest*
21642   ac_cv_header_stdc=no
21643 fi
21644 rm -f conftest*
21645
21646 fi
21647
21648 if test $ac_cv_header_stdc = yes; then
21649   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21650 if test "$cross_compiling" = yes; then
21651   :
21652 else
21653   cat > conftest.$ac_ext <<EOF
21654 #line 21655 "configure"
21655 #include "confdefs.h"
21656 #include <ctype.h>
21657 #if ((' ' & 0x0FF) == 0x020)
21658 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21659 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21660 #else
21661 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21662  || ('j' <= (c) && (c) <= 'r') \
21663  || ('s' <= (c) && (c) <= 'z'))
21664 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21665 #endif
21666 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21667 int main () { int i; for (i = 0; i < 256; i++)
21668 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21669 exit (0); }
21670
21671 EOF
21672 if { (eval echo configure:21673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21673 then
21674   :
21675 else
21676   echo "configure: failed program was:" >&5
21677   cat conftest.$ac_ext >&5
21678   rm -fr conftest*
21679   ac_cv_header_stdc=no
21680 fi
21681 rm -fr conftest*
21682 fi
21683
21684 fi
21685 fi
21686
21687 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21688 if test $ac_cv_header_stdc = yes; then
21689   cat >> confdefs.h <<\EOF
21690 #define STDC_HEADERS 1
21691 EOF
21692
21693 fi
21694
21695 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21696 echo "configure:21697: checking for mode_t" >&5
21697 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21698   echo $ac_n "(cached) $ac_c" 1>&6
21699 else
21700   cat > conftest.$ac_ext <<EOF
21701 #line 21702 "configure"
21702 #include "confdefs.h"
21703 #include <sys/types.h>
21704 #if STDC_HEADERS
21705 #include <stdlib.h>
21706 #include <stddef.h>
21707 #endif
21708
21709 EOF
21710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21711   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21712   rm -rf conftest*
21713   eval "ac_cv_type_mode_t=yes"
21714 else
21715   rm -rf conftest*
21716   eval "ac_cv_type_mode_t=no"
21717 fi
21718 rm -f conftest*
21719
21720 fi
21721 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21722   echo "$ac_t""yes" 1>&6
21723 else
21724   echo "$ac_t""no" 1>&6
21725   cat >> confdefs.h <<EOF
21726 #define mode_t int
21727 EOF
21728
21729 fi
21730
21731 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21732 echo "configure:21733: checking for off_t" >&5
21733 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21734   echo $ac_n "(cached) $ac_c" 1>&6
21735 else
21736   cat > conftest.$ac_ext <<EOF
21737 #line 21738 "configure"
21738 #include "confdefs.h"
21739 #include <sys/types.h>
21740 #if STDC_HEADERS
21741 #include <stdlib.h>
21742 #include <stddef.h>
21743 #endif
21744
21745 EOF
21746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21747   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21748   rm -rf conftest*
21749   eval "ac_cv_type_off_t=yes"
21750 else
21751   rm -rf conftest*
21752   eval "ac_cv_type_off_t=no"
21753 fi
21754 rm -f conftest*
21755
21756 fi
21757 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21758   echo "$ac_t""yes" 1>&6
21759 else
21760   echo "$ac_t""no" 1>&6
21761   cat >> confdefs.h <<EOF
21762 #define off_t long
21763 EOF
21764
21765 fi
21766
21767 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21768 echo "configure:21769: checking for pid_t" >&5
21769 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21770   echo $ac_n "(cached) $ac_c" 1>&6
21771 else
21772   cat > conftest.$ac_ext <<EOF
21773 #line 21774 "configure"
21774 #include "confdefs.h"
21775 #include <sys/types.h>
21776 #if STDC_HEADERS
21777 #include <stdlib.h>
21778 #include <stddef.h>
21779 #endif
21780
21781 EOF
21782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21783   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21784   rm -rf conftest*
21785   eval "ac_cv_type_pid_t=yes"
21786 else
21787   rm -rf conftest*
21788   eval "ac_cv_type_pid_t=no"
21789 fi
21790 rm -f conftest*
21791
21792 fi
21793 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21794   echo "$ac_t""yes" 1>&6
21795 else
21796   echo "$ac_t""no" 1>&6
21797   cat >> confdefs.h <<EOF
21798 #define pid_t int
21799 EOF
21800
21801 fi
21802
21803 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21804 echo "configure:21805: checking for ptrdiff_t" >&5
21805 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21806   echo $ac_n "(cached) $ac_c" 1>&6
21807 else
21808   cat > conftest.$ac_ext <<EOF
21809 #line 21810 "configure"
21810 #include "confdefs.h"
21811 #include <stddef.h>
21812 int main() {
21813 ptrdiff_t p
21814 ; return 0; }
21815 EOF
21816 if { (eval echo configure:21817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21817   rm -rf conftest*
21818   am_cv_type_ptrdiff_t=yes
21819 else
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822   rm -rf conftest*
21823   am_cv_type_ptrdiff_t=no
21824 fi
21825 rm -f conftest*
21826 fi
21827
21828 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21829    if test $am_cv_type_ptrdiff_t = yes; then
21830      cat >> confdefs.h <<\EOF
21831 #define HAVE_PTRDIFF_T 1
21832 EOF
21833
21834    fi
21835
21836 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21837 echo "configure:21838: checking return type of signal handlers" >&5
21838 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21839   echo $ac_n "(cached) $ac_c" 1>&6
21840 else
21841   cat > conftest.$ac_ext <<EOF
21842 #line 21843 "configure"
21843 #include "confdefs.h"
21844 #include <sys/types.h>
21845 #include <signal.h>
21846 #ifdef signal
21847 #undef signal
21848 #endif
21849 #ifdef __cplusplus
21850 extern "C" void (*signal (int, void (*)(int)))(int);
21851 #else
21852 void (*signal ()) ();
21853 #endif
21854
21855 int main() {
21856 int i;
21857 ; return 0; }
21858 EOF
21859 if { (eval echo configure:21860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21860   rm -rf conftest*
21861   ac_cv_type_signal=void
21862 else
21863   echo "configure: failed program was:" >&5
21864   cat conftest.$ac_ext >&5
21865   rm -rf conftest*
21866   ac_cv_type_signal=int
21867 fi
21868 rm -f conftest*
21869 fi
21870
21871 echo "$ac_t""$ac_cv_type_signal" 1>&6
21872 cat >> confdefs.h <<EOF
21873 #define RETSIGTYPE $ac_cv_type_signal
21874 EOF
21875
21876
21877 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21878 echo "configure:21879: checking for size_t" >&5
21879 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21880   echo $ac_n "(cached) $ac_c" 1>&6
21881 else
21882   cat > conftest.$ac_ext <<EOF
21883 #line 21884 "configure"
21884 #include "confdefs.h"
21885 #include <sys/types.h>
21886 #if STDC_HEADERS
21887 #include <stdlib.h>
21888 #include <stddef.h>
21889 #endif
21890
21891 EOF
21892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21893   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21894   rm -rf conftest*
21895   eval "ac_cv_type_size_t=yes"
21896 else
21897   rm -rf conftest*
21898   eval "ac_cv_type_size_t=no"
21899 fi
21900 rm -f conftest*
21901
21902 fi
21903 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21904   echo "$ac_t""yes" 1>&6
21905 else
21906   echo "$ac_t""no" 1>&6
21907   cat >> confdefs.h <<EOF
21908 #define size_t unsigned
21909 EOF
21910
21911 fi
21912
21913
21914 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21915 echo "configure:21916: checking for ssize_t" >&5
21916 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21917   echo $ac_n "(cached) $ac_c" 1>&6
21918 else
21919   cat > conftest.$ac_ext <<EOF
21920 #line 21921 "configure"
21921 #include "confdefs.h"
21922 #include <sys/types.h>
21923 #if STDC_HEADERS
21924 #include <stdlib.h>
21925 #include <stddef.h>
21926 #endif
21927
21928 EOF
21929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21930   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21931   rm -rf conftest*
21932   eval "ac_cv_type_ssize_t=yes"
21933 else
21934   rm -rf conftest*
21935   eval "ac_cv_type_ssize_t=no"
21936 fi
21937 rm -f conftest*
21938
21939 fi
21940 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21941   echo "$ac_t""yes" 1>&6
21942 else
21943   echo "$ac_t""no" 1>&6
21944   cat >> confdefs.h <<EOF
21945 #define ssize_t signed int
21946 EOF
21947
21948 fi
21949
21950 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21951 echo "configure:21952: checking for caddr_t" >&5
21952 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21953   echo $ac_n "(cached) $ac_c" 1>&6
21954 else
21955   cat > conftest.$ac_ext <<EOF
21956 #line 21957 "configure"
21957 #include "confdefs.h"
21958 #include <sys/types.h>
21959 #if STDC_HEADERS
21960 #include <stdlib.h>
21961 #include <stddef.h>
21962 #endif
21963
21964 EOF
21965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21966   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21967   rm -rf conftest*
21968   eval "ac_cv_type_caddr_t=yes"
21969 else
21970   rm -rf conftest*
21971   eval "ac_cv_type_caddr_t=no"
21972 fi
21973 rm -f conftest*
21974
21975 fi
21976 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21977   echo "$ac_t""yes" 1>&6
21978 else
21979   echo "$ac_t""no" 1>&6
21980   cat >> confdefs.h <<EOF
21981 #define caddr_t char *
21982 EOF
21983
21984 fi
21985
21986
21987 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21988 echo "configure:21989: checking for socklen_t" >&5
21989 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21990   echo $ac_n "(cached) $ac_c" 1>&6
21991 else
21992   cat > conftest.$ac_ext <<EOF
21993 #line 21994 "configure"
21994 #include "confdefs.h"
21995
21996 #ifdef HAVE_SYS_TYPES_H
21997 #include <sys/types.h>
21998 #endif
21999 #ifdef HAVE_SYS_SOCKET_H
22000 #include <sys/socket.h>
22001 #endif
22002
22003 int main() {
22004 socklen_t len;
22005 ; return 0; }
22006 EOF
22007 if { (eval echo configure:22008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22008   rm -rf conftest*
22009   ol_cv_type_socklen_t=yes
22010 else
22011   echo "configure: failed program was:" >&5
22012   cat conftest.$ac_ext >&5
22013   rm -rf conftest*
22014   ol_cv_type_socklen_t=no
22015 fi
22016 rm -f conftest*
22017 fi
22018
22019 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22020   if test $ol_cv_type_socklen_t = no; then
22021     cat >> confdefs.h <<\EOF
22022 #define socklen_t int
22023 EOF
22024
22025   fi
22026  
22027 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22028 echo "configure:22029: checking for member st_blksize in aggregate type struct stat" >&5
22029 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22030   echo $ac_n "(cached) $ac_c" 1>&6
22031 else
22032   cat > conftest.$ac_ext <<EOF
22033 #line 22034 "configure"
22034 #include "confdefs.h"
22035 #include <sys/types.h>
22036 #include <sys/stat.h>
22037 int main() {
22038 struct stat foo; foo.st_blksize;
22039 ; return 0; }
22040 EOF
22041 if { (eval echo configure:22042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22042   rm -rf conftest*
22043   ac_cv_c_struct_member_st_blksize=yes
22044 else
22045   echo "configure: failed program was:" >&5
22046   cat conftest.$ac_ext >&5
22047   rm -rf conftest*
22048   ac_cv_c_struct_member_st_blksize=no
22049 fi
22050 rm -f conftest*
22051 fi
22052
22053 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22054 st_blksize="$ac_cv_c_struct_member_st_blksize"
22055 if test $ac_cv_c_struct_member_st_blksize = yes; then
22056   cat >> confdefs.h <<\EOF
22057 #define HAVE_ST_BLKSIZE 1
22058 EOF
22059
22060 fi
22061
22062 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22063 echo "configure:22064: checking whether time.h and sys/time.h may both be included" >&5
22064 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22065   echo $ac_n "(cached) $ac_c" 1>&6
22066 else
22067   cat > conftest.$ac_ext <<EOF
22068 #line 22069 "configure"
22069 #include "confdefs.h"
22070 #include <sys/types.h>
22071 #include <sys/time.h>
22072 #include <time.h>
22073 int main() {
22074 struct tm *tp;
22075 ; return 0; }
22076 EOF
22077 if { (eval echo configure:22078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22078   rm -rf conftest*
22079   ac_cv_header_time=yes
22080 else
22081   echo "configure: failed program was:" >&5
22082   cat conftest.$ac_ext >&5
22083   rm -rf conftest*
22084   ac_cv_header_time=no
22085 fi
22086 rm -f conftest*
22087 fi
22088
22089 echo "$ac_t""$ac_cv_header_time" 1>&6
22090 if test $ac_cv_header_time = yes; then
22091   cat >> confdefs.h <<\EOF
22092 #define TIME_WITH_SYS_TIME 1
22093 EOF
22094
22095 fi
22096
22097 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22098 echo "configure:22099: checking whether struct tm is in sys/time.h or time.h" >&5
22099 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22100   echo $ac_n "(cached) $ac_c" 1>&6
22101 else
22102   cat > conftest.$ac_ext <<EOF
22103 #line 22104 "configure"
22104 #include "confdefs.h"
22105 #include <sys/types.h>
22106 #include <time.h>
22107 int main() {
22108 struct tm *tp; tp->tm_sec;
22109 ; return 0; }
22110 EOF
22111 if { (eval echo configure:22112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22112   rm -rf conftest*
22113   ac_cv_struct_tm=time.h
22114 else
22115   echo "configure: failed program was:" >&5
22116   cat conftest.$ac_ext >&5
22117   rm -rf conftest*
22118   ac_cv_struct_tm=sys/time.h
22119 fi
22120 rm -f conftest*
22121 fi
22122
22123 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22124 if test $ac_cv_struct_tm = sys/time.h; then
22125   cat >> confdefs.h <<\EOF
22126 #define TM_IN_SYS_TIME 1
22127 EOF
22128
22129 fi
22130
22131 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22132 echo "configure:22133: checking for uid_t in sys/types.h" >&5
22133 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22134   echo $ac_n "(cached) $ac_c" 1>&6
22135 else
22136   cat > conftest.$ac_ext <<EOF
22137 #line 22138 "configure"
22138 #include "confdefs.h"
22139 #include <sys/types.h>
22140 EOF
22141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22142   egrep "uid_t" >/dev/null 2>&1; then
22143   rm -rf conftest*
22144   ac_cv_type_uid_t=yes
22145 else
22146   rm -rf conftest*
22147   ac_cv_type_uid_t=no
22148 fi
22149 rm -f conftest*
22150
22151 fi
22152
22153 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22154 if test $ac_cv_type_uid_t = no; then
22155   cat >> confdefs.h <<\EOF
22156 #define uid_t int
22157 EOF
22158
22159   cat >> confdefs.h <<\EOF
22160 #define gid_t int
22161 EOF
22162
22163 fi
22164
22165 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22166 echo "configure:22167: checking for sig_atomic_t" >&5
22167 if eval "test \"\${ol_cv_type_sig_atomic_t+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 #include <signal.h>
22174 int main() {
22175 sig_atomic_t atomic;
22176 ; return 0; }
22177 EOF
22178 if { (eval echo configure:22179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22179   rm -rf conftest*
22180   ol_cv_type_sig_atomic_t=yes
22181 else
22182   echo "configure: failed program was:" >&5
22183   cat conftest.$ac_ext >&5
22184   rm -rf conftest*
22185   ol_cv_type_sig_atomic_t=no
22186 fi
22187 rm -f conftest*
22188 fi
22189
22190 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22191   if test $ol_cv_type_sig_atomic_t = no; then
22192     cat >> confdefs.h <<\EOF
22193 #define sig_atomic_t int
22194 EOF
22195
22196   fi
22197  
22198
22199
22200 # test for pw_gecos in struct passwd
22201 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22202 echo "configure:22203: checking struct passwd for pw_gecos" >&5
22203 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22204   echo $ac_n "(cached) $ac_c" 1>&6
22205 else
22206   
22207         cat > conftest.$ac_ext <<EOF
22208 #line 22209 "configure"
22209 #include "confdefs.h"
22210 #include <pwd.h>
22211 int main() {
22212
22213         struct passwd pwd;
22214         pwd.pw_gecos = pwd.pw_name;
22215
22216 ; return 0; }
22217 EOF
22218 if { (eval echo configure:22219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22219   rm -rf conftest*
22220   ol_cv_struct_passwd_pw_gecos=yes
22221 else
22222   echo "configure: failed program was:" >&5
22223   cat conftest.$ac_ext >&5
22224   rm -rf conftest*
22225   ol_cv_struct_passwd_pw_gecos=no
22226 fi
22227 rm -f conftest*
22228 fi
22229
22230 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22231 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22232         cat >> confdefs.h <<\EOF
22233 #define HAVE_PW_GECOS 1
22234 EOF
22235
22236 fi
22237
22238 # test for pw_passwd in struct passwd
22239 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22240 echo "configure:22241: checking struct passwd for pw_passwd" >&5
22241 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22242   echo $ac_n "(cached) $ac_c" 1>&6
22243 else
22244   
22245         cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248 #include <pwd.h>
22249 int main() {
22250
22251         struct passwd pwd;
22252         pwd.pw_passwd = pwd.pw_name;
22253
22254 ; return 0; }
22255 EOF
22256 if { (eval echo configure:22257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22257   rm -rf conftest*
22258   ol_cv_struct_passwd_pw_passwd=yes
22259 else
22260   echo "configure: failed program was:" >&5
22261   cat conftest.$ac_ext >&5
22262   rm -rf conftest*
22263   ol_cv_struct_passwd_pw_passwd=no
22264 fi
22265 rm -f conftest*
22266 fi
22267
22268 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22269 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22270         cat >> confdefs.h <<\EOF
22271 #define HAVE_PW_PASSWD 1
22272 EOF
22273
22274 fi
22275
22276
22277 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22278 echo "configure:22279: checking if toupper() requires islower()" >&5
22279 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22280   echo $ac_n "(cached) $ac_c" 1>&6
22281 else
22282   
22283         if test "$cross_compiling" = yes; then
22284   ol_cv_c_upper_lower=safe
22285 else
22286   cat > conftest.$ac_ext <<EOF
22287 #line 22288 "configure"
22288 #include "confdefs.h"
22289
22290 #include <ctype.h>
22291 main()
22292 {
22293         if ('C' == toupper('C'))
22294                 exit(0);
22295         else
22296                 exit(1);
22297 }
22298 EOF
22299 if { (eval echo configure:22300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22300 then
22301   ol_cv_c_upper_lower=no
22302 else
22303   echo "configure: failed program was:" >&5
22304   cat conftest.$ac_ext >&5
22305   rm -fr conftest*
22306   ol_cv_c_upper_lower=yes
22307 fi
22308 rm -fr conftest*
22309 fi
22310
22311 fi
22312
22313 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22314 if test $ol_cv_c_upper_lower != no ; then
22315         cat >> confdefs.h <<\EOF
22316 #define C_UPPER_LOWER 1
22317 EOF
22318
22319 fi
22320
22321 echo $ac_n "checking for working const""... $ac_c" 1>&6
22322 echo "configure:22323: checking for working const" >&5
22323 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22324   echo $ac_n "(cached) $ac_c" 1>&6
22325 else
22326   cat > conftest.$ac_ext <<EOF
22327 #line 22328 "configure"
22328 #include "confdefs.h"
22329
22330 int main() {
22331
22332 /* Ultrix mips cc rejects this.  */
22333 typedef int charset[2]; const charset x;
22334 /* SunOS 4.1.1 cc rejects this.  */
22335 char const *const *ccp;
22336 char **p;
22337 /* NEC SVR4.0.2 mips cc rejects this.  */
22338 struct point {int x, y;};
22339 static struct point const zero = {0,0};
22340 /* AIX XL C 1.02.0.0 rejects this.
22341    It does not let you subtract one const X* pointer from another in an arm
22342    of an if-expression whose if-part is not a constant expression */
22343 const char *g = "string";
22344 ccp = &g + (g ? g-g : 0);
22345 /* HPUX 7.0 cc rejects these. */
22346 ++ccp;
22347 p = (char**) ccp;
22348 ccp = (char const *const *) p;
22349 { /* SCO 3.2v4 cc rejects this.  */
22350   char *t;
22351   char const *s = 0 ? (char *) 0 : (char const *) 0;
22352
22353   *t++ = 0;
22354 }
22355 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22356   int x[] = {25, 17};
22357   const int *foo = &x[0];
22358   ++foo;
22359 }
22360 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22361   typedef const int *iptr;
22362   iptr p = 0;
22363   ++p;
22364 }
22365 { /* AIX XL C 1.02.0.0 rejects this saying
22366      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22367   struct s { int j; const int *ap[3]; };
22368   struct s *b; b->j = 5;
22369 }
22370 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22371   const int foo = 10;
22372 }
22373
22374 ; return 0; }
22375 EOF
22376 if { (eval echo configure:22377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22377   rm -rf conftest*
22378   ac_cv_c_const=yes
22379 else
22380   echo "configure: failed program was:" >&5
22381   cat conftest.$ac_ext >&5
22382   rm -rf conftest*
22383   ac_cv_c_const=no
22384 fi
22385 rm -f conftest*
22386 fi
22387
22388 echo "$ac_t""$ac_cv_c_const" 1>&6
22389 if test $ac_cv_c_const = no; then
22390   cat >> confdefs.h <<\EOF
22391 #define const 
22392 EOF
22393
22394 fi
22395
22396 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22397 echo "configure:22398: checking if compiler understands volatile" >&5
22398 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22399   echo $ac_n "(cached) $ac_c" 1>&6
22400 else
22401   cat > conftest.$ac_ext <<EOF
22402 #line 22403 "configure"
22403 #include "confdefs.h"
22404 int x, y, z;
22405 int main() {
22406 volatile int a; int * volatile b = x ? &y : &z;
22407       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22408       *b = 0;
22409 ; return 0; }
22410 EOF
22411 if { (eval echo configure:22412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22412   rm -rf conftest*
22413   ol_cv_c_volatile=yes
22414 else
22415   echo "configure: failed program was:" >&5
22416   cat conftest.$ac_ext >&5
22417   rm -rf conftest*
22418   ol_cv_c_volatile=no
22419 fi
22420 rm -f conftest*
22421 fi
22422
22423 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22424   if test $ol_cv_c_volatile = yes; then
22425     : 
22426   else
22427     cat >> confdefs.h <<\EOF
22428 #define volatile 
22429 EOF
22430
22431   fi
22432  
22433
22434 if test $cross_compiling = yes ; then
22435         cat >> confdefs.h <<\EOF
22436 #define CROSS_COMPILING 1
22437 EOF
22438
22439 else
22440         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22441 echo "configure:22442: checking whether byte ordering is bigendian" >&5
22442 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22443   echo $ac_n "(cached) $ac_c" 1>&6
22444 else
22445   ac_cv_c_bigendian=unknown
22446 # See if sys/param.h defines the BYTE_ORDER macro.
22447 cat > conftest.$ac_ext <<EOF
22448 #line 22449 "configure"
22449 #include "confdefs.h"
22450 #include <sys/types.h>
22451 #include <sys/param.h>
22452 int main() {
22453
22454 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22455  bogus endian macros
22456 #endif
22457 ; return 0; }
22458 EOF
22459 if { (eval echo configure:22460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22460   rm -rf conftest*
22461   # It does; now see whether it defined to BIG_ENDIAN or not.
22462 cat > conftest.$ac_ext <<EOF
22463 #line 22464 "configure"
22464 #include "confdefs.h"
22465 #include <sys/types.h>
22466 #include <sys/param.h>
22467 int main() {
22468
22469 #if BYTE_ORDER != BIG_ENDIAN
22470  not big endian
22471 #endif
22472 ; return 0; }
22473 EOF
22474 if { (eval echo configure:22475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22475   rm -rf conftest*
22476   ac_cv_c_bigendian=yes
22477 else
22478   echo "configure: failed program was:" >&5
22479   cat conftest.$ac_ext >&5
22480   rm -rf conftest*
22481   ac_cv_c_bigendian=no
22482 fi
22483 rm -f conftest*
22484 else
22485   echo "configure: failed program was:" >&5
22486   cat conftest.$ac_ext >&5
22487 fi
22488 rm -f conftest*
22489 if test $ac_cv_c_bigendian = unknown; then
22490 if test "$cross_compiling" = yes; then
22491     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22492 else
22493   cat > conftest.$ac_ext <<EOF
22494 #line 22495 "configure"
22495 #include "confdefs.h"
22496 main () {
22497   /* Are we little or big endian?  From Harbison&Steele.  */
22498   union
22499   {
22500     long l;
22501     char c[sizeof (long)];
22502   } u;
22503   u.l = 1;
22504   exit (u.c[sizeof (long) - 1] == 1);
22505 }
22506 EOF
22507 if { (eval echo configure:22508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22508 then
22509   ac_cv_c_bigendian=no
22510 else
22511   echo "configure: failed program was:" >&5
22512   cat conftest.$ac_ext >&5
22513   rm -fr conftest*
22514   ac_cv_c_bigendian=yes
22515 fi
22516 rm -fr conftest*
22517 fi
22518
22519 fi
22520 fi
22521
22522 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22523 if test $ac_cv_c_bigendian = yes; then
22524   cat >> confdefs.h <<\EOF
22525 #define WORDS_BIGENDIAN 1
22526 EOF
22527
22528 fi
22529
22530 fi
22531
22532 echo $ac_n "checking size of short""... $ac_c" 1>&6
22533 echo "configure:22534: checking size of short" >&5 
22534 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22535   echo $ac_n "(cached) $ac_c" 1>&6
22536 else
22537   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22538   cat > conftest.$ac_ext <<EOF
22539 #line 22540 "configure"
22540 #include "confdefs.h"
22541 #include "confdefs.h" 
22542 #include <sys/types.h> 
22543  
22544
22545 int main() {
22546 switch (0) case 0: case (sizeof (short) == $ac_size):;
22547 ; return 0; }
22548 EOF
22549 if { (eval echo configure:22550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22550   rm -rf conftest*
22551   ac_cv_sizeof_short=$ac_size
22552 else
22553   echo "configure: failed program was:" >&5
22554   cat conftest.$ac_ext >&5
22555 fi
22556 rm -f conftest* 
22557   if test x$ac_cv_sizeof_short != x ; then break; fi 
22558 done 
22559
22560 fi
22561  
22562 if test x$ac_cv_sizeof_short = x ; then 
22563   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22564 fi 
22565 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22566 cat >> confdefs.h <<EOF
22567 #define SIZEOF_SHORT $ac_cv_sizeof_short
22568 EOF
22569  
22570  
22571 echo $ac_n "checking size of int""... $ac_c" 1>&6
22572 echo "configure:22573: checking size of int" >&5 
22573 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22574   echo $ac_n "(cached) $ac_c" 1>&6
22575 else
22576   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22577   cat > conftest.$ac_ext <<EOF
22578 #line 22579 "configure"
22579 #include "confdefs.h"
22580 #include "confdefs.h" 
22581 #include <sys/types.h> 
22582  
22583
22584 int main() {
22585 switch (0) case 0: case (sizeof (int) == $ac_size):;
22586 ; return 0; }
22587 EOF
22588 if { (eval echo configure:22589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22589   rm -rf conftest*
22590   ac_cv_sizeof_int=$ac_size
22591 else
22592   echo "configure: failed program was:" >&5
22593   cat conftest.$ac_ext >&5
22594 fi
22595 rm -f conftest* 
22596   if test x$ac_cv_sizeof_int != x ; then break; fi 
22597 done 
22598
22599 fi
22600  
22601 if test x$ac_cv_sizeof_int = x ; then 
22602   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22603 fi 
22604 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22605 cat >> confdefs.h <<EOF
22606 #define SIZEOF_INT $ac_cv_sizeof_int
22607 EOF
22608  
22609  
22610 echo $ac_n "checking size of long""... $ac_c" 1>&6
22611 echo "configure:22612: checking size of long" >&5 
22612 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22613   echo $ac_n "(cached) $ac_c" 1>&6
22614 else
22615   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22616   cat > conftest.$ac_ext <<EOF
22617 #line 22618 "configure"
22618 #include "confdefs.h"
22619 #include "confdefs.h" 
22620 #include <sys/types.h> 
22621  
22622
22623 int main() {
22624 switch (0) case 0: case (sizeof (long) == $ac_size):;
22625 ; return 0; }
22626 EOF
22627 if { (eval echo configure:22628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22628   rm -rf conftest*
22629   ac_cv_sizeof_long=$ac_size
22630 else
22631   echo "configure: failed program was:" >&5
22632   cat conftest.$ac_ext >&5
22633 fi
22634 rm -f conftest* 
22635   if test x$ac_cv_sizeof_long != x ; then break; fi 
22636 done 
22637
22638 fi
22639  
22640 if test x$ac_cv_sizeof_long = x ; then 
22641   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22642 fi 
22643 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22644 cat >> confdefs.h <<EOF
22645 #define SIZEOF_LONG $ac_cv_sizeof_long
22646 EOF
22647  
22648
22649
22650 if test "$ac_cv_sizeof_int" -lt 4 ; then
22651         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22652
22653         cat >> confdefs.h <<\EOF
22654 #define LBER_INT_T long
22655 EOF
22656
22657 else
22658         cat >> confdefs.h <<\EOF
22659 #define LBER_INT_T int
22660 EOF
22661
22662 fi
22663
22664 cat >> confdefs.h <<\EOF
22665 #define LBER_LEN_T long
22666 EOF
22667
22668 cat >> confdefs.h <<\EOF
22669 #define LBER_SOCKET_T int
22670 EOF
22671
22672 cat >> confdefs.h <<\EOF
22673 #define LBER_TAG_T long
22674 EOF
22675
22676
22677 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22678 echo "configure:22679: checking for 8-bit clean memcmp" >&5
22679 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22680   echo $ac_n "(cached) $ac_c" 1>&6
22681 else
22682   if test "$cross_compiling" = yes; then
22683   ac_cv_func_memcmp_clean=no
22684 else
22685   cat > conftest.$ac_ext <<EOF
22686 #line 22687 "configure"
22687 #include "confdefs.h"
22688
22689 main()
22690 {
22691   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22692   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22693 }
22694
22695 EOF
22696 if { (eval echo configure:22697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22697 then
22698   ac_cv_func_memcmp_clean=yes
22699 else
22700   echo "configure: failed program was:" >&5
22701   cat conftest.$ac_ext >&5
22702   rm -fr conftest*
22703   ac_cv_func_memcmp_clean=no
22704 fi
22705 rm -fr conftest*
22706 fi
22707
22708 fi
22709
22710 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22711 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22712
22713 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22714 echo "configure:22715: checking for strftime" >&5
22715 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22716   echo $ac_n "(cached) $ac_c" 1>&6
22717 else
22718   cat > conftest.$ac_ext <<EOF
22719 #line 22720 "configure"
22720 #include "confdefs.h"
22721 /* System header to define __stub macros and hopefully few prototypes,
22722     which can conflict with char strftime(); below.  */
22723 #include <assert.h>
22724 /* Override any gcc2 internal prototype to avoid an error.  */
22725 /* We use char because int might match the return type of a gcc2
22726     builtin and then its argument prototype would still apply.  */
22727 char strftime();
22728 char (*f)();
22729
22730 int main() {
22731
22732 /* The GNU C library defines this for functions which it implements
22733     to always fail with ENOSYS.  Some functions are actually named
22734     something starting with __ and the normal name is an alias.  */
22735 #if defined (__stub_strftime) || defined (__stub___strftime)
22736 choke me
22737 #else
22738 f = strftime;
22739 #endif
22740
22741 ; return 0; }
22742 EOF
22743 if { (eval echo configure:22744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22744   rm -rf conftest*
22745   eval "ac_cv_func_strftime=yes"
22746 else
22747   echo "configure: failed program was:" >&5
22748   cat conftest.$ac_ext >&5
22749   rm -rf conftest*
22750   eval "ac_cv_func_strftime=no"
22751 fi
22752 rm -f conftest*
22753 fi
22754
22755 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22756   echo "$ac_t""yes" 1>&6
22757   cat >> confdefs.h <<\EOF
22758 #define HAVE_STRFTIME 1
22759 EOF
22760
22761 else
22762   echo "$ac_t""no" 1>&6
22763 # strftime is in -lintl on SCO UNIX.
22764 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22765 echo "configure:22766: checking for strftime in -lintl" >&5
22766 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22768   echo $ac_n "(cached) $ac_c" 1>&6
22769 else
22770   ac_save_LIBS="$LIBS"
22771 LIBS="-lintl  $LIBS"
22772 cat > conftest.$ac_ext <<EOF
22773 #line 22774 "configure"
22774 #include "confdefs.h"
22775 /* Override any gcc2 internal prototype to avoid an error.  */
22776 /* We use char because int might match the return type of a gcc2
22777     builtin and then its argument prototype would still apply.  */
22778 char strftime();
22779
22780 int main() {
22781 strftime()
22782 ; return 0; }
22783 EOF
22784 if { (eval echo configure:22785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22785   rm -rf conftest*
22786   eval "ac_cv_lib_$ac_lib_var=yes"
22787 else
22788   echo "configure: failed program was:" >&5
22789   cat conftest.$ac_ext >&5
22790   rm -rf conftest*
22791   eval "ac_cv_lib_$ac_lib_var=no"
22792 fi
22793 rm -f conftest*
22794 LIBS="$ac_save_LIBS"
22795
22796 fi
22797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22798   echo "$ac_t""yes" 1>&6
22799   cat >> confdefs.h <<\EOF
22800 #define HAVE_STRFTIME 1
22801 EOF
22802
22803 LIBS="-lintl $LIBS"
22804 else
22805   echo "$ac_t""no" 1>&6
22806 fi
22807
22808 fi
22809
22810
22811 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22812 echo "configure:22813: checking for inet_aton()" >&5
22813 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22814   echo $ac_n "(cached) $ac_c" 1>&6
22815 else
22816   cat > conftest.$ac_ext <<EOF
22817 #line 22818 "configure"
22818 #include "confdefs.h"
22819
22820 #ifdef HAVE_SYS_TYPES_H
22821 #       include <sys/types.h>
22822 #endif
22823 #ifdef HAVE_SYS_SOCKET_H
22824 #       include <sys/socket.h>
22825 #       ifdef HAVE_SYS_SELECT_H
22826 #               include <sys/select.h>
22827 #       endif
22828 #       include <netinet/in.h>
22829 #       ifdef HAVE_ARPA_INET_H
22830 #               include <arpa/inet.h>
22831 #       endif
22832 #endif
22833
22834 int main() {
22835 struct in_addr in;
22836 int rc = inet_aton( "255.255.255.255", &in );
22837 ; return 0; }
22838 EOF
22839 if { (eval echo configure:22840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22840   rm -rf conftest*
22841   ol_cv_func_inet_aton=yes
22842 else
22843   echo "configure: failed program was:" >&5
22844   cat conftest.$ac_ext >&5
22845   rm -rf conftest*
22846   ol_cv_func_inet_aton=no
22847 fi
22848 rm -f conftest*
22849 fi
22850
22851 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22852   if test $ol_cv_func_inet_aton != no; then
22853     cat >> confdefs.h <<\EOF
22854 #define HAVE_INET_ATON 1
22855 EOF
22856
22857   fi
22858  
22859
22860 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22861 echo "configure:22862: checking for _spawnlp" >&5
22862 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22863   echo $ac_n "(cached) $ac_c" 1>&6
22864 else
22865   cat > conftest.$ac_ext <<EOF
22866 #line 22867 "configure"
22867 #include "confdefs.h"
22868 /* System header to define __stub macros and hopefully few prototypes,
22869     which can conflict with char _spawnlp(); below.  */
22870 #include <assert.h>
22871 /* Override any gcc2 internal prototype to avoid an error.  */
22872 /* We use char because int might match the return type of a gcc2
22873     builtin and then its argument prototype would still apply.  */
22874 char _spawnlp();
22875 char (*f)();
22876
22877 int main() {
22878
22879 /* The GNU C library defines this for functions which it implements
22880     to always fail with ENOSYS.  Some functions are actually named
22881     something starting with __ and the normal name is an alias.  */
22882 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22883 choke me
22884 #else
22885 f = _spawnlp;
22886 #endif
22887
22888 ; return 0; }
22889 EOF
22890 if { (eval echo configure:22891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22891   rm -rf conftest*
22892   eval "ac_cv_func__spawnlp=yes"
22893 else
22894   echo "configure: failed program was:" >&5
22895   cat conftest.$ac_ext >&5
22896   rm -rf conftest*
22897   eval "ac_cv_func__spawnlp=no"
22898 fi
22899 rm -f conftest*
22900 fi
22901
22902 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22903   echo "$ac_t""yes" 1>&6
22904   cat >> confdefs.h <<\EOF
22905 #define HAVE_SPAWNLP 1
22906 EOF
22907
22908 else
22909   echo "$ac_t""no" 1>&6
22910 fi
22911
22912
22913 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22914 echo "configure:22915: checking for _snprintf" >&5
22915 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22916   echo $ac_n "(cached) $ac_c" 1>&6
22917 else
22918   cat > conftest.$ac_ext <<EOF
22919 #line 22920 "configure"
22920 #include "confdefs.h"
22921 /* System header to define __stub macros and hopefully few prototypes,
22922     which can conflict with char _snprintf(); below.  */
22923 #include <assert.h>
22924 /* Override any gcc2 internal prototype to avoid an error.  */
22925 /* We use char because int might match the return type of a gcc2
22926     builtin and then its argument prototype would still apply.  */
22927 char _snprintf();
22928 char (*f)();
22929
22930 int main() {
22931
22932 /* The GNU C library defines this for functions which it implements
22933     to always fail with ENOSYS.  Some functions are actually named
22934     something starting with __ and the normal name is an alias.  */
22935 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22936 choke me
22937 #else
22938 f = _snprintf;
22939 #endif
22940
22941 ; return 0; }
22942 EOF
22943 if { (eval echo configure:22944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22944   rm -rf conftest*
22945   eval "ac_cv_func__snprintf=yes"
22946 else
22947   echo "configure: failed program was:" >&5
22948   cat conftest.$ac_ext >&5
22949   rm -rf conftest*
22950   eval "ac_cv_func__snprintf=no"
22951 fi
22952 rm -f conftest*
22953 fi
22954
22955 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22956   echo "$ac_t""yes" 1>&6
22957   ac_cv_func_snprintf=yes
22958         cat >> confdefs.h <<\EOF
22959 #define snprintf _snprintf
22960 EOF
22961
22962
22963 else
22964   echo "$ac_t""no" 1>&6
22965 fi
22966
22967
22968 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22969 echo "configure:22970: checking for _vsnprintf" >&5
22970 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22971   echo $ac_n "(cached) $ac_c" 1>&6
22972 else
22973   cat > conftest.$ac_ext <<EOF
22974 #line 22975 "configure"
22975 #include "confdefs.h"
22976 /* System header to define __stub macros and hopefully few prototypes,
22977     which can conflict with char _vsnprintf(); below.  */
22978 #include <assert.h>
22979 /* Override any gcc2 internal prototype to avoid an error.  */
22980 /* We use char because int might match the return type of a gcc2
22981     builtin and then its argument prototype would still apply.  */
22982 char _vsnprintf();
22983 char (*f)();
22984
22985 int main() {
22986
22987 /* The GNU C library defines this for functions which it implements
22988     to always fail with ENOSYS.  Some functions are actually named
22989     something starting with __ and the normal name is an alias.  */
22990 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22991 choke me
22992 #else
22993 f = _vsnprintf;
22994 #endif
22995
22996 ; return 0; }
22997 EOF
22998 if { (eval echo configure:22999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22999   rm -rf conftest*
23000   eval "ac_cv_func__vsnprintf=yes"
23001 else
23002   echo "configure: failed program was:" >&5
23003   cat conftest.$ac_ext >&5
23004   rm -rf conftest*
23005   eval "ac_cv_func__vsnprintf=no"
23006 fi
23007 rm -f conftest*
23008 fi
23009
23010 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23011   echo "$ac_t""yes" 1>&6
23012   ac_cv_func_vsnprintf=yes
23013         cat >> confdefs.h <<\EOF
23014 #define vsnprintf _vsnprintf
23015 EOF
23016
23017
23018 else
23019   echo "$ac_t""no" 1>&6
23020 fi
23021
23022
23023 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23024 echo "configure:23025: checking for vprintf" >&5
23025 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23026   echo $ac_n "(cached) $ac_c" 1>&6
23027 else
23028   cat > conftest.$ac_ext <<EOF
23029 #line 23030 "configure"
23030 #include "confdefs.h"
23031 /* System header to define __stub macros and hopefully few prototypes,
23032     which can conflict with char vprintf(); below.  */
23033 #include <assert.h>
23034 /* Override any gcc2 internal prototype to avoid an error.  */
23035 /* We use char because int might match the return type of a gcc2
23036     builtin and then its argument prototype would still apply.  */
23037 char vprintf();
23038 char (*f)();
23039
23040 int main() {
23041
23042 /* The GNU C library defines this for functions which it implements
23043     to always fail with ENOSYS.  Some functions are actually named
23044     something starting with __ and the normal name is an alias.  */
23045 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23046 choke me
23047 #else
23048 f = vprintf;
23049 #endif
23050
23051 ; return 0; }
23052 EOF
23053 if { (eval echo configure:23054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23054   rm -rf conftest*
23055   eval "ac_cv_func_vprintf=yes"
23056 else
23057   echo "configure: failed program was:" >&5
23058   cat conftest.$ac_ext >&5
23059   rm -rf conftest*
23060   eval "ac_cv_func_vprintf=no"
23061 fi
23062 rm -f conftest*
23063 fi
23064
23065 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23066   echo "$ac_t""yes" 1>&6
23067   cat >> confdefs.h <<\EOF
23068 #define HAVE_VPRINTF 1
23069 EOF
23070
23071 else
23072   echo "$ac_t""no" 1>&6
23073 fi
23074
23075 if test "$ac_cv_func_vprintf" != yes; then
23076 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23077 echo "configure:23078: checking for _doprnt" >&5
23078 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23079   echo $ac_n "(cached) $ac_c" 1>&6
23080 else
23081   cat > conftest.$ac_ext <<EOF
23082 #line 23083 "configure"
23083 #include "confdefs.h"
23084 /* System header to define __stub macros and hopefully few prototypes,
23085     which can conflict with char _doprnt(); below.  */
23086 #include <assert.h>
23087 /* Override any gcc2 internal prototype to avoid an error.  */
23088 /* We use char because int might match the return type of a gcc2
23089     builtin and then its argument prototype would still apply.  */
23090 char _doprnt();
23091 char (*f)();
23092
23093 int main() {
23094
23095 /* The GNU C library defines this for functions which it implements
23096     to always fail with ENOSYS.  Some functions are actually named
23097     something starting with __ and the normal name is an alias.  */
23098 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23099 choke me
23100 #else
23101 f = _doprnt;
23102 #endif
23103
23104 ; return 0; }
23105 EOF
23106 if { (eval echo configure:23107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23107   rm -rf conftest*
23108   eval "ac_cv_func__doprnt=yes"
23109 else
23110   echo "configure: failed program was:" >&5
23111   cat conftest.$ac_ext >&5
23112   rm -rf conftest*
23113   eval "ac_cv_func__doprnt=no"
23114 fi
23115 rm -f conftest*
23116 fi
23117
23118 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23119   echo "$ac_t""yes" 1>&6
23120   cat >> confdefs.h <<\EOF
23121 #define HAVE_DOPRNT 1
23122 EOF
23123
23124 else
23125   echo "$ac_t""no" 1>&6
23126 fi
23127
23128 fi
23129
23130
23131 if test $ac_cv_func_vprintf = yes ; then
23132                 for ac_func in snprintf vsnprintf
23133 do
23134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23135 echo "configure:23136: checking for $ac_func" >&5
23136 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23137   echo $ac_n "(cached) $ac_c" 1>&6
23138 else
23139   cat > conftest.$ac_ext <<EOF
23140 #line 23141 "configure"
23141 #include "confdefs.h"
23142 /* System header to define __stub macros and hopefully few prototypes,
23143     which can conflict with char $ac_func(); below.  */
23144 #include <assert.h>
23145 /* Override any gcc2 internal prototype to avoid an error.  */
23146 /* We use char because int might match the return type of a gcc2
23147     builtin and then its argument prototype would still apply.  */
23148 char $ac_func();
23149 char (*f)();
23150
23151 int main() {
23152
23153 /* The GNU C library defines this for functions which it implements
23154     to always fail with ENOSYS.  Some functions are actually named
23155     something starting with __ and the normal name is an alias.  */
23156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23157 choke me
23158 #else
23159 f = $ac_func;
23160 #endif
23161
23162 ; return 0; }
23163 EOF
23164 if { (eval echo configure:23165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23165   rm -rf conftest*
23166   eval "ac_cv_func_$ac_func=yes"
23167 else
23168   echo "configure: failed program was:" >&5
23169   cat conftest.$ac_ext >&5
23170   rm -rf conftest*
23171   eval "ac_cv_func_$ac_func=no"
23172 fi
23173 rm -f conftest*
23174 fi
23175
23176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23177   echo "$ac_t""yes" 1>&6
23178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23179   cat >> confdefs.h <<EOF
23180 #define $ac_tr_func 1
23181 EOF
23182  
23183 else
23184   echo "$ac_t""no" 1>&6
23185 fi
23186 done
23187
23188 fi
23189
23190 for ac_func in \
23191         bcopy                   \
23192         closesocket             \
23193         chroot                  \
23194         endgrent                \
23195         endpwent                \
23196         fcntl                   \
23197         flock                   \
23198         fstat                   \
23199         getdtablesize   \
23200         getgrgid                \
23201         gethostname             \
23202         getpass                 \
23203         getpassphrase   \
23204         getpwuid                \
23205         getpwnam                \
23206         getspnam                \
23207         gettimeofday    \
23208         initgroups              \
23209         lockf                   \
23210         memcpy                  \
23211         memmove                 \
23212         mkstemp                 \
23213         mktemp                  \
23214         pipe                    \
23215         read                    \
23216         recv                    \
23217         recvfrom                \
23218         setpwfile               \
23219         setgid                  \
23220         setegid                 \
23221         setsid                  \
23222         setuid                  \
23223         seteuid                 \
23224         sigaction               \
23225         signal                  \
23226         sigset                  \
23227         strdup                  \
23228         strerror                \
23229         strpbrk                 \
23230         strrchr                 \
23231         strsep                  \
23232         strstr                  \
23233         strtol                  \
23234         strtoul                 \
23235         strtoq                  \
23236         strtouq                 \
23237         strtoll                 \
23238         strspn                  \
23239         sysconf                 \
23240         usleep                  \
23241         waitpid                 \
23242         wait4                   \
23243         write                   \
23244         send                    \
23245         sendmsg                 \
23246         sendto                  \
23247
23248 do
23249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23250 echo "configure:23251: checking for $ac_func" >&5
23251 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23252   echo $ac_n "(cached) $ac_c" 1>&6
23253 else
23254   cat > conftest.$ac_ext <<EOF
23255 #line 23256 "configure"
23256 #include "confdefs.h"
23257 /* System header to define __stub macros and hopefully few prototypes,
23258     which can conflict with char $ac_func(); below.  */
23259 #include <assert.h>
23260 /* Override any gcc2 internal prototype to avoid an error.  */
23261 /* We use char because int might match the return type of a gcc2
23262     builtin and then its argument prototype would still apply.  */
23263 char $ac_func();
23264 char (*f)();
23265
23266 int main() {
23267
23268 /* The GNU C library defines this for functions which it implements
23269     to always fail with ENOSYS.  Some functions are actually named
23270     something starting with __ and the normal name is an alias.  */
23271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23272 choke me
23273 #else
23274 f = $ac_func;
23275 #endif
23276
23277 ; return 0; }
23278 EOF
23279 if { (eval echo configure:23280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23280   rm -rf conftest*
23281   eval "ac_cv_func_$ac_func=yes"
23282 else
23283   echo "configure: failed program was:" >&5
23284   cat conftest.$ac_ext >&5
23285   rm -rf conftest*
23286   eval "ac_cv_func_$ac_func=no"
23287 fi
23288 rm -f conftest*
23289 fi
23290
23291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23292   echo "$ac_t""yes" 1>&6
23293     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23294   cat >> confdefs.h <<EOF
23295 #define $ac_tr_func 1
23296 EOF
23297  
23298 else
23299   echo "$ac_t""no" 1>&6
23300 fi
23301 done
23302
23303
23304 for ac_func in getopt getpeereid
23305 do
23306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23307 echo "configure:23308: checking for $ac_func" >&5
23308 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23309   echo $ac_n "(cached) $ac_c" 1>&6
23310 else
23311   cat > conftest.$ac_ext <<EOF
23312 #line 23313 "configure"
23313 #include "confdefs.h"
23314 /* System header to define __stub macros and hopefully few prototypes,
23315     which can conflict with char $ac_func(); below.  */
23316 #include <assert.h>
23317 /* Override any gcc2 internal prototype to avoid an error.  */
23318 /* We use char because int might match the return type of a gcc2
23319     builtin and then its argument prototype would still apply.  */
23320 char $ac_func();
23321 char (*f)();
23322
23323 int main() {
23324
23325 /* The GNU C library defines this for functions which it implements
23326     to always fail with ENOSYS.  Some functions are actually named
23327     something starting with __ and the normal name is an alias.  */
23328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23329 choke me
23330 #else
23331 f = $ac_func;
23332 #endif
23333
23334 ; return 0; }
23335 EOF
23336 if { (eval echo configure:23337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23337   rm -rf conftest*
23338   eval "ac_cv_func_$ac_func=yes"
23339 else
23340   echo "configure: failed program was:" >&5
23341   cat conftest.$ac_ext >&5
23342   rm -rf conftest*
23343   eval "ac_cv_func_$ac_func=no"
23344 fi
23345 rm -f conftest*
23346 fi
23347
23348 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23349   echo "$ac_t""yes" 1>&6
23350     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23351   cat >> confdefs.h <<EOF
23352 #define $ac_tr_func 1
23353 EOF
23354  
23355 else
23356   echo "$ac_t""no" 1>&6
23357 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23358 fi
23359 done
23360
23361
23362
23363 if test "$ac_cv_func_getopt" != yes; then
23364         LIBSRCS="$LIBSRCS getopt.c"
23365 fi
23366 if test "$ac_cv_func_getpeereid" != yes; then
23367         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23368 echo "configure:23369: checking for msg_accrights in msghdr" >&5
23369 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23370   echo $ac_n "(cached) $ac_c" 1>&6
23371 else
23372   cat > conftest.$ac_ext <<EOF
23373 #line 23374 "configure"
23374 #include "confdefs.h"
23375 #include <sys/socket.h>
23376 int main() {
23377 struct msghdr m; m.msg_accrightslen=0
23378 ; return 0; }
23379 EOF
23380 if { (eval echo configure:23381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23381   rm -rf conftest*
23382   ol_cv_msghdr_msg_accrights=yes
23383 else
23384   echo "configure: failed program was:" >&5
23385   cat conftest.$ac_ext >&5
23386   rm -rf conftest*
23387   ol_cv_msghdr_msg_accrights=no
23388 fi
23389 rm -f conftest*
23390         
23391 fi
23392
23393 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23394   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23395         cat >> confdefs.h <<\EOF
23396 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23397 EOF
23398
23399   fi
23400
23401         LIBSRCS="$LIBSRCS getpeereid.c"
23402 fi
23403 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23404         if test "$ac_cv_func_snprintf" != yes; then
23405                 cat >> confdefs.h <<\EOF
23406 #define snprintf ber_pvt_snprintf
23407 EOF
23408
23409         fi
23410         if test "$ac_cv_func_vsnprintf" != yes; then
23411                 cat >> confdefs.h <<\EOF
23412 #define vsnprintf ber_pvt_vsnprintf
23413 EOF
23414
23415         fi
23416 fi
23417
23418 # Check Configuration
23419 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23420 echo "configure:23421: checking declaration of sys_errlist" >&5
23421 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23422   echo $ac_n "(cached) $ac_c" 1>&6
23423 else
23424   
23425         cat > conftest.$ac_ext <<EOF
23426 #line 23427 "configure"
23427 #include "confdefs.h"
23428
23429 #include <stdio.h>
23430 #include <sys/types.h>
23431 #include <errno.h>
23432 #ifdef WINNT
23433 #include <stdlib.h>
23434 #endif 
23435 int main() {
23436 char *c = (char *) *sys_errlist
23437 ; return 0; }
23438 EOF
23439 if { (eval echo configure:23440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23440   rm -rf conftest*
23441   ol_cv_dcl_sys_errlist=yes
23442         ol_cv_have_sys_errlist=yes
23443 else
23444   echo "configure: failed program was:" >&5
23445   cat conftest.$ac_ext >&5
23446   rm -rf conftest*
23447   ol_cv_dcl_sys_errlist=no
23448 fi
23449 rm -f conftest*
23450 fi
23451
23452 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23453 #
23454 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23455 if test $ol_cv_dcl_sys_errlist = no ; then
23456         cat >> confdefs.h <<\EOF
23457 #define DECL_SYS_ERRLIST 1
23458 EOF
23459
23460
23461         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23462 echo "configure:23463: checking existence of sys_errlist" >&5
23463 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23464   echo $ac_n "(cached) $ac_c" 1>&6
23465 else
23466   
23467                 cat > conftest.$ac_ext <<EOF
23468 #line 23469 "configure"
23469 #include "confdefs.h"
23470 #include <errno.h>
23471 int main() {
23472 char *c = (char *) *sys_errlist
23473 ; return 0; }
23474 EOF
23475 if { (eval echo configure:23476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23476   rm -rf conftest*
23477   ol_cv_have_sys_errlist=yes
23478 else
23479   echo "configure: failed program was:" >&5
23480   cat conftest.$ac_ext >&5
23481   rm -rf conftest*
23482   ol_cv_have_sys_errlist=no
23483 fi
23484 rm -f conftest*
23485 fi
23486
23487 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23488 fi
23489 if test $ol_cv_have_sys_errlist = yes ; then
23490         cat >> confdefs.h <<\EOF
23491 #define HAVE_SYS_ERRLIST 1
23492 EOF
23493
23494 fi
23495
23496
23497
23498 if test "$ol_enable_slapi" != no ; then
23499                         for ac_hdr in ltdl.h
23500 do
23501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23503 echo "configure:23504: checking for $ac_hdr" >&5
23504 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23505   echo $ac_n "(cached) $ac_c" 1>&6
23506 else
23507   cat > conftest.$ac_ext <<EOF
23508 #line 23509 "configure"
23509 #include "confdefs.h"
23510 #include <$ac_hdr>
23511 EOF
23512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23513 { (eval echo configure:23514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23515 if test -z "$ac_err"; then
23516   rm -rf conftest*
23517   eval "ac_cv_header_$ac_safe=yes"
23518 else
23519   echo "$ac_err" >&5
23520   echo "configure: failed program was:" >&5
23521   cat conftest.$ac_ext >&5
23522   rm -rf conftest*
23523   eval "ac_cv_header_$ac_safe=no"
23524 fi
23525 rm -f conftest*
23526 fi
23527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23528   echo "$ac_t""yes" 1>&6
23529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23530   cat >> confdefs.h <<EOF
23531 #define $ac_tr_hdr 1
23532 EOF
23533  
23534 else
23535   echo "$ac_t""no" 1>&6
23536 fi
23537 done
23538
23539
23540         if test $ac_cv_header_ltdl_h != yes ; then
23541                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23542         fi
23543         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23544 echo "configure:23545: checking for lt_dlinit in -lltdl" >&5
23545 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23547   echo $ac_n "(cached) $ac_c" 1>&6
23548 else
23549   ac_save_LIBS="$LIBS"
23550 LIBS="-lltdl  $LIBS"
23551 cat > conftest.$ac_ext <<EOF
23552 #line 23553 "configure"
23553 #include "confdefs.h"
23554 /* Override any gcc2 internal prototype to avoid an error.  */
23555 /* We use char because int might match the return type of a gcc2
23556     builtin and then its argument prototype would still apply.  */
23557 char lt_dlinit();
23558
23559 int main() {
23560 lt_dlinit()
23561 ; return 0; }
23562 EOF
23563 if { (eval echo configure:23564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23564   rm -rf conftest*
23565   eval "ac_cv_lib_$ac_lib_var=yes"
23566 else
23567   echo "configure: failed program was:" >&5
23568   cat conftest.$ac_ext >&5
23569   rm -rf conftest*
23570   eval "ac_cv_lib_$ac_lib_var=no"
23571 fi
23572 rm -f conftest*
23573 LIBS="$ac_save_LIBS"
23574
23575 fi
23576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23577   echo "$ac_t""yes" 1>&6
23578   
23579                 SLAPI_LIBS=-lltdl
23580                 LIBSLAPI=libslapi.a
23581                 LIBSLAPITOOLS=../libslapi.a
23582                 cat >> confdefs.h <<\EOF
23583 #define HAVE_LIBLTDL 1
23584 EOF
23585
23586         
23587 else
23588   echo "$ac_t""no" 1>&6
23589 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23590 fi
23591
23592
23593         cat >> confdefs.h <<\EOF
23594 #define LDAP_SLAPI 1
23595 EOF
23596
23597 fi
23598
23599 if test "$ol_enable_debug" != no ; then
23600         cat >> confdefs.h <<\EOF
23601 #define LDAP_DEBUG 1
23602 EOF
23603
23604 fi
23605 if test "$ol_enable_syslog" = yes ; then
23606         cat >> confdefs.h <<\EOF
23607 #define LDAP_SYSLOG 1
23608 EOF
23609
23610 fi
23611 if test "$ol_link_kbind" != no ; then
23612         cat >> confdefs.h <<\EOF
23613 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23614 EOF
23615
23616 fi
23617 if test "$ol_enable_proctitle" != no ; then
23618         cat >> confdefs.h <<\EOF
23619 #define LDAP_PROCTITLE 1
23620 EOF
23621
23622 fi
23623 if test "$ol_enable_referrals" != no ; then
23624         cat >> confdefs.h <<\EOF
23625 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23626 EOF
23627
23628 fi
23629 if test "$ol_enable_local" != no; then
23630         cat >> confdefs.h <<\EOF
23631 #define LDAP_PF_LOCAL 1
23632 EOF
23633
23634 fi
23635 if test "$ol_link_ipv6" != no; then
23636         cat >> confdefs.h <<\EOF
23637 #define LDAP_PF_INET6 1
23638 EOF
23639
23640 fi
23641 if test "$ol_enable_cleartext" != no ; then
23642         cat >> confdefs.h <<\EOF
23643 #define SLAPD_CLEARTEXT 1
23644 EOF
23645
23646 fi
23647 if test "$ol_enable_crypt" != no ; then
23648         cat >> confdefs.h <<\EOF
23649 #define SLAPD_CRYPT 1
23650 EOF
23651
23652 fi
23653 if test "$ol_link_kpasswd" != no ; then
23654         cat >> confdefs.h <<\EOF
23655 #define SLAPD_KPASSWD 1
23656 EOF
23657
23658 fi
23659 if test "$ol_link_spasswd" != no ; then
23660         cat >> confdefs.h <<\EOF
23661 #define SLAPD_SPASSWD 1
23662 EOF
23663
23664 fi
23665 if test "$ol_enable_multimaster" != no ; then
23666         cat >> confdefs.h <<\EOF
23667 #define SLAPD_MULTIMASTER 1
23668 EOF
23669
23670 fi
23671 if test "$ol_enable_rlookups" != no ; then
23672         cat >> confdefs.h <<\EOF
23673 #define SLAPD_RLOOKUPS 1
23674 EOF
23675
23676 fi
23677 if test "$ol_enable_aci" != no ; then
23678         cat >> confdefs.h <<\EOF
23679 #define SLAPD_ACI_ENABLED 1
23680 EOF
23681
23682 fi
23683
23684 if test "$ol_link_modules" != no ; then
23685         cat >> confdefs.h <<\EOF
23686 #define SLAPD_MODULES 1
23687 EOF
23688
23689         BUILD_SLAPD=yes
23690         SLAPD_MODULES_LDFLAGS="-dlopen self"
23691 fi
23692
23693 cat >> confdefs.h <<\EOF
23694 #define SLAPD_MOD_STATIC 1
23695 EOF
23696
23697 cat >> confdefs.h <<\EOF
23698 #define SLAPD_MOD_DYNAMIC 2
23699 EOF
23700
23701
23702 if test "$ol_enable_bdb" != no ; then
23703         cat >> confdefs.h <<\EOF
23704 #define SLAPD_BDB 1
23705 EOF
23706
23707         BUILD_SLAPD=yes
23708         BUILD_BDB=yes
23709         if test "$ol_with_bdb_module" != static ; then
23710                 cat >> confdefs.h <<\EOF
23711 #define SLAPD_BDB_DYNAMIC 1
23712 EOF
23713
23714                 BUILD_BDB=mod
23715                 BUILD_BDB_DYNAMIC=shared
23716                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23717         else
23718                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23719         fi
23720 fi
23721
23722 if test "$ol_link_dnssrv" != no ; then
23723         cat >> confdefs.h <<\EOF
23724 #define SLAPD_DNSSRV 1
23725 EOF
23726
23727         BUILD_SLAPD=yes
23728         BUILD_DNSSRV=yes
23729         if test "$ol_with_dnssrv_module" != static ; then
23730                 cat >> confdefs.h <<\EOF
23731 #define SLAPD_DNSSRV_DYNAMIC 1
23732 EOF
23733
23734                 BUILD_DNSSRV=mod
23735                 BUILD_DNSSRV_DYNAMIC=shared
23736                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23737         else
23738                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23739         fi
23740 fi
23741
23742 if test "$ol_enable_hdb" != no ; then
23743         cat >> confdefs.h <<\EOF
23744 #define SLAPD_HDB 1
23745 EOF
23746
23747         BUILD_SLAPD=yes
23748         BUILD_HDB=yes
23749         if test "$ol_with_hdb_module" != static ; then
23750                 cat >> confdefs.h <<\EOF
23751 #define SLAPD_HDB_DYNAMIC 1
23752 EOF
23753
23754                 BUILD_HDB=mod
23755                 BUILD_HDB_DYNAMIC=shared
23756                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23757         else
23758                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23759         fi
23760 fi
23761
23762 if test "$ol_enable_ldap" != no ; then
23763         cat >> confdefs.h <<\EOF
23764 #define SLAPD_LDAP 1
23765 EOF
23766
23767         BUILD_SLAPD=yes
23768         BUILD_LDAP=yes
23769         if test "$ol_with_ldap_module" != static ; then
23770                 cat >> confdefs.h <<\EOF
23771 #define SLAPD_LDAP_DYNAMIC 1
23772 EOF
23773
23774                 BUILD_LDAP=mod
23775                 BUILD_LDAP_DYNAMIC=shared
23776                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23777         else
23778                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23779         fi
23780 fi
23781
23782 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23783         cat >> confdefs.h <<\EOF
23784 #define SLAPD_LDBM 1
23785 EOF
23786
23787         BUILD_SLAPD=yes
23788         BUILD_LDBM=yes
23789         if test "$ol_with_ldbm_module" != static ; then
23790                 cat >> confdefs.h <<\EOF
23791 #define SLAPD_LDBM_DYNAMIC 1
23792 EOF
23793
23794                 BUILD_LDBM=mod
23795                 BUILD_LDBM_DYNAMIC=shared
23796                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23797         else
23798                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23799         fi
23800 fi
23801
23802 if test "$ol_enable_meta" != no ; then
23803         if test "$ol_enable_ldap" = no ; then
23804                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23805         fi
23806         if test "$ol_enable_rewrite" = no ; then
23807                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23808         fi
23809         cat >> confdefs.h <<\EOF
23810 #define SLAPD_META 1
23811 EOF
23812
23813         BUILD_SLAPD=yes
23814         BUILD_META=yes
23815         BUILD_REWRITE=yes
23816         if test "$ol_with_meta_module" != static ; then
23817                 cat >> confdefs.h <<\EOF
23818 #define SLAPD_META_DYNAMIC 1
23819 EOF
23820
23821                 BUILD_META=mod
23822                 BUILD_META_DYNAMIC=shared
23823                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23824         else
23825                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23826         fi
23827 fi
23828
23829 if test "$ol_enable_monitor" != no ; then
23830         cat >> confdefs.h <<\EOF
23831 #define SLAPD_MONITOR 1
23832 EOF
23833
23834         BUILD_SLAPD=yes
23835         BUILD_MONITOR=yes
23836         if test "$ol_with_monitor_module" != static ; then
23837                 cat >> confdefs.h <<\EOF
23838 #define SLAPD_MONITOR_DYNAMIC 1
23839 EOF
23840
23841                 BUILD_MONITOR=mod
23842                 BUILD_MONITOR_DYNAMIC=shared
23843                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23844         else
23845                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23846         fi
23847 fi
23848
23849 if test "$ol_enable_null" != no ; then
23850         cat >> confdefs.h <<\EOF
23851 #define SLAPD_NULL 1
23852 EOF
23853
23854         BUILD_SLAPD=yes
23855         BUILD_NULL=yes
23856         if test "$ol_with_null_module" != static ; then
23857                 cat >> confdefs.h <<\EOF
23858 #define SLAPD_NULL_DYNAMIC 1
23859 EOF
23860
23861                 BUILD_NULL=mod
23862                 BUILD_NULL_DYNAMIC=shared
23863                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23864         else
23865                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23866         fi
23867 fi
23868
23869 if test "$ol_enable_passwd" != no ; then
23870         cat >> confdefs.h <<\EOF
23871 #define SLAPD_PASSWD 1
23872 EOF
23873
23874         BUILD_SLAPD=yes
23875         BUILD_PASSWD=yes
23876         if test "$ol_with_passwd_module" != static ; then
23877                 cat >> confdefs.h <<\EOF
23878 #define SLAPD_PASSWD_DYNAMIC 1
23879 EOF
23880
23881                 BUILD_PASSWD=mod
23882                 BUILD_PASSWD_DYNAMIC=shared
23883                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23884         else
23885                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23886         fi
23887 fi
23888
23889 if test "$ol_link_perl" != no ; then
23890         cat >> confdefs.h <<\EOF
23891 #define SLAPD_PERL 1
23892 EOF
23893
23894         BUILD_SLAPD=yes
23895         BUILD_PERL=yes
23896         if test "$ol_with_perl_module" != static ; then
23897                 cat >> confdefs.h <<\EOF
23898 #define SLAPD_PERL_DYNAMIC 1
23899 EOF
23900
23901                 BUILD_PERL=mod
23902                 BUILD_PERL_DYNAMIC=shared
23903                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23904         else
23905                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23906         fi
23907 fi
23908
23909 if test "$ol_enable_shell" != no ; then
23910         if test "$ol_link_thread" != no ; then
23911                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23912         fi
23913         cat >> confdefs.h <<\EOF
23914 #define SLAPD_SHELL 1
23915 EOF
23916
23917         BUILD_SLAPD=yes
23918         BUILD_SHELL=yes
23919         if test "$ol_with_shell_module" != static ; then
23920                 cat >> confdefs.h <<\EOF
23921 #define SLAPD_SHELL_DYNAMIC 1
23922 EOF
23923
23924                 BUILD_SHELL=mod
23925                 BUILD_SHELL_DYNAMIC=shared
23926                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23927         else
23928                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23929         fi
23930 fi
23931
23932 if test "$ol_link_sql" != no ; then
23933         cat >> confdefs.h <<\EOF
23934 #define SLAPD_SQL 1
23935 EOF
23936
23937         BUILD_SLAPD=yes
23938         BUILD_SQL=yes
23939         if test "$ol_with_sql_module" != static; then
23940                 cat >> confdefs.h <<\EOF
23941 #define SLAPD_SQL_DYNAMIC 1
23942 EOF
23943
23944                 BUILD_SQL=mod
23945                 BUILD_SQL_DYNAMIC=shared
23946                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23947         else
23948                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23949         fi
23950 fi
23951
23952 if test "$ol_with_dyngroup" != no ; then
23953         BUILD_DYNGROUP=$ol_with_dyngroup
23954         if test "$ol_with_dyngroup" = mod ; then
23955                 MFLAG=SLAPD_MOD_DYNAMIC
23956                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23957         else
23958                 MFLAG=SLAPD_MOD_STATIC
23959         fi
23960         cat >> confdefs.h <<EOF
23961 #define SLAPD_OVER_DYNGROUP $MFLAG
23962 EOF
23963
23964 fi
23965
23966 if test "$ol_with_proxycache" != no ; then
23967         BUILD_PROXYCACHE=$ol_with_proxycache
23968         if test "$ol_with_proxycache" = mod ; then
23969                 MFLAG=SLAPD_MOD_DYNAMIC
23970                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23971         else
23972                 MFLAG=SLAPD_MOD_STATIC
23973         fi
23974         cat >> confdefs.h <<EOF
23975 #define SLAPD_OVER_PROXYCACHE $MFLAG
23976 EOF
23977
23978 fi
23979
23980 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23981         $BUILD_SLAPD = yes ; then
23982         BUILD_SLURPD=yes
23983 fi
23984
23985 if test "$ol_enable_rewrite" != no ; then
23986         cat >> confdefs.h <<\EOF
23987 #define ENABLE_REWRITE 1
23988 EOF
23989
23990         BUILD_REWRITE=yes
23991 fi
23992
23993 if test "$ol_enable_slapi" != no ; then
23994         cat >> confdefs.h <<\EOF
23995 #define ENABLE_SLAPI 1
23996 EOF
23997
23998         BUILD_SLAPI=yes
23999         SLAPD_SLAPI_DEPEND=libslapi.a
24000 fi
24001
24002
24003
24004 if test "$ac_cv_mingw32" = yes ; then
24005         PLAT=NT
24006         SLAPD_MODULES_LDFLAGS=
24007 else
24008         PLAT=UNIX
24009 fi
24010
24011 if test -z "$SLAPD_STATIC_BACKENDS"; then
24012         SLAPD_NO_STATIC='#'
24013 else
24014         SLAPD_NO_STATIC=
24015 fi
24016
24017
24018
24019
24020
24021
24022
24023   
24024   
24025   
24026   
24027   
24028   
24029   
24030   
24031   
24032   
24033   
24034   
24035   
24036   
24037   
24038   
24039   
24040   
24041   
24042   
24043   
24044   
24045   
24046   
24047   
24048   
24049   
24050   
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090 # Check whether --with-xxinstall or --without-xxinstall was given.
24091 if test "${with_xxinstall+set}" = set; then
24092   withval="$with_xxinstall"
24093   :
24094 fi
24095
24096
24097
24098 trap '' 1 2 15
24099
24100 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24101
24102 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24103 # Let make expand exec_prefix.
24104 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24105
24106 # Any assignment to VPATH causes Sun make to only execute
24107 # the first set of double-colon rules, so remove it if not needed.
24108 # If there is a colon in the path, we need to keep it.
24109 if test "x$srcdir" = x.; then
24110   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24111 fi
24112
24113 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24114
24115 DEFS=-DHAVE_CONFIG_H
24116
24117 # Without the "./", some shells look in PATH for config.status.
24118 : ${CONFIG_STATUS=./config.status}
24119
24120 echo creating $CONFIG_STATUS
24121 rm -f $CONFIG_STATUS
24122 cat > $CONFIG_STATUS <<EOF
24123 #! /bin/sh
24124 # Generated automatically by configure.
24125 # Run this file to recreate the current configuration.
24126 # This directory was configured as follows,
24127 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24128 #
24129 # $0 $ac_configure_args
24130 #
24131 # Compiler output produced by configure, useful for debugging
24132 # configure, is in ./config.log if it exists.
24133
24134 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24135 for ac_option
24136 do
24137   case "\$ac_option" in
24138   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24139     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24140     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24141   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24142     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24143     exit 0 ;;
24144   -help | --help | --hel | --he | --h)
24145     echo "\$ac_cs_usage"; exit 0 ;;
24146   *) echo "\$ac_cs_usage"; exit 1 ;;
24147   esac
24148 done
24149
24150 ac_given_srcdir=$srcdir
24151 ac_given_INSTALL="$INSTALL"
24152
24153 trap 'rm -fr `echo "\
24154 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24155 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24156 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24157 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24158 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24159 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24160 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24161 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24162 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24163 include/Makefile:build/top.mk:include/Makefile.in \
24164 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24165 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24166 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24167 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24168 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24169 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24170 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24171 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24172 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24173 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24174 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24175 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24176 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24177 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24178 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24179 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24180 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24181 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24182 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24183 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24184 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24185 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24186 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24187 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24188 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24189 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24190 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24191 tests/run \
24192 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24193  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24194 EOF
24195 cat >> $CONFIG_STATUS <<EOF
24196
24197 # Protect against being on the right side of a sed subst in config.status.
24198 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24199  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24200 $ac_vpsub
24201 $extrasub
24202 s%@SHELL@%$SHELL%g
24203 s%@CFLAGS@%$CFLAGS%g
24204 s%@CPPFLAGS@%$CPPFLAGS%g
24205 s%@CXXFLAGS@%$CXXFLAGS%g
24206 s%@FFLAGS@%$FFLAGS%g
24207 s%@DEFS@%$DEFS%g
24208 s%@LDFLAGS@%$LDFLAGS%g
24209 s%@LIBS@%$LIBS%g
24210 s%@exec_prefix@%$exec_prefix%g
24211 s%@prefix@%$prefix%g
24212 s%@program_transform_name@%$program_transform_name%g
24213 s%@bindir@%$bindir%g
24214 s%@sbindir@%$sbindir%g
24215 s%@libexecdir@%$libexecdir%g
24216 s%@datadir@%$datadir%g
24217 s%@sysconfdir@%$sysconfdir%g
24218 s%@sharedstatedir@%$sharedstatedir%g
24219 s%@localstatedir@%$localstatedir%g
24220 s%@libdir@%$libdir%g
24221 s%@includedir@%$includedir%g
24222 s%@oldincludedir@%$oldincludedir%g
24223 s%@infodir@%$infodir%g
24224 s%@mandir@%$mandir%g
24225 s%@host@%$host%g
24226 s%@host_alias@%$host_alias%g
24227 s%@host_cpu@%$host_cpu%g
24228 s%@host_vendor@%$host_vendor%g
24229 s%@host_os@%$host_os%g
24230 s%@target@%$target%g
24231 s%@target_alias@%$target_alias%g
24232 s%@target_cpu@%$target_cpu%g
24233 s%@target_vendor@%$target_vendor%g
24234 s%@target_os@%$target_os%g
24235 s%@build@%$build%g
24236 s%@build_alias@%$build_alias%g
24237 s%@build_cpu@%$build_cpu%g
24238 s%@build_vendor@%$build_vendor%g
24239 s%@build_os@%$build_os%g
24240 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24241 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24242 s%@INSTALL_DATA@%$INSTALL_DATA%g
24243 s%@PACKAGE@%$PACKAGE%g
24244 s%@VERSION@%$VERSION%g
24245 s%@ACLOCAL@%$ACLOCAL%g
24246 s%@AUTOCONF@%$AUTOCONF%g
24247 s%@AUTOMAKE@%$AUTOMAKE%g
24248 s%@AUTOHEADER@%$AUTOHEADER%g
24249 s%@MAKEINFO@%$MAKEINFO%g
24250 s%@install_sh@%$install_sh%g
24251 s%@AMTAR@%$AMTAR%g
24252 s%@AWK@%$AWK%g
24253 s%@AMTARFLAGS@%$AMTARFLAGS%g
24254 s%@SET_MAKE@%$SET_MAKE%g
24255 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24256 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24257 s%@top_builddir@%$top_builddir%g
24258 s%@ldap_subdir@%$ldap_subdir%g
24259 s%@CC@%$CC%g
24260 s%@AR@%$AR%g
24261 s%@LN_S@%$LN_S%g
24262 s%@OBJEXT@%$OBJEXT%g
24263 s%@EXEEXT@%$EXEEXT%g
24264 s%@ECHO@%$ECHO%g
24265 s%@RANLIB@%$RANLIB%g
24266 s%@STRIP@%$STRIP%g
24267 s%@DLLTOOL@%$DLLTOOL%g
24268 s%@AS@%$AS%g
24269 s%@OBJDUMP@%$OBJDUMP%g
24270 s%@CPP@%$CPP%g
24271 s%@LIBTOOL@%$LIBTOOL%g
24272 s%@LN_H@%$LN_H%g
24273 s%@PERLBIN@%$PERLBIN%g
24274 s%@OL_MKDEP@%$OL_MKDEP%g
24275 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24276 s%@LTSTATIC@%$LTSTATIC%g
24277 s%@LIBOBJS@%$LIBOBJS%g
24278 s%@LIBSRCS@%$LIBSRCS%g
24279 s%@PLAT@%$PLAT%g
24280 s%@WITH_TLS@%$WITH_TLS%g
24281 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24282 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24283 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24284 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24285 s%@BUILD_BDB@%$BUILD_BDB%g
24286 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24287 s%@BUILD_HDB@%$BUILD_HDB%g
24288 s%@BUILD_LDAP@%$BUILD_LDAP%g
24289 s%@BUILD_LDBM@%$BUILD_LDBM%g
24290 s%@BUILD_META@%$BUILD_META%g
24291 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24292 s%@BUILD_NULL@%$BUILD_NULL%g
24293 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24294 s%@BUILD_PERL@%$BUILD_PERL%g
24295 s%@BUILD_SHELL@%$BUILD_SHELL%g
24296 s%@BUILD_SQL@%$BUILD_SQL%g
24297 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24298 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24299 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24300 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24301 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24302 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24303 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24304 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24305 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24306 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24307 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24308 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24309 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24310 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24311 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24312 s%@LDAP_LIBS@%$LDAP_LIBS%g
24313 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24314 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24315 s%@LDBM_LIBS@%$LDBM_LIBS%g
24316 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24317 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24318 s%@WRAP_LIBS@%$WRAP_LIBS%g
24319 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24320 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24321 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24322 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24323 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24324 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24325 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24326 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24327 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24328 s%@KRB4_LIBS@%$KRB4_LIBS%g
24329 s%@KRB5_LIBS@%$KRB5_LIBS%g
24330 s%@SASL_LIBS@%$SASL_LIBS%g
24331 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
24332 s%@TLS_LIBS@%$TLS_LIBS%g
24333 s%@MODULES_LIBS@%$MODULES_LIBS%g
24334 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24335 s%@LIBSLAPI@%$LIBSLAPI%g
24336 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24337 s%@AUTH_LIBS@%$AUTH_LIBS%g
24338 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24339 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24340 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24341 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24342
24343 CEOF
24344 EOF
24345
24346 cat >> $CONFIG_STATUS <<\EOF
24347
24348 # Split the substitutions into bite-sized pieces for seds with
24349 # small command number limits, like on Digital OSF/1 and HP-UX.
24350 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24351 ac_file=1 # Number of current file.
24352 ac_beg=1 # First line for current file.
24353 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24354 ac_more_lines=:
24355 ac_sed_cmds=""
24356 while $ac_more_lines; do
24357   if test $ac_beg -gt 1; then
24358     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24359   else
24360     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24361   fi
24362   if test ! -s conftest.s$ac_file; then
24363     ac_more_lines=false
24364     rm -f conftest.s$ac_file
24365   else
24366     if test -z "$ac_sed_cmds"; then
24367       ac_sed_cmds="sed -f conftest.s$ac_file"
24368     else
24369       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24370     fi
24371     ac_file=`expr $ac_file + 1`
24372     ac_beg=$ac_end
24373     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24374   fi
24375 done
24376 if test -z "$ac_sed_cmds"; then
24377   ac_sed_cmds=cat
24378 fi
24379 EOF
24380
24381 cat >> $CONFIG_STATUS <<EOF
24382
24383 CONFIG_FILES=\${CONFIG_FILES-"\
24384 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24385 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24386 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24387 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24388 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24389 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24390 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24391 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24392 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24393 include/Makefile:build/top.mk:include/Makefile.in \
24394 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24395 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24396 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24397 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24398 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24399 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24400 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24401 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24402 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24403 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24404 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24405 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24406 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24407 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24408 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24409 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24410 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24411 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24412 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24413 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24414 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24415 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24416 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24417 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24418 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24419 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24420 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24421 tests/run \
24422 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24423 "}
24424 EOF
24425 cat >> $CONFIG_STATUS <<\EOF
24426 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24427   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24428   case "$ac_file" in
24429   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24430        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24431   *) ac_file_in="${ac_file}.in" ;;
24432   esac
24433
24434   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24435
24436   # Remove last slash and all that follows it.  Not all systems have dirname.
24437   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24438   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24439     # The file is in a subdirectory.
24440     test ! -d "$ac_dir" && mkdir "$ac_dir"
24441     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24442     # A "../" for each directory in $ac_dir_suffix.
24443     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24444   else
24445     ac_dir_suffix= ac_dots=
24446   fi
24447
24448   case "$ac_given_srcdir" in
24449   .)  srcdir=.
24450       if test -z "$ac_dots"; then top_srcdir=.
24451       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24452   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24453   *) # Relative path.
24454     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24455     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24456   esac
24457
24458   case "$ac_given_INSTALL" in
24459   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24460   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24461   esac
24462
24463   echo creating "$ac_file"
24464   rm -f "$ac_file"
24465   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24466   case "$ac_file" in
24467   *[Mm]akefile*) ac_comsub="1i\\
24468 # $configure_input" ;;
24469   *) ac_comsub= ;;
24470   esac
24471
24472   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24473   sed -e "$ac_comsub
24474 s%@configure_input@%$configure_input%g
24475 s%@srcdir@%$srcdir%g
24476 s%@top_srcdir@%$top_srcdir%g
24477 s%@INSTALL@%$INSTALL%g
24478 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24479 fi; done
24480 rm -f conftest.s*
24481
24482 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24483 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24484 #
24485 # ac_d sets the value in "#define NAME VALUE" lines.
24486 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24487 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24488 ac_dC='\3'
24489 ac_dD='%g'
24490 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24491 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24492 ac_uB='\([      ]\)%\1#\2define\3'
24493 ac_uC=' '
24494 ac_uD='\4%g'
24495 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24496 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24497 ac_eB='$%\1#\2define\3'
24498 ac_eC=' '
24499 ac_eD='%g'
24500
24501 if test "${CONFIG_HEADERS+set}" != set; then
24502 EOF
24503 cat >> $CONFIG_STATUS <<EOF
24504   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24505 EOF
24506 cat >> $CONFIG_STATUS <<\EOF
24507 fi
24508 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24509   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24510   case "$ac_file" in
24511   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24512        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24513   *) ac_file_in="${ac_file}.in" ;;
24514   esac
24515
24516   echo creating $ac_file
24517
24518   rm -f conftest.frag conftest.in conftest.out
24519   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24520   cat $ac_file_inputs > conftest.in
24521
24522 EOF
24523
24524 # Transform confdefs.h into a sed script conftest.vals that substitutes
24525 # the proper values into config.h.in to produce config.h.  And first:
24526 # Protect against being on the right side of a sed subst in config.status.
24527 # Protect against being in an unquoted here document in config.status.
24528 rm -f conftest.vals
24529 cat > conftest.hdr <<\EOF
24530 s/[\\&%]/\\&/g
24531 s%[\\$`]%\\&%g
24532 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24533 s%ac_d%ac_u%gp
24534 s%ac_u%ac_e%gp
24535 EOF
24536 sed -n -f conftest.hdr confdefs.h > conftest.vals
24537 rm -f conftest.hdr
24538
24539 # This sed command replaces #undef with comments.  This is necessary, for
24540 # example, in the case of _POSIX_SOURCE, which is predefined and required
24541 # on some systems where configure will not decide to define it.
24542 cat >> conftest.vals <<\EOF
24543 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24544 EOF
24545
24546 # Break up conftest.vals because some shells have a limit on
24547 # the size of here documents, and old seds have small limits too.
24548
24549 rm -f conftest.tail
24550 while :
24551 do
24552   ac_lines=`grep -c . conftest.vals`
24553   # grep -c gives empty output for an empty file on some AIX systems.
24554   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24555   # Write a limited-size here document to conftest.frag.
24556   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24557   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24558   echo 'CEOF
24559   sed -f conftest.frag conftest.in > conftest.out
24560   rm -f conftest.in
24561   mv conftest.out conftest.in
24562 ' >> $CONFIG_STATUS
24563   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24564   rm -f conftest.vals
24565   mv conftest.tail conftest.vals
24566 done
24567 rm -f conftest.vals
24568
24569 cat >> $CONFIG_STATUS <<\EOF
24570   rm -f conftest.frag conftest.h
24571   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24572   cat conftest.in >> conftest.h
24573   rm -f conftest.in
24574   if cmp -s $ac_file conftest.h 2>/dev/null; then
24575     echo "$ac_file is unchanged"
24576     rm -f conftest.h
24577   else
24578     # Remove last slash and all that follows it.  Not all systems have dirname.
24579       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24580       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24581       # The file is in a subdirectory.
24582       test ! -d "$ac_dir" && mkdir "$ac_dir"
24583     fi
24584     rm -f $ac_file
24585     mv conftest.h $ac_file
24586   fi
24587 fi; done
24588
24589 EOF
24590 cat >> $CONFIG_STATUS <<EOF
24591
24592 EOF
24593 cat >> $CONFIG_STATUS <<\EOF
24594
24595 chmod +x tests/run
24596 date > stamp-h
24597 echo Please run \"make depend\" to build dependencies
24598
24599 exit 0
24600 EOF
24601 chmod +x $CONFIG_STATUS
24602 rm -fr confdefs* $ac_clean_files
24603 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24604