]> git.sur5r.net Git - openldap/blob - configure
further cleanup of search data upon exit, abandon, cancel
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.546 2004/09/26 20:58:47 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 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-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-chain        LDAP Chain Response no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
146 ac_help="$ac_help
147
148 SLURPD (Replication Daemon) Options:"
149 ac_help="$ac_help
150   --enable-slurpd         enable building slurpd [auto]"
151 ac_help="$ac_help
152
153 Library Generation & Linking Options"
154 ac_help="$ac_help
155   --enable-static[=PKGS]  build static libraries [default=yes]"
156 ac_help="$ac_help
157   --enable-shared[=PKGS]  build shared libraries [default=yes]"
158 ac_help="$ac_help
159   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
160 ac_help="$ac_help
161   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
162
163 # Find the correct PATH separator.  Usually this is `:', but
164 # DJGPP uses `;' like DOS.
165 if test "X${PATH_SEPARATOR+set}" != Xset; then
166   UNAME=${UNAME-`uname 2>/dev/null`}
167   case X$UNAME in
168     *-DOS) lt_cv_sys_path_separator=';' ;;
169     *)     lt_cv_sys_path_separator=':' ;;
170   esac
171   PATH_SEPARATOR=$lt_cv_sys_path_separator
172 fi
173
174
175 # Check that we are running under the correct shell.
176 SHELL=${CONFIG_SHELL-/bin/sh}
177
178 case X$ECHO in
179 X*--fallback-echo)
180   # Remove one level of quotation (which was required for Make).
181   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
182   ;;
183 esac
184
185 echo=${ECHO-echo}
186 if test "X$1" = X--no-reexec; then
187   # Discard the --no-reexec flag, and continue.
188   shift
189 elif test "X$1" = X--fallback-echo; then
190   # Avoid inline document here, it may be left over
191   :
192 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
193   # Yippee, $echo works!
194   :
195 else
196   # Restart under the correct shell.
197   exec $SHELL "$0" --no-reexec ${1+"$@"}
198 fi
199
200 if test "X$1" = X--fallback-echo; then
201   # used as fallback echo
202   shift
203   cat <<EOF
204
205 EOF
206   exit 0
207 fi
208
209 # The HP-UX ksh and POSIX shell print the target directory to stdout
210 # if CDPATH is set.
211 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
212
213 if test -z "$ECHO"; then
214 if test "X${echo_test_string+set}" != Xset; then
215 # find a string as large as possible, as long as the shell can cope with it
216   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
217     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
218     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
219        echo_test_string="`eval $cmd`" &&
220        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
221     then
222       break
223     fi
224   done
225 fi
226
227 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
228    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
229    test "X$echo_testing_string" = "X$echo_test_string"; then
230   :
231 else
232   # The Solaris, AIX, and Digital Unix default echo programs unquote
233   # backslashes.  This makes it impossible to quote backslashes using
234   #   echo "$something" | sed 's/\\/\\\\/g'
235   #
236   # So, first we look for a working echo in the user's PATH.
237
238   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
239   for dir in $PATH /usr/ucb; do
240     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
241        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       echo="$dir/echo"
245       break
246     fi
247   done
248   IFS="$save_ifs"
249
250   if test "X$echo" = Xecho; then
251     # We didn't find a better echo, so look for alternatives.
252     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
253        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
254        test "X$echo_testing_string" = "X$echo_test_string"; then
255       # This shell has a builtin print -r that does the trick.
256       echo='print -r'
257     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
258          test "X$CONFIG_SHELL" != X/bin/ksh; then
259       # If we have ksh, try running configure again with it.
260       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
261       export ORIGINAL_CONFIG_SHELL
262       CONFIG_SHELL=/bin/ksh
263       export CONFIG_SHELL
264       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
265     else
266       # Try using printf.
267       echo='printf %s\n'
268       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
269          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
270          test "X$echo_testing_string" = "X$echo_test_string"; then
271         # Cool, printf works
272         :
273       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
278         export CONFIG_SHELL
279         SHELL="$CONFIG_SHELL"
280         export SHELL
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
283            test "X$echo_testing_string" = 'X\t' &&
284            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
285            test "X$echo_testing_string" = "X$echo_test_string"; then
286         echo="$CONFIG_SHELL $0 --fallback-echo"
287       else
288         # maybe with a smaller string...
289         prev=:
290
291         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
292           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
293           then
294             break
295           fi
296           prev="$cmd"
297         done
298
299         if test "$prev" != 'sed 50q "$0"'; then
300           echo_test_string=`eval $prev`
301           export echo_test_string
302           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
303         else
304           # Oops.  We lost completely, so just stick with echo.
305           echo=echo
306         fi
307       fi
308     fi
309   fi
310 fi
311 fi
312
313 # Copy echo and quote the copy suitably for passing to libtool from
314 # the Makefile, instead of quoting the original, which is used later.
315 ECHO=$echo
316 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
317    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
318 fi
319
320
321 ac_help="$ac_help
322   --disable-libtool-lock  avoid locking (might break parallel builds)"
323 ac_help="$ac_help
324   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
325 ac_help="$ac_help
326
327 See INSTALL file for further details."
328
329 # Initialize some variables set by options.
330 # The variables have the same names as the options, with
331 # dashes changed to underlines.
332 build=NONE
333 cache_file=./config.cache
334 exec_prefix=NONE
335 host=NONE
336 no_create=
337 nonopt=NONE
338 no_recursion=
339 prefix=NONE
340 program_prefix=NONE
341 program_suffix=NONE
342 program_transform_name=s,x,x,
343 silent=
344 site=
345 srcdir=
346 target=NONE
347 verbose=
348 x_includes=NONE
349 x_libraries=NONE
350 bindir='${exec_prefix}/bin'
351 sbindir='${exec_prefix}/sbin'
352 libexecdir='${exec_prefix}/libexec'
353 datadir='${prefix}/share'
354 sysconfdir='${prefix}/etc'
355 sharedstatedir='${prefix}/com'
356 localstatedir='${prefix}/var'
357 libdir='${exec_prefix}/lib'
358 includedir='${prefix}/include'
359 oldincludedir='/usr/include'
360 infodir='${prefix}/info'
361 mandir='${prefix}/man'
362
363 # Initialize some other variables.
364 subdirs=
365 MFLAGS= MAKEFLAGS=
366 SHELL=${CONFIG_SHELL-/bin/sh}
367 # Maximum number of lines to put in a shell here document.
368 ac_max_here_lines=12
369
370 ac_prev=
371 for ac_option
372 do
373
374   # If the previous option needs an argument, assign it.
375   if test -n "$ac_prev"; then
376     eval "$ac_prev=\$ac_option"
377     ac_prev=
378     continue
379   fi
380
381   case "$ac_option" in
382   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
383   *) ac_optarg= ;;
384   esac
385
386   # Accept the important Cygnus configure options, so we can diagnose typos.
387
388   case "$ac_option" in
389
390   -bindir | --bindir | --bindi | --bind | --bin | --bi)
391     ac_prev=bindir ;;
392   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
393     bindir="$ac_optarg" ;;
394
395   -build | --build | --buil | --bui | --bu)
396     ac_prev=build ;;
397   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
398     build="$ac_optarg" ;;
399
400   -cache-file | --cache-file | --cache-fil | --cache-fi \
401   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
402     ac_prev=cache_file ;;
403   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
404   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
405     cache_file="$ac_optarg" ;;
406
407   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
408     ac_prev=datadir ;;
409   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
410   | --da=*)
411     datadir="$ac_optarg" ;;
412
413   -disable-* | --disable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     eval "enable_${ac_feature}=no" ;;
421
422   -enable-* | --enable-*)
423     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
427     fi
428     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "enable_${ac_feature}='$ac_optarg'" ;;
434
435   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
436   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
437   | --exec | --exe | --ex)
438     ac_prev=exec_prefix ;;
439   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
440   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
441   | --exec=* | --exe=* | --ex=*)
442     exec_prefix="$ac_optarg" ;;
443
444   -gas | --gas | --ga | --g)
445     # Obsolete; use --with-gas.
446     with_gas=yes ;;
447
448   -help | --help | --hel | --he)
449     # Omit some internal or obsolete options to make the list less imposing.
450     # This message is too long to be a string in the A/UX 3.1 sh.
451     cat << EOF
452 Usage: configure [options] [host]
453 Options: [defaults in brackets after descriptions]
454 Configuration:
455   --cache-file=FILE       cache test results in FILE
456   --help                  print this message
457   --no-create             do not create output files
458   --quiet, --silent       do not print \`checking...' messages
459   --version               print the version of autoconf that created configure
460 Directory and file names:
461   --prefix=PREFIX         install architecture-independent files in PREFIX
462                           [$ac_default_prefix]
463   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
464                           [same as prefix]
465   --bindir=DIR            user executables in DIR [EPREFIX/bin]
466   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
467   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
468   --datadir=DIR           read-only architecture-independent data in DIR
469                           [PREFIX/share]
470   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
471   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
472                           [PREFIX/com]
473   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
474   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
475   --includedir=DIR        C header files in DIR [PREFIX/include]
476   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
477   --infodir=DIR           info documentation in DIR [PREFIX/info]
478   --mandir=DIR            man documentation in DIR [PREFIX/man]
479   --srcdir=DIR            find the sources in DIR [configure dir or ..]
480   --program-prefix=PREFIX prepend PREFIX to installed program names
481   --program-suffix=SUFFIX append SUFFIX to installed program names
482   --program-transform-name=PROGRAM
483                           run sed PROGRAM on installed program names
484 EOF
485     cat << EOF
486 Host type:
487   --build=BUILD           configure for building on BUILD [BUILD=HOST]
488   --host=HOST             configure for HOST [guessed]
489   --target=TARGET         configure for TARGET [TARGET=HOST]
490 Features and packages:
491   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
492   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
493   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
494   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
495   --x-includes=DIR        X include files are in DIR
496   --x-libraries=DIR       X library files are in DIR
497 EOF
498     if test -n "$ac_help"; then
499       echo "--enable and --with options recognized:$ac_help"
500     fi
501     exit 0 ;;
502
503   -host | --host | --hos | --ho)
504     ac_prev=host ;;
505   -host=* | --host=* | --hos=* | --ho=*)
506     host="$ac_optarg" ;;
507
508   -includedir | --includedir | --includedi | --included | --include \
509   | --includ | --inclu | --incl | --inc)
510     ac_prev=includedir ;;
511   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
512   | --includ=* | --inclu=* | --incl=* | --inc=*)
513     includedir="$ac_optarg" ;;
514
515   -infodir | --infodir | --infodi | --infod | --info | --inf)
516     ac_prev=infodir ;;
517   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
518     infodir="$ac_optarg" ;;
519
520   -libdir | --libdir | --libdi | --libd)
521     ac_prev=libdir ;;
522   -libdir=* | --libdir=* | --libdi=* | --libd=*)
523     libdir="$ac_optarg" ;;
524
525   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
526   | --libexe | --libex | --libe)
527     ac_prev=libexecdir ;;
528   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
529   | --libexe=* | --libex=* | --libe=*)
530     libexecdir="$ac_optarg" ;;
531
532   -localstatedir | --localstatedir | --localstatedi | --localstated \
533   | --localstate | --localstat | --localsta | --localst \
534   | --locals | --local | --loca | --loc | --lo)
535     ac_prev=localstatedir ;;
536   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
537   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
538   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
539     localstatedir="$ac_optarg" ;;
540
541   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
542     ac_prev=mandir ;;
543   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
544     mandir="$ac_optarg" ;;
545
546   -nfp | --nfp | --nf)
547     # Obsolete; use --without-fp.
548     with_fp=no ;;
549
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c)
552     no_create=yes ;;
553
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
556     no_recursion=yes ;;
557
558   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
559   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
560   | --oldin | --oldi | --old | --ol | --o)
561     ac_prev=oldincludedir ;;
562   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
563   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
564   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
565     oldincludedir="$ac_optarg" ;;
566
567   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
568     ac_prev=prefix ;;
569   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
570     prefix="$ac_optarg" ;;
571
572   -program-prefix | --program-prefix | --program-prefi | --program-pref \
573   | --program-pre | --program-pr | --program-p)
574     ac_prev=program_prefix ;;
575   -program-prefix=* | --program-prefix=* | --program-prefi=* \
576   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
577     program_prefix="$ac_optarg" ;;
578
579   -program-suffix | --program-suffix | --program-suffi | --program-suff \
580   | --program-suf | --program-su | --program-s)
581     ac_prev=program_suffix ;;
582   -program-suffix=* | --program-suffix=* | --program-suffi=* \
583   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
584     program_suffix="$ac_optarg" ;;
585
586   -program-transform-name | --program-transform-name \
587   | --program-transform-nam | --program-transform-na \
588   | --program-transform-n | --program-transform- \
589   | --program-transform | --program-transfor \
590   | --program-transfo | --program-transf \
591   | --program-trans | --program-tran \
592   | --progr-tra | --program-tr | --program-t)
593     ac_prev=program_transform_name ;;
594   -program-transform-name=* | --program-transform-name=* \
595   | --program-transform-nam=* | --program-transform-na=* \
596   | --program-transform-n=* | --program-transform-=* \
597   | --program-transform=* | --program-transfor=* \
598   | --program-transfo=* | --program-transf=* \
599   | --program-trans=* | --program-tran=* \
600   | --progr-tra=* | --program-tr=* | --program-t=*)
601     program_transform_name="$ac_optarg" ;;
602
603   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
604   | -silent | --silent | --silen | --sile | --sil)
605     silent=yes ;;
606
607   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
608     ac_prev=sbindir ;;
609   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
610   | --sbi=* | --sb=*)
611     sbindir="$ac_optarg" ;;
612
613   -sharedstatedir | --sharedstatedir | --sharedstatedi \
614   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
615   | --sharedst | --shareds | --shared | --share | --shar \
616   | --sha | --sh)
617     ac_prev=sharedstatedir ;;
618   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
619   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
620   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
621   | --sha=* | --sh=*)
622     sharedstatedir="$ac_optarg" ;;
623
624   -site | --site | --sit)
625     ac_prev=site ;;
626   -site=* | --site=* | --sit=*)
627     site="$ac_optarg" ;;
628
629   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
630     ac_prev=srcdir ;;
631   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
632     srcdir="$ac_optarg" ;;
633
634   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
635   | --syscon | --sysco | --sysc | --sys | --sy)
636     ac_prev=sysconfdir ;;
637   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
638   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
639     sysconfdir="$ac_optarg" ;;
640
641   -target | --target | --targe | --targ | --tar | --ta | --t)
642     ac_prev=target ;;
643   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
644     target="$ac_optarg" ;;
645
646   -v | -verbose | --verbose | --verbos | --verbo | --verb)
647     verbose=yes ;;
648
649   -version | --version | --versio | --versi | --vers)
650     echo "configure generated by autoconf version 2.13.1"
651     exit 0 ;;
652
653   -with-* | --with-*)
654     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
655     # Reject names that are not valid shell variable names.
656     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
657       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
658     fi
659     ac_package=`echo $ac_package| sed 's/-/_/g'`
660     case "$ac_option" in
661       *=*) ;;
662       *) ac_optarg=yes ;;
663     esac
664     eval "with_${ac_package}='$ac_optarg'" ;;
665
666   -without-* | --without-*)
667     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
668     # Reject names that are not valid shell variable names.
669     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
670       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
671     fi
672     ac_package=`echo $ac_package| sed 's/-/_/g'`
673     eval "with_${ac_package}=no" ;;
674
675   --x)
676     # Obsolete; use --with-x.
677     with_x=yes ;;
678
679   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
680   | --x-incl | --x-inc | --x-in | --x-i)
681     ac_prev=x_includes ;;
682   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
683   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
684     x_includes="$ac_optarg" ;;
685
686   -x-libraries | --x-libraries | --x-librarie | --x-librari \
687   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
688     ac_prev=x_libraries ;;
689   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
690   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
691     x_libraries="$ac_optarg" ;;
692
693   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
694     ;;
695
696   *)
697     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
698       echo "configure: warning: $ac_option: invalid host type" 1>&2
699     fi
700     if test "x$nonopt" != xNONE; then
701       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
702     fi
703     nonopt="$ac_option"
704     ;;
705
706   esac
707 done
708
709 if test -n "$ac_prev"; then
710   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
711 fi
712
713 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
714
715 # File descriptor usage:
716 # 0 standard input
717 # 1 file creation
718 # 2 errors and warnings
719 # 3 some systems may open it to /dev/tty
720 # 4 used on the Kubota Titan
721 # 6 checking for... messages and results
722 # 5 compiler messages saved in config.log
723 if test "$silent" = yes; then
724   exec 6>/dev/null
725 else
726   exec 6>&1
727 fi
728 exec 5>./config.log
729
730 echo "\
731 This file contains any messages produced by compilers while
732 running configure, to aid debugging if configure makes a mistake.
733 " 1>&5
734
735 # Strip out --no-create and --no-recursion so they do not pile up.
736 # Also quote any args containing shell metacharacters.
737 ac_configure_args=
738 for ac_arg
739 do
740   case "$ac_arg" in
741   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
742   | --no-cr | --no-c) ;;
743   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
744   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
745   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
746   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
747   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
748   esac
749 done
750
751 # NLS nuisances.
752 # Only set these to C if already set.  These must not be set unconditionally
753 # because not all systems understand e.g. LANG=C (notably SCO).
754 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
755 # Non-C LC_CTYPE values break the ctype check.
756 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
757 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
758 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
759 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
760
761 # confdefs.h avoids OS command line length limits that DEFS can exceed.
762 rm -rf conftest* confdefs.h
763 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
764 echo > confdefs.h
765
766 # A filename unique to this package, relative to the directory that
767 # configure is in, which we can look for to find out if srcdir is correct.
768 ac_unique_file=build/version.sh
769
770 # Find the source files, if location was not specified.
771 if test -z "$srcdir"; then
772   ac_srcdir_defaulted=yes
773   # Try the directory containing this script, then its parent.
774   ac_prog=$0
775   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
776   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
777   srcdir=$ac_confdir
778   if test ! -r $srcdir/$ac_unique_file; then
779     srcdir=..
780   fi
781 else
782   ac_srcdir_defaulted=no
783 fi
784 if test ! -r $srcdir/$ac_unique_file; then
785   if test "$ac_srcdir_defaulted" = yes; then
786     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
787   else
788     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
789   fi
790 fi
791 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
792
793 # Prefer explicitly selected file to automatically selected ones.
794 if test -z "$CONFIG_SITE"; then
795   if test "x$prefix" != xNONE; then
796     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
797   else
798     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
799   fi
800 fi
801 for ac_site_file in $CONFIG_SITE; do
802   if test -r "$ac_site_file"; then
803     echo "loading site script $ac_site_file"
804     . "$ac_site_file"
805   fi
806 done
807
808
809 ac_ext=c
810 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
811 ac_cpp='$CPP $CPPFLAGS'
812 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
813 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
814 cross_compiling=$ac_cv_prog_cc_cross
815
816 ac_exeext=
817 ac_objext=o
818 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
819   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
820   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
821     ac_n= ac_c='
822 ' ac_t='        '
823   else
824     ac_n=-n ac_c= ac_t=
825   fi
826 else
827   ac_n= ac_c='\c' ac_t=
828 fi
829
830
831 # set unset (borrowed from autoconf 2.49c)
832 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
833   ol_unset=unset
834 else
835   ol_unset=false
836 fi
837 # unset CDPATH
838 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
839
840 ac_aux_dir=
841 for ac_dir in build $srcdir/build; do
842   if test -f $ac_dir/install-sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install-sh -c"
845     break
846   elif test -f $ac_dir/install.sh; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/install.sh -c"
849     break
850   elif test -f $ac_dir/shtool; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/shtool install -c"
853     break
854   fi
855 done
856 if test -z "$ac_aux_dir"; then
857   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
858 fi
859 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
860 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
861 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
862
863 eval `$ac_aux_dir/version.sh`
864 if test -z "$OL_STRING"; then
865         { echo "configure: error: could not determine version" 1>&2; exit 1; }
866 fi
867
868 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
869         ac_cv_shtool="$ac_aux_dir/shtool"
870 else
871         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
872 fi
873
874 SHTOOL="$ac_cv_shtool"
875
876 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
877 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
878
879 OPENLDAP_CVS=""
880 if test -d $ac_aux_dir/CVS; then
881         OPENLDAP_CVS="(from CVS sources) "
882 fi
883
884 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
885
886
887 echo $ac_n "checking host system type""... $ac_c" 1>&6
888 echo "configure:889: checking host system type" >&5
889 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
890
891 # Make sure we can run config.sub.
892   if $ac_config_sub sun4 >/dev/null 2>&1; then :
893     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
894   fi
895
896   ac_cv_host_alias=$host
897   case "$ac_cv_host_alias" in
898   NONE)
899     case $nonopt in
900     NONE)
901       if ac_cv_host_alias=`$ac_config_guess`; then :
902       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
903       fi ;;
904     *) ac_cv_host_alias=$nonopt ;;
905     esac ;;
906   esac
907
908   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
909   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
910   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
911   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
912 else
913   echo $ac_n "(cached) $ac_c" 1>&6
914 fi
915
916 echo "$ac_t""$ac_cv_host" 1>&6
917
918 host=$ac_cv_host
919 host_alias=$ac_cv_host_alias
920 host_cpu=$ac_cv_host_cpu
921 host_vendor=$ac_cv_host_vendor
922 host_os=$ac_cv_host_os
923
924
925
926
927
928 echo $ac_n "checking target system type""... $ac_c" 1>&6
929 echo "configure:930: checking target system type" >&5
930 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
931
932 # Make sure we can run config.sub.
933   if $ac_config_sub sun4 >/dev/null 2>&1; then :
934     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
935   fi
936
937   ac_cv_target_alias=$target
938   case "$ac_cv_target_alias" in
939   NONE)
940     case $nonopt in
941     NONE)
942       ac_cv_target_alias=$host_alias ;;
943
944     *) ac_cv_target_alias=$nonopt ;;
945     esac ;;
946   esac
947
948   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
949   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
950   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
951   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
952 else
953   echo $ac_n "(cached) $ac_c" 1>&6
954 fi
955
956 echo "$ac_t""$ac_cv_target" 1>&6
957
958 target=$ac_cv_target
959 target_alias=$ac_cv_target_alias
960 target_cpu=$ac_cv_target_cpu
961 target_vendor=$ac_cv_target_vendor
962 target_os=$ac_cv_target_os
963
964
965
966
967
968 echo $ac_n "checking build system type""... $ac_c" 1>&6
969 echo "configure:970: checking build system type" >&5
970 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
971
972 # Make sure we can run config.sub.
973   if $ac_config_sub sun4 >/dev/null 2>&1; then :
974     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
975   fi
976
977   ac_cv_build_alias=$build
978   case "$ac_cv_build_alias" in
979   NONE)
980     case $nonopt in
981     NONE)
982       ac_cv_build_alias=$host_alias ;;
983
984     *) ac_cv_build_alias=$nonopt ;;
985     esac ;;
986   esac
987
988   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
989   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
990   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
991   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
992 else
993   echo $ac_n "(cached) $ac_c" 1>&6
994 fi
995
996 echo "$ac_t""$ac_cv_build" 1>&6
997
998 build=$ac_cv_build
999 build_alias=$ac_cv_build_alias
1000 build_cpu=$ac_cv_build_cpu
1001 build_vendor=$ac_cv_build_vendor
1002 build_os=$ac_cv_build_os
1003
1004
1005
1006
1007
1008 # Do some error checking and defaulting for the host and target type.
1009 # The inputs are:
1010 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1011 #
1012 # The rules are:
1013 # 1. You are not allowed to specify --host, --target, and nonopt at the
1014 #    same time.
1015 # 2. Host defaults to nonopt.
1016 # 3. If nonopt is not specified, then host defaults to the current host,
1017 #    as determined by config.guess.
1018 # 4. Target and build default to nonopt.
1019 # 5. If nonopt is not specified, then target and build default to host.
1020
1021 # The aliases save the names the user supplied, while $host etc.
1022 # will get canonicalized.
1023 case $host---$target---$nonopt in
1024 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1025 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1026 esac
1027
1028 test "$host_alias" != "$target_alias" &&
1029   test "$program_prefix$program_suffix$program_transform_name" = \
1030     NONENONEs,x,x, &&
1031   program_prefix=${target_alias}-
1032
1033
1034 # Find a good install program.  We prefer a C program (faster),
1035 # so one script is as good as another.  But avoid the broken or
1036 # incompatible versions:
1037 # SysV /etc/install, /usr/sbin/install
1038 # SunOS /usr/etc/install
1039 # IRIX /sbin/install
1040 # AIX /bin/install
1041 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1042 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1043 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1044 # ./install, which can be erroneously created by make from ./install.sh.
1045 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1046 echo "configure:1047: checking for a BSD compatible install" >&5
1047 if test -z "$INSTALL"; then
1048 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1052   for ac_dir in $PATH; do
1053     # Account for people who put trailing slashes in PATH elements.
1054     case "$ac_dir/" in
1055     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1056     *)
1057       # OSF1 and SCO ODT 3.0 have their own names for install.
1058       # Don't use installbsd from OSF since it installs stuff as root
1059       # by default.
1060       for ac_prog in ginstall scoinst install; do
1061         if test -f $ac_dir/$ac_prog; then
1062           if test $ac_prog = install &&
1063             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # AIX install.  It has an incompatible calling convention.
1065             :
1066           elif test $ac_prog = install &&
1067             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1068             # program-specific install script used by HP pwplus--don't use.
1069             :
1070           else
1071             ac_cv_path_install="$ac_dir/$ac_prog -c"
1072             break 2
1073           fi
1074         fi
1075       done
1076       ;;
1077     esac
1078   done
1079   IFS="$ac_save_IFS"
1080
1081 fi
1082   if test "${ac_cv_path_install+set}" = set; then
1083     INSTALL="$ac_cv_path_install"
1084   else
1085     # As a last resort, use the slow shell script.  We don't cache a
1086     # path for INSTALL within a source directory, because that will
1087     # break other packages using the cache if that directory is
1088     # removed, or if the path is relative.
1089     INSTALL="$ac_install_sh"
1090   fi
1091 fi
1092 echo "$ac_t""$INSTALL" 1>&6
1093
1094 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1095 # It thinks the first close brace ends the variable substitution.
1096 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1097
1098 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1099
1100 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1101
1102 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1103 echo "configure:1104: checking whether build environment is sane" >&5
1104 # Just in case
1105 sleep 1
1106 echo timestamp > conftestfile
1107 # Do `set' in a subshell so we don't clobber the current shell's
1108 # arguments.  Must try -L first in case configure is actually a
1109 # symlink; some systems play weird games with the mod time of symlinks
1110 # (eg FreeBSD returns the mod time of the symlink's containing
1111 # directory).
1112 if (
1113    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1114    if test "$*" = "X"; then
1115       # -L didn't work.
1116       set X `ls -t $srcdir/configure conftestfile`
1117    fi
1118    if test "$*" != "X $srcdir/configure conftestfile" \
1119       && test "$*" != "X conftestfile $srcdir/configure"; then
1120
1121       # If neither matched, then we have a broken ls.  This can happen
1122       # if, for instance, CONFIG_SHELL is bash and it inherits a
1123       # broken ls alias from the environment.  This has actually
1124       # happened.  Such a system could not be considered "sane".
1125       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1126 alias in your environment" 1>&2; exit 1; }
1127    fi
1128
1129    test "$2" = conftestfile
1130    )
1131 then
1132    # Ok.
1133    :
1134 else
1135    { echo "configure: error: newly created file is older than distributed files!
1136 Check your system clock" 1>&2; exit 1; }
1137 fi
1138 rm -f conftest*
1139 echo "$ac_t""yes" 1>&6
1140 if test "$program_transform_name" = s,x,x,; then
1141   program_transform_name=
1142 else
1143   # Double any \ or $.  echo might interpret backslashes.
1144   cat <<\EOF_SED > conftestsed
1145 s,\\,\\\\,g; s,\$,$$,g
1146 EOF_SED
1147   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1148   rm -f conftestsed
1149 fi
1150 test "$program_prefix" != NONE &&
1151   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1152 # Use a double $ so make ignores it.
1153 test "$program_suffix" != NONE &&
1154   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1155
1156 # sed with no file args requires a program.
1157 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1158
1159 for ac_prog in mawk gawk nawk awk
1160 do
1161 # Extract the first word of "$ac_prog", so it can be a program name with args.
1162 set dummy $ac_prog; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1166   echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168   if test -n "$AWK"; then
1169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1170 else
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1172   ac_dummy="$PATH"
1173   for ac_dir in $ac_dummy; do
1174     test -z "$ac_dir" && ac_dir=.
1175     if test -f $ac_dir/$ac_word; then
1176       ac_cv_prog_AWK="$ac_prog"
1177       break
1178     fi
1179   done
1180   IFS="$ac_save_ifs"
1181 fi
1182 fi
1183 AWK="$ac_cv_prog_AWK"
1184 if test -n "$AWK"; then
1185   echo "$ac_t""$AWK" 1>&6
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190 test -n "$AWK" && break
1191 done
1192
1193 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether ${MAKE-make} sets \${MAKE}" >&5
1195 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1196 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1197   echo $ac_n "(cached) $ac_c" 1>&6
1198 else
1199   cat > conftestmake <<\EOF
1200 all:
1201         @echo 'ac_maketemp="${MAKE}"'
1202 EOF
1203 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1204 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1205 if test -n "$ac_maketemp"; then
1206   eval ac_cv_prog_make_${ac_make}_set=yes
1207 else
1208   eval ac_cv_prog_make_${ac_make}_set=no
1209 fi
1210 rm -f conftestmake
1211 fi
1212 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1213   echo "$ac_t""yes" 1>&6
1214   SET_MAKE=
1215 else
1216   echo "$ac_t""no" 1>&6
1217   SET_MAKE="MAKE=${MAKE-make}"
1218 fi
1219
1220
1221
1222 PACKAGE=$OL_PACKAGE
1223
1224 VERSION=$OL_VERSION
1225
1226 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1227   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1228 fi
1229
1230
1231
1232 missing_dir=`cd $ac_aux_dir && pwd`
1233 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1234 echo "configure:1235: checking for working aclocal" >&5
1235 # Run test in a subshell; some versions of sh will print an error if
1236 # an executable is not found, even if stderr is redirected.
1237 # Redirect stdin to placate older versions of autoconf.  Sigh.
1238 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1239    ACLOCAL=aclocal
1240    echo "$ac_t""found" 1>&6
1241 else
1242    ACLOCAL="$missing_dir/missing aclocal"
1243    echo "$ac_t""missing" 1>&6
1244 fi
1245
1246 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1247 echo "configure:1248: checking for working autoconf" >&5
1248 # Run test in a subshell; some versions of sh will print an error if
1249 # an executable is not found, even if stderr is redirected.
1250 # Redirect stdin to placate older versions of autoconf.  Sigh.
1251 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1252    AUTOCONF=autoconf
1253    echo "$ac_t""found" 1>&6
1254 else
1255    AUTOCONF="$missing_dir/missing autoconf"
1256    echo "$ac_t""missing" 1>&6
1257 fi
1258
1259 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1260 echo "configure:1261: checking for working automake" >&5
1261 # Run test in a subshell; some versions of sh will print an error if
1262 # an executable is not found, even if stderr is redirected.
1263 # Redirect stdin to placate older versions of autoconf.  Sigh.
1264 if (automake --version) < /dev/null > /dev/null 2>&1; then
1265    AUTOMAKE=automake
1266    echo "$ac_t""found" 1>&6
1267 else
1268    AUTOMAKE="$missing_dir/missing automake"
1269    echo "$ac_t""missing" 1>&6
1270 fi
1271
1272 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1273 echo "configure:1274: checking for working autoheader" >&5
1274 # Run test in a subshell; some versions of sh will print an error if
1275 # an executable is not found, even if stderr is redirected.
1276 # Redirect stdin to placate older versions of autoconf.  Sigh.
1277 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1278    AUTOHEADER=autoheader
1279    echo "$ac_t""found" 1>&6
1280 else
1281    AUTOHEADER="$missing_dir/missing autoheader"
1282    echo "$ac_t""missing" 1>&6
1283 fi
1284
1285 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1286 echo "configure:1287: checking for working makeinfo" >&5
1287 # Run test in a subshell; some versions of sh will print an error if
1288 # an executable is not found, even if stderr is redirected.
1289 # Redirect stdin to placate older versions of autoconf.  Sigh.
1290 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1291    MAKEINFO=makeinfo
1292    echo "$ac_t""found" 1>&6
1293 else
1294    MAKEINFO="$missing_dir/missing makeinfo"
1295    echo "$ac_t""missing" 1>&6
1296 fi
1297
1298 install_sh="$missing_dir/install-sh"
1299 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1300
1301 for ac_prog in gnutar gtar tar
1302 do
1303 # Extract the first word of "$ac_prog", so it can be a program name with args.
1304 set dummy $ac_prog; ac_word=$2
1305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1306 echo "configure:1307: checking for $ac_word" >&5
1307 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   if test -n "$AMTAR"; then
1311   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1312 else
1313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1314   ac_dummy="$PATH"
1315   for ac_dir in $ac_dummy; do
1316     test -z "$ac_dir" && ac_dir=.
1317     if test -f $ac_dir/$ac_word; then
1318       ac_cv_prog_AMTAR="$ac_prog"
1319       break
1320     fi
1321   done
1322   IFS="$ac_save_ifs"
1323 fi
1324 fi
1325 AMTAR="$ac_cv_prog_AMTAR"
1326 if test -n "$AMTAR"; then
1327   echo "$ac_t""$AMTAR" 1>&6
1328 else
1329   echo "$ac_t""no" 1>&6
1330 fi
1331
1332 test -n "$AMTAR" && break
1333 done
1334
1335
1336 AMTARFLAGS=
1337 if test -n "$AMTAR"; then
1338   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1339         AMTARFLAGS=o
1340   fi
1341 fi
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_PACKAGE "$PACKAGE"
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define OPENLDAP_VERSION "$VERSION"
1349 EOF
1350
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION $OL_API_INC
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1366 EOF
1367
1368
1369 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1370
1371 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1372
1373 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1374
1375
1376
1377 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1378 echo "configure:1379: checking configure arguments" >&5
1379
1380
1381 top_builddir=`pwd`
1382
1383 ldap_subdir="/openldap"
1384
1385 # Check whether --with-subdir or --without-subdir was given.
1386 if test "${with_subdir+set}" = set; then
1387   withval="$with_subdir"
1388   case "$withval" in
1389         no) ldap_subdir=""
1390                 ;;
1391         yes)
1392                 ;;
1393         /*|\\*)
1394                 ldap_subdir="$withval"
1395                 ;;
1396         *)
1397                 ldap_subdir="/$withval"
1398                 ;;
1399 esac
1400
1401 fi
1402
1403
1404 # OpenLDAP --enable-debug
1405         # Check whether --enable-debug or --disable-debug was given.
1406 if test "${enable_debug+set}" = set; then
1407   enableval="$enable_debug"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no ; do
1411                 if test "$enableval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1417         fi
1418         ol_enable_debug="$ol_arg"
1419
1420 else
1421         ol_enable_debug="yes"
1422 fi
1423 # end --enable-debug
1424 # OpenLDAP --enable-dynamic
1425         # Check whether --enable-dynamic or --disable-dynamic was given.
1426 if test "${enable_dynamic+set}" = set; then
1427   enableval="$enable_dynamic"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto yes no ; do
1431                 if test "$enableval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1437         fi
1438         ol_enable_dynamic="$ol_arg"
1439
1440 else
1441         ol_enable_dynamic="no"
1442 fi
1443 # end --enable-dynamic
1444 # OpenLDAP --enable-syslog
1445         # Check whether --enable-syslog or --disable-syslog was given.
1446 if test "${enable_syslog+set}" = set; then
1447   enableval="$enable_syslog"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no ; do
1451                 if test "$enableval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1457         fi
1458         ol_enable_syslog="$ol_arg"
1459
1460 else
1461         ol_enable_syslog="auto"
1462 fi
1463 # end --enable-syslog
1464 # OpenLDAP --enable-proctitle
1465         # Check whether --enable-proctitle or --disable-proctitle was given.
1466 if test "${enable_proctitle+set}" = set; then
1467   enableval="$enable_proctitle"
1468   
1469         ol_arg=invalid
1470         for ol_val in auto yes no ; do
1471                 if test "$enableval" = "$ol_val" ; then
1472                         ol_arg="$ol_val"
1473                 fi
1474         done
1475         if test "$ol_arg" = "invalid" ; then
1476                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1477         fi
1478         ol_enable_proctitle="$ol_arg"
1479
1480 else
1481         ol_enable_proctitle="yes"
1482 fi
1483 # end --enable-proctitle
1484 ol_enable_referrals=${ol_enable_referrals-no}
1485 ol_enable_kbind=${ol_enable_kbind-no}
1486 # OpenLDAP --enable-ipv6
1487         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1488 if test "${enable_ipv6+set}" = set; then
1489   enableval="$enable_ipv6"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto yes no ; do
1493                 if test "$enableval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1499         fi
1500         ol_enable_ipv6="$ol_arg"
1501
1502 else
1503         ol_enable_ipv6="auto"
1504 fi
1505 # end --enable-ipv6
1506 # OpenLDAP --enable-local
1507         # Check whether --enable-local or --disable-local was given.
1508 if test "${enable_local+set}" = set; then
1509   enableval="$enable_local"
1510   
1511         ol_arg=invalid
1512         for ol_val in auto yes no ; do
1513                 if test "$enableval" = "$ol_val" ; then
1514                         ol_arg="$ol_val"
1515                 fi
1516         done
1517         if test "$ol_arg" = "invalid" ; then
1518                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1519         fi
1520         ol_enable_local="$ol_arg"
1521
1522 else
1523         ol_enable_local="auto"
1524 fi
1525 # end --enable-local
1526
1527
1528 # OpenLDAP --with-cyrus_sasl
1529         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1530 if test "${with_cyrus_sasl+set}" = set; then
1531   withval="$with_cyrus_sasl"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no  ; do
1535                 if test "$withval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1541         fi
1542         ol_with_cyrus_sasl="$ol_arg"
1543
1544 else
1545         ol_with_cyrus_sasl="auto"
1546 fi
1547 # end --with-cyrus_sasl
1548
1549 # OpenLDAP --with-fetch
1550         # Check whether --with-fetch or --without-fetch was given.
1551 if test "${with_fetch+set}" = set; then
1552   withval="$with_fetch"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no  ; do
1556                 if test "$withval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1562         fi
1563         ol_with_fetch="$ol_arg"
1564
1565 else
1566         ol_with_fetch="auto"
1567 fi
1568 # end --with-fetch
1569
1570 ol_with_kerberos=${ol_with_kerberos-auto}
1571 # OpenLDAP --with-threads
1572         # Check whether --with-threads or --without-threads was given.
1573 if test "${with_threads+set}" = set; then
1574   withval="$with_threads"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1578                 if test "$withval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1584         fi
1585         ol_with_threads="$ol_arg"
1586
1587 else
1588         ol_with_threads="auto"
1589 fi
1590 # end --with-threads
1591
1592 # OpenLDAP --with-tls
1593         # Check whether --with-tls or --without-tls was given.
1594 if test "${with_tls+set}" = set; then
1595   withval="$with_tls"
1596   
1597         ol_arg=invalid
1598         for ol_val in auto ssleay openssl yes no  ; do
1599                 if test "$withval" = "$ol_val" ; then
1600                         ol_arg="$ol_val"
1601                 fi
1602         done
1603         if test "$ol_arg" = "invalid" ; then
1604                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1605         fi
1606         ol_with_tls="$ol_arg"
1607
1608 else
1609         ol_with_tls="auto"
1610 fi
1611 # end --with-tls
1612
1613 # OpenLDAP --with-yielding_select
1614         # Check whether --with-yielding_select or --without-yielding_select was given.
1615 if test "${with_yielding_select+set}" = set; then
1616   withval="$with_yielding_select"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no manual  ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1626         fi
1627         ol_with_yielding_select="$ol_arg"
1628
1629 else
1630         ol_with_yielding_select="auto"
1631 fi
1632 # end --with-yielding_select
1633
1634 # OpenLDAP --with-multiple_precision
1635         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1636 if test "${with_multiple_precision+set}" = set; then
1637   withval="$with_multiple_precision"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto bignum gmp yes no  ; do
1641                 if test "$withval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1647         fi
1648         ol_with_multiple_precision="$ol_arg"
1649
1650 else
1651         ol_with_multiple_precision="auto"
1652 fi
1653 # end --with-multiple_precision
1654
1655
1656
1657 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1658 if test "${with_xxslapdoptions+set}" = set; then
1659   withval="$with_xxslapdoptions"
1660   :
1661 fi
1662
1663 # OpenLDAP --enable-slapd
1664         # Check whether --enable-slapd or --disable-slapd was given.
1665 if test "${enable_slapd+set}" = set; then
1666   enableval="$enable_slapd"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1676         fi
1677         ol_enable_slapd="$ol_arg"
1678
1679 else
1680         ol_enable_slapd="yes"
1681 fi
1682 # end --enable-slapd
1683 # OpenLDAP --enable-aci
1684         # Check whether --enable-aci or --disable-aci was given.
1685 if test "${enable_aci+set}" = set; then
1686   enableval="$enable_aci"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1696         fi
1697         ol_enable_aci="$ol_arg"
1698
1699 else
1700         ol_enable_aci="no"
1701 fi
1702 # end --enable-aci
1703 # OpenLDAP --enable-cleartext
1704         # Check whether --enable-cleartext or --disable-cleartext was given.
1705 if test "${enable_cleartext+set}" = set; then
1706   enableval="$enable_cleartext"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1716         fi
1717         ol_enable_cleartext="$ol_arg"
1718
1719 else
1720         ol_enable_cleartext="yes"
1721 fi
1722 # end --enable-cleartext
1723 # OpenLDAP --enable-crypt
1724         # Check whether --enable-crypt or --disable-crypt was given.
1725 if test "${enable_crypt+set}" = set; then
1726   enableval="$enable_crypt"
1727   
1728         ol_arg=invalid
1729         for ol_val in auto yes no ; do
1730                 if test "$enableval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1736         fi
1737         ol_enable_crypt="$ol_arg"
1738
1739 else
1740         ol_enable_crypt="no"
1741 fi
1742 # end --enable-crypt
1743 # OpenLDAP --enable-lmpasswd
1744         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1745 if test "${enable_lmpasswd+set}" = set; then
1746   enableval="$enable_lmpasswd"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1756         fi
1757         ol_enable_lmpasswd="$ol_arg"
1758
1759 else
1760         ol_enable_lmpasswd="no"
1761 fi
1762 # end --enable-lmpasswd
1763 # OpenLDAP --enable-spasswd
1764         # Check whether --enable-spasswd or --disable-spasswd was given.
1765 if test "${enable_spasswd+set}" = set; then
1766   enableval="$enable_spasswd"
1767   
1768         ol_arg=invalid
1769         for ol_val in auto yes no ; do
1770                 if test "$enableval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1776         fi
1777         ol_enable_spasswd="$ol_arg"
1778
1779 else
1780         ol_enable_spasswd="no"
1781 fi
1782 # end --enable-spasswd
1783 # OpenLDAP --enable-modules
1784         # Check whether --enable-modules or --disable-modules was given.
1785 if test "${enable_modules+set}" = set; then
1786   enableval="$enable_modules"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1796         fi
1797         ol_enable_modules="$ol_arg"
1798
1799 else
1800         ol_enable_modules="no"
1801 fi
1802 # end --enable-modules
1803 ol_enable_multimaster=${ol_enable_multimaster-no}
1804 # OpenLDAP --enable-rewrite
1805         # Check whether --enable-rewrite or --disable-rewrite was given.
1806 if test "${enable_rewrite+set}" = set; then
1807   enableval="$enable_rewrite"
1808   
1809         ol_arg=invalid
1810         for ol_val in auto yes no ; do
1811                 if test "$enableval" = "$ol_val" ; then
1812                         ol_arg="$ol_val"
1813                 fi
1814         done
1815         if test "$ol_arg" = "invalid" ; then
1816                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1817         fi
1818         ol_enable_rewrite="$ol_arg"
1819
1820 else
1821         ol_enable_rewrite="auto"
1822 fi
1823 # end --enable-rewrite
1824 # OpenLDAP --enable-rlookups
1825         # Check whether --enable-rlookups or --disable-rlookups was given.
1826 if test "${enable_rlookups+set}" = set; then
1827   enableval="$enable_rlookups"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1837         fi
1838         ol_enable_rlookups="$ol_arg"
1839
1840 else
1841         ol_enable_rlookups="no"
1842 fi
1843 # end --enable-rlookups
1844 # OpenLDAP --enable-slapi
1845         # Check whether --enable-slapi or --disable-slapi was given.
1846 if test "${enable_slapi+set}" = set; then
1847   enableval="$enable_slapi"
1848   
1849         ol_arg=invalid
1850         for ol_val in auto yes no ; do
1851                 if test "$enableval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1857         fi
1858         ol_enable_slapi="$ol_arg"
1859
1860 else
1861         ol_enable_slapi="no"
1862 fi
1863 # end --enable-slapi
1864 # OpenLDAP --enable-slp
1865         # Check whether --enable-slp or --disable-slp was given.
1866 if test "${enable_slp+set}" = set; then
1867   enableval="$enable_slp"
1868   
1869         ol_arg=invalid
1870         for ol_val in auto yes no ; do
1871                 if test "$enableval" = "$ol_val" ; then
1872                         ol_arg="$ol_val"
1873                 fi
1874         done
1875         if test "$ol_arg" = "invalid" ; then
1876                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1877         fi
1878         ol_enable_slp="$ol_arg"
1879
1880 else
1881         ol_enable_slp="no"
1882 fi
1883 # end --enable-slp
1884 # OpenLDAP --enable-wrappers
1885         # Check whether --enable-wrappers or --disable-wrappers was given.
1886 if test "${enable_wrappers+set}" = set; then
1887   enableval="$enable_wrappers"
1888   
1889         ol_arg=invalid
1890         for ol_val in auto yes no ; do
1891                 if test "$enableval" = "$ol_val" ; then
1892                         ol_arg="$ol_val"
1893                 fi
1894         done
1895         if test "$ol_arg" = "invalid" ; then
1896                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1897         fi
1898         ol_enable_wrappers="$ol_arg"
1899
1900 else
1901         ol_enable_wrappers="no"
1902 fi
1903 # end --enable-wrappers
1904
1905 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1906         passwd perl relay shell sql"
1907
1908 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1909 if test "${with_xxslapbackends+set}" = set; then
1910   withval="$with_xxslapbackends"
1911   :
1912 fi
1913
1914
1915 # OpenLDAP --enable-backends
1916         # Check whether --enable-backends or --disable-backends was given.
1917 if test "${enable_backends+set}" = set; then
1918   enableval="$enable_backends"
1919   
1920         ol_arg=invalid
1921         for ol_val in no yes mod ; do
1922                 if test "$enableval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1928         fi
1929         ol_enable_backends="$ol_arg"
1930
1931 else
1932         ol_enable_backends="no"
1933 fi
1934 # end --enable-backends
1935 # OpenLDAP --enable-bdb
1936         # Check whether --enable-bdb or --disable-bdb was given.
1937 if test "${enable_bdb+set}" = set; then
1938   enableval="$enable_bdb"
1939   
1940         ol_arg=invalid
1941         for ol_val in no yes mod ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1948         fi
1949         ol_enable_bdb="$ol_arg"
1950
1951 else
1952         ol_enable_bdb="yes"
1953 fi
1954 # end --enable-bdb
1955 # OpenLDAP --enable-dnssrv
1956         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1957 if test "${enable_dnssrv+set}" = set; then
1958   enableval="$enable_dnssrv"
1959   
1960         ol_arg=invalid
1961         for ol_val in no yes mod ; do
1962                 if test "$enableval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1968         fi
1969         ol_enable_dnssrv="$ol_arg"
1970
1971 else
1972         ol_enable_dnssrv="no"
1973 fi
1974 # end --enable-dnssrv
1975 # OpenLDAP --enable-hdb
1976         # Check whether --enable-hdb or --disable-hdb was given.
1977 if test "${enable_hdb+set}" = set; then
1978   enableval="$enable_hdb"
1979   
1980         ol_arg=invalid
1981         for ol_val in no yes mod ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1988         fi
1989         ol_enable_hdb="$ol_arg"
1990
1991 else
1992         ol_enable_hdb="no"
1993 fi
1994 # end --enable-hdb
1995 # OpenLDAP --enable-ldap
1996         # Check whether --enable-ldap or --disable-ldap was given.
1997 if test "${enable_ldap+set}" = set; then
1998   enableval="$enable_ldap"
1999   
2000         ol_arg=invalid
2001         for ol_val in no yes mod ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2008         fi
2009         ol_enable_ldap="$ol_arg"
2010
2011 else
2012         ol_enable_ldap="no"
2013 fi
2014 # end --enable-ldap
2015 # OpenLDAP --enable-ldbm
2016         # Check whether --enable-ldbm or --disable-ldbm was given.
2017 if test "${enable_ldbm+set}" = set; then
2018   enableval="$enable_ldbm"
2019   
2020         ol_arg=invalid
2021         for ol_val in no yes mod ; do
2022                 if test "$enableval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2028         fi
2029         ol_enable_ldbm="$ol_arg"
2030
2031 else
2032         ol_enable_ldbm="no"
2033 fi
2034 # end --enable-ldbm
2035 # OpenLDAP --with-ldbm_api
2036         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2037 if test "${with_ldbm_api+set}" = set; then
2038   withval="$with_ldbm_api"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2042                 if test "$withval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2048         fi
2049         ol_with_ldbm_api="$ol_arg"
2050
2051 else
2052         ol_with_ldbm_api="auto"
2053 fi
2054 # end --with-ldbm_api
2055
2056 # OpenLDAP --with-ldbm_type
2057         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2058 if test "${with_ldbm_type+set}" = set; then
2059   withval="$with_ldbm_type"
2060   
2061         ol_arg=invalid
2062         for ol_val in auto btree hash ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2069         fi
2070         ol_with_ldbm_type="$ol_arg"
2071
2072 else
2073         ol_with_ldbm_type="auto"
2074 fi
2075 # end --with-ldbm_type
2076
2077 # OpenLDAP --enable-meta
2078         # Check whether --enable-meta or --disable-meta was given.
2079 if test "${enable_meta+set}" = set; then
2080   enableval="$enable_meta"
2081   
2082         ol_arg=invalid
2083         for ol_val in no yes mod ; do
2084                 if test "$enableval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2090         fi
2091         ol_enable_meta="$ol_arg"
2092
2093 else
2094         ol_enable_meta="no"
2095 fi
2096 # end --enable-meta
2097 # OpenLDAP --enable-monitor
2098         # Check whether --enable-monitor or --disable-monitor was given.
2099 if test "${enable_monitor+set}" = set; then
2100   enableval="$enable_monitor"
2101   
2102         ol_arg=invalid
2103         for ol_val in no yes mod ; do
2104                 if test "$enableval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2110         fi
2111         ol_enable_monitor="$ol_arg"
2112
2113 else
2114         ol_enable_monitor="yes"
2115 fi
2116 # end --enable-monitor
2117 # OpenLDAP --enable-null
2118         # Check whether --enable-null or --disable-null was given.
2119 if test "${enable_null+set}" = set; then
2120   enableval="$enable_null"
2121   
2122         ol_arg=invalid
2123         for ol_val in no yes mod ; do
2124                 if test "$enableval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2130         fi
2131         ol_enable_null="$ol_arg"
2132
2133 else
2134         ol_enable_null="no"
2135 fi
2136 # end --enable-null
2137 # OpenLDAP --enable-passwd
2138         # Check whether --enable-passwd or --disable-passwd was given.
2139 if test "${enable_passwd+set}" = set; then
2140   enableval="$enable_passwd"
2141   
2142         ol_arg=invalid
2143         for ol_val in no yes mod ; do
2144                 if test "$enableval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2150         fi
2151         ol_enable_passwd="$ol_arg"
2152
2153 else
2154         ol_enable_passwd="no"
2155 fi
2156 # end --enable-passwd
2157 # OpenLDAP --enable-perl
2158         # Check whether --enable-perl or --disable-perl was given.
2159 if test "${enable_perl+set}" = set; then
2160   enableval="$enable_perl"
2161   
2162         ol_arg=invalid
2163         for ol_val in no yes mod ; do
2164                 if test "$enableval" = "$ol_val" ; then
2165                         ol_arg="$ol_val"
2166                 fi
2167         done
2168         if test "$ol_arg" = "invalid" ; then
2169                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2170         fi
2171         ol_enable_perl="$ol_arg"
2172
2173 else
2174         ol_enable_perl="no"
2175 fi
2176 # end --enable-perl
2177 # OpenLDAP --enable-relay
2178         # Check whether --enable-relay or --disable-relay was given.
2179 if test "${enable_relay+set}" = set; then
2180   enableval="$enable_relay"
2181   
2182         ol_arg=invalid
2183         for ol_val in no yes mod ; do
2184                 if test "$enableval" = "$ol_val" ; then
2185                         ol_arg="$ol_val"
2186                 fi
2187         done
2188         if test "$ol_arg" = "invalid" ; then
2189                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2190         fi
2191         ol_enable_relay="$ol_arg"
2192
2193 else
2194         ol_enable_relay="yes"
2195 fi
2196 # end --enable-relay
2197 # OpenLDAP --enable-shell
2198         # Check whether --enable-shell or --disable-shell was given.
2199 if test "${enable_shell+set}" = set; then
2200   enableval="$enable_shell"
2201   
2202         ol_arg=invalid
2203         for ol_val in no yes mod ; do
2204                 if test "$enableval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2210         fi
2211         ol_enable_shell="$ol_arg"
2212
2213 else
2214         ol_enable_shell="no"
2215 fi
2216 # end --enable-shell
2217 # OpenLDAP --enable-sql
2218         # Check whether --enable-sql or --disable-sql was given.
2219 if test "${enable_sql+set}" = set; then
2220   enableval="$enable_sql"
2221   
2222         ol_arg=invalid
2223         for ol_val in no yes mod ; do
2224                 if test "$enableval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2230         fi
2231         ol_enable_sql="$ol_arg"
2232
2233 else
2234         ol_enable_sql="no"
2235 fi
2236 # end --enable-sql
2237
2238 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2239         refint unique"
2240
2241 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2242 if test "${with_xxslapoverlays+set}" = set; then
2243   withval="$with_xxslapoverlays"
2244   :
2245 fi
2246
2247
2248 # OpenLDAP --enable-overlays
2249         # Check whether --enable-overlays or --disable-overlays was given.
2250 if test "${enable_overlays+set}" = set; then
2251   enableval="$enable_overlays"
2252   
2253         ol_arg=invalid
2254         for ol_val in no yes mod ; do
2255                 if test "$enableval" = "$ol_val" ; then
2256                         ol_arg="$ol_val"
2257                 fi
2258         done
2259         if test "$ol_arg" = "invalid" ; then
2260                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2261         fi
2262         ol_enable_overlays="$ol_arg"
2263
2264 else
2265         ol_enable_overlays="no"
2266 fi
2267 # end --enable-overlays
2268 # OpenLDAP --enable-chain
2269         # Check whether --enable-chain or --disable-chain was given.
2270 if test "${enable_chain+set}" = set; then
2271   enableval="$enable_chain"
2272   
2273         ol_arg=invalid
2274         for ol_val in no yes mod ; do
2275                 if test "$enableval" = "$ol_val" ; then
2276                         ol_arg="$ol_val"
2277                 fi
2278         done
2279         if test "$ol_arg" = "invalid" ; then
2280                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2281         fi
2282         ol_enable_chain="$ol_arg"
2283
2284 else
2285         ol_enable_chain="no"
2286 fi
2287 # end --enable-chain
2288
2289 # OpenLDAP --enable-denyop
2290         # Check whether --enable-denyop or --disable-denyop was given.
2291 if test "${enable_denyop+set}" = set; then
2292   enableval="$enable_denyop"
2293   
2294         ol_arg=invalid
2295         for ol_val in no yes mod ; do
2296                 if test "$enableval" = "$ol_val" ; then
2297                         ol_arg="$ol_val"
2298                 fi
2299         done
2300         if test "$ol_arg" = "invalid" ; then
2301                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2302         fi
2303         ol_enable_denyop="$ol_arg"
2304
2305 else
2306         ol_enable_denyop="no"
2307 fi
2308 # end --enable-denyop
2309
2310 # OpenLDAP --enable-dyngroup
2311         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2312 if test "${enable_dyngroup+set}" = set; then
2313   enableval="$enable_dyngroup"
2314   
2315         ol_arg=invalid
2316         for ol_val in no yes mod ; do
2317                 if test "$enableval" = "$ol_val" ; then
2318                         ol_arg="$ol_val"
2319                 fi
2320         done
2321         if test "$ol_arg" = "invalid" ; then
2322                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2323         fi
2324         ol_enable_dyngroup="$ol_arg"
2325
2326 else
2327         ol_enable_dyngroup="no"
2328 fi
2329 # end --enable-dyngroup
2330
2331 # OpenLDAP --enable-lastmod
2332         # Check whether --enable-lastmod or --disable-lastmod was given.
2333 if test "${enable_lastmod+set}" = set; then
2334   enableval="$enable_lastmod"
2335   
2336         ol_arg=invalid
2337         for ol_val in no yes mod ; do
2338                 if test "$enableval" = "$ol_val" ; then
2339                         ol_arg="$ol_val"
2340                 fi
2341         done
2342         if test "$ol_arg" = "invalid" ; then
2343                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2344         fi
2345         ol_enable_lastmod="$ol_arg"
2346
2347 else
2348         ol_enable_lastmod="no"
2349 fi
2350 # end --enable-lastmod
2351
2352 # OpenLDAP --enable-ppolicy
2353         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2354 if test "${enable_ppolicy+set}" = set; then
2355   enableval="$enable_ppolicy"
2356   
2357         ol_arg=invalid
2358         for ol_val in no yes mod ; do
2359                 if test "$enableval" = "$ol_val" ; then
2360                         ol_arg="$ol_val"
2361                 fi
2362         done
2363         if test "$ol_arg" = "invalid" ; then
2364                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2365         fi
2366         ol_enable_ppolicy="$ol_arg"
2367
2368 else
2369         ol_enable_ppolicy="no"
2370 fi
2371 # end --enable-ppolicy
2372
2373 # OpenLDAP --enable-proxycache
2374         # Check whether --enable-proxycache or --disable-proxycache was given.
2375 if test "${enable_proxycache+set}" = set; then
2376   enableval="$enable_proxycache"
2377   
2378         ol_arg=invalid
2379         for ol_val in no yes mod ; do
2380                 if test "$enableval" = "$ol_val" ; then
2381                         ol_arg="$ol_val"
2382                 fi
2383         done
2384         if test "$ol_arg" = "invalid" ; then
2385                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2386         fi
2387         ol_enable_proxycache="$ol_arg"
2388
2389 else
2390         ol_enable_proxycache="no"
2391 fi
2392 # end --enable-proxycache
2393
2394 # OpenLDAP --enable-refint
2395         # Check whether --enable-refint or --disable-refint was given.
2396 if test "${enable_refint+set}" = set; then
2397   enableval="$enable_refint"
2398   
2399         ol_arg=invalid
2400         for ol_val in no yes mod ; do
2401                 if test "$enableval" = "$ol_val" ; then
2402                         ol_arg="$ol_val"
2403                 fi
2404         done
2405         if test "$ol_arg" = "invalid" ; then
2406                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2407         fi
2408         ol_enable_refint="$ol_arg"
2409
2410 else
2411         ol_enable_refint="no"
2412 fi
2413 # end --enable-refint
2414
2415 # OpenLDAP --enable-rwm
2416         # Check whether --enable-rwm or --disable-rwm was given.
2417 if test "${enable_rwm+set}" = set; then
2418   enableval="$enable_rwm"
2419   
2420         ol_arg=invalid
2421         for ol_val in no yes mod ; do
2422                 if test "$enableval" = "$ol_val" ; then
2423                         ol_arg="$ol_val"
2424                 fi
2425         done
2426         if test "$ol_arg" = "invalid" ; then
2427                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2428         fi
2429         ol_enable_rwm="$ol_arg"
2430
2431 else
2432         ol_enable_rwm="no"
2433 fi
2434 # end --enable-rwm
2435
2436 # OpenLDAP --enable-unique
2437         # Check whether --enable-unique or --disable-unique was given.
2438 if test "${enable_unique+set}" = set; then
2439   enableval="$enable_unique"
2440   
2441         ol_arg=invalid
2442         for ol_val in no yes mod ; do
2443                 if test "$enableval" = "$ol_val" ; then
2444                         ol_arg="$ol_val"
2445                 fi
2446         done
2447         if test "$ol_arg" = "invalid" ; then
2448                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2449         fi
2450         ol_enable_unique="$ol_arg"
2451
2452 else
2453         ol_enable_unique="no"
2454 fi
2455 # end --enable-unique
2456
2457
2458
2459 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2460 if test "${with_xxslurpdoptions+set}" = set; then
2461   withval="$with_xxslurpdoptions"
2462   :
2463 fi
2464
2465 # OpenLDAP --enable-slurpd
2466         # Check whether --enable-slurpd or --disable-slurpd was given.
2467 if test "${enable_slurpd+set}" = set; then
2468   enableval="$enable_slurpd"
2469   
2470         ol_arg=invalid
2471         for ol_val in auto yes no ; do
2472                 if test "$enableval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2478         fi
2479         ol_enable_slurpd="$ol_arg"
2480
2481 else
2482         ol_enable_slurpd="auto"
2483 fi
2484 # end --enable-slurpd
2485
2486 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2487 if test "${with_xxliboptions+set}" = set; then
2488   withval="$with_xxliboptions"
2489   :
2490 fi
2491
2492 # Check whether --enable-static or --disable-static was given.
2493 if test "${enable_static+set}" = set; then
2494   enableval="$enable_static"
2495   p=${PACKAGE-default}
2496 case $enableval in
2497 yes) enable_static=yes ;;
2498 no) enable_static=no ;;
2499 *)
2500   enable_static=no
2501   # Look at the argument we got.  We use all the common list separators.
2502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2503   for pkg in $enableval; do
2504     if test "X$pkg" = "X$p"; then
2505       enable_static=yes
2506     fi
2507   done
2508   IFS="$ac_save_ifs"
2509   ;;
2510 esac
2511 else
2512   enable_static=yes
2513 fi
2514
2515 # Check whether --enable-shared or --disable-shared was given.
2516 if test "${enable_shared+set}" = set; then
2517   enableval="$enable_shared"
2518   p=${PACKAGE-default}
2519 case $enableval in
2520 yes) enable_shared=yes ;;
2521 no) enable_shared=no ;;
2522 *)
2523   enable_shared=no
2524   # Look at the argument we got.  We use all the common list separators.
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2526   for pkg in $enableval; do
2527     if test "X$pkg" = "X$p"; then
2528       enable_shared=yes
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532   ;;
2533 esac
2534 else
2535   enable_shared=yes
2536 fi
2537
2538
2539
2540 # Activate any backends that were not explicitly enabled.
2541 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2542 if test $ol_enable_backends != no ; then
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp = no ; then
2546                         eval "ol_enable_$i=$ol_enable_backends"
2547                 fi
2548         done
2549 fi
2550 # Activate the overlays
2551 if test $ol_enable_overlays != no ; then
2552         for i in $Overlays; do
2553                 eval "ol_tmp=\$ol_enable_$i"
2554                 if test $ol_tmp = no ; then
2555                         eval "ol_enable_$i=$ol_enable_overlays"
2556                 fi
2557         done
2558 fi
2559
2560 # validate options
2561 if test $ol_enable_slapd = no ; then
2562                 if test $ol_enable_slapi = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2564         fi
2565         if test $ol_enable_backends != no ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2567         fi
2568         for i in $Backends; do
2569                 eval "ol_tmp=\$ol_enable_$i"
2570                 if test $ol_tmp != no ; then
2571                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2572                         eval "ol_enable_$i=no"
2573                 fi
2574         done
2575         if test $ol_enable_modules = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2577         fi
2578         if test $ol_enable_multimaster = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2580         fi
2581         if test $ol_enable_wrappers = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2583         fi
2584         if test $ol_enable_rlookups = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2586         fi
2587         if test $ol_enable_aci = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2589         fi
2590         if test $ol_with_ldbm_api != auto ; then
2591                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2592         fi
2593         if test $ol_with_ldbm_type != auto ; then
2594                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2595         fi
2596         if test $ol_enable_slurpd = yes ; then
2597                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2598         fi
2599         if test $ol_enable_rewrite = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2601         fi
2602                 if test $ol_enable_overlays != no ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2604         fi
2605         for i in $Overlays; do
2606                 eval "ol_tmp=\$ol_enable_$i"
2607                 if test $ol_tmp != no ; then
2608                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2609                         eval "ol_enable_$i=no"
2610                 fi
2611         done
2612
2613         # force settings to no
2614         ol_enable_slapi=no
2615
2616         ol_enable_backends=no
2617         ol_enable_overlays=no
2618         ol_enable_modules=no
2619         ol_enable_multimaster=no
2620         ol_enable_rlookups=no
2621         ol_enable_aci=no
2622         ol_enable_wrappers=no
2623
2624         ol_with_ldbm_api=no
2625         ol_with_ldbm_type=no
2626
2627         ol_enable_slurpd=no
2628
2629         ol_enable_rewrite=no
2630
2631 elif test $ol_enable_ldbm = no ; then
2632         
2633         if test $ol_with_ldbm_api != auto ; then
2634                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2635         fi
2636
2637         if test $ol_with_ldbm_type != auto ; then
2638                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2639         fi
2640
2641         if test $ol_enable_modules != yes -a \
2642                 $ol_enable_bdb = no -a \
2643                 $ol_enable_dnssrv = no -a \
2644                 $ol_enable_hdb = no -a \
2645                 $ol_enable_ldap = no -a \
2646                 $ol_enable_meta = no -a \
2647                 $ol_enable_monitor = no -a \
2648                 $ol_enable_null = no -a \
2649                 $ol_enable_passwd = no -a \
2650                 $ol_enable_perl = no -a \
2651                 $ol_enable_relay = no -a \
2652                 $ol_enable_shell = no -a \
2653                 $ol_enable_sql = no ; then
2654
2655                 if test $ol_enable_slapd = yes ; then
2656                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2657                 else
2658                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2659                         ol_enable_slapd=no
2660                 fi
2661         fi
2662
2663         ol_with_ldbm_api=no
2664         ol_with_ldbm_type=no
2665
2666         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2667                 ol_with_ldbm_api=berkeley
2668         fi
2669
2670 else
2671                 if test $ol_with_ldbm_api = gdbm -a \
2672                 $ol_with_ldbm_type = btree ; then
2673                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2674         fi
2675         if test $ol_with_ldbm_api = mdbm -a \
2676                 $ol_with_ldbm_type = btree ; then
2677                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2678         fi
2679         if test $ol_with_ldbm_api = ndbm -a \
2680                 $ol_with_ldbm_type = btree ; then
2681                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2682         fi
2683
2684         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2685                 if test $ol_with_ldbm_api = auto ; then
2686                         ol_with_ldbm_api=berkeley
2687                 elif test $ol_with_ldbm_api != berkeley ; then
2688                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2689                 fi
2690         fi
2691 fi
2692
2693 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2694         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2695 fi
2696
2697 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2698         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2699 fi
2700
2701 if test $ol_enable_slurpd = yes ; then
2702                 if test $ol_with_threads = no ; then
2703                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2704         fi
2705 fi
2706
2707 if test $ol_enable_lmpasswd = yes ; then
2708         if test $ol_with_tls = no ; then
2709                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2710         fi
2711 fi
2712
2713 if test $ol_enable_kbind = yes ; then
2714         if test $ol_with_kerberos = no ; then
2715                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2716         elif test $ol_with_kerberos = auto ; then
2717                 ol_with_kerberos=yes
2718         fi
2719
2720 elif test $ol_enable_kbind = no ; then
2721         if test $ol_with_kerberos = auto ; then
2722                 ol_with_kerberos=no
2723         elif test $ol_with_kerberos != no ; then
2724                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2725                 ol_with_kerberos=no
2726         fi
2727 fi
2728
2729 if test $ol_enable_spasswd = yes ; then
2730         if test $ol_with_cyrus_sasl = no ; then
2731                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2732         fi
2733         ol_with_cyrus_sasl=yes
2734 fi
2735
2736 echo "$ac_t""done" 1>&6
2737
2738 LDAP_LIBS=
2739 LDBM_LIBS=
2740 LTHREAD_LIBS=
2741 LUTIL_LIBS=
2742
2743 SLAPD_LIBS=
2744 SLURPD_LIBS=
2745
2746 BUILD_SLAPD=no
2747 BUILD_SLURPD=no
2748
2749 BUILD_THREAD=no
2750
2751 BUILD_SLAPI=no
2752 SLAPD_SLAPI_DEPEND=
2753
2754 BUILD_BDB=no
2755 BUILD_DNSSRV=no
2756 BUILD_HDB=no
2757 BUILD_LDAP=no
2758 BUILD_LDBM=no
2759 BUILD_META=no
2760 BUILD_MONITOR=no
2761 BUILD_NULL=no
2762 BUILD_PASSWD=no
2763 BUILD_PERL=no
2764 BUILD_RELAY=no
2765 BUILD_SHELL=no
2766 BUILD_SQL=no
2767
2768 BUILD_CHAIN=no
2769 BUILD_DENYOP=no
2770 BUILD_DYNGROUP=no
2771 BUILD_LASTMOD=no
2772 BUILD_PPOLICY=no
2773 BUILD_PROXYCACHE=no
2774 BUILD_REFINT=no
2775 BUILD_RWM=no
2776 BUILD_UNIQUE=no
2777
2778 SLAPD_DYNAMIC_OVERLAYS=
2779
2780 SLAPD_MODULES_LDFLAGS=
2781 SLAPD_MODULES_CPPFLAGS=
2782
2783 SLAPD_STATIC_BACKENDS=
2784 SLAPD_DYNAMIC_BACKENDS=
2785
2786 SLAPD_PERL_LDFLAGS=
2787 MOD_PERL_LDFLAGS=
2788 PERL_CPPFLAGS=
2789
2790 SLAPD_SQL_LDFLAGS=
2791 SLAPD_SQL_LIBS=
2792 SLAPD_SQL_INCLUDES=
2793
2794 KRB4_LIBS=
2795 KRB5_LIBS=
2796 SASL_LIBS=
2797 TLS_LIBS=
2798 MODULES_LIBS=
2799 SLAPI_LIBS=
2800 LIBSLAPI=
2801 LIBSLAPITOOLS=
2802 AUTH_LIBS=
2803
2804 SLAPD_SLP_LIBS=
2805 SLAPD_GMP_LIBS=
2806
2807
2808 cat >> confdefs.h <<\EOF
2809 #define HAVE_MKVERSION 1
2810 EOF
2811
2812
2813
2814
2815 ol_aix_threads=no
2816 case "$target" in
2817 *-*-aix*)       if test -z "$CC" ; then
2818                 case "$ol_with_threads" in
2819                 auto | yes |  posix) ol_aix_threads=yes ;;
2820                 esac
2821         fi
2822 ;;
2823 esac
2824
2825 if test $ol_aix_threads = yes ; then
2826         if test -z "${CC}" ; then
2827                 for ac_prog in cc_r xlc_r cc
2828 do
2829 # Extract the first word of "$ac_prog", so it can be a program name with args.
2830 set dummy $ac_prog; ac_word=$2
2831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2832 echo "configure:2833: checking for $ac_word" >&5
2833 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   if test -n "$CC"; then
2837   ac_cv_prog_CC="$CC" # Let the user override the test.
2838 else
2839   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2840   ac_dummy="$PATH"
2841   for ac_dir in $ac_dummy; do
2842     test -z "$ac_dir" && ac_dir=.
2843     if test -f $ac_dir/$ac_word; then
2844       ac_cv_prog_CC="$ac_prog"
2845       break
2846     fi
2847   done
2848   IFS="$ac_save_ifs"
2849 fi
2850 fi
2851 CC="$ac_cv_prog_CC"
2852 if test -n "$CC"; then
2853   echo "$ac_t""$CC" 1>&6
2854 else
2855   echo "$ac_t""no" 1>&6
2856 fi
2857
2858 test -n "$CC" && break
2859 done
2860
2861
2862                 if test "$CC" = cc ; then
2863                                                 if test $ol_with_threads != auto ; then
2864                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2865                         else
2866                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2867                         fi
2868                         ol_with_threads=no
2869                 fi
2870         fi
2871
2872         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2873                 ol_with_threads=posix
2874                 ol_cv_pthread_create=yes
2875         fi
2876 fi
2877
2878 if test -z "${CC}"; then
2879         for ac_prog in cc gcc
2880 do
2881 # Extract the first word of "$ac_prog", so it can be a program name with args.
2882 set dummy $ac_prog; ac_word=$2
2883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2884 echo "configure:2885: checking for $ac_word" >&5
2885 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2886   echo $ac_n "(cached) $ac_c" 1>&6
2887 else
2888   if test -n "$CC"; then
2889   ac_cv_prog_CC="$CC" # Let the user override the test.
2890 else
2891   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2892   ac_dummy="$PATH"
2893   for ac_dir in $ac_dummy; do
2894     test -z "$ac_dir" && ac_dir=.
2895     if test -f $ac_dir/$ac_word; then
2896       ac_cv_prog_CC="$ac_prog"
2897       break
2898     fi
2899   done
2900   IFS="$ac_save_ifs"
2901 fi
2902 fi
2903 CC="$ac_cv_prog_CC"
2904 if test -n "$CC"; then
2905   echo "$ac_t""$CC" 1>&6
2906 else
2907   echo "$ac_t""no" 1>&6
2908 fi
2909
2910 test -n "$CC" && break
2911 done
2912 test -n "$CC" || CC="missing"
2913
2914
2915         if test "${CC}" = "missing" ; then
2916                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2917         fi
2918 fi
2919
2920 if test -z "${AR}"; then
2921         for ac_prog in ar gar
2922 do
2923 # Extract the first word of "$ac_prog", so it can be a program name with args.
2924 set dummy $ac_prog; ac_word=$2
2925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2926 echo "configure:2927: checking for $ac_word" >&5
2927 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   if test -n "$AR"; then
2931   ac_cv_prog_AR="$AR" # Let the user override the test.
2932 else
2933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2934   ac_dummy="$PATH"
2935   for ac_dir in $ac_dummy; do
2936     test -z "$ac_dir" && ac_dir=.
2937     if test -f $ac_dir/$ac_word; then
2938       ac_cv_prog_AR="$ac_prog"
2939       break
2940     fi
2941   done
2942   IFS="$ac_save_ifs"
2943 fi
2944 fi
2945 AR="$ac_cv_prog_AR"
2946 if test -n "$AR"; then
2947   echo "$ac_t""$AR" 1>&6
2948 else
2949   echo "$ac_t""no" 1>&6
2950 fi
2951
2952 test -n "$AR" && break
2953 done
2954 test -n "$AR" || AR="missing"
2955
2956
2957         if test "${AR}" = "missing" ; then
2958                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2959         fi
2960 fi
2961
2962
2963
2964 # Find the correct PATH separator.  Usually this is `:', but
2965 # DJGPP uses `;' like DOS.
2966 if test "X${PATH_SEPARATOR+set}" != Xset; then
2967   UNAME=${UNAME-`uname 2>/dev/null`}
2968   case X$UNAME in
2969     *-DOS) lt_cv_sys_path_separator=';' ;;
2970     *)     lt_cv_sys_path_separator=':' ;;
2971   esac
2972   PATH_SEPARATOR=$lt_cv_sys_path_separator
2973 fi
2974
2975 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2976 echo "configure:2977: checking for Cygwin environment" >&5
2977 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983
2984 int main() {
2985
2986 #ifndef __CYGWIN__
2987 #define __CYGWIN__ __CYGWIN32__
2988 #endif
2989 return __CYGWIN__;
2990 ; return 0; }
2991 EOF
2992 if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2993   rm -rf conftest*
2994   ac_cv_cygwin=yes
2995 else
2996   echo "configure: failed program was:" >&5
2997   cat conftest.$ac_ext >&5
2998   rm -rf conftest*
2999   ac_cv_cygwin=no
3000 fi
3001 rm -f conftest*
3002 fi
3003
3004 echo "$ac_t""$ac_cv_cygwin" 1>&6
3005 CYGWIN=
3006 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3007 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3008 echo "configure:3009: checking for mingw32 environment" >&5
3009 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3010   echo $ac_n "(cached) $ac_c" 1>&6
3011 else
3012   cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015
3016 int main() {
3017 return __MINGW32__;
3018 ; return 0; }
3019 EOF
3020 if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3021   rm -rf conftest*
3022   ac_cv_mingw32=yes
3023 else
3024   echo "configure: failed program was:" >&5
3025   cat conftest.$ac_ext >&5
3026   rm -rf conftest*
3027   ac_cv_mingw32=no
3028 fi
3029 rm -f conftest*
3030 fi
3031
3032 echo "$ac_t""$ac_cv_mingw32" 1>&6
3033 MINGW32=
3034 test "$ac_cv_mingw32" = yes && MINGW32=yes
3035 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3036 echo "configure:3037: checking for EMX OS/2 environment" >&5
3037 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3038   echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040   cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043
3044 int main() {
3045 return __EMX__;
3046 ; return 0; }
3047 EOF
3048 if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3049   rm -rf conftest*
3050   ac_cv_emxos2=yes
3051 else
3052   echo "configure: failed program was:" >&5
3053   cat conftest.$ac_ext >&5
3054   rm -rf conftest*
3055   ac_cv_emxos2=no
3056 fi
3057 rm -f conftest*
3058 fi
3059
3060 echo "$ac_t""$ac_cv_emxos2" 1>&6
3061 EMXOS2=
3062 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3063 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3064 echo "configure:3065: checking how to run the C preprocessor" >&5
3065 # On Suns, sometimes $CPP names a directory.
3066 if test -n "$CPP" && test -d "$CPP"; then
3067   CPP=
3068 fi
3069 if test -z "$CPP"; then
3070 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073     # This must be in double quotes, not single quotes, because CPP may get
3074   # substituted into the Makefile and "${CC-cc}" will confuse make.
3075   CPP="${CC-cc} -E"
3076   # On the NeXT, cc -E runs the code through the compiler's parser,
3077   # not just through cpp.
3078   cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081 #include <assert.h>
3082 Syntax Error
3083 EOF
3084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3085 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087 if test -z "$ac_err"; then
3088   :
3089 else
3090   echo "$ac_err" >&5
3091   echo "configure: failed program was:" >&5
3092   cat conftest.$ac_ext >&5
3093   rm -rf conftest*
3094   CPP="${CC-cc} -E -traditional-cpp"
3095   cat > conftest.$ac_ext <<EOF
3096 #line 3097 "configure"
3097 #include "confdefs.h"
3098 #include <assert.h>
3099 Syntax Error
3100 EOF
3101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3102 { (eval echo configure:3103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3104 if test -z "$ac_err"; then
3105   :
3106 else
3107   echo "$ac_err" >&5
3108   echo "configure: failed program was:" >&5
3109   cat conftest.$ac_ext >&5
3110   rm -rf conftest*
3111   CPP="${CC-cc} -nologo -E"
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 #include <assert.h>
3116 Syntax Error
3117 EOF
3118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3119 { (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3121 if test -z "$ac_err"; then
3122   :
3123 else
3124   echo "$ac_err" >&5
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   CPP=/lib/cpp
3129 fi
3130 rm -f conftest*
3131 fi
3132 rm -f conftest*
3133 fi
3134 rm -f conftest*
3135   ac_cv_prog_CPP="$CPP"
3136 fi
3137   CPP="$ac_cv_prog_CPP"
3138 else
3139   ac_cv_prog_CPP="$CPP"
3140 fi
3141 echo "$ac_t""$CPP" 1>&6
3142
3143 # Check whether --enable-fast-install or --disable-fast-install was given.
3144 if test "${enable_fast_install+set}" = set; then
3145   enableval="$enable_fast_install"
3146   p=${PACKAGE-default}
3147 case $enableval in
3148 yes) enable_fast_install=yes ;;
3149 no) enable_fast_install=no ;;
3150 *)
3151   enable_fast_install=no
3152   # Look at the argument we got.  We use all the common list separators.
3153   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3154   for pkg in $enableval; do
3155     if test "X$pkg" = "X$p"; then
3156       enable_fast_install=yes
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160   ;;
3161 esac
3162 else
3163   enable_fast_install=yes
3164 fi
3165
3166 # Extract the first word of "gcc", so it can be a program name with args.
3167 set dummy gcc; ac_word=$2
3168 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3169 echo "configure:3170: checking for $ac_word" >&5
3170 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3171   echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173   if test -n "$CC"; then
3174   ac_cv_prog_CC="$CC" # Let the user override the test.
3175 else
3176   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3177   ac_dummy="$PATH"
3178   for ac_dir in $ac_dummy; do
3179     test -z "$ac_dir" && ac_dir=.
3180     if test -f $ac_dir/$ac_word; then
3181       ac_cv_prog_CC="gcc"
3182       break
3183     fi
3184   done
3185   IFS="$ac_save_ifs"
3186 fi
3187 fi
3188 CC="$ac_cv_prog_CC"
3189 if test -n "$CC"; then
3190   echo "$ac_t""$CC" 1>&6
3191 else
3192   echo "$ac_t""no" 1>&6
3193 fi
3194
3195 if test -z "$CC"; then
3196   # Extract the first word of "cc", so it can be a program name with args.
3197 set dummy cc; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$CC"; then
3204   ac_cv_prog_CC="$CC" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_prog_rejected=no
3208   ac_dummy="$PATH"
3209   for ac_dir in $ac_dummy; do
3210     test -z "$ac_dir" && ac_dir=.
3211     if test -f $ac_dir/$ac_word; then
3212       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3213         ac_prog_rejected=yes
3214         continue
3215       fi
3216       ac_cv_prog_CC="cc"
3217       break
3218     fi
3219   done
3220   IFS="$ac_save_ifs"
3221 if test $ac_prog_rejected = yes; then
3222   # We found a bogon in the path, so make sure we never use it.
3223   set dummy $ac_cv_prog_CC
3224   shift
3225   if test $# -gt 0; then
3226     # We chose a different compiler from the bogus one.
3227     # However, it has the same basename, so the bogon will be chosen
3228     # first if we set CC to just the basename; use the full file name.
3229     shift
3230     set dummy "$ac_dir/$ac_word" "$@"
3231     shift
3232     ac_cv_prog_CC="$@"
3233   fi
3234 fi
3235 fi
3236 fi
3237 CC="$ac_cv_prog_CC"
3238 if test -n "$CC"; then
3239   echo "$ac_t""$CC" 1>&6
3240 else
3241   echo "$ac_t""no" 1>&6
3242 fi
3243
3244   if test -z "$CC"; then
3245     case "`uname -s`" in
3246     *win32* | *WIN32* | *CYGWIN*)
3247       # Extract the first word of "cl", so it can be a program name with args.
3248 set dummy cl; ac_word=$2
3249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_word" >&5
3251 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   if test -n "$CC"; then
3255   ac_cv_prog_CC="$CC" # Let the user override the test.
3256 else
3257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3258   ac_dummy="$PATH"
3259   for ac_dir in $ac_dummy; do
3260     test -z "$ac_dir" && ac_dir=.
3261     if test -f $ac_dir/$ac_word; then
3262       ac_cv_prog_CC="cl"
3263       break
3264     fi
3265   done
3266   IFS="$ac_save_ifs"
3267 fi
3268 fi
3269 CC="$ac_cv_prog_CC"
3270 if test -n "$CC"; then
3271   echo "$ac_t""$CC" 1>&6
3272 else
3273   echo "$ac_t""no" 1>&6
3274 fi
3275  ;;
3276     esac
3277   fi
3278   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3279 fi
3280
3281 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3282 echo "configure:3283: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3283
3284 ac_ext=c
3285 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3286 ac_cpp='$CPP $CPPFLAGS'
3287 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3288 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3289 cross_compiling=$ac_cv_prog_cc_cross
3290
3291 cat > conftest.$ac_ext << EOF
3292
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295
3296 main(){return(0);}
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3299   ac_cv_prog_cc_works=yes
3300   # If we can't run a trivial program, we are probably using a cross compiler.
3301   if (./conftest; exit) 2>/dev/null; then
3302     ac_cv_prog_cc_cross=no
3303   else
3304     ac_cv_prog_cc_cross=yes
3305   fi
3306 else
3307   echo "configure: failed program was:" >&5
3308   cat conftest.$ac_ext >&5
3309   ac_cv_prog_cc_works=no
3310 fi
3311 rm -fr conftest*
3312 ac_ext=c
3313 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3314 ac_cpp='$CPP $CPPFLAGS'
3315 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3316 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3317 cross_compiling=$ac_cv_prog_cc_cross
3318
3319 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3320 if test $ac_cv_prog_cc_works = no; then
3321   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3322 fi
3323 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3324 echo "configure:3325: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3325 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3326 cross_compiling=$ac_cv_prog_cc_cross
3327
3328 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3329 echo "configure:3330: checking whether we are using GNU C" >&5
3330 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.c <<EOF
3334 #ifdef __GNUC__
3335   yes;
3336 #endif
3337 EOF
3338 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3339   ac_cv_prog_gcc=yes
3340 else
3341   ac_cv_prog_gcc=no
3342 fi
3343 fi
3344
3345 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3346
3347 if test $ac_cv_prog_gcc = yes; then
3348   GCC=yes
3349 else
3350   GCC=
3351 fi
3352
3353 ac_test_CFLAGS="${CFLAGS+set}"
3354 ac_save_CFLAGS="$CFLAGS"
3355 CFLAGS=
3356 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3357 echo "configure:3358: checking whether ${CC-cc} accepts -g" >&5
3358 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   echo 'void f(){}' > conftest.c
3362 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3363   ac_cv_prog_cc_g=yes
3364 else
3365   ac_cv_prog_cc_g=no
3366 fi
3367 rm -f conftest*
3368
3369 fi
3370
3371 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3372 if test "$ac_test_CFLAGS" = set; then
3373   CFLAGS="$ac_save_CFLAGS"
3374 elif test $ac_cv_prog_cc_g = yes; then
3375   if test "$GCC" = yes; then
3376     CFLAGS="-g -O2"
3377   else
3378     CFLAGS="-g"
3379   fi
3380 else
3381   if test "$GCC" = yes; then
3382     CFLAGS="-O2"
3383   else
3384     CFLAGS=
3385   fi
3386 fi
3387
3388 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3389 if test "${with_gnu_ld+set}" = set; then
3390   withval="$with_gnu_ld"
3391   test "$withval" = no || with_gnu_ld=yes
3392 else
3393   with_gnu_ld=no
3394 fi
3395
3396 ac_prog=ld
3397 if test "$GCC" = yes; then
3398   # Check if gcc -print-prog-name=ld gives a path.
3399   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3400 echo "configure:3401: checking for ld used by GCC" >&5
3401   case $host in
3402   *-*-mingw*)
3403     # gcc leaves a trailing carriage return which upsets mingw
3404     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3405   *)
3406     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3407   esac
3408   case $ac_prog in
3409     # Accept absolute paths.
3410     [\\/]* | [A-Za-z]:[\\/]*)
3411       re_direlt='/[^/][^/]*/\.\./'
3412       # Canonicalize the path of ld
3413       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3414       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3415         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3416       done
3417       test -z "$LD" && LD="$ac_prog"
3418       ;;
3419   "")
3420     # If it fails, then pretend we aren't using GCC.
3421     ac_prog=ld
3422     ;;
3423   *)
3424     # If it is relative, then search for the first ld in PATH.
3425     with_gnu_ld=unknown
3426     ;;
3427   esac
3428 elif test "$with_gnu_ld" = yes; then
3429   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3430 echo "configure:3431: checking for GNU ld" >&5
3431 else
3432   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3433 echo "configure:3434: checking for non-GNU ld" >&5
3434 fi
3435 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   if test -z "$LD"; then
3439   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3440   for ac_dir in $PATH; do
3441     test -z "$ac_dir" && ac_dir=.
3442     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3443       lt_cv_path_LD="$ac_dir/$ac_prog"
3444       # Check to see if the program is GNU ld.  I'd rather use --version,
3445       # but apparently some GNU ld's only accept -v.
3446       # Break only if it was the GNU/non-GNU ld that we prefer.
3447       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3448         test "$with_gnu_ld" != no && break
3449       else
3450         test "$with_gnu_ld" != yes && break
3451       fi
3452     fi
3453   done
3454   IFS="$ac_save_ifs"
3455 else
3456   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3457 fi
3458 fi
3459
3460 LD="$lt_cv_path_LD"
3461 if test -n "$LD"; then
3462   echo "$ac_t""$LD" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3467 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3468 echo "configure:3469: checking if the linker ($LD) is GNU ld" >&5
3469 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3473 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3474   lt_cv_prog_gnu_ld=yes
3475 else
3476   lt_cv_prog_gnu_ld=no
3477 fi
3478 fi
3479
3480 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3481 with_gnu_ld=$lt_cv_prog_gnu_ld
3482
3483
3484 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3485 echo "configure:3486: checking for $LD option to reload object files" >&5
3486 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   lt_cv_ld_reload_flag='-r'
3490 fi
3491
3492 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3493 reload_flag=$lt_cv_ld_reload_flag
3494 test -n "$reload_flag" && reload_flag=" $reload_flag"
3495
3496 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3497 echo "configure:3498: checking for BSD-compatible nm" >&5
3498 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   if test -n "$NM"; then
3502   # Let the user override the test.
3503   lt_cv_path_NM="$NM"
3504 else
3505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3506   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3507     test -z "$ac_dir" && ac_dir=.
3508     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3509     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3510       # Check to see if the nm accepts a BSD-compat flag.
3511       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3512       #   nm: unknown option "B" ignored
3513       # Tru64's nm complains that /dev/null is an invalid object file
3514       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3515         lt_cv_path_NM="$tmp_nm -B"
3516         break
3517       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3518         lt_cv_path_NM="$tmp_nm -p"
3519         break
3520       else
3521         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3522         continue # so that we can try to find one that supports BSD flags
3523       fi
3524     fi
3525   done
3526   IFS="$ac_save_ifs"
3527   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3528 fi
3529 fi
3530
3531 NM="$lt_cv_path_NM"
3532 echo "$ac_t""$NM" 1>&6
3533
3534 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3535 echo "configure:3536: checking for a sed that does not truncate output" >&5
3536 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   # Loop through the user's path and test for sed and gsed.
3540 # Then use that list of sed's as ones to test for truncation.
3541 as_executable_p="test -f"
3542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543 for as_dir in $PATH
3544 do
3545   IFS=$as_save_IFS
3546   test -z "$as_dir" && as_dir=.
3547   for ac_prog in sed gsed; do
3548     for ac_exec_ext in '' $ac_executable_extensions; do
3549       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3550         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3551       fi
3552     done
3553   done
3554 done
3555
3556   # Create a temporary directory, and hook for its removal unless debugging.
3557 $debug ||
3558 {
3559   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3560   trap '{ (exit 1); exit 1; }' 1 2 13 15
3561 }
3562
3563 # Create a (secure) tmp directory for tmp files.
3564 : ${TMPDIR=/tmp}
3565 {
3566   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3567   test -n "$tmp" && test -d "$tmp"
3568 }  ||
3569 {
3570   tmp=$TMPDIR/sed$$-$RANDOM
3571   (umask 077 && mkdir $tmp)
3572 } ||
3573 {
3574    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3575    { (exit 1); exit 1; }
3576 }
3577   _max=0
3578   _count=0
3579   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3580   # along with /bin/sed that truncates output.
3581   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3582     test ! -f ${_sed} && break
3583     cat /dev/null > "$tmp/sed.in"
3584     _count=0
3585     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3586     # Check for GNU sed and select it if it is found.
3587     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3588       lt_cv_path_SED=${_sed}
3589       break
3590     fi
3591     while true; do
3592       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3593       mv "$tmp/sed.tmp" "$tmp/sed.in"
3594       cp "$tmp/sed.in" "$tmp/sed.nl"
3595       echo >>"$tmp/sed.nl"
3596       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3597       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3598       # 40000 chars as input seems more than enough
3599       test $_count -gt 10 && break
3600       _count=`expr $_count + 1`
3601       if test $_count -gt $_max; then
3602         _max=$_count
3603         lt_cv_path_SED=$_sed
3604       fi
3605     done
3606   done
3607   rm -rf "$tmp"
3608
3609 fi
3610
3611 if test "X$SED" != "X"; then
3612   lt_cv_path_SED=$SED
3613 else
3614   SED=$lt_cv_path_SED
3615 fi
3616 echo "$ac_t""$SED" 1>&6
3617
3618 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3619 echo "configure:3620: checking whether ln -s works" >&5
3620 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623   rm -f conftestdata
3624 if ln -s X conftestdata 2>/dev/null
3625 then
3626   rm -f conftestdata
3627   ac_cv_prog_LN_S="ln -s"
3628 else
3629   ac_cv_prog_LN_S=ln
3630 fi
3631 fi
3632 LN_S="$ac_cv_prog_LN_S"
3633 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3634   echo "$ac_t""yes" 1>&6
3635 else
3636   echo "$ac_t""no" 1>&6
3637 fi
3638
3639 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3640 echo "configure:3641: checking how to recognise dependent libraries" >&5
3641 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   lt_cv_file_magic_cmd='$MAGIC_CMD'
3645 lt_cv_file_magic_test_file=
3646 lt_cv_deplibs_check_method='unknown'
3647 # Need to set the preceding variable on all platforms that support
3648 # interlibrary dependencies.
3649 # 'none' -- dependencies not supported.
3650 # `unknown' -- same as none, but documents that we really don't know.
3651 # 'pass_all' -- all dependencies passed with no checks.
3652 # 'test_compile' -- check by making test program.
3653 # 'file_magic [[regex]]' -- check by looking for files in library path
3654 # which responds to the $file_magic_cmd with a given egrep regex.
3655 # If you have `file' or equivalent on your system and you're not sure
3656 # whether `pass_all' will *always* work, you probably want this one.
3657
3658 case $host_os in
3659 aix4* | aix5*)
3660   lt_cv_deplibs_check_method=pass_all
3661   ;;
3662
3663 beos*)
3664   lt_cv_deplibs_check_method=pass_all
3665   ;;
3666
3667 bsdi4*)
3668   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3669   lt_cv_file_magic_cmd='/usr/bin/file -L'
3670   lt_cv_file_magic_test_file=/shlib/libc.so
3671   ;;
3672
3673 cygwin* | mingw* | pw32*)
3674   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3675   lt_cv_file_magic_cmd='$OBJDUMP -f'
3676   ;;
3677
3678 darwin* | rhapsody*)
3679   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3680   lt_cv_file_magic_cmd='/usr/bin/file -L'
3681   case "$host_os" in
3682   rhapsody* | darwin1.[012])
3683     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3684     ;;
3685   *) # Darwin 1.3 on
3686     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3687     ;;
3688   esac
3689   ;;
3690
3691 freebsd*)
3692   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3693     case $host_cpu in
3694     i*86 )
3695       # Not sure whether the presence of OpenBSD here was a mistake.
3696       # Let's accept both of them until this is cleared up.
3697       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3698       lt_cv_file_magic_cmd=/usr/bin/file
3699       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3700       ;;
3701     esac
3702   else
3703     lt_cv_deplibs_check_method=pass_all
3704   fi
3705   ;;
3706
3707 gnu*)
3708   lt_cv_deplibs_check_method=pass_all
3709   ;;
3710
3711 hpux10.20*|hpux11*)
3712   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3713   lt_cv_file_magic_cmd=/usr/bin/file
3714   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3715   ;;
3716
3717 irix5* | irix6* | nonstopux*)
3718   case $host_os in
3719   irix5* | nonstopux*)
3720     # this will be overridden with pass_all, but let us keep it just in case
3721     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3722     ;;
3723   *)
3724     case $LD in
3725     *-32|*"-32 ") libmagic=32-bit;;
3726     *-n32|*"-n32 ") libmagic=N32;;
3727     *-64|*"-64 ") libmagic=64-bit;;
3728     *) libmagic=never-match;;
3729     esac
3730     # this will be overridden with pass_all, but let us keep it just in case
3731     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3732     ;;
3733   esac
3734   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3735   lt_cv_deplibs_check_method=pass_all
3736   ;;
3737
3738 # This must be Linux ELF.
3739 linux-gnu*)
3740   case $host_cpu in
3741   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3742     lt_cv_deplibs_check_method=pass_all ;;
3743   *)
3744     # glibc up to 2.1.1 does not perform some relocations on ARM
3745     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3746   esac
3747   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3748   ;;
3749
3750 netbsd*)
3751   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3752     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3753   else
3754     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3755   fi
3756   ;;
3757
3758 newos6*)
3759   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3760   lt_cv_file_magic_cmd=/usr/bin/file
3761   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3762   ;;
3763
3764 openbsd*)
3765   lt_cv_file_magic_cmd=/usr/bin/file
3766   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3767   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3768     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3769   else
3770     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3771   fi
3772   ;;
3773
3774 openedition*)
3775   lt_cv_deplibs_check_method=pass_all
3776   ;;
3777
3778 osf3* | osf4* | osf5*)
3779   # this will be overridden with pass_all, but let us keep it just in case
3780   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3781   lt_cv_file_magic_test_file=/shlib/libc.so
3782   lt_cv_deplibs_check_method=pass_all
3783   ;;
3784
3785 sco3.2v5*)
3786   lt_cv_deplibs_check_method=pass_all
3787   ;;
3788
3789 solaris*)
3790   lt_cv_deplibs_check_method=pass_all
3791   lt_cv_file_magic_test_file=/lib/libc.so
3792   ;;
3793
3794 sysv5uw[78]* | sysv4*uw2*)
3795   lt_cv_deplibs_check_method=pass_all
3796   ;;
3797
3798 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3799   case $host_vendor in
3800   motorola)
3801     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]'
3802     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3803     ;;
3804   ncr)
3805     lt_cv_deplibs_check_method=pass_all
3806     ;;
3807   sequent)
3808     lt_cv_file_magic_cmd='/bin/file'
3809     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3810     ;;
3811   sni)
3812     lt_cv_file_magic_cmd='/bin/file'
3813     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3814     lt_cv_file_magic_test_file=/lib/libc.so
3815     ;;
3816   siemens)
3817     lt_cv_deplibs_check_method=pass_all
3818     ;;
3819   esac
3820   ;;
3821 esac
3822
3823 fi
3824
3825 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3826 file_magic_cmd=$lt_cv_file_magic_cmd
3827 deplibs_check_method=$lt_cv_deplibs_check_method
3828
3829 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3830 echo "configure:3831: checking for object suffix" >&5
3831 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   rm -f conftest*
3835 echo 'int i = 1;' > conftest.$ac_ext
3836 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837   for ac_file in conftest.*; do
3838     case $ac_file in
3839     *.c) ;;
3840     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3841     esac
3842   done
3843 else
3844   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_objext" 1>&6
3850 OBJEXT=$ac_cv_objext
3851 ac_objext=$ac_cv_objext
3852
3853
3854
3855
3856 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3857 echo "configure:3858: checking for executable suffix" >&5
3858 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3862   ac_cv_exeext=.exe
3863 else
3864   rm -f conftest*
3865   echo 'int main () { return 0; }' > conftest.$ac_ext
3866   ac_cv_exeext=
3867   if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3868     for file in conftest.*; do
3869       case $file in
3870       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3871       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3872       esac
3873     done
3874   else
3875     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3876   fi
3877   rm -f conftest*
3878   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3879 fi
3880 fi
3881
3882 EXEEXT=""
3883 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3884 echo "$ac_t""${ac_cv_exeext}" 1>&6
3885 ac_exeext=$EXEEXT
3886
3887 if test $host != $build; then
3888   ac_tool_prefix=${host_alias}-
3889 else
3890   ac_tool_prefix=
3891 fi
3892
3893
3894
3895
3896 # Check for command to grab the raw symbol name followed by C symbol from nm.
3897 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3898 echo "configure:3899: checking command to parse $NM output" >&5
3899 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   
3903 # These are sane defaults that work on at least a few old systems.
3904 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3905
3906 # Character class describing NM global symbol codes.
3907 symcode='[BCDEGRST]'
3908
3909 # Regexp to match symbols that can be accessed directly from C.
3910 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3911
3912 # Transform the above into a raw symbol and a C symbol.
3913 symxfrm='\1 \2\3 \3'
3914
3915 # Transform an extracted symbol line into a proper C declaration
3916 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3917
3918 # Transform an extracted symbol line into symbol name and symbol address
3919 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'"
3920
3921 # Define system-specific variables.
3922 case $host_os in
3923 aix*)
3924   symcode='[BCDT]'
3925   ;;
3926 cygwin* | mingw* | pw32*)
3927   symcode='[ABCDGISTW]'
3928   ;;
3929 hpux*) # Its linker distinguishes data from code symbols
3930   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3931   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'"
3932   ;;
3933 irix* | nonstopux*)
3934   symcode='[BCDEGRST]'
3935   ;;
3936 osf*)
3937   symcode='[BCDEGQRST]'
3938   ;;
3939 solaris* | sysv5*)
3940   symcode='[BDT]'
3941   ;;
3942 sysv4)
3943   symcode='[DFNSTU]'
3944   ;;
3945 esac
3946
3947 # Handle CRLF in mingw tool chain
3948 opt_cr=
3949 case $host_os in
3950 mingw*)
3951   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3952   ;;
3953 esac
3954
3955 # If we're using GNU nm, then use its standard symbol codes.
3956 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3957   symcode='[ABCDGISTW]'
3958 fi
3959
3960 # Try without a prefix undercore, then with it.
3961 for ac_symprfx in "" "_"; do
3962
3963   # Write the raw and C identifiers.
3964 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3965
3966   # Check to see that the pipe works correctly.
3967   pipe_works=no
3968   rm -f conftest*
3969   cat > conftest.$ac_ext <<EOF
3970 #ifdef __cplusplus
3971 extern "C" {
3972 #endif
3973 char nm_test_var;
3974 void nm_test_func(){}
3975 #ifdef __cplusplus
3976 }
3977 #endif
3978 int main(){nm_test_var='a';nm_test_func();return(0);}
3979 EOF
3980
3981   if { (eval echo configure:3982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3982     # Now try to grab the symbols.
3983     nlist=conftest.nm
3984     if { (eval echo configure:3985: \"$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
3985       # Try sorting and uniquifying the output.
3986       if sort "$nlist" | uniq > "$nlist"T; then
3987         mv -f "$nlist"T "$nlist"
3988       else
3989         rm -f "$nlist"T
3990       fi
3991
3992       # Make sure that we snagged all the symbols we need.
3993       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3994         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3995           cat <<EOF > conftest.$ac_ext
3996 #ifdef __cplusplus
3997 extern "C" {
3998 #endif
3999
4000 EOF
4001           # Now generate the symbol file.
4002           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4003
4004           cat <<EOF >> conftest.$ac_ext
4005 #if defined (__STDC__) && __STDC__
4006 # define lt_ptr void *
4007 #else
4008 # define lt_ptr char *
4009 # define const
4010 #endif
4011
4012 /* The mapping between symbol names and symbols. */
4013 const struct {
4014   const char *name;
4015   lt_ptr address;
4016 }
4017 lt_preloaded_symbols[] =
4018 {
4019 EOF
4020           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4021           cat <<\EOF >> conftest.$ac_ext
4022   {0, (lt_ptr) 0}
4023 };
4024
4025 #ifdef __cplusplus
4026 }
4027 #endif
4028 EOF
4029           # Now try linking the two files.
4030           mv conftest.$ac_objext conftstm.$ac_objext
4031           save_LIBS="$LIBS"
4032           save_CFLAGS="$CFLAGS"
4033           LIBS="conftstm.$ac_objext"
4034           CFLAGS="$CFLAGS$no_builtin_flag"
4035           if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4036             pipe_works=yes
4037           fi
4038           LIBS="$save_LIBS"
4039           CFLAGS="$save_CFLAGS"
4040         else
4041           echo "cannot find nm_test_func in $nlist" >&5
4042         fi
4043       else
4044         echo "cannot find nm_test_var in $nlist" >&5
4045       fi
4046     else
4047       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4048     fi
4049   else
4050     echo "$progname: failed program was:" >&5
4051     cat conftest.$ac_ext >&5
4052   fi
4053   rm -f conftest* conftst*
4054
4055   # Do not use the global_symbol_pipe unless it works.
4056   if test "$pipe_works" = yes; then
4057     break
4058   else
4059     lt_cv_sys_global_symbol_pipe=
4060   fi
4061 done
4062
4063 fi
4064
4065 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4066 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4067   global_symbol_to_cdecl=
4068   global_symbol_to_c_name_address=
4069 else
4070   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4071   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4072 fi
4073 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4074 then
4075   echo "$ac_t""failed" 1>&6
4076 else
4077   echo "$ac_t""ok" 1>&6
4078 fi
4079
4080 for ac_hdr in dlfcn.h
4081 do
4082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4084 echo "configure:4085: checking for $ac_hdr" >&5
4085 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091 #include <$ac_hdr>
4092 EOF
4093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4094 { (eval echo configure:4095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4096 if test -z "$ac_err"; then
4097   rm -rf conftest*
4098   eval "ac_cv_header_$ac_safe=yes"
4099 else
4100   echo "$ac_err" >&5
4101   echo "configure: failed program was:" >&5
4102   cat conftest.$ac_ext >&5
4103   rm -rf conftest*
4104   eval "ac_cv_header_$ac_safe=no"
4105 fi
4106 rm -f conftest*
4107 fi
4108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4109   echo "$ac_t""yes" 1>&6
4110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4111   cat >> confdefs.h <<EOF
4112 #define $ac_tr_hdr 1
4113 EOF
4114  
4115 else
4116   echo "$ac_t""no" 1>&6
4117 fi
4118 done
4119
4120
4121
4122
4123
4124
4125 # Only perform the check for file, if the check method requires it
4126 case $deplibs_check_method in
4127 file_magic*)
4128   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4129     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4130 echo "configure:4131: checking for ${ac_tool_prefix}file" >&5
4131 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4132   echo $ac_n "(cached) $ac_c" 1>&6
4133 else
4134   case $MAGIC_CMD in
4135   /*)
4136   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4137   ;;
4138   ?:/*)
4139   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4140   ;;
4141   *)
4142   ac_save_MAGIC_CMD="$MAGIC_CMD"
4143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4144   ac_dummy="/usr/bin:$PATH"
4145   for ac_dir in $ac_dummy; do
4146     test -z "$ac_dir" && ac_dir=.
4147     if test -f $ac_dir/${ac_tool_prefix}file; then
4148       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4149       if test -n "$file_magic_test_file"; then
4150         case $deplibs_check_method in
4151         "file_magic "*)
4152           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4153           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4154           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4155             egrep "$file_magic_regex" > /dev/null; then
4156             :
4157           else
4158             cat <<EOF 1>&2
4159
4160 *** Warning: the command libtool uses to detect shared libraries,
4161 *** $file_magic_cmd, produces output that libtool cannot recognize.
4162 *** The result is that libtool may fail to recognize shared libraries
4163 *** as such.  This will affect the creation of libtool libraries that
4164 *** depend on shared libraries, but programs linked with such libtool
4165 *** libraries will work regardless of this problem.  Nevertheless, you
4166 *** may want to report the problem to your system manager and/or to
4167 *** bug-libtool@gnu.org
4168
4169 EOF
4170           fi ;;
4171         esac
4172       fi
4173       break
4174     fi
4175   done
4176   IFS="$ac_save_ifs"
4177   MAGIC_CMD="$ac_save_MAGIC_CMD"
4178   ;;
4179 esac
4180 fi
4181
4182 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4183 if test -n "$MAGIC_CMD"; then
4184   echo "$ac_t""$MAGIC_CMD" 1>&6
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188
4189 if test -z "$lt_cv_path_MAGIC_CMD"; then
4190   if test -n "$ac_tool_prefix"; then
4191     echo $ac_n "checking for file""... $ac_c" 1>&6
4192 echo "configure:4193: checking for file" >&5
4193 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   case $MAGIC_CMD in
4197   /*)
4198   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4199   ;;
4200   ?:/*)
4201   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4202   ;;
4203   *)
4204   ac_save_MAGIC_CMD="$MAGIC_CMD"
4205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4206   ac_dummy="/usr/bin:$PATH"
4207   for ac_dir in $ac_dummy; do
4208     test -z "$ac_dir" && ac_dir=.
4209     if test -f $ac_dir/file; then
4210       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4211       if test -n "$file_magic_test_file"; then
4212         case $deplibs_check_method in
4213         "file_magic "*)
4214           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4215           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4216           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4217             egrep "$file_magic_regex" > /dev/null; then
4218             :
4219           else
4220             cat <<EOF 1>&2
4221
4222 *** Warning: the command libtool uses to detect shared libraries,
4223 *** $file_magic_cmd, produces output that libtool cannot recognize.
4224 *** The result is that libtool may fail to recognize shared libraries
4225 *** as such.  This will affect the creation of libtool libraries that
4226 *** depend on shared libraries, but programs linked with such libtool
4227 *** libraries will work regardless of this problem.  Nevertheless, you
4228 *** may want to report the problem to your system manager and/or to
4229 *** bug-libtool@gnu.org
4230
4231 EOF
4232           fi ;;
4233         esac
4234       fi
4235       break
4236     fi
4237   done
4238   IFS="$ac_save_ifs"
4239   MAGIC_CMD="$ac_save_MAGIC_CMD"
4240   ;;
4241 esac
4242 fi
4243
4244 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4245 if test -n "$MAGIC_CMD"; then
4246   echo "$ac_t""$MAGIC_CMD" 1>&6
4247 else
4248   echo "$ac_t""no" 1>&6
4249 fi
4250
4251   else
4252     MAGIC_CMD=:
4253   fi
4254 fi
4255
4256   fi
4257   ;;
4258 esac
4259
4260 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4261 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4263 echo "configure:4264: checking for $ac_word" >&5
4264 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   if test -n "$RANLIB"; then
4268   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4269 else
4270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4271   ac_dummy="$PATH"
4272   for ac_dir in $ac_dummy; do
4273     test -z "$ac_dir" && ac_dir=.
4274     if test -f $ac_dir/$ac_word; then
4275       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4276       break
4277     fi
4278   done
4279   IFS="$ac_save_ifs"
4280 fi
4281 fi
4282 RANLIB="$ac_cv_prog_RANLIB"
4283 if test -n "$RANLIB"; then
4284   echo "$ac_t""$RANLIB" 1>&6
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289
4290 if test -z "$ac_cv_prog_RANLIB"; then
4291 if test -n "$ac_tool_prefix"; then
4292   # Extract the first word of "ranlib", so it can be a program name with args.
4293 set dummy ranlib; ac_word=$2
4294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4295 echo "configure:4296: checking for $ac_word" >&5
4296 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   if test -n "$RANLIB"; then
4300   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4301 else
4302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4303   ac_dummy="$PATH"
4304   for ac_dir in $ac_dummy; do
4305     test -z "$ac_dir" && ac_dir=.
4306     if test -f $ac_dir/$ac_word; then
4307       ac_cv_prog_RANLIB="ranlib"
4308       break
4309     fi
4310   done
4311   IFS="$ac_save_ifs"
4312   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4313 fi
4314 fi
4315 RANLIB="$ac_cv_prog_RANLIB"
4316 if test -n "$RANLIB"; then
4317   echo "$ac_t""$RANLIB" 1>&6
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322 else
4323   RANLIB=":"
4324 fi
4325 fi
4326
4327 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4328 set dummy ${ac_tool_prefix}strip; ac_word=$2
4329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_word" >&5
4331 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4332   echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334   if test -n "$STRIP"; then
4335   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4336 else
4337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4338   ac_dummy="$PATH"
4339   for ac_dir in $ac_dummy; do
4340     test -z "$ac_dir" && ac_dir=.
4341     if test -f $ac_dir/$ac_word; then
4342       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4343       break
4344     fi
4345   done
4346   IFS="$ac_save_ifs"
4347 fi
4348 fi
4349 STRIP="$ac_cv_prog_STRIP"
4350 if test -n "$STRIP"; then
4351   echo "$ac_t""$STRIP" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356
4357 if test -z "$ac_cv_prog_STRIP"; then
4358 if test -n "$ac_tool_prefix"; then
4359   # Extract the first word of "strip", so it can be a program name with args.
4360 set dummy strip; ac_word=$2
4361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_word" >&5
4363 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   if test -n "$STRIP"; then
4367   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4368 else
4369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4370   ac_dummy="$PATH"
4371   for ac_dir in $ac_dummy; do
4372     test -z "$ac_dir" && ac_dir=.
4373     if test -f $ac_dir/$ac_word; then
4374       ac_cv_prog_STRIP="strip"
4375       break
4376     fi
4377   done
4378   IFS="$ac_save_ifs"
4379   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4380 fi
4381 fi
4382 STRIP="$ac_cv_prog_STRIP"
4383 if test -n "$STRIP"; then
4384   echo "$ac_t""$STRIP" 1>&6
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389 else
4390   STRIP=":"
4391 fi
4392 fi
4393
4394
4395 enable_dlopen=yes
4396 enable_win32_dll=yes
4397
4398 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4399 if test "${enable_libtool_lock+set}" = set; then
4400   enableval="$enable_libtool_lock"
4401   :
4402 fi
4403
4404 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4405
4406 # Some flags need to be propagated to the compiler or linker for good
4407 # libtool support.
4408 case $host in
4409 *-*-irix6*)
4410   # Find out which ABI we are using.
4411   echo '#line 4412 "configure"' > conftest.$ac_ext
4412   if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4413     case `/usr/bin/file conftest.$ac_objext` in
4414     *32-bit*)
4415       LD="${LD-ld} -32"
4416       ;;
4417     *N32*)
4418       LD="${LD-ld} -n32"
4419       ;;
4420     *64-bit*)
4421       LD="${LD-ld} -64"
4422       ;;
4423     esac
4424   fi
4425   rm -rf conftest*
4426   ;;
4427
4428 *-*-sco3.2v5*)
4429   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4430   SAVE_CFLAGS="$CFLAGS"
4431   CFLAGS="$CFLAGS -belf"
4432   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4433 echo "configure:4434: checking whether the C compiler needs -belf" >&5
4434 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   
4438      ac_ext=c
4439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4440 ac_cpp='$CPP $CPPFLAGS'
4441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4443 cross_compiling=$ac_cv_prog_cc_cross
4444
4445      cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448
4449 int main() {
4450
4451 ; return 0; }
4452 EOF
4453 if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4454   rm -rf conftest*
4455   lt_cv_cc_needs_belf=yes
4456 else
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -rf conftest*
4460   lt_cv_cc_needs_belf=no
4461 fi
4462 rm -f conftest*
4463      ac_ext=c
4464 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4465 ac_cpp='$CPP $CPPFLAGS'
4466 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4467 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4468 cross_compiling=$ac_cv_prog_cc_cross
4469
4470 fi
4471
4472 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4473   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4474     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4475     CFLAGS="$SAVE_CFLAGS"
4476   fi
4477   ;;
4478
4479 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4480   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4481 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4483 echo "configure:4484: checking for $ac_word" >&5
4484 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   if test -n "$DLLTOOL"; then
4488   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4489 else
4490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4491   ac_dummy="$PATH"
4492   for ac_dir in $ac_dummy; do
4493     test -z "$ac_dir" && ac_dir=.
4494     if test -f $ac_dir/$ac_word; then
4495       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4496       break
4497     fi
4498   done
4499   IFS="$ac_save_ifs"
4500 fi
4501 fi
4502 DLLTOOL="$ac_cv_prog_DLLTOOL"
4503 if test -n "$DLLTOOL"; then
4504   echo "$ac_t""$DLLTOOL" 1>&6
4505 else
4506   echo "$ac_t""no" 1>&6
4507 fi
4508
4509
4510 if test -z "$ac_cv_prog_DLLTOOL"; then
4511 if test -n "$ac_tool_prefix"; then
4512   # Extract the first word of "dlltool", so it can be a program name with args.
4513 set dummy dlltool; ac_word=$2
4514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_word" >&5
4516 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   if test -n "$DLLTOOL"; then
4520   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4521 else
4522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4523   ac_dummy="$PATH"
4524   for ac_dir in $ac_dummy; do
4525     test -z "$ac_dir" && ac_dir=.
4526     if test -f $ac_dir/$ac_word; then
4527       ac_cv_prog_DLLTOOL="dlltool"
4528       break
4529     fi
4530   done
4531   IFS="$ac_save_ifs"
4532   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4533 fi
4534 fi
4535 DLLTOOL="$ac_cv_prog_DLLTOOL"
4536 if test -n "$DLLTOOL"; then
4537   echo "$ac_t""$DLLTOOL" 1>&6
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541
4542 else
4543   DLLTOOL="false"
4544 fi
4545 fi
4546
4547   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4548 set dummy ${ac_tool_prefix}as; ac_word=$2
4549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4550 echo "configure:4551: checking for $ac_word" >&5
4551 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4552   echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554   if test -n "$AS"; then
4555   ac_cv_prog_AS="$AS" # Let the user override the test.
4556 else
4557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4558   ac_dummy="$PATH"
4559   for ac_dir in $ac_dummy; do
4560     test -z "$ac_dir" && ac_dir=.
4561     if test -f $ac_dir/$ac_word; then
4562       ac_cv_prog_AS="${ac_tool_prefix}as"
4563       break
4564     fi
4565   done
4566   IFS="$ac_save_ifs"
4567 fi
4568 fi
4569 AS="$ac_cv_prog_AS"
4570 if test -n "$AS"; then
4571   echo "$ac_t""$AS" 1>&6
4572 else
4573   echo "$ac_t""no" 1>&6
4574 fi
4575
4576
4577 if test -z "$ac_cv_prog_AS"; then
4578 if test -n "$ac_tool_prefix"; then
4579   # Extract the first word of "as", so it can be a program name with args.
4580 set dummy as; ac_word=$2
4581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4582 echo "configure:4583: checking for $ac_word" >&5
4583 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   if test -n "$AS"; then
4587   ac_cv_prog_AS="$AS" # Let the user override the test.
4588 else
4589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4590   ac_dummy="$PATH"
4591   for ac_dir in $ac_dummy; do
4592     test -z "$ac_dir" && ac_dir=.
4593     if test -f $ac_dir/$ac_word; then
4594       ac_cv_prog_AS="as"
4595       break
4596     fi
4597   done
4598   IFS="$ac_save_ifs"
4599   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4600 fi
4601 fi
4602 AS="$ac_cv_prog_AS"
4603 if test -n "$AS"; then
4604   echo "$ac_t""$AS" 1>&6
4605 else
4606   echo "$ac_t""no" 1>&6
4607 fi
4608
4609 else
4610   AS="false"
4611 fi
4612 fi
4613
4614   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4615 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4617 echo "configure:4618: checking for $ac_word" >&5
4618 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4619   echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621   if test -n "$OBJDUMP"; then
4622   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4623 else
4624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4625   ac_dummy="$PATH"
4626   for ac_dir in $ac_dummy; do
4627     test -z "$ac_dir" && ac_dir=.
4628     if test -f $ac_dir/$ac_word; then
4629       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4630       break
4631     fi
4632   done
4633   IFS="$ac_save_ifs"
4634 fi
4635 fi
4636 OBJDUMP="$ac_cv_prog_OBJDUMP"
4637 if test -n "$OBJDUMP"; then
4638   echo "$ac_t""$OBJDUMP" 1>&6
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642
4643
4644 if test -z "$ac_cv_prog_OBJDUMP"; then
4645 if test -n "$ac_tool_prefix"; then
4646   # Extract the first word of "objdump", so it can be a program name with args.
4647 set dummy objdump; 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_OBJDUMP+set}\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   if test -n "$OBJDUMP"; then
4654   ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="objdump"
4662       break
4663     fi
4664   done
4665   IFS="$ac_save_ifs"
4666   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4667 fi
4668 fi
4669 OBJDUMP="$ac_cv_prog_OBJDUMP"
4670 if test -n "$OBJDUMP"; then
4671   echo "$ac_t""$OBJDUMP" 1>&6
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675
4676 else
4677   OBJDUMP="false"
4678 fi
4679 fi
4680
4681
4682   # recent cygwin and mingw systems supply a stub DllMain which the user
4683   # can override, but on older systems we have to supply one
4684   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4685 echo "configure:4686: checking if libtool should supply DllMain function" >&5
4686 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692
4693 int main() {
4694 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4695       DllMain (0, 0, 0);
4696 ; return 0; }
4697 EOF
4698 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4699   rm -rf conftest*
4700   lt_cv_need_dllmain=no
4701 else
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -rf conftest*
4705   lt_cv_need_dllmain=yes
4706 fi
4707 rm -f conftest*
4708 fi
4709
4710 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4711
4712   case $host/$CC in
4713   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4714     # old mingw systems require "-dll" to link a DLL, while more recent ones
4715     # require "-mdll"
4716     SAVE_CFLAGS="$CFLAGS"
4717     CFLAGS="$CFLAGS -mdll"
4718     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4719 echo "configure:4720: checking how to link DLLs" >&5
4720 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726
4727 int main() {
4728
4729 ; return 0; }
4730 EOF
4731 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732   rm -rf conftest*
4733   lt_cv_cc_dll_switch=-mdll
4734 else
4735   echo "configure: failed program was:" >&5
4736   cat conftest.$ac_ext >&5
4737   rm -rf conftest*
4738   lt_cv_cc_dll_switch=-dll
4739 fi
4740 rm -f conftest*
4741 fi
4742
4743 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4744     CFLAGS="$SAVE_CFLAGS" ;;
4745   *-*-cygwin* | *-*-pw32*)
4746     # cygwin systems need to pass --dll to the linker, and not link
4747     # crt.o which will require a WinMain@16 definition.
4748     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4749   esac
4750   ;;
4751   
4752 esac
4753
4754 # Sed substitution that helps us do robust quoting.  It backslashifies
4755 # metacharacters that are still active within double-quoted strings.
4756 Xsed='sed -e s/^X//'
4757 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4758
4759 # Same as above, but do not quote variable references.
4760 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4761
4762 # Sed substitution to delay expansion of an escaped shell variable in a
4763 # double_quote_subst'ed string.
4764 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4765
4766 # Constants:
4767 rm="rm -f"
4768
4769 # Global variables:
4770 default_ofile=libtool
4771 can_build_shared=yes
4772
4773 # All known linkers require a `.a' archive for static linking (except M$VC,
4774 # which needs '.lib').
4775 libext=a
4776 ltmain="$ac_aux_dir/ltmain.sh"
4777 ofile="$default_ofile"
4778 with_gnu_ld="$lt_cv_prog_gnu_ld"
4779 need_locks="$enable_libtool_lock"
4780
4781 old_CC="$CC"
4782 old_CFLAGS="$CFLAGS"
4783
4784 # Set sane defaults for various variables
4785 test -z "$AR" && AR=ar
4786 test -z "$AR_FLAGS" && AR_FLAGS=cru
4787 test -z "$AS" && AS=as
4788 test -z "$CC" && CC=cc
4789 test -z "$DLLTOOL" && DLLTOOL=dlltool
4790 test -z "$LD" && LD=ld
4791 test -z "$LN_S" && LN_S="ln -s"
4792 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4793 test -z "$NM" && NM=nm
4794 test -z "$OBJDUMP" && OBJDUMP=objdump
4795 test -z "$RANLIB" && RANLIB=:
4796 test -z "$STRIP" && STRIP=:
4797 test -z "$ac_objext" && ac_objext=o
4798
4799 if test x"$host" != x"$build"; then
4800   ac_tool_prefix=${host_alias}-
4801 else
4802   ac_tool_prefix=
4803 fi
4804
4805 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4806 case $host_os in
4807 linux-gnu*) ;;
4808 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4809 esac
4810
4811 case $host_os in
4812 aix3*)
4813   # AIX sometimes has problems with the GCC collect2 program.  For some
4814   # reason, if we set the COLLECT_NAMES environment variable, the problems
4815   # vanish in a puff of smoke.
4816   if test "X${COLLECT_NAMES+set}" != Xset; then
4817     COLLECT_NAMES=
4818     export COLLECT_NAMES
4819   fi
4820   ;;
4821 esac
4822
4823 # Determine commands to create old-style static archives.
4824 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4825 old_postinstall_cmds='chmod 644 $oldlib'
4826 old_postuninstall_cmds=
4827
4828 if test -n "$RANLIB"; then
4829   case $host_os in
4830   openbsd*)
4831     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4832     ;;
4833   *)
4834     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4835     ;;
4836   esac
4837   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4838 fi
4839
4840 # Allow CC to be a program name with arguments.
4841 set dummy $CC
4842 compiler="$2"
4843
4844 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4845 echo "configure:4846: checking for objdir" >&5
4846 rm -f .libs 2>/dev/null
4847 mkdir .libs 2>/dev/null
4848 if test -d .libs; then
4849   objdir=.libs
4850 else
4851   # MS-DOS does not allow filenames that begin with a dot.
4852   objdir=_libs
4853 fi
4854 rmdir .libs 2>/dev/null
4855 echo "$ac_t""$objdir" 1>&6
4856
4857
4858 # Check whether --with-pic or --without-pic was given.
4859 if test "${with_pic+set}" = set; then
4860   withval="$with_pic"
4861   pic_mode="$withval"
4862 else
4863   pic_mode=default
4864 fi
4865
4866 test -z "$pic_mode" && pic_mode=default
4867
4868 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4869 # in isolation, and that seeing it set (from the cache) indicates that
4870 # the associated values are set (in the cache) correctly too.
4871 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4872 echo "configure:4873: checking for $compiler option to produce PIC" >&5
4873 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4874   echo $ac_n "(cached) $ac_c" 1>&6
4875 else
4876    lt_cv_prog_cc_pic=
4877   lt_cv_prog_cc_shlib=
4878   lt_cv_prog_cc_wl=
4879   lt_cv_prog_cc_static=
4880   lt_cv_prog_cc_no_builtin=
4881   lt_cv_prog_cc_can_build_shared=$can_build_shared
4882
4883   if test "$GCC" = yes; then
4884     lt_cv_prog_cc_wl='-Wl,'
4885     lt_cv_prog_cc_static='-static'
4886
4887     case $host_os in
4888     aix*)
4889       # Below there is a dirty hack to force normal static linking with -ldl
4890       # The problem is because libdl dynamically linked with both libc and
4891       # libC (AIX C++ library), which obviously doesn't included in libraries
4892       # list by gcc. This cause undefined symbols with -static flags.
4893       # This hack allows C programs to be linked with "-static -ldl", but
4894       # not sure about C++ programs.
4895       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4896       ;;
4897     amigaos*)
4898       # FIXME: we need at least 68020 code to build shared libraries, but
4899       # adding the `-m68020' flag to GCC prevents building anything better,
4900       # like `-m68040'.
4901       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4902       ;;
4903     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4904       # PIC is the default for these OSes.
4905       ;;
4906     darwin* | rhapsody*)
4907       # PIC is the default on this platform
4908       # Common symbols not allowed in MH_DYLIB files
4909       lt_cv_prog_cc_pic='-fno-common'
4910       ;;
4911     cygwin* | mingw* | pw32* | os2*)
4912       # This hack is so that the source file can tell whether it is being
4913       # built for inclusion in a dll (and should export symbols for example).
4914       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4915       ;;
4916     sysv4*MP*)
4917       if test -d /usr/nec; then
4918          lt_cv_prog_cc_pic=-Kconform_pic
4919       fi
4920       ;;
4921     *)
4922       lt_cv_prog_cc_pic='-fPIC'
4923       ;;
4924     esac
4925   else
4926     # PORTME Check for PIC flags for the system compiler.
4927     case $host_os in
4928     aix3* | aix4* | aix5*)
4929       lt_cv_prog_cc_wl='-Wl,'
4930       # All AIX code is PIC.
4931       if test "$host_cpu" = ia64; then
4932         # AIX 5 now supports IA64 processor
4933         lt_cv_prog_cc_static='-Bstatic'
4934       else
4935         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4936       fi
4937       ;;
4938
4939     hpux9* | hpux10* | hpux11*)
4940       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4941       lt_cv_prog_cc_wl='-Wl,'
4942       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4943       lt_cv_prog_cc_pic='+Z'
4944       ;;
4945
4946     irix5* | irix6* | nonstopux*)
4947       lt_cv_prog_cc_wl='-Wl,'
4948       lt_cv_prog_cc_static='-non_shared'
4949       # PIC (with -KPIC) is the default.
4950       ;;
4951
4952     cygwin* | mingw* | pw32* | os2*)
4953       # This hack is so that the source file can tell whether it is being
4954       # built for inclusion in a dll (and should export symbols for example).
4955       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4956       ;;
4957
4958     newsos6)
4959       lt_cv_prog_cc_pic='-KPIC'
4960       lt_cv_prog_cc_static='-Bstatic'
4961       ;;
4962     
4963     openedition)
4964       # XPLINK code is PIC by default
4965       ;;
4966
4967     osf3* | osf4* | osf5*)
4968       # All OSF/1 code is PIC.
4969       lt_cv_prog_cc_wl='-Wl,'
4970       lt_cv_prog_cc_static='-non_shared'
4971       ;;
4972
4973     sco3.2v5*)
4974       lt_cv_prog_cc_pic='-Kpic'
4975       lt_cv_prog_cc_static='-dn'
4976       lt_cv_prog_cc_shlib='-belf'
4977       ;;
4978
4979     solaris*)
4980       lt_cv_prog_cc_pic='-KPIC'
4981       lt_cv_prog_cc_static='-Bstatic'
4982       lt_cv_prog_cc_wl='-Wl,'
4983       ;;
4984
4985     sunos4*)
4986       lt_cv_prog_cc_pic='-PIC'
4987       lt_cv_prog_cc_static='-Bstatic'
4988       lt_cv_prog_cc_wl='-Qoption ld '
4989       ;;
4990
4991     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4992       lt_cv_prog_cc_pic='-KPIC'
4993       lt_cv_prog_cc_static='-Bstatic'
4994       lt_cv_prog_cc_wl='-Wl,'
4995       ;;
4996
4997     uts4*)
4998       lt_cv_prog_cc_pic='-pic'
4999       lt_cv_prog_cc_static='-Bstatic'
5000       ;;
5001
5002     sysv4*MP*)
5003       if test -d /usr/nec ;then
5004         lt_cv_prog_cc_pic='-Kconform_pic'
5005         lt_cv_prog_cc_static='-Bstatic'
5006       fi
5007       ;;
5008
5009     *)
5010       lt_cv_prog_cc_can_build_shared=no
5011       ;;
5012     esac
5013   fi
5014
5015 fi
5016
5017 if test -z "$lt_cv_prog_cc_pic"; then
5018   echo "$ac_t""none" 1>&6
5019 else
5020   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5021
5022   # Check to make sure the pic_flag actually works.
5023   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5024 echo "configure:5025: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5025   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028       save_CFLAGS="$CFLAGS"
5029     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5030     cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5033
5034 int main() {
5035
5036 ; return 0; }
5037 EOF
5038 if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5039   rm -rf conftest*
5040         case $host_os in
5041       hpux9* | hpux10* | hpux11*)
5042         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5043         # they create non-PIC objects.  So, if there were any warnings, we
5044         # assume that PIC is not supported.
5045         if test -s conftest.err; then
5046           lt_cv_prog_cc_pic_works=no
5047         else
5048           lt_cv_prog_cc_pic_works=yes
5049         fi
5050         ;;
5051       *)
5052         lt_cv_prog_cc_pic_works=yes
5053         ;;
5054       esac
5055     
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060         lt_cv_prog_cc_pic_works=no
5061     
5062 fi
5063 rm -f conftest*
5064     CFLAGS="$save_CFLAGS"
5065   
5066 fi
5067
5068
5069   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5070     lt_cv_prog_cc_pic=
5071     lt_cv_prog_cc_can_build_shared=no
5072   else
5073     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5074   fi
5075
5076   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5077 fi
5078
5079 # Check for any special shared library compilation flags.
5080 if test -n "$lt_cv_prog_cc_shlib"; then
5081   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5082   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5083   else
5084    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5085     lt_cv_prog_cc_can_build_shared=no
5086   fi
5087 fi
5088
5089 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5090 echo "configure:5091: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5091 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094     lt_cv_prog_cc_static_works=no
5095   save_LDFLAGS="$LDFLAGS"
5096   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   lt_cv_prog_cc_static_works=yes
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111 fi
5112 rm -f conftest*
5113   LDFLAGS="$save_LDFLAGS"
5114
5115 fi
5116
5117
5118 # Belt *and* braces to stop my trousers falling down:
5119 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5120 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5121
5122 pic_flag="$lt_cv_prog_cc_pic"
5123 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5124 wl="$lt_cv_prog_cc_wl"
5125 link_static_flag="$lt_cv_prog_cc_static"
5126 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5127 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5128
5129
5130 # Check to see if options -o and -c are simultaneously supported by compiler
5131 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5132 echo "configure:5133: checking if $compiler supports -c -o file.$ac_objext" >&5
5133 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   
5137 $rm -r conftest 2>/dev/null
5138 mkdir conftest
5139 cd conftest
5140 echo "int some_variable = 0;" > conftest.$ac_ext
5141 mkdir out
5142 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5143 # that will create temporary files in the current directory regardless of
5144 # the output directory.  Thus, making CWD read-only will cause this test
5145 # to fail, enabling locking or at least warning the user not to do parallel
5146 # builds.
5147 chmod -w .
5148 save_CFLAGS="$CFLAGS"
5149 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5150 compiler_c_o=no
5151 if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5152   # The compiler can only warn and ignore the option if not recognized
5153   # So say no if there are warnings
5154   if test -s out/conftest.err; then
5155     lt_cv_compiler_c_o=no
5156   else
5157     lt_cv_compiler_c_o=yes
5158   fi
5159 else
5160   # Append any errors to the config.log.
5161   cat out/conftest.err 1>&5
5162   lt_cv_compiler_c_o=no
5163 fi
5164 CFLAGS="$save_CFLAGS"
5165 chmod u+w .
5166 $rm conftest* out/*
5167 rmdir out
5168 cd ..
5169 rmdir conftest
5170 $rm -r conftest 2>/dev/null
5171
5172 fi
5173
5174 compiler_c_o=$lt_cv_compiler_c_o
5175 echo "$ac_t""$compiler_c_o" 1>&6
5176
5177 if test x"$compiler_c_o" = x"yes"; then
5178   # Check to see if we can write to a .lo
5179   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5180 echo "configure:5181: checking if $compiler supports -c -o file.lo" >&5
5181   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5182   echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184   
5185   lt_cv_compiler_o_lo=no
5186   save_CFLAGS="$CFLAGS"
5187   CFLAGS="$CFLAGS -c -o conftest.lo"
5188   save_objext="$ac_objext"
5189   ac_objext=lo
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 int main() {
5195 int some_variable = 0;
5196 ; return 0; }
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199   rm -rf conftest*
5200       # The compiler can only warn and ignore the option if not recognized
5201     # So say no if there are warnings
5202     if test -s conftest.err; then
5203       lt_cv_compiler_o_lo=no
5204     else
5205       lt_cv_compiler_o_lo=yes
5206     fi
5207   
5208 else
5209   echo "configure: failed program was:" >&5
5210   cat conftest.$ac_ext >&5
5211 fi
5212 rm -f conftest*
5213   ac_objext="$save_objext"
5214   CFLAGS="$save_CFLAGS"
5215   
5216 fi
5217
5218   compiler_o_lo=$lt_cv_compiler_o_lo
5219   echo "$ac_t""$compiler_o_lo" 1>&6
5220 else
5221   compiler_o_lo=no
5222 fi
5223
5224 # Check to see if we can do hard links to lock some files if needed
5225 hard_links="nottested"
5226 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5227   # do not overwrite the value of need_locks provided by the user
5228   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5229 echo "configure:5230: checking if we can lock with hard links" >&5
5230   hard_links=yes
5231   $rm conftest*
5232   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5233   touch conftest.a
5234   ln conftest.a conftest.b 2>&5 || hard_links=no
5235   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5236   echo "$ac_t""$hard_links" 1>&6
5237   if test "$hard_links" = no; then
5238     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5239     need_locks=warn
5240   fi
5241 else
5242   need_locks=no
5243 fi
5244
5245 if test "$GCC" = yes; then
5246   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5247   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5248 echo "configure:5249: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5249   echo "int some_variable = 0;" > conftest.$ac_ext
5250   save_CFLAGS="$CFLAGS"
5251   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5252   compiler_rtti_exceptions=no
5253   cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256
5257 int main() {
5258 int some_variable = 0;
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5262   rm -rf conftest*
5263       # The compiler can only warn and ignore the option if not recognized
5264     # So say no if there are warnings
5265     if test -s conftest.err; then
5266       compiler_rtti_exceptions=no
5267     else
5268       compiler_rtti_exceptions=yes
5269     fi
5270   
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274 fi
5275 rm -f conftest*
5276   CFLAGS="$save_CFLAGS"
5277   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5278
5279   if test "$compiler_rtti_exceptions" = "yes"; then
5280     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5281   else
5282     no_builtin_flag=' -fno-builtin'
5283   fi
5284 fi
5285
5286 # See if the linker supports building shared libraries.
5287 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5288 echo "configure:5289: checking whether the linker ($LD) supports shared libraries" >&5
5289
5290 allow_undefined_flag=
5291 no_undefined_flag=
5292 need_lib_prefix=unknown
5293 need_version=unknown
5294 # when you set need_version to no, make sure it does not cause -set_version
5295 # flags to be left without arguments
5296 archive_cmds=
5297 archive_expsym_cmds=
5298 old_archive_from_new_cmds=
5299 old_archive_from_expsyms_cmds=
5300 export_dynamic_flag_spec=
5301 whole_archive_flag_spec=
5302 thread_safe_flag_spec=
5303 hardcode_into_libs=no
5304 hardcode_libdir_flag_spec=
5305 hardcode_libdir_separator=
5306 hardcode_direct=no
5307 hardcode_minus_L=no
5308 hardcode_shlibpath_var=unsupported
5309 runpath_var=
5310 link_all_deplibs=unknown
5311 always_export_symbols=no
5312 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5313 # include_expsyms should be a list of space-separated symbols to be *always*
5314 # included in the symbol list
5315 include_expsyms=
5316 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5317 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5318 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5319 # as well as any symbol that contains `d'.
5320 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5321 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5322 # platforms (ab)use it in PIC code, but their linkers get confused if
5323 # the symbol is explicitly referenced.  Since portable code cannot
5324 # rely on this symbol name, it's probably fine to never include it in
5325 # preloaded symbol tables.
5326 extract_expsyms_cmds=
5327
5328 case $host_os in
5329 cygwin* | mingw* | pw32*)
5330   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5331   # When not using gcc, we currently assume that we are using
5332   # Microsoft Visual C++.
5333   if test "$GCC" != yes; then
5334     with_gnu_ld=no
5335   fi
5336   ;;
5337 openbsd*)
5338   with_gnu_ld=no
5339   ;;
5340 esac
5341
5342 ld_shlibs=yes
5343 if test "$with_gnu_ld" = yes; then
5344   # If archive_cmds runs LD, not CC, wlarc should be empty
5345   wlarc='${wl}'
5346
5347   # See if GNU ld supports shared libraries.
5348   case $host_os in
5349   aix3* | aix4* | aix5*)
5350     # On AIX, the GNU linker is very broken
5351     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5352     ld_shlibs=no
5353     cat <<EOF 1>&2
5354
5355 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5356 *** to be unable to reliably create shared libraries on AIX.
5357 *** Therefore, libtool is disabling shared libraries support.  If you
5358 *** really care for shared libraries, you may want to modify your PATH
5359 *** so that a non-GNU linker is found, and then restart.
5360
5361 EOF
5362     ;;
5363
5364   amigaos*)
5365     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)'
5366     hardcode_libdir_flag_spec='-L$libdir'
5367     hardcode_minus_L=yes
5368
5369     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5370     # that the semantics of dynamic libraries on AmigaOS, at least up
5371     # to version 4, is to share data among multiple programs linked
5372     # with the same dynamic library.  Since this doesn't match the
5373     # behavior of shared libraries on other platforms, we can use
5374     # them.
5375     ld_shlibs=no
5376     ;;
5377
5378   beos*)
5379     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5380       allow_undefined_flag=unsupported
5381       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5382       # support --undefined.  This deserves some investigation.  FIXME
5383       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5384     else
5385       ld_shlibs=no
5386     fi
5387     ;;
5388
5389   cygwin* | mingw* | pw32*)
5390     # hardcode_libdir_flag_spec is actually meaningless, as there is
5391     # no search path for DLLs.
5392     hardcode_libdir_flag_spec='-L$libdir'
5393     allow_undefined_flag=unsupported
5394     always_export_symbols=yes
5395
5396     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5397       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5398       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5399       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5400       else $CC -o impgen impgen.c ; fi)~
5401       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5402
5403     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5404
5405     # cygwin and mingw dlls have different entry points and sets of symbols
5406     # to exclude.
5407     # FIXME: what about values for MSVC?
5408     dll_entry=__cygwin_dll_entry@12
5409     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5410     case $host_os in
5411     mingw*)
5412       # mingw values
5413       dll_entry=_DllMainCRTStartup@12
5414       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5415       ;;
5416     esac
5417
5418     # mingw and cygwin differ, and it's simplest to just exclude the union
5419     # of the two symbol sets.
5420     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5421
5422     # recent cygwin and mingw systems supply a stub DllMain which the user
5423     # can override, but on older systems we have to supply one (in ltdll.c)
5424     if test "x$lt_cv_need_dllmain" = "xyes"; then
5425       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5426       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~
5427         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5428     else
5429       ltdll_obj=
5430       ltdll_cmds=
5431     fi
5432
5433     # Extract the symbol export list from an `--export-all' def file,
5434     # then regenerate the def file from the symbol export list, so that
5435     # the compiled dll only exports the symbol export list.
5436     # Be careful not to strip the DATA tag left be newer dlltools.
5437     export_symbols_cmds="$ltdll_cmds"'
5438       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5439       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5440
5441     # If the export-symbols file already is a .def file (1st line
5442     # is EXPORTS), use it as is.
5443     # If DATA tags from a recent dlltool are present, honour them!
5444     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5445         cp $export_symbols $output_objdir/$soname-def;
5446       else
5447         echo EXPORTS > $output_objdir/$soname-def;
5448         _lt_hint=1;
5449         cat $export_symbols | while read symbol; do
5450          set dummy \$symbol;
5451          case \$# in
5452            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5453            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5454            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5455          esac;
5456          _lt_hint=`expr 1 + \$_lt_hint`;
5457         done;
5458       fi~
5459       '"$ltdll_cmds"'
5460       $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~
5461       $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~
5462       $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~
5463       $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~
5464       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5465     ;;
5466
5467   netbsd*)
5468     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5469       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5470       wlarc=
5471     else
5472       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5473       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5474     fi
5475     ;;
5476
5477   solaris* | sysv5*)
5478     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5479       ld_shlibs=no
5480       cat <<EOF 1>&2
5481
5482 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5483 *** create shared libraries on Solaris systems.  Therefore, libtool
5484 *** is disabling shared libraries support.  We urge you to upgrade GNU
5485 *** binutils to release 2.9.1 or newer.  Another option is to modify
5486 *** your PATH or compiler configuration so that the native linker is
5487 *** used, and then restart.
5488
5489 EOF
5490     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5491       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5492       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5493     else
5494       ld_shlibs=no
5495     fi
5496     ;;
5497
5498   sunos4*)
5499     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5500     wlarc=
5501     hardcode_direct=yes
5502     hardcode_shlibpath_var=no
5503     ;;
5504
5505   *)
5506     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5507       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5508       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5509     else
5510       ld_shlibs=no
5511     fi
5512     ;;
5513   esac
5514
5515   if test "$ld_shlibs" = yes; then
5516     runpath_var=LD_RUN_PATH
5517     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5518     export_dynamic_flag_spec='${wl}--export-dynamic'
5519     case $host_os in
5520     cygwin* | mingw* | pw32*)
5521       # dlltool doesn't understand --whole-archive et. al.
5522       whole_archive_flag_spec=
5523       ;;
5524     *)
5525       # ancient GNU ld didn't support --whole-archive et. al.
5526       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5527         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5528       else
5529         whole_archive_flag_spec=
5530       fi
5531       ;;
5532     esac
5533   fi
5534 else
5535   # PORTME fill in a description of your system's linker (not GNU ld)
5536   case $host_os in
5537   aix3*)
5538     allow_undefined_flag=unsupported
5539     always_export_symbols=yes
5540     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'
5541     # Note: this linker hardcodes the directories in LIBPATH if there
5542     # are no directories specified by -L.
5543     hardcode_minus_L=yes
5544     if test "$GCC" = yes && test -z "$link_static_flag"; then
5545       # Neither direct hardcoding nor static linking is supported with a
5546       # broken collect2.
5547       hardcode_direct=unsupported
5548     fi
5549     ;;
5550
5551   aix4* | aix5*)
5552     if test "$host_cpu" = ia64; then
5553       # On IA64, the linker does run time linking by default, so we don't
5554       # have to do anything special.
5555       aix_use_runtimelinking=no
5556       exp_sym_flag='-Bexport'
5557       no_entry_flag=""
5558     else
5559       aix_use_runtimelinking=no
5560
5561       # Test if we are trying to use run time linking or normal
5562       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5563       # need to do runtime linking.
5564       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5565         for ld_flag in $LDFLAGS; do
5566           case $ld_flag in
5567           *-brtl*)
5568             aix_use_runtimelinking=yes
5569             break
5570           ;;
5571           esac
5572         done
5573       esac
5574
5575       exp_sym_flag='-bexport'
5576       no_entry_flag='-bnoentry'
5577     fi
5578
5579     # When large executables or shared objects are built, AIX ld can
5580     # have problems creating the table of contents.  If linking a library
5581     # or program results in "error TOC overflow" add -mminimal-toc to
5582     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5583     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5584
5585     hardcode_direct=yes
5586     archive_cmds=''
5587     hardcode_libdir_separator=':'
5588     if test "$GCC" = yes; then
5589       case $host_os in aix4.[012]|aix4.[012].*)
5590         collect2name=`${CC} -print-prog-name=collect2`
5591         if test -f "$collect2name" && \
5592           strings "$collect2name" | grep resolve_lib_name >/dev/null
5593         then
5594           # We have reworked collect2
5595           hardcode_direct=yes
5596         else
5597           # We have old collect2
5598           hardcode_direct=unsupported
5599           # It fails to find uninstalled libraries when the uninstalled
5600           # path is not listed in the libpath.  Setting hardcode_minus_L
5601           # to unsupported forces relinking
5602           hardcode_minus_L=yes
5603           hardcode_libdir_flag_spec='-L$libdir'
5604           hardcode_libdir_separator=
5605         fi
5606       esac
5607
5608       shared_flag='-shared'
5609     else
5610       # not using gcc
5611       if test "$host_cpu" = ia64; then
5612         shared_flag='${wl}-G'
5613       else
5614         if test "$aix_use_runtimelinking" = yes; then
5615           shared_flag='${wl}-G'
5616         else
5617           shared_flag='${wl}-bM:SRE'
5618         fi
5619       fi
5620     fi
5621
5622     # It seems that -bexpall can do strange things, so it is better to
5623     # generate a list of symbols to export.
5624     always_export_symbols=yes
5625     if test "$aix_use_runtimelinking" = yes; then
5626       # Warning - without using the other runtime loading flags (-brtl),
5627       # -berok will link without error, but may produce a broken library.
5628       allow_undefined_flag='-berok'
5629       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5630       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"
5631     else
5632       if test "$host_cpu" = ia64; then
5633         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5634         allow_undefined_flag="-z nodefs"
5635         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"
5636       else
5637         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5638         # Warning - without using the other run time loading flags,
5639         # -berok will link without error, but may produce a broken library.
5640         allow_undefined_flag='${wl}-berok'
5641         # This is a bit strange, but is similar to how AIX traditionally builds
5642         # it's shared libraries.
5643         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'
5644       fi
5645     fi
5646     ;;
5647
5648   amigaos*)
5649     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)'
5650     hardcode_libdir_flag_spec='-L$libdir'
5651     hardcode_minus_L=yes
5652     # see comment about different semantics on the GNU ld section
5653     ld_shlibs=no
5654     ;;
5655
5656   cygwin* | mingw* | pw32*)
5657     # When not using gcc, we currently assume that we are using
5658     # Microsoft Visual C++.
5659     # hardcode_libdir_flag_spec is actually meaningless, as there is
5660     # no search path for DLLs.
5661     hardcode_libdir_flag_spec=' '
5662     allow_undefined_flag=unsupported
5663     # Tell ltmain to make .lib files, not .a files.
5664     libext=lib
5665     # FIXME: Setting linknames here is a bad hack.
5666     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5667     # The linker will automatically build a .lib file if we build a DLL.
5668     old_archive_from_new_cmds='true'
5669     # FIXME: Should let the user specify the lib program.
5670     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5671     fix_srcfile_path='`cygpath -w "$srcfile"`'
5672     ;;
5673
5674   darwin* | rhapsody*)
5675     case "$host_os" in
5676     rhapsody* | darwin1.[012])
5677       allow_undefined_flag='-undefined suppress'
5678       ;;
5679     *) # Darwin 1.3 on
5680       allow_undefined_flag='-flat_namespace -undefined suppress'
5681       ;;
5682     esac
5683     # FIXME: Relying on posixy $() will cause problems for
5684     #        cross-compilation, but unfortunately the echo tests do not
5685     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5686     #        `"' quotes if we put them in here... so don't!
5687     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)'
5688     # We need to add '_' to the symbols in $export_symbols first
5689     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5690     hardcode_direct=yes
5691     hardcode_shlibpath_var=no
5692     whole_archive_flag_spec='-all_load $convenience'
5693     ;;
5694
5695   freebsd1*)
5696     ld_shlibs=no
5697     ;;
5698
5699   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5700   # support.  Future versions do this automatically, but an explicit c++rt0.o
5701   # does not break anything, and helps significantly (at the cost of a little
5702   # extra space).
5703   freebsd2.2*)
5704     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5705     hardcode_libdir_flag_spec='-R$libdir'
5706     hardcode_direct=yes
5707     hardcode_shlibpath_var=no
5708     ;;
5709
5710   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5711   freebsd2*)
5712     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5713     hardcode_direct=yes
5714     hardcode_minus_L=yes
5715     hardcode_shlibpath_var=no
5716     ;;
5717
5718   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5719   freebsd*)
5720     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5721     hardcode_libdir_flag_spec='-R$libdir'
5722     hardcode_direct=yes
5723     hardcode_shlibpath_var=no
5724     ;;
5725
5726   hpux9* | hpux10* | hpux11*)
5727     case $host_os in
5728     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' ;;
5729     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5730     esac
5731     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5732     hardcode_libdir_separator=:
5733     hardcode_direct=yes
5734     hardcode_minus_L=yes # Not in the search PATH, but as the default
5735                          # location of the library.
5736     export_dynamic_flag_spec='${wl}-E'
5737     ;;
5738
5739   irix5* | irix6* | nonstopux*)
5740     if test "$GCC" = yes; then
5741       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'
5742       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5743     else
5744       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'
5745       hardcode_libdir_flag_spec='-rpath $libdir'
5746     fi
5747     hardcode_libdir_separator=:
5748     link_all_deplibs=yes
5749     ;;
5750
5751   netbsd*)
5752     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5753       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5754     else
5755       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5756     fi
5757     hardcode_libdir_flag_spec='-R$libdir'
5758     hardcode_direct=yes
5759     hardcode_shlibpath_var=no
5760     ;;
5761
5762   newsos6)
5763     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5764     hardcode_direct=yes
5765     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5766     hardcode_libdir_separator=:
5767     hardcode_shlibpath_var=no
5768     ;;
5769
5770   openbsd*)
5771     hardcode_direct=yes
5772     hardcode_shlibpath_var=no
5773     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5774       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5775       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5776       export_dynamic_flag_spec='${wl}-E'
5777     else
5778       case "$host_os" in
5779       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5780         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5781         hardcode_libdir_flag_spec='-R$libdir'
5782         ;;
5783       *)
5784         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5785         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5786         ;;
5787       esac
5788     fi
5789     ;;
5790
5791   openedition*)
5792     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5793         cp \$linknames \$output_objdir && linknames=''"
5794     export_dynamic_flag_spec="-Wl,DLL"
5795     ;;
5796
5797   os2*)
5798     hardcode_libdir_flag_spec='-L$libdir'
5799     hardcode_minus_L=yes
5800     allow_undefined_flag=unsupported
5801     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'
5802     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5803     ;;
5804
5805   osf3*)
5806     if test "$GCC" = yes; then
5807       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5808       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'
5809     else
5810       allow_undefined_flag=' -expect_unresolved \*'
5811       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'
5812     fi
5813     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5814     hardcode_libdir_separator=:
5815     ;;
5816
5817   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5818     if test "$GCC" = yes; then
5819       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5820       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'
5821       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5822     else
5823       allow_undefined_flag=' -expect_unresolved \*'
5824       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'
5825       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5826       $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'
5827
5828       #Both c and cxx compiler support -rpath directly
5829       hardcode_libdir_flag_spec='-rpath $libdir'
5830     fi
5831     hardcode_libdir_separator=:
5832     ;;
5833
5834   sco3.2v5*)
5835     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5836     hardcode_shlibpath_var=no
5837     runpath_var=LD_RUN_PATH
5838     hardcode_runpath_var=yes
5839     export_dynamic_flag_spec='${wl}-Bexport'
5840     ;;
5841
5842   solaris*)
5843     # gcc --version < 3.0 without binutils cannot create self contained
5844     # shared libraries reliably, requiring libgcc.a to resolve some of
5845     # the object symbols generated in some cases.  Libraries that use
5846     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5847     # a copy of libgcc.a into every shared library to guarantee resolving
5848     # such symbols causes other problems:  According to Tim Van Holder
5849     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5850     # (to the application) exception stack for one thing.
5851     no_undefined_flag=' -z defs'
5852     if test "$GCC" = yes; then
5853       case `$CC --version 2>/dev/null` in
5854       [12].*)
5855         cat <<EOF 1>&2
5856
5857 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5858 *** create self contained shared libraries on Solaris systems, without
5859 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5860 *** -no-undefined support, which will at least allow you to build shared
5861 *** libraries.  However, you may find that when you link such libraries
5862 *** into an application without using GCC, you have to manually add
5863 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5864 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5865 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5866
5867 EOF
5868         no_undefined_flag=
5869         ;;
5870       esac
5871     fi
5872     # $CC -shared without GNU ld will not create a library from C++
5873     # object files and a static libstdc++, better avoid it by now
5874     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5875     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5876                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5877     hardcode_libdir_flag_spec='-R$libdir'
5878     hardcode_shlibpath_var=no
5879     case $host_os in
5880     solaris2.[0-5] | solaris2.[0-5].*) ;;
5881     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5882       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5883     esac
5884     link_all_deplibs=yes
5885     ;;
5886
5887   sunos4*)
5888     if test "x$host_vendor" = xsequent; then
5889       # Use $CC to link under sequent, because it throws in some extra .o
5890       # files that make .init and .fini sections work.
5891       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5892     else
5893       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5894     fi
5895     hardcode_libdir_flag_spec='-L$libdir'
5896     hardcode_direct=yes
5897     hardcode_minus_L=yes
5898     hardcode_shlibpath_var=no
5899     ;;
5900
5901   sysv4)
5902     case $host_vendor in
5903       sni)
5904         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5905         hardcode_direct=yes # is this really true???
5906         ;;
5907       siemens)
5908         ## LD is ld it makes a PLAMLIB
5909         ## CC just makes a GrossModule.
5910         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5911         reload_cmds='$CC -r -o $output$reload_objs'
5912         hardcode_direct=no
5913         ;;
5914       motorola)
5915         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5916         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5917         ;;
5918     esac
5919     runpath_var='LD_RUN_PATH'
5920     hardcode_shlibpath_var=no
5921     ;;
5922
5923   sysv4.3*)
5924     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5925     hardcode_shlibpath_var=no
5926     export_dynamic_flag_spec='-Bexport'
5927     ;;
5928
5929   sysv5*)
5930     no_undefined_flag=' -z text'
5931     # $CC -shared without GNU ld will not create a library from C++
5932     # object files and a static libstdc++, better avoid it by now
5933     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5934     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5935                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5936     hardcode_libdir_flag_spec=
5937     hardcode_shlibpath_var=no
5938     runpath_var='LD_RUN_PATH'
5939     ;;
5940
5941   uts4*)
5942     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5943     hardcode_libdir_flag_spec='-L$libdir'
5944     hardcode_shlibpath_var=no
5945     ;;
5946
5947   dgux*)
5948     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5949     hardcode_libdir_flag_spec='-L$libdir'
5950     hardcode_shlibpath_var=no
5951     ;;
5952
5953   sysv4*MP*)
5954     if test -d /usr/nec; then
5955       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5956       hardcode_shlibpath_var=no
5957       runpath_var=LD_RUN_PATH
5958       hardcode_runpath_var=yes
5959       ld_shlibs=yes
5960     fi
5961     ;;
5962
5963   sysv4.2uw2*)
5964     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5965     hardcode_direct=yes
5966     hardcode_minus_L=no
5967     hardcode_shlibpath_var=no
5968     hardcode_runpath_var=yes
5969     runpath_var=LD_RUN_PATH
5970     ;;
5971
5972   sysv5uw7* | unixware7*)
5973     no_undefined_flag='${wl}-z ${wl}text'
5974     if test "$GCC" = yes; then
5975       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5976     else
5977       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5978     fi
5979     runpath_var='LD_RUN_PATH'
5980     hardcode_shlibpath_var=no
5981     ;;
5982
5983   *)
5984     ld_shlibs=no
5985     ;;
5986   esac
5987 fi
5988 echo "$ac_t""$ld_shlibs" 1>&6
5989 test "$ld_shlibs" = no && can_build_shared=no
5990
5991 # Check hardcoding attributes.
5992 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5993 echo "configure:5994: checking how to hardcode library paths into programs" >&5
5994 hardcode_action=
5995 if test -n "$hardcode_libdir_flag_spec" || \
5996    test -n "$runpath_var"; then
5997
5998   # We can hardcode non-existant directories.
5999   if test "$hardcode_direct" != no &&
6000      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6001      # have to relink, otherwise we might link with an installed library
6002      # when we should be linking with a yet-to-be-installed one
6003      ## test "$hardcode_shlibpath_var" != no &&
6004      test "$hardcode_minus_L" != no; then
6005     # Linking always hardcodes the temporary library directory.
6006     hardcode_action=relink
6007   else
6008     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6009     hardcode_action=immediate
6010   fi
6011 else
6012   # We cannot hardcode anything, or else we can only hardcode existing
6013   # directories.
6014   hardcode_action=unsupported
6015 fi
6016 echo "$ac_t""$hardcode_action" 1>&6
6017
6018 striplib=
6019 old_striplib=
6020 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6021 echo "configure:6022: checking whether stripping libraries is possible" >&5
6022 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6023   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6024   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6025   echo "$ac_t""yes" 1>&6
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029
6030 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6031 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6032
6033 # PORTME Fill in your ld.so characteristics
6034 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6035 echo "configure:6036: checking dynamic linker characteristics" >&5
6036 library_names_spec=
6037 libname_spec='lib$name'
6038 soname_spec=
6039 postinstall_cmds=
6040 postuninstall_cmds=
6041 finish_cmds=
6042 finish_eval=
6043 shlibpath_var=
6044 shlibpath_overrides_runpath=unknown
6045 version_type=none
6046 dynamic_linker="$host_os ld.so"
6047 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6048 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6049
6050 case $host_os in
6051 aix3*)
6052   version_type=linux
6053   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6054   shlibpath_var=LIBPATH
6055
6056   # AIX has no versioning support, so we append a major version to the name.
6057   soname_spec='${libname}${release}.so$major'
6058   ;;
6059
6060 aix4* | aix5*)
6061   version_type=linux
6062   need_lib_prefix=no
6063   need_version=no
6064   hardcode_into_libs=yes
6065   if test "$host_cpu" = ia64; then
6066     # AIX 5 supports IA64
6067     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6068     shlibpath_var=LD_LIBRARY_PATH
6069   else
6070     # With GCC up to 2.95.x, collect2 would create an import file
6071     # for dependence libraries.  The import file would start with
6072     # the line `#! .'.  This would cause the generated library to
6073     # depend on `.', always an invalid library.  This was fixed in
6074     # development snapshots of GCC prior to 3.0.
6075     case $host_os in
6076       aix4 | aix4.[01] | aix4.[01].*)
6077         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6078              echo ' yes '
6079              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6080           :
6081         else
6082           can_build_shared=no
6083         fi
6084         ;;
6085     esac
6086     # AIX (on Power*) has no versioning support, so currently we can
6087     # not hardcode correct soname into executable. Probably we can
6088     # add versioning support to collect2, so additional links can
6089     # be useful in future.
6090     if test "$aix_use_runtimelinking" = yes; then
6091       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6092       # instead of lib<name>.a to let people know that these are not
6093       # typical AIX shared libraries.
6094       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6095     else
6096       # We preserve .a as extension for shared libraries through AIX4.2
6097       # and later when we are not doing run time linking.
6098       library_names_spec='${libname}${release}.a $libname.a'
6099       soname_spec='${libname}${release}.so$major'
6100     fi
6101     shlibpath_var=LIBPATH
6102   fi
6103   hardcode_into_libs=yes
6104   ;;
6105
6106 amigaos*)
6107   library_names_spec='$libname.ixlibrary $libname.a'
6108   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6109   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'
6110   ;;
6111
6112 beos*)
6113   library_names_spec='${libname}.so'
6114   dynamic_linker="$host_os ld.so"
6115   shlibpath_var=LIBRARY_PATH
6116   ;;
6117
6118 bsdi4*)
6119   version_type=linux
6120   need_version=no
6121   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6122   soname_spec='${libname}${release}.so$major'
6123   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6124   shlibpath_var=LD_LIBRARY_PATH
6125   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6126   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6127   export_dynamic_flag_spec=-rdynamic
6128   # the default ld.so.conf also contains /usr/contrib/lib and
6129   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6130   # libtool to hard-code these into programs
6131   ;;
6132
6133 cygwin* | mingw* | pw32*)
6134   version_type=windows
6135   need_version=no
6136   need_lib_prefix=no
6137   case $GCC,$host_os in
6138   yes,cygwin*)
6139     library_names_spec='$libname.dll.a'
6140     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6141     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6142       dldir=$destdir/`dirname \$dlpath`~
6143       test -d \$dldir || mkdir -p \$dldir~
6144       $install_prog .libs/$dlname \$dldir/$dlname'
6145     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6146       dlpath=$dir/\$dldll~
6147        $rm \$dlpath'
6148     ;;
6149   yes,mingw*)
6150     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6151     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6152     ;;
6153   yes,pw32*)
6154     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6155     ;;
6156   *)
6157     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6158     ;;
6159   esac
6160   dynamic_linker='Win32 ld.exe'
6161   # FIXME: first we should search . and the directory the executable is in
6162   shlibpath_var=PATH
6163   ;;
6164
6165 darwin* | rhapsody*)
6166   dynamic_linker="$host_os dyld"
6167   version_type=darwin
6168   need_lib_prefix=no
6169   need_version=no
6170   # FIXME: Relying on posixy $() will cause problems for
6171   #        cross-compilation, but unfortunately the echo tests do not
6172   #        yet detect zsh echo's removal of \ escapes.
6173   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)'
6174   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6175   shlibpath_overrides_runpath=yes
6176   shlibpath_var=DYLD_LIBRARY_PATH
6177   ;;
6178
6179 freebsd1*)
6180   dynamic_linker=no
6181   ;;
6182
6183 freebsd*)
6184   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6185   version_type=freebsd-$objformat
6186   case $version_type in
6187     freebsd-elf*)
6188       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6189       need_version=no
6190       need_lib_prefix=no
6191       ;;
6192     freebsd-*)
6193       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6194       need_version=yes
6195       ;;
6196   esac
6197   shlibpath_var=LD_LIBRARY_PATH
6198   case $host_os in
6199   freebsd2*)
6200     shlibpath_overrides_runpath=yes
6201     ;;
6202   *)
6203     shlibpath_overrides_runpath=no
6204     hardcode_into_libs=yes
6205     ;;
6206   esac
6207   ;;
6208
6209 gnu*)
6210   version_type=linux
6211   need_lib_prefix=no
6212   need_version=no
6213   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6214   soname_spec='${libname}${release}.so$major'
6215   shlibpath_var=LD_LIBRARY_PATH
6216   hardcode_into_libs=yes
6217   ;;
6218
6219 hpux9* | hpux10* | hpux11*)
6220   # Give a soname corresponding to the major version so that dld.sl refuses to
6221   # link against other versions.
6222   dynamic_linker="$host_os dld.sl"
6223   version_type=sunos
6224   need_lib_prefix=no
6225   need_version=no
6226   shlibpath_var=SHLIB_PATH
6227   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6228   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6229   soname_spec='${libname}${release}.sl$major'
6230   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6231   postinstall_cmds='chmod 555 $lib'
6232   ;;
6233
6234 irix5* | irix6* | nonstopux*)
6235   case $host_os in
6236     nonstopux*) version_type=nonstopux ;;
6237     *)          version_type=irix ;;
6238   esac
6239   need_lib_prefix=no
6240   need_version=no
6241   soname_spec='${libname}${release}.so$major'
6242   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6243   case $host_os in
6244   irix5* | nonstopux*)
6245     libsuff= shlibsuff=
6246     ;;
6247   *)
6248     case $LD in # libtool.m4 will add one of these switches to LD
6249     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6250     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6251     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6252     *) libsuff= shlibsuff= libmagic=never-match;;
6253     esac
6254     ;;
6255   esac
6256   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6257   shlibpath_overrides_runpath=no
6258   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6259   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6260   ;;
6261
6262 # No shared lib support for Linux oldld, aout, or coff.
6263 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6264   dynamic_linker=no
6265   ;;
6266
6267 # This must be Linux ELF.
6268 linux-gnu*)
6269   version_type=linux
6270   need_lib_prefix=no
6271   need_version=no
6272   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6273   soname_spec='${libname}${release}.so$major'
6274   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6275   shlibpath_var=LD_LIBRARY_PATH
6276   shlibpath_overrides_runpath=no
6277   # This implies no fast_install, which is unacceptable.
6278   # Some rework will be needed to allow for fast_install
6279   # before this can be enabled.
6280   hardcode_into_libs=yes
6281
6282   # We used to test for /lib/ld.so.1 and disable shared libraries on
6283   # powerpc, because MkLinux only supported shared libraries with the
6284   # GNU dynamic linker.  Since this was broken with cross compilers,
6285   # most powerpc-linux boxes support dynamic linking these days and
6286   # people can always --disable-shared, the test was removed, and we
6287   # assume the GNU/Linux dynamic linker is in use.
6288   dynamic_linker='GNU/Linux ld.so'
6289   ;;
6290
6291 netbsd*)
6292   version_type=sunos
6293   need_lib_prefix=no
6294   need_version=no
6295   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6296     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6297     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6298     dynamic_linker='NetBSD (a.out) ld.so'
6299   else
6300     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6301     soname_spec='${libname}${release}.so$major'
6302     dynamic_linker='NetBSD ld.elf_so'
6303   fi
6304   shlibpath_var=LD_LIBRARY_PATH
6305   shlibpath_overrides_runpath=yes
6306   hardcode_into_libs=yes
6307   ;;
6308
6309 newsos6)
6310   version_type=linux
6311   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6312   shlibpath_var=LD_LIBRARY_PATH
6313   shlibpath_overrides_runpath=yes
6314   ;;
6315
6316 openbsd*)
6317   version_type=sunos
6318   need_lib_prefix=no
6319   need_version=no
6320   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6321     case "$host_os" in
6322     openbsd2.[89] | openbsd2.[89].*)
6323       shlibpath_overrides_runpath=no
6324       ;;
6325     *)
6326       shlibpath_overrides_runpath=yes
6327       ;;
6328     esac
6329   else
6330     shlibpath_overrides_runpath=yes
6331   fi
6332   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6333   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6334   shlibpath_var=LD_LIBRARY_PATH
6335   ;;
6336
6337 openedition*)
6338   need_lib_prefix=no
6339   need_version=no
6340   shlibpath_overrides_runpath=yes
6341   shlibpath_var=LIBPATH
6342   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6343   # the library's exports are in libname.x; this is the file that must
6344   # actually be linked with to use a DLL.
6345   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6346   ;;
6347
6348 os2*)
6349   libname_spec='$name'
6350   need_lib_prefix=no
6351   library_names_spec='$libname.dll $libname.a'
6352   dynamic_linker='OS/2 ld.exe'
6353   shlibpath_var=LIBPATH
6354   ;;
6355
6356 osf3* | osf4* | osf5*)
6357   version_type=osf
6358   need_version=no
6359   soname_spec='${libname}${release}.so$major'
6360   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6361   shlibpath_var=LD_LIBRARY_PATH
6362   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6363   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6364   hardcode_into_libs=yes
6365   ;;
6366
6367 sco3.2v5*)
6368   version_type=osf
6369   soname_spec='${libname}${release}.so$major'
6370   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6371   shlibpath_var=LD_LIBRARY_PATH
6372   ;;
6373
6374 solaris*)
6375   version_type=linux
6376   need_lib_prefix=no
6377   need_version=no
6378   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6379   soname_spec='${libname}${release}.so$major'
6380   shlibpath_var=LD_LIBRARY_PATH
6381   shlibpath_overrides_runpath=yes
6382   hardcode_into_libs=yes
6383   # ldd complains unless libraries are executable
6384   postinstall_cmds='chmod +x $lib'
6385   ;;
6386
6387 sunos4*)
6388   version_type=sunos
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6390   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6391   shlibpath_var=LD_LIBRARY_PATH
6392   shlibpath_overrides_runpath=yes
6393   if test "$with_gnu_ld" = yes; then
6394     need_lib_prefix=no
6395   fi
6396   need_version=yes
6397   ;;
6398
6399 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6400   version_type=linux
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6402   soname_spec='${libname}${release}.so$major'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   case $host_vendor in
6405     sni)
6406       shlibpath_overrides_runpath=no
6407       need_lib_prefix=no
6408       export_dynamic_flag_spec='${wl}-Blargedynsym'
6409       runpath_var=LD_RUN_PATH
6410       ;;
6411     siemens)
6412       need_lib_prefix=no
6413       ;;
6414     motorola)
6415       need_lib_prefix=no
6416       need_version=no
6417       shlibpath_overrides_runpath=no
6418       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6419       ;;
6420   esac
6421   ;;
6422
6423 uts4*)
6424   version_type=linux
6425   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6426   soname_spec='${libname}${release}.so$major'
6427   shlibpath_var=LD_LIBRARY_PATH
6428   ;;
6429
6430 dgux*)
6431   version_type=linux
6432   need_lib_prefix=no
6433   need_version=no
6434   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6435   soname_spec='${libname}${release}.so$major'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   ;;
6438
6439 sysv4*MP*)
6440   if test -d /usr/nec ;then
6441     version_type=linux
6442     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6443     soname_spec='$libname.so.$major'
6444     shlibpath_var=LD_LIBRARY_PATH
6445   fi
6446   ;;
6447
6448 *)
6449   dynamic_linker=no
6450   ;;
6451 esac
6452 echo "$ac_t""$dynamic_linker" 1>&6
6453 test "$dynamic_linker" = no && can_build_shared=no
6454
6455 # Report the final consequences.
6456 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6457 echo "configure:6458: checking if libtool supports shared libraries" >&5
6458 echo "$ac_t""$can_build_shared" 1>&6
6459
6460 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6461 echo "configure:6462: checking whether to build shared libraries" >&5
6462 test "$can_build_shared" = "no" && enable_shared=no
6463
6464 # On AIX, shared libraries and static libraries use the same namespace, and
6465 # are all built from PIC.
6466 case "$host_os" in
6467 aix3*)
6468   test "$enable_shared" = yes && enable_static=no
6469   if test -n "$RANLIB"; then
6470     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6471     postinstall_cmds='$RANLIB $lib'
6472   fi
6473   ;;
6474
6475 aix4*)
6476   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6477     test "$enable_shared" = yes && enable_static=no
6478   fi
6479   ;;
6480 esac
6481 echo "$ac_t""$enable_shared" 1>&6
6482
6483 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6484 echo "configure:6485: checking whether to build static libraries" >&5
6485 # Make sure either enable_shared or enable_static is yes.
6486 test "$enable_shared" = yes || enable_static=yes
6487 echo "$ac_t""$enable_static" 1>&6
6488
6489 if test "$hardcode_action" = relink; then
6490   # Fast installation is not supported
6491   enable_fast_install=no
6492 elif test "$shlibpath_overrides_runpath" = yes ||
6493      test "$enable_shared" = no; then
6494   # Fast installation is not necessary
6495   enable_fast_install=needless
6496 fi
6497
6498 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6499 if test "$GCC" = yes; then
6500   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6501 fi
6502
6503 if test "x$enable_dlopen" != xyes; then
6504   enable_dlopen=unknown
6505   enable_dlopen_self=unknown
6506   enable_dlopen_self_static=unknown
6507 else
6508   lt_cv_dlopen=no
6509   lt_cv_dlopen_libs=
6510
6511   case $host_os in
6512   beos*)
6513     lt_cv_dlopen="load_add_on"
6514     lt_cv_dlopen_libs=
6515     lt_cv_dlopen_self=yes
6516     ;;
6517
6518   cygwin* | mingw* | pw32*)
6519     lt_cv_dlopen="LoadLibrary"
6520     lt_cv_dlopen_libs=
6521    ;;
6522
6523   *)
6524     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6525 echo "configure:6526: checking for dllload" >&5
6526 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6527   echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529   cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* System header to define __stub macros and hopefully few prototypes,
6533     which can conflict with char dllload(); below.  */
6534 #include <assert.h>
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 /* We use char because int might match the return type of a gcc2
6537     builtin and then its argument prototype would still apply.  */
6538 char dllload();
6539 char (*f)();
6540
6541 int main() {
6542
6543 /* The GNU C library defines this for functions which it implements
6544     to always fail with ENOSYS.  Some functions are actually named
6545     something starting with __ and the normal name is an alias.  */
6546 #if defined (__stub_dllload) || defined (__stub___dllload)
6547 choke me
6548 #else
6549 f = dllload;
6550 #endif
6551
6552 ; return 0; }
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6555   rm -rf conftest*
6556   eval "ac_cv_func_dllload=yes"
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560   rm -rf conftest*
6561   eval "ac_cv_func_dllload=no"
6562 fi
6563 rm -f conftest*
6564 fi
6565
6566 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6567   echo "$ac_t""yes" 1>&6
6568   lt_cv_dlopen="dllload"
6569 else
6570   echo "$ac_t""no" 1>&6
6571 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6572 echo "configure:6573: checking for shl_load" >&5
6573 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6574   echo $ac_n "(cached) $ac_c" 1>&6
6575 else
6576   cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* System header to define __stub macros and hopefully few prototypes,
6580     which can conflict with char shl_load(); below.  */
6581 #include <assert.h>
6582 /* Override any gcc2 internal prototype to avoid an error.  */
6583 /* We use char because int might match the return type of a gcc2
6584     builtin and then its argument prototype would still apply.  */
6585 char shl_load();
6586 char (*f)();
6587
6588 int main() {
6589
6590 /* The GNU C library defines this for functions which it implements
6591     to always fail with ENOSYS.  Some functions are actually named
6592     something starting with __ and the normal name is an alias.  */
6593 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6594 choke me
6595 #else
6596 f = shl_load;
6597 #endif
6598
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6602   rm -rf conftest*
6603   eval "ac_cv_func_shl_load=yes"
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   eval "ac_cv_func_shl_load=no"
6609 fi
6610 rm -f conftest*
6611 fi
6612
6613 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6614   echo "$ac_t""yes" 1>&6
6615   lt_cv_dlopen="shl_load"
6616 else
6617   echo "$ac_t""no" 1>&6
6618 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6619 echo "configure:6620: checking for shl_load in -ldld" >&5
6620 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6622   echo $ac_n "(cached) $ac_c" 1>&6
6623 else
6624   ac_save_LIBS="$LIBS"
6625 LIBS="-ldld  $LIBS"
6626 cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629 /* Override any gcc2 internal prototype to avoid an error.  */
6630 /* We use char because int might match the return type of a gcc2
6631     builtin and then its argument prototype would still apply.  */
6632 char shl_load();
6633
6634 int main() {
6635 shl_load()
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   eval "ac_cv_lib_$ac_lib_var=yes"
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   eval "ac_cv_lib_$ac_lib_var=no"
6646 fi
6647 rm -f conftest*
6648 LIBS="$ac_save_LIBS"
6649
6650 fi
6651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6652   echo "$ac_t""yes" 1>&6
6653   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6654 else
6655   echo "$ac_t""no" 1>&6
6656 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6657 echo "configure:6658: checking for dlopen" >&5
6658 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665     which can conflict with char dlopen(); below.  */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error.  */
6668 /* We use char because int might match the return type of a gcc2
6669     builtin and then its argument prototype would still apply.  */
6670 char dlopen();
6671 char (*f)();
6672
6673 int main() {
6674
6675 /* The GNU C library defines this for functions which it implements
6676     to always fail with ENOSYS.  Some functions are actually named
6677     something starting with __ and the normal name is an alias.  */
6678 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6679 choke me
6680 #else
6681 f = dlopen;
6682 #endif
6683
6684 ; return 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6687   rm -rf conftest*
6688   eval "ac_cv_func_dlopen=yes"
6689 else
6690   echo "configure: failed program was:" >&5
6691   cat conftest.$ac_ext >&5
6692   rm -rf conftest*
6693   eval "ac_cv_func_dlopen=no"
6694 fi
6695 rm -f conftest*
6696 fi
6697
6698 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6699   echo "$ac_t""yes" 1>&6
6700   lt_cv_dlopen="dlopen"
6701 else
6702   echo "$ac_t""no" 1>&6
6703 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6704 echo "configure:6705: checking for dlopen in -ldl" >&5
6705 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6707   echo $ac_n "(cached) $ac_c" 1>&6
6708 else
6709   ac_save_LIBS="$LIBS"
6710 LIBS="-ldl  $LIBS"
6711 cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 /* We use char because int might match the return type of a gcc2
6716     builtin and then its argument prototype would still apply.  */
6717 char dlopen();
6718
6719 int main() {
6720 dlopen()
6721 ; return 0; }
6722 EOF
6723 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=yes"
6726 else
6727   echo "configure: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   rm -rf conftest*
6730   eval "ac_cv_lib_$ac_lib_var=no"
6731 fi
6732 rm -f conftest*
6733 LIBS="$ac_save_LIBS"
6734
6735 fi
6736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6737   echo "$ac_t""yes" 1>&6
6738   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6739 else
6740   echo "$ac_t""no" 1>&6
6741 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6742 echo "configure:6743: checking for dlopen in -lsvld" >&5
6743 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6745   echo $ac_n "(cached) $ac_c" 1>&6
6746 else
6747   ac_save_LIBS="$LIBS"
6748 LIBS="-lsvld  $LIBS"
6749 cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char dlopen();
6756
6757 int main() {
6758 dlopen()
6759 ; return 0; }
6760 EOF
6761 if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=yes"
6764 else
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=no"
6769 fi
6770 rm -f conftest*
6771 LIBS="$ac_save_LIBS"
6772
6773 fi
6774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6775   echo "$ac_t""yes" 1>&6
6776   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6777 else
6778   echo "$ac_t""no" 1>&6
6779 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6780 echo "configure:6781: checking for dld_link in -ldld" >&5
6781 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   ac_save_LIBS="$LIBS"
6786 LIBS="-ldld  $LIBS"
6787 cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 /* We use char because int might match the return type of a gcc2
6792     builtin and then its argument prototype would still apply.  */
6793 char dld_link();
6794
6795 int main() {
6796 dld_link()
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_lib_$ac_lib_var=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=no"
6807 fi
6808 rm -f conftest*
6809 LIBS="$ac_save_LIBS"
6810
6811 fi
6812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6815 else
6816   echo "$ac_t""no" 1>&6
6817 fi
6818
6819               
6820 fi
6821
6822             
6823 fi
6824
6825           
6826 fi
6827
6828         
6829 fi
6830
6831       
6832 fi
6833
6834     
6835 fi
6836
6837     ;;
6838   esac
6839
6840   if test "x$lt_cv_dlopen" != xno; then
6841     enable_dlopen=yes
6842   else
6843     enable_dlopen=no
6844   fi
6845
6846   case $lt_cv_dlopen in
6847   dlopen)
6848     save_CPPFLAGS="$CPPFLAGS"
6849         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6850
6851     save_LDFLAGS="$LDFLAGS"
6852     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6853
6854     save_LIBS="$LIBS"
6855     LIBS="$lt_cv_dlopen_libs $LIBS"
6856
6857     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6858 echo "configure:6859: checking whether a program can dlopen itself" >&5
6859 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862           if test "$cross_compiling" = yes; then :
6863   lt_cv_dlopen_self=cross
6864 else
6865     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6866   lt_status=$lt_dlunknown
6867   cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6870
6871 #if HAVE_DLFCN_H
6872 #include <dlfcn.h>
6873 #endif
6874
6875 #include <stdio.h>
6876
6877 #ifdef RTLD_GLOBAL
6878 #  define LT_DLGLOBAL           RTLD_GLOBAL
6879 #else
6880 #  ifdef DL_GLOBAL
6881 #    define LT_DLGLOBAL         DL_GLOBAL
6882 #  else
6883 #    define LT_DLGLOBAL         0
6884 #  endif
6885 #endif
6886
6887 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6888    find out it does not work in some platform. */
6889 #ifndef LT_DLLAZY_OR_NOW
6890 #  ifdef RTLD_LAZY
6891 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6892 #  else
6893 #    ifdef DL_LAZY
6894 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6895 #    else
6896 #      ifdef RTLD_NOW
6897 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6898 #      else
6899 #        ifdef DL_NOW
6900 #          define LT_DLLAZY_OR_NOW      DL_NOW
6901 #        else
6902 #          define LT_DLLAZY_OR_NOW      0
6903 #        endif
6904 #      endif
6905 #    endif
6906 #  endif
6907 #endif
6908
6909 #ifdef __cplusplus
6910 extern "C" void exit (int);
6911 #endif
6912
6913 void fnord() { int i=42;}
6914 int main ()
6915 {
6916   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6917   int status = $lt_dlunknown;
6918
6919   if (self)
6920     {
6921       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6922       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6923       /* dlclose (self); */
6924     }
6925
6926     exit (status);
6927 }
6928 EOF
6929   if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6930     (./conftest; exit; ) 2>/dev/null
6931     lt_status=$?
6932     case x$lt_status in
6933       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6934       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6935       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6936     esac
6937   else :
6938     # compilation failed
6939     lt_cv_dlopen_self=no
6940   fi
6941 fi
6942 rm -fr conftest*
6943
6944     
6945 fi
6946
6947 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6948
6949     if test "x$lt_cv_dlopen_self" = xyes; then
6950       LDFLAGS="$LDFLAGS $link_static_flag"
6951       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6952 echo "configure:6953: checking whether a statically linked program can dlopen itself" >&5
6953 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956           if test "$cross_compiling" = yes; then :
6957   lt_cv_dlopen_self_static=cross
6958 else
6959     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6960   lt_status=$lt_dlunknown
6961   cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964
6965 #if HAVE_DLFCN_H
6966 #include <dlfcn.h>
6967 #endif
6968
6969 #include <stdio.h>
6970
6971 #ifdef RTLD_GLOBAL
6972 #  define LT_DLGLOBAL           RTLD_GLOBAL
6973 #else
6974 #  ifdef DL_GLOBAL
6975 #    define LT_DLGLOBAL         DL_GLOBAL
6976 #  else
6977 #    define LT_DLGLOBAL         0
6978 #  endif
6979 #endif
6980
6981 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6982    find out it does not work in some platform. */
6983 #ifndef LT_DLLAZY_OR_NOW
6984 #  ifdef RTLD_LAZY
6985 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6986 #  else
6987 #    ifdef DL_LAZY
6988 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6989 #    else
6990 #      ifdef RTLD_NOW
6991 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6992 #      else
6993 #        ifdef DL_NOW
6994 #          define LT_DLLAZY_OR_NOW      DL_NOW
6995 #        else
6996 #          define LT_DLLAZY_OR_NOW      0
6997 #        endif
6998 #      endif
6999 #    endif
7000 #  endif
7001 #endif
7002
7003 #ifdef __cplusplus
7004 extern "C" void exit (int);
7005 #endif
7006
7007 void fnord() { int i=42;}
7008 int main ()
7009 {
7010   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7011   int status = $lt_dlunknown;
7012
7013   if (self)
7014     {
7015       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7016       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7017       /* dlclose (self); */
7018     }
7019
7020     exit (status);
7021 }
7022 EOF
7023   if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7024     (./conftest; exit; ) 2>/dev/null
7025     lt_status=$?
7026     case x$lt_status in
7027       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7028       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7029       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7030     esac
7031   else :
7032     # compilation failed
7033     lt_cv_dlopen_self_static=no
7034   fi
7035 fi
7036 rm -fr conftest*
7037
7038       
7039 fi
7040
7041 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7042     fi
7043
7044     CPPFLAGS="$save_CPPFLAGS"
7045     LDFLAGS="$save_LDFLAGS"
7046     LIBS="$save_LIBS"
7047     ;;
7048   esac
7049
7050   case $lt_cv_dlopen_self in
7051   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7052   *) enable_dlopen_self=unknown ;;
7053   esac
7054
7055   case $lt_cv_dlopen_self_static in
7056   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7057   *) enable_dlopen_self_static=unknown ;;
7058   esac
7059 fi
7060
7061
7062 if test "$enable_shared" = yes && test "$GCC" = yes; then
7063   case $archive_cmds in
7064   *'~'*)
7065     # FIXME: we may have to deal with multi-command sequences.
7066     ;;
7067   '$CC '*)
7068     # Test whether the compiler implicitly links with -lc since on some
7069     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7070     # to ld, don't add -lc before -lgcc.
7071     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7072 echo "configure:7073: checking whether -lc should be explicitly linked in" >&5
7073     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7074   echo $ac_n "(cached) $ac_c" 1>&6
7075 else
7076   $rm conftest*
7077     echo 'static int dummy;' > conftest.$ac_ext
7078
7079     if { (eval echo configure:7080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7080       soname=conftest
7081       lib=conftest
7082       libobjs=conftest.$ac_objext
7083       deplibs=
7084       wl=$lt_cv_prog_cc_wl
7085       compiler_flags=-v
7086       linker_flags=-v
7087       verstring=
7088       output_objdir=.
7089       libname=conftest
7090       save_allow_undefined_flag=$allow_undefined_flag
7091       allow_undefined_flag=
7092       if { (eval echo configure:7093: \"$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; }
7093       then
7094         lt_cv_archive_cmds_need_lc=no
7095       else
7096         lt_cv_archive_cmds_need_lc=yes
7097       fi
7098       allow_undefined_flag=$save_allow_undefined_flag
7099     else
7100       cat conftest.err 1>&5
7101     fi
7102 fi
7103
7104     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7105     ;;
7106   esac
7107 fi
7108 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7109
7110 # The second clause should only fire when bootstrapping the
7111 # libtool distribution, otherwise you forgot to ship ltmain.sh
7112 # with your package, and you will get complaints that there are
7113 # no rules to generate ltmain.sh.
7114 if test -f "$ltmain"; then
7115   :
7116 else
7117   # If there is no Makefile yet, we rely on a make rule to execute
7118   # `config.status --recheck' to rerun these tests and create the
7119   # libtool script then.
7120   test -f Makefile && make "$ltmain"
7121 fi
7122
7123 if test -f "$ltmain"; then
7124   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7125   $rm -f "${ofile}T"
7126
7127   echo creating $ofile
7128
7129   # Now quote all the things that may contain metacharacters while being
7130   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7131   # variables and quote the copies for generation of the libtool script.
7132   for var in echo old_CC old_CFLAGS SED \
7133     AR AR_FLAGS CC LD LN_S NM SHELL \
7134     reload_flag reload_cmds wl \
7135     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7136     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7137     library_names_spec soname_spec \
7138     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7139     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7140     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7141     old_striplib striplib file_magic_cmd export_symbols_cmds \
7142     deplibs_check_method allow_undefined_flag no_undefined_flag \
7143     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7144     global_symbol_to_c_name_address \
7145     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7146     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7147     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7148
7149     case $var in
7150     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7151     old_postinstall_cmds | old_postuninstall_cmds | \
7152     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7153     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7154     postinstall_cmds | postuninstall_cmds | \
7155     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7156       # Double-quote double-evaled strings.
7157       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7158       ;;
7159     *)
7160       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7161       ;;
7162     esac
7163   done
7164
7165   cat <<__EOF__ > "${ofile}T"
7166 #! $SHELL
7167
7168 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7169 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7170 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7171 #
7172 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7173 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7174 #
7175 # This program is free software; you can redistribute it and/or modify
7176 # it under the terms of the GNU General Public License as published by
7177 # the Free Software Foundation; either version 2 of the License, or
7178 # (at your option) any later version.
7179 #
7180 # This program is distributed in the hope that it will be useful, but
7181 # WITHOUT ANY WARRANTY; without even the implied warranty of
7182 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7183 # General Public License for more details.
7184 #
7185 # You should have received a copy of the GNU General Public License
7186 # along with this program; if not, write to the Free Software
7187 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7188 #
7189 # As a special exception to the GNU General Public License, if you
7190 # distribute this file as part of a program that contains a
7191 # configuration script generated by Autoconf, you may include it under
7192 # the same distribution terms that you use for the rest of that program.
7193
7194 # A sed that does not truncate output.
7195 SED=$lt_SED
7196
7197 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7198 Xsed="${SED} -e s/^X//"
7199
7200 # The HP-UX ksh and POSIX shell print the target directory to stdout
7201 # if CDPATH is set.
7202 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7203
7204 # ### BEGIN LIBTOOL CONFIG
7205
7206 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7207
7208 # Shell to use when invoking shell scripts.
7209 SHELL=$lt_SHELL
7210
7211 # Whether or not to build shared libraries.
7212 build_libtool_libs=$enable_shared
7213
7214 # Whether or not to build static libraries.
7215 build_old_libs=$enable_static
7216
7217 # Whether or not to add -lc for building shared libraries.
7218 build_libtool_need_lc=$need_lc
7219
7220 # Whether or not to optimize for fast installation.
7221 fast_install=$enable_fast_install
7222
7223 # The host system.
7224 host_alias=$host_alias
7225 host=$host
7226
7227 # An echo program that does not interpret backslashes.
7228 echo=$lt_echo
7229
7230 # The archiver.
7231 AR=$lt_AR
7232 AR_FLAGS=$lt_AR_FLAGS
7233
7234 # The default C compiler.
7235 CC=$lt_CC
7236
7237 # Is the compiler the GNU C compiler?
7238 with_gcc=$GCC
7239
7240 # The linker used to build libraries.
7241 LD=$lt_LD
7242
7243 # Whether we need hard or soft links.
7244 LN_S=$lt_LN_S
7245
7246 # A BSD-compatible nm program.
7247 NM=$lt_NM
7248
7249 # A symbol stripping program
7250 STRIP=$STRIP
7251
7252 # Used to examine libraries when file_magic_cmd begins "file"
7253 MAGIC_CMD=$MAGIC_CMD
7254
7255 # Used on cygwin: DLL creation program.
7256 DLLTOOL="$DLLTOOL"
7257
7258 # Used on cygwin: object dumper.
7259 OBJDUMP="$OBJDUMP"
7260
7261 # Used on cygwin: assembler.
7262 AS="$AS"
7263
7264 # The name of the directory that contains temporary libtool files.
7265 objdir=$objdir
7266
7267 # How to create reloadable object files.
7268 reload_flag=$lt_reload_flag
7269 reload_cmds=$lt_reload_cmds
7270
7271 # How to pass a linker flag through the compiler.
7272 wl=$lt_wl
7273
7274 # Object file suffix (normally "o").
7275 objext="$ac_objext"
7276
7277 # Old archive suffix (normally "a").
7278 libext="$libext"
7279
7280 # Executable file suffix (normally "").
7281 exeext="$exeext"
7282
7283 # Additional compiler flags for building library objects.
7284 pic_flag=$lt_pic_flag
7285 pic_mode=$pic_mode
7286
7287 # Does compiler simultaneously support -c and -o options?
7288 compiler_c_o=$lt_compiler_c_o
7289
7290 # Can we write directly to a .lo ?
7291 compiler_o_lo=$lt_compiler_o_lo
7292
7293 # Must we lock files when doing compilation ?
7294 need_locks=$lt_need_locks
7295
7296 # Do we need the lib prefix for modules?
7297 need_lib_prefix=$need_lib_prefix
7298
7299 # Do we need a version for libraries?
7300 need_version=$need_version
7301
7302 # Whether dlopen is supported.
7303 dlopen_support=$enable_dlopen
7304
7305 # Whether dlopen of programs is supported.
7306 dlopen_self=$enable_dlopen_self
7307
7308 # Whether dlopen of statically linked programs is supported.
7309 dlopen_self_static=$enable_dlopen_self_static
7310
7311 # Compiler flag to prevent dynamic linking.
7312 link_static_flag=$lt_link_static_flag
7313
7314 # Compiler flag to turn off builtin functions.
7315 no_builtin_flag=$lt_no_builtin_flag
7316
7317 # Compiler flag to allow reflexive dlopens.
7318 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7319
7320 # Compiler flag to generate shared objects directly from archives.
7321 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7322
7323 # Compiler flag to generate thread-safe objects.
7324 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7325
7326 # Library versioning type.
7327 version_type=$version_type
7328
7329 # Format of library name prefix.
7330 libname_spec=$lt_libname_spec
7331
7332 # List of archive names.  First name is the real one, the rest are links.
7333 # The last name is the one that the linker finds with -lNAME.
7334 library_names_spec=$lt_library_names_spec
7335
7336 # The coded name of the library, if different from the real name.
7337 soname_spec=$lt_soname_spec
7338
7339 # Commands used to build and install an old-style archive.
7340 RANLIB=$lt_RANLIB
7341 old_archive_cmds=$lt_old_archive_cmds
7342 old_postinstall_cmds=$lt_old_postinstall_cmds
7343 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7344
7345 # Create an old-style archive from a shared archive.
7346 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7347
7348 # Create a temporary old-style archive to link instead of a shared archive.
7349 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7350
7351 # Commands used to build and install a shared archive.
7352 archive_cmds=$lt_archive_cmds
7353 archive_expsym_cmds=$lt_archive_expsym_cmds
7354 postinstall_cmds=$lt_postinstall_cmds
7355 postuninstall_cmds=$lt_postuninstall_cmds
7356
7357 # Commands to strip libraries.
7358 old_striplib=$lt_old_striplib
7359 striplib=$lt_striplib
7360
7361 # Method to check whether dependent libraries are shared objects.
7362 deplibs_check_method=$lt_deplibs_check_method
7363
7364 # Command to use when deplibs_check_method == file_magic.
7365 file_magic_cmd=$lt_file_magic_cmd
7366
7367 # Flag that allows shared libraries with undefined symbols to be built.
7368 allow_undefined_flag=$lt_allow_undefined_flag
7369
7370 # Flag that forces no undefined symbols.
7371 no_undefined_flag=$lt_no_undefined_flag
7372
7373 # Commands used to finish a libtool library installation in a directory.
7374 finish_cmds=$lt_finish_cmds
7375
7376 # Same as above, but a single script fragment to be evaled but not shown.
7377 finish_eval=$lt_finish_eval
7378
7379 # Take the output of nm and produce a listing of raw symbols and C names.
7380 global_symbol_pipe=$lt_global_symbol_pipe
7381
7382 # Transform the output of nm in a proper C declaration
7383 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7384
7385 # Transform the output of nm in a C name address pair
7386 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7387
7388 # This is the shared library runtime path variable.
7389 runpath_var=$runpath_var
7390
7391 # This is the shared library path variable.
7392 shlibpath_var=$shlibpath_var
7393
7394 # Is shlibpath searched before the hard-coded library search path?
7395 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7396
7397 # How to hardcode a shared library path into an executable.
7398 hardcode_action=$hardcode_action
7399
7400 # Whether we should hardcode library paths into libraries.
7401 hardcode_into_libs=$hardcode_into_libs
7402
7403 # Flag to hardcode \$libdir into a binary during linking.
7404 # This must work even if \$libdir does not exist.
7405 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7406
7407 # Whether we need a single -rpath flag with a separated argument.
7408 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7409
7410 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7411 # resulting binary.
7412 hardcode_direct=$hardcode_direct
7413
7414 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7415 # resulting binary.
7416 hardcode_minus_L=$hardcode_minus_L
7417
7418 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7419 # the resulting binary.
7420 hardcode_shlibpath_var=$hardcode_shlibpath_var
7421
7422 # Variables whose values should be saved in libtool wrapper scripts and
7423 # restored at relink time.
7424 variables_saved_for_relink="$variables_saved_for_relink"
7425
7426 # Whether libtool must link a program against all its dependency libraries.
7427 link_all_deplibs=$link_all_deplibs
7428
7429 # Compile-time system search path for libraries
7430 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7431
7432 # Run-time system search path for libraries
7433 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7434
7435 # Fix the shell variable \$srcfile for the compiler.
7436 fix_srcfile_path="$fix_srcfile_path"
7437
7438 # Set to yes if exported symbols are required.
7439 always_export_symbols=$always_export_symbols
7440
7441 # The commands to list exported symbols.
7442 export_symbols_cmds=$lt_export_symbols_cmds
7443
7444 # The commands to extract the exported symbol list from a shared archive.
7445 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7446
7447 # Symbols that should not be listed in the preloaded symbols.
7448 exclude_expsyms=$lt_exclude_expsyms
7449
7450 # Symbols that must always be exported.
7451 include_expsyms=$lt_include_expsyms
7452
7453 # ### END LIBTOOL CONFIG
7454
7455 __EOF__
7456
7457   case $host_os in
7458   aix3*)
7459     cat <<\EOF >> "${ofile}T"
7460
7461 # AIX sometimes has problems with the GCC collect2 program.  For some
7462 # reason, if we set the COLLECT_NAMES environment variable, the problems
7463 # vanish in a puff of smoke.
7464 if test "X${COLLECT_NAMES+set}" != Xset; then
7465   COLLECT_NAMES=
7466   export COLLECT_NAMES
7467 fi
7468 EOF
7469     ;;
7470   esac
7471
7472   case $host_os in
7473   cygwin* | mingw* | pw32* | os2*)
7474     cat <<'EOF' >> "${ofile}T"
7475       # This is a source program that is used to create dlls on Windows
7476       # Don't remove nor modify the starting and closing comments
7477 # /* ltdll.c starts here */
7478 # #define WIN32_LEAN_AND_MEAN
7479 # #include <windows.h>
7480 # #undef WIN32_LEAN_AND_MEAN
7481 # #include <stdio.h>
7482 #
7483 # #ifndef __CYGWIN__
7484 # #  ifdef __CYGWIN32__
7485 # #    define __CYGWIN__ __CYGWIN32__
7486 # #  endif
7487 # #endif
7488 #
7489 # #ifdef __cplusplus
7490 # extern "C" {
7491 # #endif
7492 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7493 # #ifdef __cplusplus
7494 # }
7495 # #endif
7496 #
7497 # #ifdef __CYGWIN__
7498 # #include <cygwin/cygwin_dll.h>
7499 # DECLARE_CYGWIN_DLL( DllMain );
7500 # #endif
7501 # HINSTANCE __hDllInstance_base;
7502 #
7503 # BOOL APIENTRY
7504 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7505 # {
7506 #   __hDllInstance_base = hInst;
7507 #   return TRUE;
7508 # }
7509 # /* ltdll.c ends here */
7510         # This is a source program that is used to create import libraries
7511         # on Windows for dlls which lack them. Don't remove nor modify the
7512         # starting and closing comments
7513 # /* impgen.c starts here */
7514 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7515 #
7516 #  This file is part of GNU libtool.
7517 #
7518 #  This program is free software; you can redistribute it and/or modify
7519 #  it under the terms of the GNU General Public License as published by
7520 #  the Free Software Foundation; either version 2 of the License, or
7521 #  (at your option) any later version.
7522 #
7523 #  This program is distributed in the hope that it will be useful,
7524 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7525 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7526 #  GNU General Public License for more details.
7527 #
7528 #  You should have received a copy of the GNU General Public License
7529 #  along with this program; if not, write to the Free Software
7530 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7531 #  */
7532 #
7533 # #include <stdio.h>            /* for printf() */
7534 # #include <unistd.h>           /* for open(), lseek(), read() */
7535 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7536 # #include <string.h>           /* for strdup() */
7537 #
7538 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7539 # #ifndef O_BINARY
7540 # #define O_BINARY 0
7541 # #endif
7542 #
7543 # static unsigned int
7544 # pe_get16 (fd, offset)
7545 #      int fd;
7546 #      int offset;
7547 # {
7548 #   unsigned char b[2];
7549 #   lseek (fd, offset, SEEK_SET);
7550 #   read (fd, b, 2);
7551 #   return b[0] + (b[1]<<8);
7552 # }
7553 #
7554 # static unsigned int
7555 # pe_get32 (fd, offset)
7556 #     int fd;
7557 #     int offset;
7558 # {
7559 #   unsigned char b[4];
7560 #   lseek (fd, offset, SEEK_SET);
7561 #   read (fd, b, 4);
7562 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7563 # }
7564 #
7565 # static unsigned int
7566 # pe_as32 (ptr)
7567 #      void *ptr;
7568 # {
7569 #   unsigned char *b = ptr;
7570 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7571 # }
7572 #
7573 # int
7574 # main (argc, argv)
7575 #     int argc;
7576 #     char *argv[];
7577 # {
7578 #     int dll;
7579 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7580 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7581 #     unsigned long name_rvas, nexp;
7582 #     unsigned char *expdata, *erva;
7583 #     char *filename, *dll_name;
7584 #
7585 #     filename = argv[1];
7586 #
7587 #     dll = open(filename, O_RDONLY|O_BINARY);
7588 #     if (dll < 1)
7589 #       return 1;
7590 #
7591 #     dll_name = filename;
7592 #
7593 #     for (i=0; filename[i]; i++)
7594 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7595 #           dll_name = filename + i +1;
7596 #
7597 #     pe_header_offset = pe_get32 (dll, 0x3c);
7598 #     opthdr_ofs = pe_header_offset + 4 + 20;
7599 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7600 #
7601 #     if (num_entries < 1) /* no exports */
7602 #       return 1;
7603 #
7604 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7605 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7606 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7607 #     secptr = (pe_header_offset + 4 + 20 +
7608 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7609 #
7610 #     expptr = 0;
7611 #     for (i = 0; i < nsections; i++)
7612 #     {
7613 #       char sname[8];
7614 #       unsigned long secptr1 = secptr + 40 * i;
7615 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7616 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7617 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7618 #       lseek(dll, secptr1, SEEK_SET);
7619 #       read(dll, sname, 8);
7620 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7621 #       {
7622 #           expptr = fptr + (export_rva - vaddr);
7623 #           if (export_rva + export_size > vaddr + vsize)
7624 #               export_size = vsize - (export_rva - vaddr);
7625 #           break;
7626 #       }
7627 #     }
7628 #
7629 #     expdata = (unsigned char*)malloc(export_size);
7630 #     lseek (dll, expptr, SEEK_SET);
7631 #     read (dll, expdata, export_size);
7632 #     erva = expdata - export_rva;
7633 #
7634 #     nexp = pe_as32 (expdata+24);
7635 #     name_rvas = pe_as32 (expdata+32);
7636 #
7637 #     printf ("EXPORTS\n");
7638 #     for (i = 0; i<nexp; i++)
7639 #     {
7640 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7641 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7642 #     }
7643 #
7644 #     return 0;
7645 # }
7646 # /* impgen.c ends here */
7647
7648 EOF
7649     ;;
7650   esac
7651
7652   # We use sed instead of cat because bash on DJGPP gets confused if
7653   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7654   # text mode, it properly converts lines to CR/LF.  This bash problem
7655   # is reportedly fixed, but why not run on old versions too?
7656   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7657
7658   mv -f "${ofile}T" "$ofile" || \
7659     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7660   chmod +x "$ofile"
7661 fi
7662
7663
7664
7665
7666
7667 # This can be used to rebuild libtool when needed
7668 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7669
7670 # Always use our own libtool.
7671 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7672
7673 # Prevent multiple expansion
7674
7675
7676
7677 ol_link_perl=no
7678 if test $ol_enable_perl != no ; then
7679         # Extract the first word of "perl", so it can be a program name with args.
7680 set dummy perl; ac_word=$2
7681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7682 echo "configure:7683: checking for $ac_word" >&5
7683 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   case "$PERLBIN" in
7687   /*)
7688   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7689   ;;
7690   ?:/*)
7691   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7692   ;;
7693   *)
7694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7695   ac_dummy="$PATH"
7696   for ac_dir in $ac_dummy; do 
7697     test -z "$ac_dir" && ac_dir=.
7698     if test -f $ac_dir/$ac_word; then
7699       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7700       break
7701     fi
7702   done
7703   IFS="$ac_save_ifs"
7704   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7705   ;;
7706 esac
7707 fi
7708 PERLBIN="$ac_cv_path_PERLBIN"
7709 if test -n "$PERLBIN"; then
7710   echo "$ac_t""$PERLBIN" 1>&6
7711 else
7712   echo "$ac_t""no" 1>&6
7713 fi
7714
7715
7716         if test "no$PERLBIN" = "no" ; then
7717                 if test $ol_enable_perl = yes ; then
7718                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7719                 fi
7720
7721         else
7722                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7723                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7724
7725                 if test x"$ol_enable_perl" = "xyes" ; then
7726                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7727                 else
7728                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7729                 fi
7730                                 ol_link_perl=yes
7731         fi
7732 fi
7733
7734 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7735 echo "configure:7736: checking how to run the C preprocessor" >&5
7736 # On Suns, sometimes $CPP names a directory.
7737 if test -n "$CPP" && test -d "$CPP"; then
7738   CPP=
7739 fi
7740 if test -z "$CPP"; then
7741 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7742   echo $ac_n "(cached) $ac_c" 1>&6
7743 else
7744     # This must be in double quotes, not single quotes, because CPP may get
7745   # substituted into the Makefile and "${CC-cc}" will confuse make.
7746   CPP="${CC-cc} -E"
7747   # On the NeXT, cc -E runs the code through the compiler's parser,
7748   # not just through cpp.
7749   cat > conftest.$ac_ext <<EOF
7750 #line 7751 "configure"
7751 #include "confdefs.h"
7752 #include <assert.h>
7753 Syntax Error
7754 EOF
7755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7756 { (eval echo configure:7757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7758 if test -z "$ac_err"; then
7759   :
7760 else
7761   echo "$ac_err" >&5
7762   echo "configure: failed program was:" >&5
7763   cat conftest.$ac_ext >&5
7764   rm -rf conftest*
7765   CPP="${CC-cc} -E -traditional-cpp"
7766   cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 #include <assert.h>
7770 Syntax Error
7771 EOF
7772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7773 { (eval echo configure:7774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7775 if test -z "$ac_err"; then
7776   :
7777 else
7778   echo "$ac_err" >&5
7779   echo "configure: failed program was:" >&5
7780   cat conftest.$ac_ext >&5
7781   rm -rf conftest*
7782   CPP="${CC-cc} -nologo -E"
7783   cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786 #include <assert.h>
7787 Syntax Error
7788 EOF
7789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7790 { (eval echo configure:7791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7792 if test -z "$ac_err"; then
7793   :
7794 else
7795   echo "$ac_err" >&5
7796   echo "configure: failed program was:" >&5
7797   cat conftest.$ac_ext >&5
7798   rm -rf conftest*
7799   CPP=/lib/cpp
7800 fi
7801 rm -f conftest*
7802 fi
7803 rm -f conftest*
7804 fi
7805 rm -f conftest*
7806   ac_cv_prog_CPP="$CPP"
7807 fi
7808   CPP="$ac_cv_prog_CPP"
7809 else
7810   ac_cv_prog_CPP="$CPP"
7811 fi
7812 echo "$ac_t""$CPP" 1>&6
7813
7814
7815
7816 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7817 echo "configure:7818: checking for Cygwin environment" >&5
7818 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7819   echo $ac_n "(cached) $ac_c" 1>&6
7820 else
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824
7825 int main() {
7826
7827 #ifndef __CYGWIN__
7828 #define __CYGWIN__ __CYGWIN32__
7829 #endif
7830 return __CYGWIN__;
7831 ; return 0; }
7832 EOF
7833 if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7834   rm -rf conftest*
7835   ac_cv_cygwin=yes
7836 else
7837   echo "configure: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   rm -rf conftest*
7840   ac_cv_cygwin=no
7841 fi
7842 rm -f conftest*
7843 fi
7844
7845 echo "$ac_t""$ac_cv_cygwin" 1>&6
7846 CYGWIN=
7847 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7848 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7849 echo "configure:7850: checking for mingw32 environment" >&5
7850 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856
7857 int main() {
7858 return __MINGW32__;
7859 ; return 0; }
7860 EOF
7861 if { (eval echo configure:7862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7862   rm -rf conftest*
7863   ac_cv_mingw32=yes
7864 else
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   ac_cv_mingw32=no
7869 fi
7870 rm -f conftest*
7871 fi
7872
7873 echo "$ac_t""$ac_cv_mingw32" 1>&6
7874 MINGW32=
7875 test "$ac_cv_mingw32" = yes && MINGW32=yes
7876
7877
7878
7879 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7880 echo "configure:7881: checking for executable suffix" >&5
7881 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7882   echo $ac_n "(cached) $ac_c" 1>&6
7883 else
7884   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7885   ac_cv_exeext=.exe
7886 else
7887   rm -f conftest*
7888   echo 'int main () { return 0; }' > conftest.$ac_ext
7889   ac_cv_exeext=
7890   if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7891     for file in conftest.*; do
7892       case $file in
7893       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7894       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7895       esac
7896     done
7897   else
7898     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7899   fi
7900   rm -f conftest*
7901   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7902 fi
7903 fi
7904
7905 EXEEXT=""
7906 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7907 echo "$ac_t""${ac_cv_exeext}" 1>&6
7908 ac_exeext=$EXEEXT
7909
7910 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7911 echo "configure:7912: checking for object suffix" >&5
7912 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7913   echo $ac_n "(cached) $ac_c" 1>&6
7914 else
7915   rm -f conftest*
7916 echo 'int i = 1;' > conftest.$ac_ext
7917 if { (eval echo configure:7918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7918   for ac_file in conftest.*; do
7919     case $ac_file in
7920     *.c) ;;
7921     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7922     esac
7923   done
7924 else
7925   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7926 fi
7927 rm -f conftest*
7928 fi
7929
7930 echo "$ac_t""$ac_cv_objext" 1>&6
7931 OBJEXT=$ac_cv_objext
7932 ac_objext=$ac_cv_objext
7933
7934
7935 cat >> confdefs.h <<EOF
7936 #define EXEEXT "${EXEEXT}"
7937 EOF
7938
7939
7940 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7941 echo "configure:7942: checking for be_app in -lbe" >&5
7942 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   ac_save_LIBS="$LIBS"
7947 LIBS="-lbe -lroot -lnet $LIBS"
7948 cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951 /* Override any gcc2 internal prototype to avoid an error.  */
7952 /* We use char because int might match the return type of a gcc2
7953     builtin and then its argument prototype would still apply.  */
7954 char be_app();
7955
7956 int main() {
7957 be_app()
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=yes"
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=no"
7968 fi
7969 rm -f conftest*
7970 LIBS="$ac_save_LIBS"
7971
7972 fi
7973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975   LIBS="$LIBS -lbe -lroot -lnet"
7976 else
7977   echo "$ac_t""no" 1>&6
7978 :
7979 fi
7980
7981
7982
7983
7984
7985 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7986 echo "configure:7987: checking for ${CC-cc} option to accept ANSI C" >&5
7987 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   am_cv_prog_cc_stdc=no
7991 ac_save_CC="$CC"
7992 # Don't try gcc -ansi; that turns off useful extensions and
7993 # breaks some systems' header files.
7994 # AIX                   -qlanglvl=ansi
7995 # Ultrix and OSF/1      -std1
7996 # HP-UX 10.20 and later -Ae
7997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7998 # SVR4                  -Xc -D__EXTENSIONS__
7999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8000 do
8001   CC="$ac_save_CC $ac_arg"
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 #include <stdarg.h>
8006 #include <stdio.h>
8007 #include <sys/types.h>
8008 #include <sys/stat.h>
8009 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8010 struct buf { int x; };
8011 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8012 static char *e (p, i)
8013      char **p;
8014      int i;
8015 {
8016   return p[i];
8017 }
8018 static char *f (char * (*g) (char **, int), char **p, ...)
8019 {
8020   char *s;
8021   va_list v;
8022   va_start (v,p);
8023   s = g (p, va_arg (v,int));
8024   va_end (v);
8025   return s;
8026 }
8027 int test (int i, double x);
8028 struct s1 {int (*f) (int a);};
8029 struct s2 {int (*f) (double a);};
8030 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8031 int argc;
8032 char **argv;
8033
8034 int main() {
8035
8036 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8037
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8041   rm -rf conftest*
8042   am_cv_prog_cc_stdc="$ac_arg"; break
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046 fi
8047 rm -f conftest*
8048 done
8049 CC="$ac_save_CC"
8050
8051 fi
8052
8053 if test -z "$am_cv_prog_cc_stdc"; then
8054   echo "$ac_t""none needed" 1>&6
8055 else
8056   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8057 fi
8058 case "x$am_cv_prog_cc_stdc" in
8059   x|xno) ;;
8060   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8061 esac
8062
8063 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8064         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8065 fi
8066
8067 # test for make depend flag
8068 OL_MKDEP=
8069 OL_MKDEP_FLAGS=
8070 if test -z "${MKDEP}"; then
8071         OL_MKDEP="${CC-cc}"
8072         if test -z "${MKDEP_FLAGS}"; then
8073                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8074 echo "configure:8075: checking for ${OL_MKDEP} depend flag" >&5
8075 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8076   echo $ac_n "(cached) $ac_c" 1>&6
8077 else
8078   
8079                         ol_cv_mkdep=no
8080                         for flag in "-M" "-xM"; do
8081                                 cat > conftest.c <<EOF
8082  noCode;
8083 EOF
8084                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8085                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8086                                 then
8087                                         if test ! -f conftest."${ac_object}" ; then
8088                                                 ol_cv_mkdep=$flag
8089                                                 OL_MKDEP_FLAGS="$flag"
8090                                                 break
8091                                         fi
8092                                 fi
8093                         done
8094                         rm -f conftest*
8095                 
8096 fi
8097
8098 echo "$ac_t""$ol_cv_mkdep" 1>&6
8099         else
8100                 cc_cv_mkdep=yes
8101                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8102         fi
8103 else
8104         cc_cv_mkdep=yes
8105         OL_MKDEP="${MKDEP}"
8106         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8107 fi
8108
8109
8110
8111 if test "${ol_cv_mkdep}" = no ; then
8112         # this will soon become an error
8113         echo "configure: warning: do not know how to generate dependencies" 1>&2
8114 fi
8115
8116 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8117 echo "configure:8118: checking for afopen in -ls" >&5
8118 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   ac_save_LIBS="$LIBS"
8123 LIBS="-ls  $LIBS"
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127 /* Override any gcc2 internal prototype to avoid an error.  */
8128 /* We use char because int might match the return type of a gcc2
8129     builtin and then its argument prototype would still apply.  */
8130 char afopen();
8131
8132 int main() {
8133 afopen()
8134 ; return 0; }
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137   rm -rf conftest*
8138   eval "ac_cv_lib_$ac_lib_var=yes"
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_lib_$ac_lib_var=no"
8144 fi
8145 rm -f conftest*
8146 LIBS="$ac_save_LIBS"
8147
8148 fi
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8150   echo "$ac_t""yes" 1>&6
8151   
8152         AUTH_LIBS=-ls
8153         cat >> confdefs.h <<\EOF
8154 #define HAVE_AIX_SECURITY 1
8155 EOF
8156
8157
8158 else
8159   echo "$ac_t""no" 1>&6
8160 fi
8161
8162
8163 case "$target" in
8164 *-ibm-openedition)
8165         ac_cv_func_getopt=no
8166         cat >> confdefs.h <<\EOF
8167 #define BOTH_STRINGS_H 1
8168 EOF
8169
8170         ;;
8171 esac
8172
8173 ol_link_modules=no
8174 if test $ol_enable_modules != no ; then
8175         for ac_hdr in ltdl.h
8176 do
8177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8179 echo "configure:8180: checking for $ac_hdr" >&5
8180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 #include <$ac_hdr>
8187 EOF
8188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8189 { (eval echo configure:8190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8191 if test -z "$ac_err"; then
8192   rm -rf conftest*
8193   eval "ac_cv_header_$ac_safe=yes"
8194 else
8195   echo "$ac_err" >&5
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198   rm -rf conftest*
8199   eval "ac_cv_header_$ac_safe=no"
8200 fi
8201 rm -f conftest*
8202 fi
8203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8204   echo "$ac_t""yes" 1>&6
8205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8206   cat >> confdefs.h <<EOF
8207 #define $ac_tr_hdr 1
8208 EOF
8209  
8210 else
8211   echo "$ac_t""no" 1>&6
8212 fi
8213 done
8214
8215
8216         if test $ac_cv_header_ltdl_h = no ; then
8217                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8218         fi
8219
8220         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8221 echo "configure:8222: checking for lt_dlinit in -lltdl" >&5
8222 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   ac_save_LIBS="$LIBS"
8227 LIBS="-lltdl  $LIBS"
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char lt_dlinit();
8235
8236 int main() {
8237 lt_dlinit()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 LIBS="$ac_save_LIBS"
8251
8252 fi
8253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255   
8256                 MODULES_LIBS=-lltdl
8257                 cat >> confdefs.h <<\EOF
8258 #define HAVE_LIBLTDL 1
8259 EOF
8260
8261         
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265
8266
8267         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8268                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8269         fi
8270         ol_link_modules=yes
8271
8272 else
8273         for i in $Backends; do
8274                 eval "ol_tmp=\$ol_enable_$i"
8275                 if test $ol_tmp = mod ; then
8276                         echo "configure: warning: building static $i backend" 1>&2
8277                         eval "ol_enable_$i=yes"
8278                 fi
8279         done
8280         for i in $Overlays; do
8281                 eval "ol_tmp=\$ol_enable_$i"
8282                 if test $ol_tmp = mod ; then
8283                         echo "configure: warning: building static $i overlay" 1>&2
8284                         eval "ol_enable_$i=yes"
8285                 fi
8286         done
8287 fi
8288
8289 # test for EBCDIC
8290 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8291 echo "configure:8292: checking for EBCDIC" >&5
8292 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8293   echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295   
8296         cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299
8300 #if !('M' == 0xd4)
8301 #include <__ASCII__/generate_error.h>
8302 #endif
8303
8304 EOF
8305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8306 { (eval echo configure:8307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8308 if test -z "$ac_err"; then
8309   rm -rf conftest*
8310   ol_cv_cpp_ebcdic=yes
8311 else
8312   echo "$ac_err" >&5
8313   echo "configure: failed program was:" >&5
8314   cat conftest.$ac_ext >&5
8315   rm -rf conftest*
8316   ol_cv_cpp_ebcdic=no
8317 fi
8318 rm -f conftest*
8319 fi
8320
8321 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8322 if test $ol_cv_cpp_ebcdic = yes ; then
8323         cat >> confdefs.h <<\EOF
8324 #define HAVE_EBCDIC 1
8325 EOF
8326
8327 fi
8328
8329 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8330 echo "configure:8331: checking for ANSI C header files" >&5
8331 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8332   echo $ac_n "(cached) $ac_c" 1>&6
8333 else
8334   cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <stdlib.h>
8338 #include <stdarg.h>
8339 #include <string.h>
8340 #include <float.h>
8341 EOF
8342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8343 { (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8345 if test -z "$ac_err"; then
8346   rm -rf conftest*
8347   ol_cv_header_stdc=yes
8348 else
8349   echo "$ac_err" >&5
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   ol_cv_header_stdc=no
8354 fi
8355 rm -f conftest*
8356
8357 if test $ol_cv_header_stdc = yes; then
8358   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8359 cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 #include <string.h>
8363 EOF
8364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8365   egrep "memchr" >/dev/null 2>&1; then
8366   :
8367 else
8368   rm -rf conftest*
8369   ol_cv_header_stdc=no
8370 fi
8371 rm -f conftest*
8372
8373 fi
8374
8375 if test $ol_cv_header_stdc = yes; then
8376   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8377 cat > conftest.$ac_ext <<EOF
8378 #line 8379 "configure"
8379 #include "confdefs.h"
8380 #include <stdlib.h>
8381 EOF
8382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8383   egrep "free" >/dev/null 2>&1; then
8384   :
8385 else
8386   rm -rf conftest*
8387   ol_cv_header_stdc=no
8388 fi
8389 rm -f conftest*
8390
8391 fi
8392
8393 if test $ol_cv_header_stdc = yes; then
8394   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8395 if test "$cross_compiling" = yes; then
8396   :
8397 else
8398   cat > conftest.$ac_ext <<EOF
8399 #line 8400 "configure"
8400 #include "confdefs.h"
8401 #include <ctype.h>
8402 #ifndef HAVE_EBCDIC
8403 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8404 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8405 #else
8406 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8407                 || ('j' <= (c) && (c) <= 'r') \
8408                 || ('s' <= (c) && (c) <= 'z'))
8409 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8410 #endif
8411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8412 int main () { int i; for (i = 0; i < 256; i++)
8413 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8414 exit (0); }
8415
8416 EOF
8417 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8418 then
8419   :
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -fr conftest*
8424   ol_cv_header_stdc=no
8425 fi
8426 rm -fr conftest*
8427 fi
8428
8429 fi
8430 fi
8431
8432 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8433 if test $ol_cv_header_stdc = yes; then
8434   cat >> confdefs.h <<\EOF
8435 #define STDC_HEADERS 1
8436 EOF
8437
8438 fi
8439 ac_cv_header_stdc=disable
8440
8441
8442 if test $ol_cv_header_stdc != yes; then
8443         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8444 fi
8445
8446 ac_header_dirent=no
8447 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8448 do
8449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8450 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8451 echo "configure:8452: checking for $ac_hdr that defines DIR" >&5
8452 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8453   echo $ac_n "(cached) $ac_c" 1>&6
8454 else
8455   cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 #include <sys/types.h>
8459 #include <$ac_hdr>
8460 int main() {
8461 DIR *dirp = 0;
8462 ; return 0; }
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8465   rm -rf conftest*
8466   eval "ac_cv_header_dirent_$ac_safe=yes"
8467 else
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -rf conftest*
8471   eval "ac_cv_header_dirent_$ac_safe=no"
8472 fi
8473 rm -f conftest*
8474 fi
8475 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8478   cat >> confdefs.h <<EOF
8479 #define $ac_tr_hdr 1
8480 EOF
8481  ac_header_dirent=$ac_hdr; break
8482 else
8483   echo "$ac_t""no" 1>&6
8484 fi
8485 done
8486 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8487 if test $ac_header_dirent = dirent.h; then
8488 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8489 echo "configure:8490: checking for opendir in -ldir" >&5
8490 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8492   echo $ac_n "(cached) $ac_c" 1>&6
8493 else
8494   ac_save_LIBS="$LIBS"
8495 LIBS="-ldir  $LIBS"
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 /* We use char because int might match the return type of a gcc2
8501     builtin and then its argument prototype would still apply.  */
8502 char opendir();
8503
8504 int main() {
8505 opendir()
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   eval "ac_cv_lib_$ac_lib_var=yes"
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_lib_$ac_lib_var=no"
8516 fi
8517 rm -f conftest*
8518 LIBS="$ac_save_LIBS"
8519
8520 fi
8521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523   LIBS="$LIBS -ldir"
8524 else
8525   echo "$ac_t""no" 1>&6
8526 fi
8527
8528 else
8529 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8530 echo "configure:8531: checking for opendir in -lx" >&5
8531 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8533   echo $ac_n "(cached) $ac_c" 1>&6
8534 else
8535   ac_save_LIBS="$LIBS"
8536 LIBS="-lx  $LIBS"
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 /* We use char because int might match the return type of a gcc2
8542     builtin and then its argument prototype would still apply.  */
8543 char opendir();
8544
8545 int main() {
8546 opendir()
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=no"
8557 fi
8558 rm -f conftest*
8559 LIBS="$ac_save_LIBS"
8560
8561 fi
8562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8563   echo "$ac_t""yes" 1>&6
8564   LIBS="$LIBS -lx"
8565 else
8566   echo "$ac_t""no" 1>&6
8567 fi
8568
8569 fi
8570
8571 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8572 echo "configure:8573: checking for sys/wait.h that is POSIX.1 compatible" >&5
8573 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 #include <sys/types.h>
8580 #include <sys/wait.h>
8581 #ifndef WEXITSTATUS
8582 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8583 #endif
8584 #ifndef WIFEXITED
8585 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8586 #endif
8587 int main() {
8588 int s;
8589 wait (&s);
8590 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8591 ; return 0; }
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8594   rm -rf conftest*
8595   ac_cv_header_sys_wait_h=yes
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   ac_cv_header_sys_wait_h=no
8601 fi
8602 rm -f conftest*
8603 fi
8604
8605 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8606 if test $ac_cv_header_sys_wait_h = yes; then
8607   cat >> confdefs.h <<\EOF
8608 #define HAVE_SYS_WAIT_H 1
8609 EOF
8610
8611 fi
8612
8613 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8614 echo "configure:8615: checking POSIX termios" >&5
8615 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8616   echo $ac_n "(cached) $ac_c" 1>&6
8617 else
8618   cat > conftest.$ac_ext <<EOF
8619 #line 8620 "configure"
8620 #include "confdefs.h"
8621 #include <sys/types.h>
8622 #include <unistd.h>
8623 #include <termios.h>
8624 int main() {
8625 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8626    tcgetattr(0, 0);
8627 ; return 0; }
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8630   rm -rf conftest*
8631   am_cv_sys_posix_termios=yes
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -rf conftest*
8636   am_cv_sys_posix_termios=no
8637 fi
8638 rm -f conftest*
8639 fi
8640
8641 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8642
8643
8644  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8645 echo "configure:8646: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8646 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8650
8651   gwinsz_in_termios_h=no
8652   if test $am_cv_sys_posix_termios = yes; then
8653     cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 #include <sys/types.h>
8657 #     include <termios.h>
8658 #     ifdef TIOCGWINSZ
8659         yes
8660 #     endif
8661     
8662 EOF
8663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8664   egrep "yes" >/dev/null 2>&1; then
8665   rm -rf conftest*
8666   gwinsz_in_termios_h=yes
8667 fi
8668 rm -f conftest*
8669
8670   fi
8671
8672   if test $gwinsz_in_termios_h = no; then
8673     cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 #include <sys/types.h>
8677 #     include <sys/ioctl.h>
8678 #     ifdef TIOCGWINSZ
8679         yes
8680 #     endif
8681     
8682 EOF
8683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8684   egrep "yes" >/dev/null 2>&1; then
8685   rm -rf conftest*
8686   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8687 fi
8688 rm -f conftest*
8689
8690   fi
8691   
8692 fi
8693
8694 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8695   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8696     cat >> confdefs.h <<\EOF
8697 #define GWINSZ_IN_SYS_IOCTL 1
8698 EOF
8699
8700   fi
8701
8702 if test $am_cv_sys_posix_termios = yes ; then
8703         cat >> confdefs.h <<\EOF
8704 #define HAVE_POSIX_TERMIOS 1
8705 EOF
8706
8707 fi
8708
8709 for ac_hdr in \
8710         arpa/inet.h             \
8711         arpa/nameser.h  \
8712         assert.h                \
8713         bits/types.h    \
8714         conio.h                 \
8715         crypt.h                 \
8716         direct.h                \
8717         errno.h                 \
8718         fcntl.h                 \
8719         filio.h                 \
8720         getopt.h                \
8721         grp.h                   \
8722         io.h                    \
8723         libutil.h               \
8724         limits.h                \
8725         locale.h                \
8726         netinet/tcp.h   \
8727         malloc.h                \
8728         memory.h                \
8729         psap.h                  \
8730         pwd.h                   \
8731         process.h               \
8732         resolv.h                \
8733         sgtty.h                 \
8734         shadow.h                \
8735         stddef.h                \
8736         string.h                \
8737         strings.h               \
8738         sysexits.h              \
8739         sys/file.h              \
8740         sys/filio.h             \
8741         sys/errno.h             \
8742         sys/ioctl.h             \
8743         sys/param.h             \
8744         sys/resource.h  \
8745         sys/select.h    \
8746         sys/socket.h    \
8747         sys/stat.h              \
8748         sys/syslog.h    \
8749         sys/time.h              \
8750         sys/types.h             \
8751         sys/ucred.h             \
8752         sys/uio.h               \
8753         syslog.h                \
8754         termios.h               \
8755         unistd.h                \
8756         winsock.h               \
8757         winsock2.h              \
8758
8759 do
8760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8762 echo "configure:8763: checking for $ac_hdr" >&5
8763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <$ac_hdr>
8770 EOF
8771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8772 { (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8774 if test -z "$ac_err"; then
8775   rm -rf conftest*
8776   eval "ac_cv_header_$ac_safe=yes"
8777 else
8778   echo "$ac_err" >&5
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   eval "ac_cv_header_$ac_safe=no"
8783 fi
8784 rm -f conftest*
8785 fi
8786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8787   echo "$ac_t""yes" 1>&6
8788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8789   cat >> confdefs.h <<EOF
8790 #define $ac_tr_hdr 1
8791 EOF
8792  
8793 else
8794   echo "$ac_t""no" 1>&6
8795 fi
8796 done
8797
8798
8799
8800
8801 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8802 echo "configure:8803: checking for sigset in -lV3" >&5
8803 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   ac_save_LIBS="$LIBS"
8808 LIBS="-lV3  $LIBS"
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 /* Override any gcc2 internal prototype to avoid an error.  */
8813 /* We use char because int might match the return type of a gcc2
8814     builtin and then its argument prototype would still apply.  */
8815 char sigset();
8816
8817 int main() {
8818 sigset()
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   eval "ac_cv_lib_$ac_lib_var=yes"
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_lib_$ac_lib_var=no"
8829 fi
8830 rm -f conftest*
8831 LIBS="$ac_save_LIBS"
8832
8833 fi
8834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8838   cat >> confdefs.h <<EOF
8839 #define $ac_tr_lib 1
8840 EOF
8841
8842   LIBS="-lV3 $LIBS"
8843
8844 else
8845   echo "$ac_t""no" 1>&6
8846 fi
8847
8848
8849 if test "$ac_cv_header_winsock_h" = yes; then
8850 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8851 echo "configure:8852: checking for winsock" >&5
8852 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   save_LIBS="$LIBS"
8856 for curlib in ws2_32 wsock32; do
8857         LIBS="$LIBS -l$curlib"
8858         cat > conftest.$ac_ext <<EOF
8859 #line 8860 "configure"
8860 #include "confdefs.h"
8861 #include <winsock.h>
8862                         
8863 int main() {
8864
8865                         socket(0,0,0);
8866                         select(0,NULL,NULL,NULL,NULL);
8867                         closesocket(0);
8868                         gethostname(NULL,0);
8869                         
8870 ; return 0; }
8871 EOF
8872 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8873   rm -rf conftest*
8874   ol_cv_winsock=yes
8875 else
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -rf conftest*
8879   ol_cv_winsock=no
8880 fi
8881 rm -f conftest*
8882
8883         if test $ol_cv_winsock = yes; then
8884                 cat >> confdefs.h <<\EOF
8885 #define HAVE_WINSOCK 1
8886 EOF
8887
8888                 ac_cv_func_socket=yes
8889                 ac_cv_func_select=yes
8890                 ac_cv_func_closesocket=yes
8891                 ac_cv_func_gethostname=yes
8892                 if test $curlib = ws2_32; then
8893                         ol_cv_winsock=winsock2
8894                         cat >> confdefs.h <<\EOF
8895 #define HAVE_WINSOCK2 1
8896 EOF
8897
8898                 fi
8899                 break
8900         fi
8901         LIBS="$save_LIBS"
8902 done
8903 fi
8904
8905 echo "$ac_t""$ol_cv_winsock" 1>&6
8906 fi
8907
8908
8909 echo $ac_n "checking for socket""... $ac_c" 1>&6
8910 echo "configure:8911: checking for socket" >&5
8911 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 /* System header to define __stub macros and hopefully few prototypes,
8918     which can conflict with char socket(); below.  */
8919 #include <assert.h>
8920 /* Override any gcc2 internal prototype to avoid an error.  */
8921 /* We use char because int might match the return type of a gcc2
8922     builtin and then its argument prototype would still apply.  */
8923 char socket();
8924 char (*f)();
8925
8926 int main() {
8927
8928 /* The GNU C library defines this for functions which it implements
8929     to always fail with ENOSYS.  Some functions are actually named
8930     something starting with __ and the normal name is an alias.  */
8931 #if defined (__stub_socket) || defined (__stub___socket)
8932 choke me
8933 #else
8934 f = socket;
8935 #endif
8936
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_func_socket=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_func_socket=no"
8947 fi
8948 rm -f conftest*
8949 fi
8950
8951 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8952   echo "$ac_t""yes" 1>&6
8953   :
8954 else
8955   echo "$ac_t""no" 1>&6
8956         
8957         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8958 echo "configure:8959: checking for main in -lsocket" >&5
8959 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   ac_save_LIBS="$LIBS"
8964 LIBS="-lsocket  $LIBS"
8965 cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968
8969 int main() {
8970 main()
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=yes"
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=no"
8981 fi
8982 rm -f conftest*
8983 LIBS="$ac_save_LIBS"
8984
8985 fi
8986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8987   echo "$ac_t""yes" 1>&6
8988     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8990   cat >> confdefs.h <<EOF
8991 #define $ac_tr_lib 1
8992 EOF
8993
8994   LIBS="-lsocket $LIBS"
8995
8996 else
8997   echo "$ac_t""no" 1>&6
8998 fi
8999
9000         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9001 echo "configure:9002: checking for main in -lnet" >&5
9002 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9004   echo $ac_n "(cached) $ac_c" 1>&6
9005 else
9006   ac_save_LIBS="$LIBS"
9007 LIBS="-lnet  $LIBS"
9008 cat > conftest.$ac_ext <<EOF
9009 #line 9010 "configure"
9010 #include "confdefs.h"
9011
9012 int main() {
9013 main()
9014 ; return 0; }
9015 EOF
9016 if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9017   rm -rf conftest*
9018   eval "ac_cv_lib_$ac_lib_var=yes"
9019 else
9020   echo "configure: failed program was:" >&5
9021   cat conftest.$ac_ext >&5
9022   rm -rf conftest*
9023   eval "ac_cv_lib_$ac_lib_var=no"
9024 fi
9025 rm -f conftest*
9026 LIBS="$ac_save_LIBS"
9027
9028 fi
9029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9030   echo "$ac_t""yes" 1>&6
9031     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9032     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9033   cat >> confdefs.h <<EOF
9034 #define $ac_tr_lib 1
9035 EOF
9036
9037   LIBS="-lnet $LIBS"
9038
9039 else
9040   echo "$ac_t""no" 1>&6
9041 fi
9042
9043         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9044 echo "configure:9045: checking for main in -lnsl_s" >&5
9045 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9047   echo $ac_n "(cached) $ac_c" 1>&6
9048 else
9049   ac_save_LIBS="$LIBS"
9050 LIBS="-lnsl_s  $LIBS"
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054
9055 int main() {
9056 main()
9057 ; return 0; }
9058 EOF
9059 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=yes"
9062 else
9063   echo "configure: failed program was:" >&5
9064   cat conftest.$ac_ext >&5
9065   rm -rf conftest*
9066   eval "ac_cv_lib_$ac_lib_var=no"
9067 fi
9068 rm -f conftest*
9069 LIBS="$ac_save_LIBS"
9070
9071 fi
9072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9073   echo "$ac_t""yes" 1>&6
9074     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9076   cat >> confdefs.h <<EOF
9077 #define $ac_tr_lib 1
9078 EOF
9079
9080   LIBS="-lnsl_s $LIBS"
9081
9082 else
9083   echo "$ac_t""no" 1>&6
9084 fi
9085
9086         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9087 echo "configure:9088: checking for main in -lnsl" >&5
9088 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   ac_save_LIBS="$LIBS"
9093 LIBS="-lnsl  $LIBS"
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097
9098 int main() {
9099 main()
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=yes"
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_lib_$ac_lib_var=no"
9110 fi
9111 rm -f conftest*
9112 LIBS="$ac_save_LIBS"
9113
9114 fi
9115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9116   echo "$ac_t""yes" 1>&6
9117     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9119   cat >> confdefs.h <<EOF
9120 #define $ac_tr_lib 1
9121 EOF
9122
9123   LIBS="-lnsl $LIBS"
9124
9125 else
9126   echo "$ac_t""no" 1>&6
9127 fi
9128
9129         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9130 echo "configure:9131: checking for socket in -linet" >&5
9131 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   ac_save_LIBS="$LIBS"
9136 LIBS="-linet  $LIBS"
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* Override any gcc2 internal prototype to avoid an error.  */
9141 /* We use char because int might match the return type of a gcc2
9142     builtin and then its argument prototype would still apply.  */
9143 char socket();
9144
9145 int main() {
9146 socket()
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   eval "ac_cv_lib_$ac_lib_var=yes"
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   eval "ac_cv_lib_$ac_lib_var=no"
9157 fi
9158 rm -f conftest*
9159 LIBS="$ac_save_LIBS"
9160
9161 fi
9162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9166   cat >> confdefs.h <<EOF
9167 #define $ac_tr_lib 1
9168 EOF
9169
9170   LIBS="-linet $LIBS"
9171
9172 else
9173   echo "$ac_t""no" 1>&6
9174 fi
9175
9176         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9177 echo "configure:9178: checking for main in -lgen" >&5
9178 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9180   echo $ac_n "(cached) $ac_c" 1>&6
9181 else
9182   ac_save_LIBS="$LIBS"
9183 LIBS="-lgen  $LIBS"
9184 cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187
9188 int main() {
9189 main()
9190 ; return 0; }
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9193   rm -rf conftest*
9194   eval "ac_cv_lib_$ac_lib_var=yes"
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_lib_$ac_lib_var=no"
9200 fi
9201 rm -f conftest*
9202 LIBS="$ac_save_LIBS"
9203
9204 fi
9205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9206   echo "$ac_t""yes" 1>&6
9207     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9208     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9209   cat >> confdefs.h <<EOF
9210 #define $ac_tr_lib 1
9211 EOF
9212
9213   LIBS="-lgen $LIBS"
9214
9215 else
9216   echo "$ac_t""no" 1>&6
9217 fi
9218
9219
9220 fi
9221
9222
9223 echo $ac_n "checking for select""... $ac_c" 1>&6
9224 echo "configure:9225: checking for select" >&5
9225 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231 /* System header to define __stub macros and hopefully few prototypes,
9232     which can conflict with char select(); below.  */
9233 #include <assert.h>
9234 /* Override any gcc2 internal prototype to avoid an error.  */
9235 /* We use char because int might match the return type of a gcc2
9236     builtin and then its argument prototype would still apply.  */
9237 char select();
9238 char (*f)();
9239
9240 int main() {
9241
9242 /* The GNU C library defines this for functions which it implements
9243     to always fail with ENOSYS.  Some functions are actually named
9244     something starting with __ and the normal name is an alias.  */
9245 #if defined (__stub_select) || defined (__stub___select)
9246 choke me
9247 #else
9248 f = select;
9249 #endif
9250
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9254   rm -rf conftest*
9255   eval "ac_cv_func_select=yes"
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   eval "ac_cv_func_select=no"
9261 fi
9262 rm -f conftest*
9263 fi
9264
9265 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267   :
9268 else
9269   echo "$ac_t""no" 1>&6
9270 { echo "configure: error: select() required." 1>&2; exit 1; }
9271 fi
9272
9273
9274 if test "${ac_cv_header_winsock_h}" != yes; then
9275                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9276 echo "configure:9277: checking types of arguments for select()" >&5
9277  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9278   echo $ac_n "(cached) $ac_c" 1>&6
9279 else
9280    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9281   echo $ac_n "(cached) $ac_c" 1>&6
9282 else
9283     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9284   echo $ac_n "(cached) $ac_c" 1>&6
9285 else
9286      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9287      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9288       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9289        cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #ifdef HAVE_SYS_TYPES_H
9293 #include <sys/types.h>
9294 #endif
9295 #ifdef HAVE_SYS_TIME_H
9296 #include <sys/time.h>
9297 #endif
9298 #ifdef HAVE_SYS_SELECT_H
9299 #include <sys/select.h>
9300 #endif
9301 #ifdef HAVE_SYS_SOCKET_H
9302 #include <sys/socket.h>
9303 #endif
9304 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);
9305 int main() {
9306
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9310   rm -rf conftest*
9311           ac_not_found=no ; break 3
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   ac_not_found=yes
9317 fi
9318 rm -f conftest*
9319       done
9320      done
9321     done
9322    
9323 fi
9324   
9325 fi
9326  
9327 fi
9328  if test "$ac_not_found" = yes; then
9329   ac_cv_func_select_arg1=int 
9330   ac_cv_func_select_arg234='int *' 
9331   ac_cv_func_select_arg5='struct timeval *'
9332  fi
9333  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9334  cat >> confdefs.h <<EOF
9335 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9336 EOF
9337
9338  cat >> confdefs.h <<EOF
9339 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9340 EOF
9341
9342  cat >> confdefs.h <<EOF
9343 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9344 EOF
9345
9346
9347 fi
9348
9349
9350 # strerror checks
9351 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9352 echo "configure:9353: checking declaration of sys_errlist" >&5
9353 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9354   echo $ac_n "(cached) $ac_c" 1>&6
9355 else
9356   
9357         cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360
9361 #include <stdio.h>
9362 #include <sys/types.h>
9363 #include <errno.h>
9364 #ifdef WINNT
9365 #include <stdlib.h>
9366 #endif 
9367 int main() {
9368 char *c = (char *) *sys_errlist
9369 ; return 0; }
9370 EOF
9371 if { (eval echo configure:9372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9372   rm -rf conftest*
9373   ol_cv_dcl_sys_errlist=yes
9374         ol_cv_have_sys_errlist=yes
9375 else
9376   echo "configure: failed program was:" >&5
9377   cat conftest.$ac_ext >&5
9378   rm -rf conftest*
9379   ol_cv_dcl_sys_errlist=no
9380 fi
9381 rm -f conftest*
9382 fi
9383
9384 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9385 #
9386 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9387 if test $ol_cv_dcl_sys_errlist = no ; then
9388         cat >> confdefs.h <<\EOF
9389 #define DECL_SYS_ERRLIST 1
9390 EOF
9391
9392
9393         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9394 echo "configure:9395: checking existence of sys_errlist" >&5
9395 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398   
9399                 cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402 #include <errno.h>
9403 int main() {
9404 char *c = (char *) *sys_errlist
9405 ; return 0; }
9406 EOF
9407 if { (eval echo configure:9408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9408   rm -rf conftest*
9409   ol_cv_have_sys_errlist=yes
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -rf conftest*
9414   ol_cv_have_sys_errlist=no
9415 fi
9416 rm -f conftest*
9417 fi
9418
9419 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9420 fi
9421 if test $ol_cv_have_sys_errlist = yes ; then
9422         cat >> confdefs.h <<\EOF
9423 #define HAVE_SYS_ERRLIST 1
9424 EOF
9425
9426 fi
9427  for ac_func in strerror strerror_r
9428 do
9429 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9430 echo "configure:9431: checking for $ac_func" >&5
9431 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9432   echo $ac_n "(cached) $ac_c" 1>&6
9433 else
9434   cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437 /* System header to define __stub macros and hopefully few prototypes,
9438     which can conflict with char $ac_func(); below.  */
9439 #include <assert.h>
9440 /* Override any gcc2 internal prototype to avoid an error.  */
9441 /* We use char because int might match the return type of a gcc2
9442     builtin and then its argument prototype would still apply.  */
9443 char $ac_func();
9444 char (*f)();
9445
9446 int main() {
9447
9448 /* The GNU C library defines this for functions which it implements
9449     to always fail with ENOSYS.  Some functions are actually named
9450     something starting with __ and the normal name is an alias.  */
9451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9452 choke me
9453 #else
9454 f = $ac_func;
9455 #endif
9456
9457 ; return 0; }
9458 EOF
9459 if { (eval echo configure:9460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9460   rm -rf conftest*
9461   eval "ac_cv_func_$ac_func=yes"
9462 else
9463   echo "configure: failed program was:" >&5
9464   cat conftest.$ac_ext >&5
9465   rm -rf conftest*
9466   eval "ac_cv_func_$ac_func=no"
9467 fi
9468 rm -f conftest*
9469 fi
9470
9471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9472   echo "$ac_t""yes" 1>&6
9473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9474   cat >> confdefs.h <<EOF
9475 #define $ac_tr_func 1
9476 EOF
9477  
9478 else
9479   echo "$ac_t""no" 1>&6
9480 fi
9481 done
9482
9483 ol_cv_func_strerror_r=no
9484 if test "${ac_cv_func_strerror_r}" = yes ; then
9485         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9486 echo "configure:9487: checking non-posix strerror_r" >&5
9487 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490   
9491         cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 #include <string.h>
9495 EOF
9496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9497   egrep "strerror_r" >/dev/null 2>&1; then
9498   rm -rf conftest*
9499   ol_decl_strerror_r=yes
9500 else
9501   rm -rf conftest*
9502   ol_decl_strerror_r=no
9503 fi
9504 rm -f conftest*
9505
9506         if test $ol_decl_strerror_r = yes ; then
9507                 cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 #include <string.h>
9511 int main() {
9512    /* from autoconf 2.59 */
9513                                 char buf[100];
9514                                 char x = *strerror_r (0, buf, sizeof buf);
9515                                 char *p = strerror_r (0, buf, sizeof buf);
9516                         
9517 ; return 0; }
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9520   rm -rf conftest*
9521   ol_cv_nonposix_strerror_r=yes
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -rf conftest*
9526   ol_cv_nonposix_strerror_r=no
9527 fi
9528 rm -f conftest*
9529         else
9530                 if test "$cross_compiling" = yes; then
9531     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9532 else
9533   cat > conftest.$ac_ext <<EOF
9534 #line 9535 "configure"
9535 #include "confdefs.h"
9536
9537                         main() {
9538                                 char buf[100];
9539                                 buf[0] = 0;
9540                                 strerror_r( 1, buf, sizeof buf );
9541                                 exit( buf[0] == 0 );
9542                         }
9543                         
9544 EOF
9545 if { (eval echo configure:9546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9546 then
9547   ol_cv_nonposix_strerror_r=yes
9548 else
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -fr conftest*
9552   ol_cv_nonposix_strerror=no
9553 fi
9554 rm -fr conftest*
9555 fi
9556
9557         fi
9558         
9559 fi
9560
9561 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9562 if test $ol_cv_nonposix_strerror_r = yes ; then
9563         cat >> confdefs.h <<\EOF
9564 #define HAVE_NONPOSIX_STRERROR_R 1
9565 EOF
9566
9567 fi
9568
9569 elif test "${ac_cv_func_strerror}" = no ; then
9570         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9571 echo "configure:9572: checking declaration of sys_errlist" >&5
9572 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9573   echo $ac_n "(cached) $ac_c" 1>&6
9574 else
9575   
9576         cat > conftest.$ac_ext <<EOF
9577 #line 9578 "configure"
9578 #include "confdefs.h"
9579
9580 #include <stdio.h>
9581 #include <sys/types.h>
9582 #include <errno.h>
9583 #ifdef WINNT
9584 #include <stdlib.h>
9585 #endif 
9586 int main() {
9587 char *c = (char *) *sys_errlist
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9591   rm -rf conftest*
9592   ol_cv_dcl_sys_errlist=yes
9593         ol_cv_have_sys_errlist=yes
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   ol_cv_dcl_sys_errlist=no
9599 fi
9600 rm -f conftest*
9601 fi
9602
9603 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9604 #
9605 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9606 if test $ol_cv_dcl_sys_errlist = no ; then
9607         cat >> confdefs.h <<\EOF
9608 #define DECL_SYS_ERRLIST 1
9609 EOF
9610
9611
9612         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9613 echo "configure:9614: checking existence of sys_errlist" >&5
9614 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618                 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 #include <errno.h>
9622 int main() {
9623 char *c = (char *) *sys_errlist
9624 ; return 0; }
9625 EOF
9626 if { (eval echo configure:9627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9627   rm -rf conftest*
9628   ol_cv_have_sys_errlist=yes
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632   rm -rf conftest*
9633   ol_cv_have_sys_errlist=no
9634 fi
9635 rm -f conftest*
9636 fi
9637
9638 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9639 fi
9640 if test $ol_cv_have_sys_errlist = yes ; then
9641         cat >> confdefs.h <<\EOF
9642 #define HAVE_SYS_ERRLIST 1
9643 EOF
9644
9645 fi
9646
9647 fi
9648
9649
9650 for ac_hdr in regex.h 
9651 do
9652 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9653 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9654 echo "configure:9655: checking for $ac_hdr" >&5
9655 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9656   echo $ac_n "(cached) $ac_c" 1>&6
9657 else
9658   cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 #include <$ac_hdr>
9662 EOF
9663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9664 { (eval echo configure:9665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9666 if test -z "$ac_err"; then
9667   rm -rf conftest*
9668   eval "ac_cv_header_$ac_safe=yes"
9669 else
9670   echo "$ac_err" >&5
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673   rm -rf conftest*
9674   eval "ac_cv_header_$ac_safe=no"
9675 fi
9676 rm -f conftest*
9677 fi
9678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9679   echo "$ac_t""yes" 1>&6
9680     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9681   cat >> confdefs.h <<EOF
9682 #define $ac_tr_hdr 1
9683 EOF
9684  
9685 else
9686   echo "$ac_t""no" 1>&6
9687 fi
9688 done
9689
9690 if test "$ac_cv_header_regex_h" != yes ; then
9691         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9692 fi
9693
9694 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9695 echo "configure:9696: checking for library containing regfree" >&5
9696 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   ac_func_search_save_LIBS="$LIBS"
9700 ac_cv_search_regfree="no"
9701 cat > conftest.$ac_ext <<EOF
9702 #line 9703 "configure"
9703 #include "confdefs.h"
9704 /* Override any gcc2 internal prototype to avoid an error.  */
9705 /* We use char because int might match the return type of a gcc2
9706     builtin and then its argument prototype would still apply.  */
9707 char regfree();
9708
9709 int main() {
9710 regfree()
9711 ; return 0; }
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9714   rm -rf conftest*
9715   ac_cv_search_regfree="none required"
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719 fi
9720 rm -f conftest*
9721 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9722 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9723 cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9726 /* Override any gcc2 internal prototype to avoid an error.  */
9727 /* We use char because int might match the return type of a gcc2
9728     builtin and then its argument prototype would still apply.  */
9729 char regfree();
9730
9731 int main() {
9732 regfree()
9733 ; return 0; }
9734 EOF
9735 if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9736   rm -rf conftest*
9737   ac_cv_search_regfree="-l$ac_lib"
9738 break
9739 else
9740   echo "configure: failed program was:" >&5
9741   cat conftest.$ac_ext >&5
9742 fi
9743 rm -f conftest*
9744 done
9745 LIBS="$ac_func_search_save_LIBS"
9746 fi
9747
9748 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9749 if test "$ac_cv_search_regfree" != "no"; then
9750   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9751   :
9752 else :
9753   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9754 fi
9755
9756
9757 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9758 echo "configure:9759: checking for compatible POSIX regex" >&5
9759 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9760   echo $ac_n "(cached) $ac_c" 1>&6
9761 else
9762   
9763         if test "$cross_compiling" = yes; then
9764   ol_cv_c_posix_regex=cross
9765 else
9766   cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769
9770 #include <sys/types.h>
9771 #include <regex.h>
9772 static char *pattern, *string;
9773 main()
9774 {
9775         int rc;
9776         regex_t re;
9777
9778         pattern = "^A";
9779
9780         if(regcomp(&re, pattern, 0)) {
9781                 return -1;
9782         }
9783         
9784         string = "ALL MATCH";
9785         
9786         rc = regexec(&re, string, 0, (void*)0, 0);
9787
9788         regfree(&re);
9789
9790         return rc;
9791 }
9792 EOF
9793 if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9794 then
9795   ol_cv_c_posix_regex=yes
9796 else
9797   echo "configure: failed program was:" >&5
9798   cat conftest.$ac_ext >&5
9799   rm -fr conftest*
9800   ol_cv_c_posix_regex=no
9801 fi
9802 rm -fr conftest*
9803 fi
9804
9805 fi
9806
9807 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9808
9809 if test "$ol_cv_c_posix_regex" = no ; then
9810         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9811 fi
9812
9813
9814 have_uuid=no
9815 for ac_hdr in sys/uuid.h
9816 do
9817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9819 echo "configure:9820: checking for $ac_hdr" >&5
9820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9821   echo $ac_n "(cached) $ac_c" 1>&6
9822 else
9823   cat > conftest.$ac_ext <<EOF
9824 #line 9825 "configure"
9825 #include "confdefs.h"
9826 #include <$ac_hdr>
9827 EOF
9828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9829 { (eval echo configure:9830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9831 if test -z "$ac_err"; then
9832   rm -rf conftest*
9833   eval "ac_cv_header_$ac_safe=yes"
9834 else
9835   echo "$ac_err" >&5
9836   echo "configure: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838   rm -rf conftest*
9839   eval "ac_cv_header_$ac_safe=no"
9840 fi
9841 rm -f conftest*
9842 fi
9843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9844   echo "$ac_t""yes" 1>&6
9845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9846   cat >> confdefs.h <<EOF
9847 #define $ac_tr_hdr 1
9848 EOF
9849  
9850 else
9851   echo "$ac_t""no" 1>&6
9852 fi
9853 done
9854
9855 if test $ac_cv_header_sys_uuid_h = yes ; then
9856         save_LIBS="$LIBS"
9857         
9858 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9859 echo "configure:9860: checking for library containing uuid_to_str" >&5
9860 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9861   echo $ac_n "(cached) $ac_c" 1>&6
9862 else
9863   ac_func_search_save_LIBS="$LIBS"
9864 ac_cv_search_uuid_to_str="no"
9865 cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868 /* Override any gcc2 internal prototype to avoid an error.  */
9869 /* We use char because int might match the return type of a gcc2
9870     builtin and then its argument prototype would still apply.  */
9871 char uuid_to_str();
9872
9873 int main() {
9874 uuid_to_str()
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   ac_cv_search_uuid_to_str="none required"
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883 fi
9884 rm -f conftest*
9885 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9886 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char uuid_to_str();
9894
9895 int main() {
9896 uuid_to_str()
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   ac_cv_search_uuid_to_str="-l$ac_lib"
9902 break
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906 fi
9907 rm -f conftest*
9908 done
9909 LIBS="$ac_func_search_save_LIBS"
9910 fi
9911
9912 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9913 if test "$ac_cv_search_uuid_to_str" != "no"; then
9914   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9915   have_uuid=yes
9916 else :
9917   :
9918 fi
9919         LIBS="$save_LIBS"
9920
9921         if test have_uuid = yes ; then
9922                 cat >> confdefs.h <<\EOF
9923 #define HAVE_UUID_TO_STR 1
9924 EOF
9925
9926
9927                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9928                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9929         fi
9930 fi
9931
9932 if test $have_uuid = no ; then
9933         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9934 echo "configure:9935: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9935         save_LIBS="$LIBS"
9936         LIBS="$LIBS -lrpcrt4"
9937         cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940
9941                 int __stdcall UuidCreate(void *);
9942                 int __stdcall UuidToStringA(void *,void **);
9943                 
9944 int main() {
9945
9946                 UuidCreate(0);
9947                 UuidToStringA(0,0);
9948                 
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   need_rpcrt=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   need_rpcrt=no
9959 fi
9960 rm -f conftest*
9961         if test $need_rpcrt = yes; then
9962                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9963         fi
9964         LIBS="$save_LIBS"
9965         echo "$ac_t""$need_rpcrt" 1>&6
9966 fi
9967
9968 ol_link_dnssrv=no
9969 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9970 echo "configure:9971: checking for res_query" >&5
9971 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 /* System header to define __stub macros and hopefully few prototypes,
9978     which can conflict with char res_query(); below.  */
9979 #include <assert.h>
9980 /* Override any gcc2 internal prototype to avoid an error.  */
9981 /* We use char because int might match the return type of a gcc2
9982     builtin and then its argument prototype would still apply.  */
9983 char res_query();
9984 char (*f)();
9985
9986 int main() {
9987
9988 /* The GNU C library defines this for functions which it implements
9989     to always fail with ENOSYS.  Some functions are actually named
9990     something starting with __ and the normal name is an alias.  */
9991 #if defined (__stub_res_query) || defined (__stub___res_query)
9992 choke me
9993 #else
9994 f = res_query;
9995 #endif
9996
9997 ; return 0; }
9998 EOF
9999 if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10000   rm -rf conftest*
10001   eval "ac_cv_func_res_query=yes"
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -rf conftest*
10006   eval "ac_cv_func_res_query=no"
10007 fi
10008 rm -f conftest*
10009 fi
10010
10011 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10012   echo "$ac_t""yes" 1>&6
10013   :
10014 else
10015   echo "$ac_t""no" 1>&6
10016 fi
10017
10018 if test $ac_cv_func_res_query = no ; then 
10019         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10020 echo "configure:10021: checking for __res_query" >&5
10021 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10022   echo $ac_n "(cached) $ac_c" 1>&6
10023 else
10024   cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* System header to define __stub macros and hopefully few prototypes,
10028     which can conflict with char __res_query(); below.  */
10029 #include <assert.h>
10030 /* Override any gcc2 internal prototype to avoid an error.  */
10031 /* We use char because int might match the return type of a gcc2
10032     builtin and then its argument prototype would still apply.  */
10033 char __res_query();
10034 char (*f)();
10035
10036 int main() {
10037
10038 /* The GNU C library defines this for functions which it implements
10039     to always fail with ENOSYS.  Some functions are actually named
10040     something starting with __ and the normal name is an alias.  */
10041 #if defined (__stub___res_query) || defined (__stub_____res_query)
10042 choke me
10043 #else
10044 f = __res_query;
10045 #endif
10046
10047 ; return 0; }
10048 EOF
10049 if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10050   rm -rf conftest*
10051   eval "ac_cv_func___res_query=yes"
10052 else
10053   echo "configure: failed program was:" >&5
10054   cat conftest.$ac_ext >&5
10055   rm -rf conftest*
10056   eval "ac_cv_func___res_query=no"
10057 fi
10058 rm -f conftest*
10059 fi
10060
10061 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10062   echo "$ac_t""yes" 1>&6
10063   :
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067
10068         ac_cv_func_res_query=$ac_cv_func___res_query
10069 fi
10070
10071 if test $ac_cv_func_res_query = no ; then 
10072         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10073 echo "configure:10074: checking for res_query in -lbind" >&5
10074 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   ac_save_LIBS="$LIBS"
10079 LIBS="-lbind  $LIBS"
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 /* Override any gcc2 internal prototype to avoid an error.  */
10084 /* We use char because int might match the return type of a gcc2
10085     builtin and then its argument prototype would still apply.  */
10086 char res_query();
10087
10088 int main() {
10089 res_query()
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=yes"
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   eval "ac_cv_lib_$ac_lib_var=no"
10100 fi
10101 rm -f conftest*
10102 LIBS="$ac_save_LIBS"
10103
10104 fi
10105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10106   echo "$ac_t""yes" 1>&6
10107     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10109   cat >> confdefs.h <<EOF
10110 #define $ac_tr_lib 1
10111 EOF
10112
10113   LIBS="-lbind $LIBS"
10114
10115 else
10116   echo "$ac_t""no" 1>&6
10117 fi
10118
10119         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10120 fi
10121
10122 if test $ac_cv_func_res_query = no ; then 
10123         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10124 echo "configure:10125: checking for __res_query in -lbind" >&5
10125 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10127   echo $ac_n "(cached) $ac_c" 1>&6
10128 else
10129   ac_save_LIBS="$LIBS"
10130 LIBS="-lbind  $LIBS"
10131 cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 /* Override any gcc2 internal prototype to avoid an error.  */
10135 /* We use char because int might match the return type of a gcc2
10136     builtin and then its argument prototype would still apply.  */
10137 char __res_query();
10138
10139 int main() {
10140 __res_query()
10141 ; return 0; }
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10144   rm -rf conftest*
10145   eval "ac_cv_lib_$ac_lib_var=yes"
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=no"
10151 fi
10152 rm -f conftest*
10153 LIBS="$ac_save_LIBS"
10154
10155 fi
10156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10157   echo "$ac_t""yes" 1>&6
10158     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10159     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10160   cat >> confdefs.h <<EOF
10161 #define $ac_tr_lib 1
10162 EOF
10163
10164   LIBS="-lbind $LIBS"
10165
10166 else
10167   echo "$ac_t""no" 1>&6
10168 fi
10169
10170         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10171 fi
10172
10173 if test $ac_cv_func_res_query = no ; then 
10174         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10175 echo "configure:10176: checking for res_query in -lresolv" >&5
10176 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10178   echo $ac_n "(cached) $ac_c" 1>&6
10179 else
10180   ac_save_LIBS="$LIBS"
10181 LIBS="-lresolv  $LIBS"
10182 cat > conftest.$ac_ext <<EOF
10183 #line 10184 "configure"
10184 #include "confdefs.h"
10185 /* Override any gcc2 internal prototype to avoid an error.  */
10186 /* We use char because int might match the return type of a gcc2
10187     builtin and then its argument prototype would still apply.  */
10188 char res_query();
10189
10190 int main() {
10191 res_query()
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=yes"
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   eval "ac_cv_lib_$ac_lib_var=no"
10202 fi
10203 rm -f conftest*
10204 LIBS="$ac_save_LIBS"
10205
10206 fi
10207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10208   echo "$ac_t""yes" 1>&6
10209     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10211   cat >> confdefs.h <<EOF
10212 #define $ac_tr_lib 1
10213 EOF
10214
10215   LIBS="-lresolv $LIBS"
10216
10217 else
10218   echo "$ac_t""no" 1>&6
10219 fi
10220
10221         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10222 fi
10223
10224 if test $ac_cv_func_res_query = no ; then 
10225         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10226 echo "configure:10227: checking for __res_query in -lresolv" >&5
10227 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10229   echo $ac_n "(cached) $ac_c" 1>&6
10230 else
10231   ac_save_LIBS="$LIBS"
10232 LIBS="-lresolv  $LIBS"
10233 cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236 /* Override any gcc2 internal prototype to avoid an error.  */
10237 /* We use char because int might match the return type of a gcc2
10238     builtin and then its argument prototype would still apply.  */
10239 char __res_query();
10240
10241 int main() {
10242 __res_query()
10243 ; return 0; }
10244 EOF
10245 if { (eval echo configure:10246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10246   rm -rf conftest*
10247   eval "ac_cv_lib_$ac_lib_var=yes"
10248 else
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   eval "ac_cv_lib_$ac_lib_var=no"
10253 fi
10254 rm -f conftest*
10255 LIBS="$ac_save_LIBS"
10256
10257 fi
10258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10259   echo "$ac_t""yes" 1>&6
10260     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10261     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10262   cat >> confdefs.h <<EOF
10263 #define $ac_tr_lib 1
10264 EOF
10265
10266   LIBS="-lresolv $LIBS"
10267
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271
10272         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10273 fi
10274
10275 if test $ac_cv_func_res_query = no ; then 
10276         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10277 echo "configure:10278: checking for _res_9_query in -lresolv" >&5
10278 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   ac_save_LIBS="$LIBS"
10283 LIBS="-lresolv  $LIBS"
10284 cat > conftest.$ac_ext <<EOF
10285 #line 10286 "configure"
10286 #include "confdefs.h"
10287 /* Override any gcc2 internal prototype to avoid an error.  */
10288 /* We use char because int might match the return type of a gcc2
10289     builtin and then its argument prototype would still apply.  */
10290 char _res_9_query();
10291
10292 int main() {
10293 _res_9_query()
10294 ; return 0; }
10295 EOF
10296 if { (eval echo configure:10297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10297   rm -rf conftest*
10298   eval "ac_cv_lib_$ac_lib_var=yes"
10299 else
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302   rm -rf conftest*
10303   eval "ac_cv_lib_$ac_lib_var=no"
10304 fi
10305 rm -f conftest*
10306 LIBS="$ac_save_LIBS"
10307
10308 fi
10309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10310   echo "$ac_t""yes" 1>&6
10311     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10313   cat >> confdefs.h <<EOF
10314 #define $ac_tr_lib 1
10315 EOF
10316
10317   LIBS="-lresolv $LIBS"
10318
10319 else
10320   echo "$ac_t""no" 1>&6
10321 fi
10322
10323         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10324 fi
10325
10326 if test "$ac_cv_func_res_query" = yes ; then
10327         cat >> confdefs.h <<\EOF
10328 #define HAVE_RES_QUERY 1
10329 EOF
10330
10331
10332         if test $ol_enable_dnssrv != no ; then
10333                 ol_link_dnssrv=yes
10334         fi
10335 fi
10336
10337 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10338         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10339 fi
10340
10341 for ac_func in hstrerror 
10342 do
10343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10344 echo "configure:10345: checking for $ac_func" >&5
10345 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   cat > conftest.$ac_ext <<EOF
10349 #line 10350 "configure"
10350 #include "confdefs.h"
10351 /* System header to define __stub macros and hopefully few prototypes,
10352     which can conflict with char $ac_func(); below.  */
10353 #include <assert.h>
10354 /* Override any gcc2 internal prototype to avoid an error.  */
10355 /* We use char because int might match the return type of a gcc2
10356     builtin and then its argument prototype would still apply.  */
10357 char $ac_func();
10358 char (*f)();
10359
10360 int main() {
10361
10362 /* The GNU C library defines this for functions which it implements
10363     to always fail with ENOSYS.  Some functions are actually named
10364     something starting with __ and the normal name is an alias.  */
10365 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10366 choke me
10367 #else
10368 f = $ac_func;
10369 #endif
10370
10371 ; return 0; }
10372 EOF
10373 if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10374   rm -rf conftest*
10375   eval "ac_cv_func_$ac_func=yes"
10376 else
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   eval "ac_cv_func_$ac_func=no"
10381 fi
10382 rm -f conftest*
10383 fi
10384
10385 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10386   echo "$ac_t""yes" 1>&6
10387     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10388   cat >> confdefs.h <<EOF
10389 #define $ac_tr_func 1
10390 EOF
10391  
10392 else
10393   echo "$ac_t""no" 1>&6
10394 fi
10395 done
10396
10397
10398 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10399 do
10400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10401 echo "configure:10402: checking for $ac_func" >&5
10402 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 /* System header to define __stub macros and hopefully few prototypes,
10409     which can conflict with char $ac_func(); below.  */
10410 #include <assert.h>
10411 /* Override any gcc2 internal prototype to avoid an error.  */
10412 /* We use char because int might match the return type of a gcc2
10413     builtin and then its argument prototype would still apply.  */
10414 char $ac_func();
10415 char (*f)();
10416
10417 int main() {
10418
10419 /* The GNU C library defines this for functions which it implements
10420     to always fail with ENOSYS.  Some functions are actually named
10421     something starting with __ and the normal name is an alias.  */
10422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10423 choke me
10424 #else
10425 f = $ac_func;
10426 #endif
10427
10428 ; return 0; }
10429 EOF
10430 if { (eval echo configure:10431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10431   rm -rf conftest*
10432   eval "ac_cv_func_$ac_func=yes"
10433 else
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_func_$ac_func=no"
10438 fi
10439 rm -f conftest*
10440 fi
10441
10442 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10445   cat >> confdefs.h <<EOF
10446 #define $ac_tr_func 1
10447 EOF
10448  
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452 done
10453
10454
10455 ol_link_ipv6=no
10456 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10457         if test $ol_enable_ipv6 = yes ; then
10458                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10459         fi
10460 elif test $ol_enable_ipv6 != no ; then
10461         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10462 echo "configure:10463: checking INET6_ADDRSTRLEN" >&5
10463 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10464   echo $ac_n "(cached) $ac_c" 1>&6
10465 else
10466   
10467                 cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470
10471 #                       include <netinet/in.h>
10472 #                       ifdef INET6_ADDRSTRLEN
10473                                 __has_inet6_addrstrlen__;
10474 #                       endif
10475                 
10476 EOF
10477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10478   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10479   rm -rf conftest*
10480   ol_cv_inet6_addrstrlen=yes
10481 else
10482   rm -rf conftest*
10483   ol_cv_inet6_addrstrlen=no
10484 fi
10485 rm -f conftest*
10486
10487 fi
10488
10489 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10490
10491
10492         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10493 echo "configure:10494: checking struct sockaddr_storage" >&5
10494 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10495   echo $ac_n "(cached) $ac_c" 1>&6
10496 else
10497   
10498                 cat > conftest.$ac_ext <<EOF
10499 #line 10500 "configure"
10500 #include "confdefs.h"
10501
10502 #include <sys/types.h>
10503 #include <sys/socket.h>
10504
10505 int main() {
10506
10507                         struct sockaddr_storage ss;
10508
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10512   rm -rf conftest*
10513   ol_cv_struct_sockaddr_storage=yes
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   ol_cv_struct_sockaddr_storage=no
10519 fi
10520 rm -f conftest*
10521 fi
10522
10523 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10524
10525         if test $ol_cv_inet6_addrstrlen = yes \
10526                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10527                 ol_link_ipv6=yes
10528         elif test $ol_enable_ipv6 = yes \
10529                         -a $ol_cv_inet6_addrstrlen = no ; then
10530                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10531         elif test $ol_enable_ipv6 = yes \
10532                         -a $ol_cv_struct_sockaddr_storage = no ; then
10533                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10534         fi
10535 fi
10536
10537 if test $ol_enable_local != no ; then
10538         for ac_hdr in sys/un.h 
10539 do
10540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10542 echo "configure:10543: checking for $ac_hdr" >&5
10543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549 #include <$ac_hdr>
10550 EOF
10551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10552 { (eval echo configure:10553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10554 if test -z "$ac_err"; then
10555   rm -rf conftest*
10556   eval "ac_cv_header_$ac_safe=yes"
10557 else
10558   echo "$ac_err" >&5
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -rf conftest*
10562   eval "ac_cv_header_$ac_safe=no"
10563 fi
10564 rm -f conftest*
10565 fi
10566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10567   echo "$ac_t""yes" 1>&6
10568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10569   cat >> confdefs.h <<EOF
10570 #define $ac_tr_hdr 1
10571 EOF
10572  
10573 else
10574   echo "$ac_t""no" 1>&6
10575 fi
10576 done
10577
10578
10579         if test $ol_enable_local = auto ; then
10580                 ol_enable_local=$ac_cv_header_sys_un_h
10581         elif test $ac_cv_header_sys_un_h = no ; then
10582                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10583         fi
10584 fi
10585
10586 ol_link_kbind=no
10587 ol_link_krb5=no
10588 ol_link_krb4=no
10589
10590 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10591         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10592         -o $ol_with_kerberos = k425 ; then
10593
10594         for ac_hdr in krb5.h
10595 do
10596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10598 echo "configure:10599: checking for $ac_hdr" >&5
10599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605 #include <$ac_hdr>
10606 EOF
10607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10608 { (eval echo configure:10609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10610 if test -z "$ac_err"; then
10611   rm -rf conftest*
10612   eval "ac_cv_header_$ac_safe=yes"
10613 else
10614   echo "$ac_err" >&5
10615   echo "configure: failed program was:" >&5
10616   cat conftest.$ac_ext >&5
10617   rm -rf conftest*
10618   eval "ac_cv_header_$ac_safe=no"
10619 fi
10620 rm -f conftest*
10621 fi
10622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10623   echo "$ac_t""yes" 1>&6
10624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10625   cat >> confdefs.h <<EOF
10626 #define $ac_tr_hdr 1
10627 EOF
10628  
10629 else
10630   echo "$ac_t""no" 1>&6
10631 fi
10632 done
10633
10634
10635         if test $ac_cv_header_krb5_h = yes ; then
10636                                 for ac_hdr in heim_err.h
10637 do
10638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10640 echo "configure:10641: checking for $ac_hdr" >&5
10641 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 #include <$ac_hdr>
10648 EOF
10649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10650 { (eval echo configure:10651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10652 if test -z "$ac_err"; then
10653   rm -rf conftest*
10654   eval "ac_cv_header_$ac_safe=yes"
10655 else
10656   echo "$ac_err" >&5
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   eval "ac_cv_header_$ac_safe=no"
10661 fi
10662 rm -f conftest*
10663 fi
10664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10665   echo "$ac_t""yes" 1>&6
10666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10667   cat >> confdefs.h <<EOF
10668 #define $ac_tr_hdr 1
10669 EOF
10670  
10671 else
10672   echo "$ac_t""no" 1>&6
10673 fi
10674 done
10675
10676                 if test $ac_cv_header_heim_err_h = yes ; then
10677                         krb5_impl=heimdal
10678                 else
10679                         krb5_impl=mit
10680                 fi
10681
10682                 if test $krb5_impl = mit; then
10683                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10684 echo "configure:10685: checking for main in -lk5crypto" >&5
10685 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   ac_save_LIBS="$LIBS"
10690 LIBS="-lk5crypto  $LIBS"
10691 cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694
10695 int main() {
10696 main()
10697 ; return 0; }
10698 EOF
10699 if { (eval echo configure:10700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10700   rm -rf conftest*
10701   eval "ac_cv_lib_$ac_lib_var=yes"
10702 else
10703   echo "configure: failed program was:" >&5
10704   cat conftest.$ac_ext >&5
10705   rm -rf conftest*
10706   eval "ac_cv_lib_$ac_lib_var=no"
10707 fi
10708 rm -f conftest*
10709 LIBS="$ac_save_LIBS"
10710
10711 fi
10712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10713   echo "$ac_t""yes" 1>&6
10714   krb5crypto=k5crypto
10715 else
10716   echo "$ac_t""no" 1>&6
10717 krb5crypto=crypto
10718 fi
10719
10720
10721                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10722 echo "configure:10723: checking for main in -lkrb5" >&5
10723 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10725   echo $ac_n "(cached) $ac_c" 1>&6
10726 else
10727   ac_save_LIBS="$LIBS"
10728 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10729 cat > conftest.$ac_ext <<EOF
10730 #line 10731 "configure"
10731 #include "confdefs.h"
10732
10733 int main() {
10734 main()
10735 ; return 0; }
10736 EOF
10737 if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=yes"
10740 else
10741   echo "configure: failed program was:" >&5
10742   cat conftest.$ac_ext >&5
10743   rm -rf conftest*
10744   eval "ac_cv_lib_$ac_lib_var=no"
10745 fi
10746 rm -f conftest*
10747 LIBS="$ac_save_LIBS"
10748
10749 fi
10750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10751   echo "$ac_t""yes" 1>&6
10752   have_krb5=yes
10753                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10754 else
10755   echo "$ac_t""no" 1>&6
10756 have_krb5=no
10757 fi
10758
10759
10760                 elif test $krb5_impl = heimdal; then
10761                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10762 echo "configure:10763: checking for main in -ldes" >&5
10763 ac_lib_var=`echo des'_'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="-ldes  $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   krb5crypto=des
10793 else
10794   echo "$ac_t""no" 1>&6
10795 krb5crypto=crypto
10796 fi
10797
10798
10799                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10800 echo "configure:10801: checking for main in -lkrb5" >&5
10801 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10803   echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805   ac_save_LIBS="$LIBS"
10806 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10807 cat > conftest.$ac_ext <<EOF
10808 #line 10809 "configure"
10809 #include "confdefs.h"
10810
10811 int main() {
10812 main()
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10816   rm -rf conftest*
10817   eval "ac_cv_lib_$ac_lib_var=yes"
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   eval "ac_cv_lib_$ac_lib_var=no"
10823 fi
10824 rm -f conftest*
10825 LIBS="$ac_save_LIBS"
10826
10827 fi
10828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10829   echo "$ac_t""yes" 1>&6
10830   have_krb5=yes
10831                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10832 else
10833   echo "$ac_t""no" 1>&6
10834 have_krb5=no
10835 fi
10836
10837
10838                         cat >> confdefs.h <<\EOF
10839 #define HAVE_HEIMDAL_KERBEROS 1
10840 EOF
10841
10842
10843                 else
10844                         have_krb5=no
10845                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10846                 fi
10847
10848                 if test $have_krb5 = yes ; then
10849                         ol_link_krb5=yes
10850
10851                         cat >> confdefs.h <<\EOF
10852 #define HAVE_KRB5 1
10853 EOF
10854
10855
10856                         if test $ol_with_kerberos = k5only ; then
10857                                 ol_with_kerberos=found
10858                         fi
10859
10860                 elif test $ol_with_kerberos != auto ; then
10861                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10862                 fi
10863
10864         fi
10865 fi
10866
10867 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10868         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10869
10870         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10871 do
10872 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10873 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10874 echo "configure:10875: checking for $ac_hdr" >&5
10875 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 #include <$ac_hdr>
10882 EOF
10883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10884 { (eval echo configure:10885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10886 if test -z "$ac_err"; then
10887   rm -rf conftest*
10888   eval "ac_cv_header_$ac_safe=yes"
10889 else
10890   echo "$ac_err" >&5
10891   echo "configure: failed program was:" >&5
10892   cat conftest.$ac_ext >&5
10893   rm -rf conftest*
10894   eval "ac_cv_header_$ac_safe=no"
10895 fi
10896 rm -f conftest*
10897 fi
10898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10899   echo "$ac_t""yes" 1>&6
10900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10901   cat >> confdefs.h <<EOF
10902 #define $ac_tr_hdr 1
10903 EOF
10904  
10905 else
10906   echo "$ac_t""no" 1>&6
10907 fi
10908 done
10909
10910
10911         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10912                 if test $krb5_impl = mit; then
10913                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10914 echo "configure:10915: checking for main in -lkrb4" >&5
10915 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10917   echo $ac_n "(cached) $ac_c" 1>&6
10918 else
10919   ac_save_LIBS="$LIBS"
10920 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10921 cat > conftest.$ac_ext <<EOF
10922 #line 10923 "configure"
10923 #include "confdefs.h"
10924
10925 int main() {
10926 main()
10927 ; return 0; }
10928 EOF
10929 if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10930   rm -rf conftest*
10931   eval "ac_cv_lib_$ac_lib_var=yes"
10932 else
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -rf conftest*
10936   eval "ac_cv_lib_$ac_lib_var=no"
10937 fi
10938 rm -f conftest*
10939 LIBS="$ac_save_LIBS"
10940
10941 fi
10942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10943   echo "$ac_t""yes" 1>&6
10944   have_k425=yes
10945                                 KRB4_LIBS="-lkrb4 -ldes425"
10946 else
10947   echo "$ac_t""no" 1>&6
10948 have_k425=no
10949 fi
10950
10951
10952                 elif test $krb5_impl = heimdal; then
10953                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10954 echo "configure:10955: checking for main in -lkrb4" >&5
10955 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10957   echo $ac_n "(cached) $ac_c" 1>&6
10958 else
10959   ac_save_LIBS="$LIBS"
10960 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10961 cat > conftest.$ac_ext <<EOF
10962 #line 10963 "configure"
10963 #include "confdefs.h"
10964
10965 int main() {
10966 main()
10967 ; return 0; }
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10970   rm -rf conftest*
10971   eval "ac_cv_lib_$ac_lib_var=yes"
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=no"
10977 fi
10978 rm -f conftest*
10979 LIBS="$ac_save_LIBS"
10980
10981 fi
10982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10983   echo "$ac_t""yes" 1>&6
10984   have_k425=yes
10985                                 KRB4_LIBS="-lkrb4"
10986 else
10987   echo "$ac_t""no" 1>&6
10988 have_k425=no
10989 fi
10990
10991
10992                 else
10993                         have_425=no
10994                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10995                 fi
10996
10997                 if test $have_k425 = yes ; then
10998                         ol_with_kerberos=found
10999                         ol_link_krb4=yes
11000
11001                         cat >> confdefs.h <<\EOF
11002 #define HAVE_KRB425 1
11003 EOF
11004
11005                         cat >> confdefs.h <<\EOF
11006 #define HAVE_KRB4 1
11007 EOF
11008
11009
11010                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11011 echo "configure:11012: checking for des_debug in Kerberos libraries" >&5
11012 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   
11016                                                                 save_LIBS="$LIBS"
11017                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11018                                 cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021
11022 #include <kerberosIV/krb.h>
11023 #include <kerberosIV/des.h>
11024 extern int des_debug;
11025
11026 int main() {
11027
11028 des_debug = 1;
11029
11030 ; return 0; }
11031 EOF
11032 if { (eval echo configure:11033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11033   rm -rf conftest*
11034   ol_cv_var_des_debug=yes
11035 else
11036   echo "configure: failed program was:" >&5
11037   cat conftest.$ac_ext >&5
11038   rm -rf conftest*
11039   ol_cv_var_des_debug=no
11040 fi
11041 rm -f conftest*
11042                                                                 LIBS="$save_LIBS"
11043                         
11044 fi
11045
11046 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11047
11048                         if test $ol_cv_var_des_debug = yes ; then
11049                                 cat >> confdefs.h <<\EOF
11050 #define HAVE_DES_DEBUG 1
11051 EOF
11052
11053                         fi
11054
11055                         LIBS="$save_LIBS"
11056                 fi
11057         fi
11058 fi
11059
11060 if test $ol_link_krb5 = yes ; then
11061         ol_with_kerberos=found
11062 fi
11063
11064 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11065         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11066
11067         for ac_hdr in krb.h des.h krb-archaeology.h 
11068 do
11069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11071 echo "configure:11072: checking for $ac_hdr" >&5
11072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11073   echo $ac_n "(cached) $ac_c" 1>&6
11074 else
11075   cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 #include <$ac_hdr>
11079 EOF
11080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11081 { (eval echo configure:11082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11083 if test -z "$ac_err"; then
11084   rm -rf conftest*
11085   eval "ac_cv_header_$ac_safe=yes"
11086 else
11087   echo "$ac_err" >&5
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_header_$ac_safe=no"
11092 fi
11093 rm -f conftest*
11094 fi
11095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11098   cat >> confdefs.h <<EOF
11099 #define $ac_tr_hdr 1
11100 EOF
11101  
11102 else
11103   echo "$ac_t""no" 1>&6
11104 fi
11105 done
11106
11107
11108         if test $ac_cv_header_krb_h = yes ; then
11109                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11110 echo "configure:11111: checking for main in -lkrb" >&5
11111 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11113   echo $ac_n "(cached) $ac_c" 1>&6
11114 else
11115   ac_save_LIBS="$LIBS"
11116 LIBS="-lkrb -ldes $LIBS"
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120
11121 int main() {
11122 main()
11123 ; return 0; }
11124 EOF
11125 if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11126   rm -rf conftest*
11127   eval "ac_cv_lib_$ac_lib_var=yes"
11128 else
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -rf conftest*
11132   eval "ac_cv_lib_$ac_lib_var=no"
11133 fi
11134 rm -f conftest*
11135 LIBS="$ac_save_LIBS"
11136
11137 fi
11138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11139   echo "$ac_t""yes" 1>&6
11140   have_k4=yes
11141 else
11142   echo "$ac_t""no" 1>&6
11143 have_k4=no
11144 fi
11145
11146
11147                 if test $have_k4 = yes ; then
11148                         ol_with_kerberos=found
11149                         ol_link_krb4=yes
11150
11151                         cat >> confdefs.h <<\EOF
11152 #define HAVE_KRB4 1
11153 EOF
11154
11155
11156                         KRB4_LIBS="-lkrb -ldes"
11157
11158                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11159                                 cat >> confdefs.h <<\EOF
11160 #define HAVE_KTH_KERBEROS 1
11161 EOF
11162
11163                         fi
11164                 fi
11165         fi
11166 fi
11167
11168 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11169         ol_link_kbind=yes
11170
11171 elif test $ol_enable_kbind = yes ; then
11172         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11173 fi
11174
11175 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11176         cat >> confdefs.h <<\EOF
11177 #define HAVE_KERBEROS 1
11178 EOF
11179
11180
11181 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11182         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11183 fi
11184
11185         
11186 ol_link_tls=no
11187 if test $ol_with_tls != no ; then
11188         for ac_hdr in openssl/ssl.h ssl.h
11189 do
11190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11192 echo "configure:11193: checking for $ac_hdr" >&5
11193 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11194   echo $ac_n "(cached) $ac_c" 1>&6
11195 else
11196   cat > conftest.$ac_ext <<EOF
11197 #line 11198 "configure"
11198 #include "confdefs.h"
11199 #include <$ac_hdr>
11200 EOF
11201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11202 { (eval echo configure:11203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11204 if test -z "$ac_err"; then
11205   rm -rf conftest*
11206   eval "ac_cv_header_$ac_safe=yes"
11207 else
11208   echo "$ac_err" >&5
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -rf conftest*
11212   eval "ac_cv_header_$ac_safe=no"
11213 fi
11214 rm -f conftest*
11215 fi
11216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11217   echo "$ac_t""yes" 1>&6
11218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11219   cat >> confdefs.h <<EOF
11220 #define $ac_tr_hdr 1
11221 EOF
11222  
11223 else
11224   echo "$ac_t""no" 1>&6
11225 fi
11226 done
11227
11228
11229         if test $ac_cv_header_openssl_ssl_h = yes \
11230                 -o $ac_cv_header_ssl_h = yes ; then
11231                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11232 echo "configure:11233: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11233 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   ac_save_LIBS="$LIBS"
11238 LIBS="-lssl -lcrypto $LIBS"
11239 cat > conftest.$ac_ext <<EOF
11240 #line 11241 "configure"
11241 #include "confdefs.h"
11242 /* Override any gcc2 internal prototype to avoid an error.  */
11243 /* We use char because int might match the return type of a gcc2
11244     builtin and then its argument prototype would still apply.  */
11245 char SSLeay_add_ssl_algorithms();
11246
11247 int main() {
11248 SSLeay_add_ssl_algorithms()
11249 ; return 0; }
11250 EOF
11251 if { (eval echo configure:11252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11252   rm -rf conftest*
11253   eval "ac_cv_lib_$ac_lib_var=yes"
11254 else
11255   echo "configure: failed program was:" >&5
11256   cat conftest.$ac_ext >&5
11257   rm -rf conftest*
11258   eval "ac_cv_lib_$ac_lib_var=no"
11259 fi
11260 rm -f conftest*
11261 LIBS="$ac_save_LIBS"
11262
11263 fi
11264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11265   echo "$ac_t""yes" 1>&6
11266   have_ssleay=yes
11267                         need_rsaref=no
11268 else
11269   echo "$ac_t""no" 1>&6
11270 have_ssleay=no
11271 fi
11272
11273                         
11274                 if test $have_ssleay = no ; then
11275                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11276 echo "configure:11277: checking for SSL_library_init in -lssl" >&5
11277 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11279   echo $ac_n "(cached) $ac_c" 1>&6
11280 else
11281   ac_save_LIBS="$LIBS"
11282 LIBS="-lssl -lcrypto $LIBS"
11283 cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286 /* Override any gcc2 internal prototype to avoid an error.  */
11287 /* We use char because int might match the return type of a gcc2
11288     builtin and then its argument prototype would still apply.  */
11289 char SSL_library_init();
11290
11291 int main() {
11292 SSL_library_init()
11293 ; return 0; }
11294 EOF
11295 if { (eval echo configure:11296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11296   rm -rf conftest*
11297   eval "ac_cv_lib_$ac_lib_var=yes"
11298 else
11299   echo "configure: failed program was:" >&5
11300   cat conftest.$ac_ext >&5
11301   rm -rf conftest*
11302   eval "ac_cv_lib_$ac_lib_var=no"
11303 fi
11304 rm -f conftest*
11305 LIBS="$ac_save_LIBS"
11306
11307 fi
11308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11309   echo "$ac_t""yes" 1>&6
11310   have_ssleay=yes
11311                                 need_rsaref=no
11312 else
11313   echo "$ac_t""no" 1>&6
11314 have_ssleay=no
11315 fi
11316
11317                 fi
11318
11319                 if test $have_ssleay = no ; then
11320                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11321 echo "configure:11322: checking for ssl3_accept in -lssl" >&5
11322 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11324   echo $ac_n "(cached) $ac_c" 1>&6
11325 else
11326   ac_save_LIBS="$LIBS"
11327 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11328 cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 /* Override any gcc2 internal prototype to avoid an error.  */
11332 /* We use char because int might match the return type of a gcc2
11333     builtin and then its argument prototype would still apply.  */
11334 char ssl3_accept();
11335
11336 int main() {
11337 ssl3_accept()
11338 ; return 0; }
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11341   rm -rf conftest*
11342   eval "ac_cv_lib_$ac_lib_var=yes"
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   eval "ac_cv_lib_$ac_lib_var=no"
11348 fi
11349 rm -f conftest*
11350 LIBS="$ac_save_LIBS"
11351
11352 fi
11353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11354   echo "$ac_t""yes" 1>&6
11355   have_ssleay=yes
11356                                 need_rsaref=yes
11357 else
11358   echo "$ac_t""no" 1>&6
11359 have_ssleay=no
11360 fi
11361
11362                 fi
11363
11364                 if test $have_ssleay = yes ; then
11365                         ol_with_tls=found
11366                         ol_link_tls=yes
11367
11368                         cat >> confdefs.h <<\EOF
11369 #define HAVE_SSLEAY 1
11370 EOF
11371
11372
11373                         if test $need_rsaref = yes; then
11374                                 cat >> confdefs.h <<\EOF
11375 #define HAVE_RSAREF 1
11376 EOF
11377
11378
11379                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11380                         else
11381                                 TLS_LIBS="-lssl -lcrypto"
11382                         fi
11383                 fi
11384         fi
11385
11386 else
11387         echo "configure: warning: TLS data protection not supported!" 1>&2
11388 fi
11389
11390 WITH_TLS=no
11391 if test $ol_link_tls = yes ; then
11392         cat >> confdefs.h <<\EOF
11393 #define HAVE_TLS 1
11394 EOF
11395
11396         WITH_TLS=yes
11397
11398 elif test $ol_with_tls = auto ; then
11399         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11400         echo "configure: warning: TLS data protection not supported!" 1>&2
11401
11402 elif test $ol_with_tls != no ; then
11403         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11404 fi
11405
11406 if test $ol_enable_lmpasswd != no; then
11407         if test $ol_link_tls != yes ; then
11408                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11409         fi
11410
11411         cat >> confdefs.h <<\EOF
11412 #define SLAPD_LMHASH 1
11413 EOF
11414
11415 fi
11416
11417 ol_link_threads=no
11418
11419 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11420         -o $ol_with_threads = nt ; then
11421
11422         
11423         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11424 echo "configure:11425: checking for _beginthread" >&5
11425 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11426   echo $ac_n "(cached) $ac_c" 1>&6
11427 else
11428   cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 /* System header to define __stub macros and hopefully few prototypes,
11432     which can conflict with char _beginthread(); below.  */
11433 #include <assert.h>
11434 /* Override any gcc2 internal prototype to avoid an error.  */
11435 /* We use char because int might match the return type of a gcc2
11436     builtin and then its argument prototype would still apply.  */
11437 char _beginthread();
11438 char (*f)();
11439
11440 int main() {
11441
11442 /* The GNU C library defines this for functions which it implements
11443     to always fail with ENOSYS.  Some functions are actually named
11444     something starting with __ and the normal name is an alias.  */
11445 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11446 choke me
11447 #else
11448 f = _beginthread;
11449 #endif
11450
11451 ; return 0; }
11452 EOF
11453 if { (eval echo configure:11454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11454   rm -rf conftest*
11455   eval "ac_cv_func__beginthread=yes"
11456 else
11457   echo "configure: failed program was:" >&5
11458   cat conftest.$ac_ext >&5
11459   rm -rf conftest*
11460   eval "ac_cv_func__beginthread=no"
11461 fi
11462 rm -f conftest*
11463 fi
11464
11465 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11466   echo "$ac_t""yes" 1>&6
11467   :
11468 else
11469   echo "$ac_t""no" 1>&6
11470 fi
11471
11472
11473         if test $ac_cv_func__beginthread = yes ; then
11474                 cat >> confdefs.h <<\EOF
11475 #define HAVE_NT_THREADS 1
11476 EOF
11477
11478                 ol_cv_nt_threads=yes
11479         fi
11480
11481
11482         if test "$ol_cv_nt_threads" = yes ; then
11483                 ol_link_threads=nt
11484                 ol_with_threads=found
11485                 ol_with_yielding_select=yes
11486
11487                 cat >> confdefs.h <<\EOF
11488 #define HAVE_NT_SERVICE_MANAGER 1
11489 EOF
11490
11491                 cat >> confdefs.h <<\EOF
11492 #define HAVE_NT_EVENT_LOG 1
11493 EOF
11494
11495         fi
11496
11497         if test $ol_with_threads = nt ; then
11498                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11499         fi
11500 fi
11501
11502 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11503         -o $ol_with_threads = posix ; then
11504
11505         for ac_hdr in pthread.h
11506 do
11507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11509 echo "configure:11510: checking for $ac_hdr" >&5
11510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <$ac_hdr>
11517 EOF
11518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11519 { (eval echo configure:11520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11521 if test -z "$ac_err"; then
11522   rm -rf conftest*
11523   eval "ac_cv_header_$ac_safe=yes"
11524 else
11525   echo "$ac_err" >&5
11526   echo "configure: failed program was:" >&5
11527   cat conftest.$ac_ext >&5
11528   rm -rf conftest*
11529   eval "ac_cv_header_$ac_safe=no"
11530 fi
11531 rm -f conftest*
11532 fi
11533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11536   cat >> confdefs.h <<EOF
11537 #define $ac_tr_hdr 1
11538 EOF
11539  
11540 else
11541   echo "$ac_t""no" 1>&6
11542 fi
11543 done
11544
11545
11546         if test $ac_cv_header_pthread_h = yes ; then
11547                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11548 echo "configure:11549: checking POSIX thread version" >&5
11549 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11550   echo $ac_n "(cached) $ac_c" 1>&6
11551 else
11552   
11553         cat > conftest.$ac_ext <<EOF
11554 #line 11555 "configure"
11555 #include "confdefs.h"
11556
11557 #               include <pthread.h>
11558         
11559 int main() {
11560
11561                 int i = PTHREAD_CREATE_JOINABLE;
11562         
11563 ; return 0; }
11564 EOF
11565 if { (eval echo configure:11566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11566   rm -rf conftest*
11567   
11568         cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 #include <pthread.h>
11572 EOF
11573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11574   egrep "pthread_detach" >/dev/null 2>&1; then
11575   rm -rf conftest*
11576   ol_cv_pthread_version=10
11577 else
11578   rm -rf conftest*
11579   ol_cv_pthread_version=8
11580 fi
11581 rm -f conftest*
11582
11583 else
11584   echo "configure: failed program was:" >&5
11585   cat conftest.$ac_ext >&5
11586   rm -rf conftest*
11587   
11588         cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591
11592 #               include <pthread.h>
11593 #               ifdef PTHREAD_CREATE_UNDETACHED
11594                 draft7
11595 #               endif
11596         
11597 EOF
11598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11599   egrep "draft7" >/dev/null 2>&1; then
11600   rm -rf conftest*
11601   ol_cv_pthread_version=7
11602 else
11603   rm -rf conftest*
11604   
11605         cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <pthread.h>
11609 EOF
11610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11611   egrep "pthread_attr_init" >/dev/null 2>&1; then
11612   rm -rf conftest*
11613   ol_cv_pthread_version=6
11614 else
11615   rm -rf conftest*
11616   
11617         cat > conftest.$ac_ext <<EOF
11618 #line 11619 "configure"
11619 #include "confdefs.h"
11620
11621 #               include <pthread.h>
11622 #ifdef          PTHREAD_MUTEX_INITIALIZER
11623                 draft5
11624 #endif
11625         
11626 EOF
11627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11628   egrep "draft5" >/dev/null 2>&1; then
11629   rm -rf conftest*
11630   ol_cv_pthread_version=5
11631 else
11632   rm -rf conftest*
11633   ol_cv_pthread_version=4
11634 fi
11635 rm -f conftest*
11636  
11637 fi
11638 rm -f conftest*
11639  
11640 fi
11641 rm -f conftest*
11642  
11643 fi
11644 rm -f conftest*
11645
11646 fi
11647
11648 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11649
11650
11651                 if test $ol_cv_pthread_version != 0 ; then
11652                         cat >> confdefs.h <<EOF
11653 #define HAVE_PTHREADS $ol_cv_pthread_version
11654 EOF
11655
11656                 else
11657                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11658                 fi
11659
11660                 # consider threads found
11661                 ol_with_threads=found
11662
11663                 
11664         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11665 echo "configure:11666: checking for LinuxThreads pthread.h" >&5
11666 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11667   echo $ac_n "(cached) $ac_c" 1>&6
11668 else
11669   cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672 #include <pthread.h>
11673 EOF
11674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11675   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11676   rm -rf conftest*
11677   ol_cv_header_linux_threads=yes
11678 else
11679   rm -rf conftest*
11680   ol_cv_header_linux_threads=no
11681 fi
11682 rm -f conftest*
11683
11684                 
11685 fi
11686
11687 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11688         if test $ol_cv_header_linux_threads = yes; then
11689                 cat >> confdefs.h <<\EOF
11690 #define HAVE_LINUX_THREADS 1
11691 EOF
11692
11693         fi
11694
11695                 
11696         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11697 echo "configure:11698: checking for GNU Pth pthread.h" >&5
11698 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11699   echo $ac_n "(cached) $ac_c" 1>&6
11700 else
11701   cat > conftest.$ac_ext <<EOF
11702 #line 11703 "configure"
11703 #include "confdefs.h"
11704 #include <pthread.h>
11705 #ifdef _POSIX_THREAD_IS_GNU_PTH
11706         __gnu_pth__;
11707 #endif
11708
11709 EOF
11710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11711   egrep "__gnu_pth__" >/dev/null 2>&1; then
11712   rm -rf conftest*
11713   ol_cv_header_gnu_pth_pthread_h=yes
11714 else
11715   rm -rf conftest*
11716   ol_cv_header_gnu_pth_pthread_h=no
11717 fi
11718 rm -f conftest*
11719
11720                 
11721 fi
11722
11723 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11724
11725
11726                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11727                         for ac_hdr in sched.h
11728 do
11729 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11730 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11731 echo "configure:11732: checking for $ac_hdr" >&5
11732 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11733   echo $ac_n "(cached) $ac_c" 1>&6
11734 else
11735   cat > conftest.$ac_ext <<EOF
11736 #line 11737 "configure"
11737 #include "confdefs.h"
11738 #include <$ac_hdr>
11739 EOF
11740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11741 { (eval echo configure:11742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11743 if test -z "$ac_err"; then
11744   rm -rf conftest*
11745   eval "ac_cv_header_$ac_safe=yes"
11746 else
11747   echo "$ac_err" >&5
11748   echo "configure: failed program was:" >&5
11749   cat conftest.$ac_ext >&5
11750   rm -rf conftest*
11751   eval "ac_cv_header_$ac_safe=no"
11752 fi
11753 rm -f conftest*
11754 fi
11755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11756   echo "$ac_t""yes" 1>&6
11757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11758   cat >> confdefs.h <<EOF
11759 #define $ac_tr_hdr 1
11760 EOF
11761  
11762 else
11763   echo "$ac_t""no" 1>&6
11764 fi
11765 done
11766
11767                 fi
11768
11769                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11770                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11771 echo "configure:11772: checking for pthread_create in default libraries" >&5
11772 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   
11776                 if test "$cross_compiling" = yes; then
11777   cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780 /* pthread test headers */
11781 #include <pthread.h>
11782 #if HAVE_PTHREADS < 7
11783 #include <errno.h>
11784 #endif
11785 #ifndef NULL
11786 #define NULL (void*)0
11787 #endif
11788
11789 static void *task(p)
11790         void *p;
11791 {
11792         return (void *) (p == NULL);
11793 }
11794
11795 int main() {
11796
11797         /* pthread test function */
11798 #ifndef PTHREAD_CREATE_DETACHED
11799 #define PTHREAD_CREATE_DETACHED 1
11800 #endif
11801         pthread_t t;
11802         int status;
11803         int detach = PTHREAD_CREATE_DETACHED;
11804
11805 #if HAVE_PTHREADS > 4
11806         /* Final pthreads */
11807         pthread_attr_t attr;
11808
11809         status = pthread_attr_init(&attr);
11810         if( status ) return status;
11811
11812 #if HAVE_PTHREADS < 7
11813         status = pthread_attr_setdetachstate(&attr, &detach);
11814         if( status < 0 ) status = errno;
11815 #else
11816         status = pthread_attr_setdetachstate(&attr, detach);
11817 #endif
11818         if( status ) return status;
11819         status = pthread_create( &t, &attr, task, NULL );
11820 #if HAVE_PTHREADS < 7
11821         if( status < 0 ) status = errno;
11822 #endif
11823         if( status ) return status;
11824 #else
11825         /* Draft 4 pthreads */
11826         status = pthread_create( &t, pthread_attr_default, task, NULL );
11827         if( status ) return errno;
11828
11829         /* give thread a chance to complete */
11830         /* it should remain joinable and hence detachable */
11831         sleep( 1 );
11832
11833         status = pthread_detach( &t );
11834         if( status ) return errno;
11835 #endif
11836
11837 #ifdef HAVE_LINUX_THREADS
11838         pthread_kill_other_threads_np();
11839 #endif
11840
11841         return 0;
11842
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11846   rm -rf conftest*
11847   ol_cv_pthread_create=yes
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   ol_cv_pthread_create=no
11853 fi
11854 rm -f conftest*
11855 else
11856   cat > conftest.$ac_ext <<EOF
11857 #line 11858 "configure"
11858 #include "confdefs.h"
11859 /* pthread test headers */
11860 #include <pthread.h>
11861 #if HAVE_PTHREADS < 7
11862 #include <errno.h>
11863 #endif
11864 #ifndef NULL
11865 #define NULL (void*)0
11866 #endif
11867
11868 static void *task(p)
11869         void *p;
11870 {
11871         return (void *) (p == NULL);
11872 }
11873
11874
11875 int main(argc, argv)
11876         int argc;
11877         char **argv;
11878 {
11879
11880         /* pthread test function */
11881 #ifndef PTHREAD_CREATE_DETACHED
11882 #define PTHREAD_CREATE_DETACHED 1
11883 #endif
11884         pthread_t t;
11885         int status;
11886         int detach = PTHREAD_CREATE_DETACHED;
11887
11888 #if HAVE_PTHREADS > 4
11889         /* Final pthreads */
11890         pthread_attr_t attr;
11891
11892         status = pthread_attr_init(&attr);
11893         if( status ) return status;
11894
11895 #if HAVE_PTHREADS < 7
11896         status = pthread_attr_setdetachstate(&attr, &detach);
11897         if( status < 0 ) status = errno;
11898 #else
11899         status = pthread_attr_setdetachstate(&attr, detach);
11900 #endif
11901         if( status ) return status;
11902         status = pthread_create( &t, &attr, task, NULL );
11903 #if HAVE_PTHREADS < 7
11904         if( status < 0 ) status = errno;
11905 #endif
11906         if( status ) return status;
11907 #else
11908         /* Draft 4 pthreads */
11909         status = pthread_create( &t, pthread_attr_default, task, NULL );
11910         if( status ) return errno;
11911
11912         /* give thread a chance to complete */
11913         /* it should remain joinable and hence detachable */
11914         sleep( 1 );
11915
11916         status = pthread_detach( &t );
11917         if( status ) return errno;
11918 #endif
11919
11920 #ifdef HAVE_LINUX_THREADS
11921         pthread_kill_other_threads_np();
11922 #endif
11923
11924         return 0;
11925
11926 }
11927
11928 EOF
11929 if { (eval echo configure:11930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11930 then
11931   ol_cv_pthread_create=yes
11932 else
11933   echo "configure: failed program was:" >&5
11934   cat conftest.$ac_ext >&5
11935   rm -fr conftest*
11936   ol_cv_pthread_create=no
11937 fi
11938 rm -fr conftest*
11939 fi
11940
11941 fi
11942
11943 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11944
11945                 if test $ol_cv_pthread_create != no ; then
11946                         ol_link_threads=posix
11947                         ol_link_pthreads=""
11948                 fi
11949                 
11950                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11951 if test "$ol_link_threads" = no ; then
11952         # try -kthread
11953         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11954 echo "configure:11955: checking for pthread link with -kthread" >&5
11955 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959                 # save the flags
11960                 ol_LIBS="$LIBS"
11961                 LIBS="-kthread $LIBS"
11962
11963                 if test "$cross_compiling" = yes; then
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 /* pthread test headers */
11968 #include <pthread.h>
11969 #if HAVE_PTHREADS < 7
11970 #include <errno.h>
11971 #endif
11972 #ifndef NULL
11973 #define NULL (void*)0
11974 #endif
11975
11976 static void *task(p)
11977         void *p;
11978 {
11979         return (void *) (p == NULL);
11980 }
11981
11982 int main() {
11983
11984         /* pthread test function */
11985 #ifndef PTHREAD_CREATE_DETACHED
11986 #define PTHREAD_CREATE_DETACHED 1
11987 #endif
11988         pthread_t t;
11989         int status;
11990         int detach = PTHREAD_CREATE_DETACHED;
11991
11992 #if HAVE_PTHREADS > 4
11993         /* Final pthreads */
11994         pthread_attr_t attr;
11995
11996         status = pthread_attr_init(&attr);
11997         if( status ) return status;
11998
11999 #if HAVE_PTHREADS < 7
12000         status = pthread_attr_setdetachstate(&attr, &detach);
12001         if( status < 0 ) status = errno;
12002 #else
12003         status = pthread_attr_setdetachstate(&attr, detach);
12004 #endif
12005         if( status ) return status;
12006         status = pthread_create( &t, &attr, task, NULL );
12007 #if HAVE_PTHREADS < 7
12008         if( status < 0 ) status = errno;
12009 #endif
12010         if( status ) return status;
12011 #else
12012         /* Draft 4 pthreads */
12013         status = pthread_create( &t, pthread_attr_default, task, NULL );
12014         if( status ) return errno;
12015
12016         /* give thread a chance to complete */
12017         /* it should remain joinable and hence detachable */
12018         sleep( 1 );
12019
12020         status = pthread_detach( &t );
12021         if( status ) return errno;
12022 #endif
12023
12024 #ifdef HAVE_LINUX_THREADS
12025         pthread_kill_other_threads_np();
12026 #endif
12027
12028         return 0;
12029
12030 ; return 0; }
12031 EOF
12032 if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12033   rm -rf conftest*
12034   ol_cv_pthread_kthread=yes
12035 else
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -rf conftest*
12039   ol_cv_pthread_kthread=no
12040 fi
12041 rm -f conftest*
12042 else
12043   cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046 /* pthread test headers */
12047 #include <pthread.h>
12048 #if HAVE_PTHREADS < 7
12049 #include <errno.h>
12050 #endif
12051 #ifndef NULL
12052 #define NULL (void*)0
12053 #endif
12054
12055 static void *task(p)
12056         void *p;
12057 {
12058         return (void *) (p == NULL);
12059 }
12060
12061
12062 int main(argc, argv)
12063         int argc;
12064         char **argv;
12065 {
12066
12067         /* pthread test function */
12068 #ifndef PTHREAD_CREATE_DETACHED
12069 #define PTHREAD_CREATE_DETACHED 1
12070 #endif
12071         pthread_t t;
12072         int status;
12073         int detach = PTHREAD_CREATE_DETACHED;
12074
12075 #if HAVE_PTHREADS > 4
12076         /* Final pthreads */
12077         pthread_attr_t attr;
12078
12079         status = pthread_attr_init(&attr);
12080         if( status ) return status;
12081
12082 #if HAVE_PTHREADS < 7
12083         status = pthread_attr_setdetachstate(&attr, &detach);
12084         if( status < 0 ) status = errno;
12085 #else
12086         status = pthread_attr_setdetachstate(&attr, detach);
12087 #endif
12088         if( status ) return status;
12089         status = pthread_create( &t, &attr, task, NULL );
12090 #if HAVE_PTHREADS < 7
12091         if( status < 0 ) status = errno;
12092 #endif
12093         if( status ) return status;
12094 #else
12095         /* Draft 4 pthreads */
12096         status = pthread_create( &t, pthread_attr_default, task, NULL );
12097         if( status ) return errno;
12098
12099         /* give thread a chance to complete */
12100         /* it should remain joinable and hence detachable */
12101         sleep( 1 );
12102
12103         status = pthread_detach( &t );
12104         if( status ) return errno;
12105 #endif
12106
12107 #ifdef HAVE_LINUX_THREADS
12108         pthread_kill_other_threads_np();
12109 #endif
12110
12111         return 0;
12112
12113 }
12114
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12117 then
12118   ol_cv_pthread_kthread=yes
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -fr conftest*
12123   ol_cv_pthread_kthread=no
12124 fi
12125 rm -fr conftest*
12126 fi
12127
12128
12129                 # restore the LIBS
12130                 LIBS="$ol_LIBS"
12131         
12132 fi
12133
12134 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12135
12136         if test $ol_cv_pthread_kthread = yes ; then
12137                 ol_link_pthreads="-kthread"
12138                 ol_link_threads=posix
12139         fi
12140 fi
12141
12142                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12143 if test "$ol_link_threads" = no ; then
12144         # try -pthread
12145         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12146 echo "configure:12147: checking for pthread link with -pthread" >&5
12147 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12148   echo $ac_n "(cached) $ac_c" 1>&6
12149 else
12150   
12151                 # save the flags
12152                 ol_LIBS="$LIBS"
12153                 LIBS="-pthread $LIBS"
12154
12155                 if test "$cross_compiling" = yes; then
12156   cat > conftest.$ac_ext <<EOF
12157 #line 12158 "configure"
12158 #include "confdefs.h"
12159 /* pthread test headers */
12160 #include <pthread.h>
12161 #if HAVE_PTHREADS < 7
12162 #include <errno.h>
12163 #endif
12164 #ifndef NULL
12165 #define NULL (void*)0
12166 #endif
12167
12168 static void *task(p)
12169         void *p;
12170 {
12171         return (void *) (p == NULL);
12172 }
12173
12174 int main() {
12175
12176         /* pthread test function */
12177 #ifndef PTHREAD_CREATE_DETACHED
12178 #define PTHREAD_CREATE_DETACHED 1
12179 #endif
12180         pthread_t t;
12181         int status;
12182         int detach = PTHREAD_CREATE_DETACHED;
12183
12184 #if HAVE_PTHREADS > 4
12185         /* Final pthreads */
12186         pthread_attr_t attr;
12187
12188         status = pthread_attr_init(&attr);
12189         if( status ) return status;
12190
12191 #if HAVE_PTHREADS < 7
12192         status = pthread_attr_setdetachstate(&attr, &detach);
12193         if( status < 0 ) status = errno;
12194 #else
12195         status = pthread_attr_setdetachstate(&attr, detach);
12196 #endif
12197         if( status ) return status;
12198         status = pthread_create( &t, &attr, task, NULL );
12199 #if HAVE_PTHREADS < 7
12200         if( status < 0 ) status = errno;
12201 #endif
12202         if( status ) return status;
12203 #else
12204         /* Draft 4 pthreads */
12205         status = pthread_create( &t, pthread_attr_default, task, NULL );
12206         if( status ) return errno;
12207
12208         /* give thread a chance to complete */
12209         /* it should remain joinable and hence detachable */
12210         sleep( 1 );
12211
12212         status = pthread_detach( &t );
12213         if( status ) return errno;
12214 #endif
12215
12216 #ifdef HAVE_LINUX_THREADS
12217         pthread_kill_other_threads_np();
12218 #endif
12219
12220         return 0;
12221
12222 ; return 0; }
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12225   rm -rf conftest*
12226   ol_cv_pthread_pthread=yes
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -rf conftest*
12231   ol_cv_pthread_pthread=no
12232 fi
12233 rm -f conftest*
12234 else
12235   cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238 /* pthread test headers */
12239 #include <pthread.h>
12240 #if HAVE_PTHREADS < 7
12241 #include <errno.h>
12242 #endif
12243 #ifndef NULL
12244 #define NULL (void*)0
12245 #endif
12246
12247 static void *task(p)
12248         void *p;
12249 {
12250         return (void *) (p == NULL);
12251 }
12252
12253
12254 int main(argc, argv)
12255         int argc;
12256         char **argv;
12257 {
12258
12259         /* pthread test function */
12260 #ifndef PTHREAD_CREATE_DETACHED
12261 #define PTHREAD_CREATE_DETACHED 1
12262 #endif
12263         pthread_t t;
12264         int status;
12265         int detach = PTHREAD_CREATE_DETACHED;
12266
12267 #if HAVE_PTHREADS > 4
12268         /* Final pthreads */
12269         pthread_attr_t attr;
12270
12271         status = pthread_attr_init(&attr);
12272         if( status ) return status;
12273
12274 #if HAVE_PTHREADS < 7
12275         status = pthread_attr_setdetachstate(&attr, &detach);
12276         if( status < 0 ) status = errno;
12277 #else
12278         status = pthread_attr_setdetachstate(&attr, detach);
12279 #endif
12280         if( status ) return status;
12281         status = pthread_create( &t, &attr, task, NULL );
12282 #if HAVE_PTHREADS < 7
12283         if( status < 0 ) status = errno;
12284 #endif
12285         if( status ) return status;
12286 #else
12287         /* Draft 4 pthreads */
12288         status = pthread_create( &t, pthread_attr_default, task, NULL );
12289         if( status ) return errno;
12290
12291         /* give thread a chance to complete */
12292         /* it should remain joinable and hence detachable */
12293         sleep( 1 );
12294
12295         status = pthread_detach( &t );
12296         if( status ) return errno;
12297 #endif
12298
12299 #ifdef HAVE_LINUX_THREADS
12300         pthread_kill_other_threads_np();
12301 #endif
12302
12303         return 0;
12304
12305 }
12306
12307 EOF
12308 if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12309 then
12310   ol_cv_pthread_pthread=yes
12311 else
12312   echo "configure: failed program was:" >&5
12313   cat conftest.$ac_ext >&5
12314   rm -fr conftest*
12315   ol_cv_pthread_pthread=no
12316 fi
12317 rm -fr conftest*
12318 fi
12319
12320
12321                 # restore the LIBS
12322                 LIBS="$ol_LIBS"
12323         
12324 fi
12325
12326 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12327
12328         if test $ol_cv_pthread_pthread = yes ; then
12329                 ol_link_pthreads="-pthread"
12330                 ol_link_threads=posix
12331         fi
12332 fi
12333
12334                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12335 if test "$ol_link_threads" = no ; then
12336         # try -pthreads
12337         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12338 echo "configure:12339: checking for pthread link with -pthreads" >&5
12339 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12340   echo $ac_n "(cached) $ac_c" 1>&6
12341 else
12342   
12343                 # save the flags
12344                 ol_LIBS="$LIBS"
12345                 LIBS="-pthreads $LIBS"
12346
12347                 if test "$cross_compiling" = yes; then
12348   cat > conftest.$ac_ext <<EOF
12349 #line 12350 "configure"
12350 #include "confdefs.h"
12351 /* pthread test headers */
12352 #include <pthread.h>
12353 #if HAVE_PTHREADS < 7
12354 #include <errno.h>
12355 #endif
12356 #ifndef NULL
12357 #define NULL (void*)0
12358 #endif
12359
12360 static void *task(p)
12361         void *p;
12362 {
12363         return (void *) (p == NULL);
12364 }
12365
12366 int main() {
12367
12368         /* pthread test function */
12369 #ifndef PTHREAD_CREATE_DETACHED
12370 #define PTHREAD_CREATE_DETACHED 1
12371 #endif
12372         pthread_t t;
12373         int status;
12374         int detach = PTHREAD_CREATE_DETACHED;
12375
12376 #if HAVE_PTHREADS > 4
12377         /* Final pthreads */
12378         pthread_attr_t attr;
12379
12380         status = pthread_attr_init(&attr);
12381         if( status ) return status;
12382
12383 #if HAVE_PTHREADS < 7
12384         status = pthread_attr_setdetachstate(&attr, &detach);
12385         if( status < 0 ) status = errno;
12386 #else
12387         status = pthread_attr_setdetachstate(&attr, detach);
12388 #endif
12389         if( status ) return status;
12390         status = pthread_create( &t, &attr, task, NULL );
12391 #if HAVE_PTHREADS < 7
12392         if( status < 0 ) status = errno;
12393 #endif
12394         if( status ) return status;
12395 #else
12396         /* Draft 4 pthreads */
12397         status = pthread_create( &t, pthread_attr_default, task, NULL );
12398         if( status ) return errno;
12399
12400         /* give thread a chance to complete */
12401         /* it should remain joinable and hence detachable */
12402         sleep( 1 );
12403
12404         status = pthread_detach( &t );
12405         if( status ) return errno;
12406 #endif
12407
12408 #ifdef HAVE_LINUX_THREADS
12409         pthread_kill_other_threads_np();
12410 #endif
12411
12412         return 0;
12413
12414 ; return 0; }
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12417   rm -rf conftest*
12418   ol_cv_pthread_pthreads=yes
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -rf conftest*
12423   ol_cv_pthread_pthreads=no
12424 fi
12425 rm -f conftest*
12426 else
12427   cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 /* pthread test headers */
12431 #include <pthread.h>
12432 #if HAVE_PTHREADS < 7
12433 #include <errno.h>
12434 #endif
12435 #ifndef NULL
12436 #define NULL (void*)0
12437 #endif
12438
12439 static void *task(p)
12440         void *p;
12441 {
12442         return (void *) (p == NULL);
12443 }
12444
12445
12446 int main(argc, argv)
12447         int argc;
12448         char **argv;
12449 {
12450
12451         /* pthread test function */
12452 #ifndef PTHREAD_CREATE_DETACHED
12453 #define PTHREAD_CREATE_DETACHED 1
12454 #endif
12455         pthread_t t;
12456         int status;
12457         int detach = PTHREAD_CREATE_DETACHED;
12458
12459 #if HAVE_PTHREADS > 4
12460         /* Final pthreads */
12461         pthread_attr_t attr;
12462
12463         status = pthread_attr_init(&attr);
12464         if( status ) return status;
12465
12466 #if HAVE_PTHREADS < 7
12467         status = pthread_attr_setdetachstate(&attr, &detach);
12468         if( status < 0 ) status = errno;
12469 #else
12470         status = pthread_attr_setdetachstate(&attr, detach);
12471 #endif
12472         if( status ) return status;
12473         status = pthread_create( &t, &attr, task, NULL );
12474 #if HAVE_PTHREADS < 7
12475         if( status < 0 ) status = errno;
12476 #endif
12477         if( status ) return status;
12478 #else
12479         /* Draft 4 pthreads */
12480         status = pthread_create( &t, pthread_attr_default, task, NULL );
12481         if( status ) return errno;
12482
12483         /* give thread a chance to complete */
12484         /* it should remain joinable and hence detachable */
12485         sleep( 1 );
12486
12487         status = pthread_detach( &t );
12488         if( status ) return errno;
12489 #endif
12490
12491 #ifdef HAVE_LINUX_THREADS
12492         pthread_kill_other_threads_np();
12493 #endif
12494
12495         return 0;
12496
12497 }
12498
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12501 then
12502   ol_cv_pthread_pthreads=yes
12503 else
12504   echo "configure: failed program was:" >&5
12505   cat conftest.$ac_ext >&5
12506   rm -fr conftest*
12507   ol_cv_pthread_pthreads=no
12508 fi
12509 rm -fr conftest*
12510 fi
12511
12512
12513                 # restore the LIBS
12514                 LIBS="$ol_LIBS"
12515         
12516 fi
12517
12518 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12519
12520         if test $ol_cv_pthread_pthreads = yes ; then
12521                 ol_link_pthreads="-pthreads"
12522                 ol_link_threads=posix
12523         fi
12524 fi
12525
12526                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12527 if test "$ol_link_threads" = no ; then
12528         # try -mthreads
12529         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12530 echo "configure:12531: checking for pthread link with -mthreads" >&5
12531 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12532   echo $ac_n "(cached) $ac_c" 1>&6
12533 else
12534   
12535                 # save the flags
12536                 ol_LIBS="$LIBS"
12537                 LIBS="-mthreads $LIBS"
12538
12539                 if test "$cross_compiling" = yes; then
12540   cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543 /* pthread test headers */
12544 #include <pthread.h>
12545 #if HAVE_PTHREADS < 7
12546 #include <errno.h>
12547 #endif
12548 #ifndef NULL
12549 #define NULL (void*)0
12550 #endif
12551
12552 static void *task(p)
12553         void *p;
12554 {
12555         return (void *) (p == NULL);
12556 }
12557
12558 int main() {
12559
12560         /* pthread test function */
12561 #ifndef PTHREAD_CREATE_DETACHED
12562 #define PTHREAD_CREATE_DETACHED 1
12563 #endif
12564         pthread_t t;
12565         int status;
12566         int detach = PTHREAD_CREATE_DETACHED;
12567
12568 #if HAVE_PTHREADS > 4
12569         /* Final pthreads */
12570         pthread_attr_t attr;
12571
12572         status = pthread_attr_init(&attr);
12573         if( status ) return status;
12574
12575 #if HAVE_PTHREADS < 7
12576         status = pthread_attr_setdetachstate(&attr, &detach);
12577         if( status < 0 ) status = errno;
12578 #else
12579         status = pthread_attr_setdetachstate(&attr, detach);
12580 #endif
12581         if( status ) return status;
12582         status = pthread_create( &t, &attr, task, NULL );
12583 #if HAVE_PTHREADS < 7
12584         if( status < 0 ) status = errno;
12585 #endif
12586         if( status ) return status;
12587 #else
12588         /* Draft 4 pthreads */
12589         status = pthread_create( &t, pthread_attr_default, task, NULL );
12590         if( status ) return errno;
12591
12592         /* give thread a chance to complete */
12593         /* it should remain joinable and hence detachable */
12594         sleep( 1 );
12595
12596         status = pthread_detach( &t );
12597         if( status ) return errno;
12598 #endif
12599
12600 #ifdef HAVE_LINUX_THREADS
12601         pthread_kill_other_threads_np();
12602 #endif
12603
12604         return 0;
12605
12606 ; return 0; }
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12609   rm -rf conftest*
12610   ol_cv_pthread_mthreads=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   ol_cv_pthread_mthreads=no
12616 fi
12617 rm -f conftest*
12618 else
12619   cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* pthread test headers */
12623 #include <pthread.h>
12624 #if HAVE_PTHREADS < 7
12625 #include <errno.h>
12626 #endif
12627 #ifndef NULL
12628 #define NULL (void*)0
12629 #endif
12630
12631 static void *task(p)
12632         void *p;
12633 {
12634         return (void *) (p == NULL);
12635 }
12636
12637
12638 int main(argc, argv)
12639         int argc;
12640         char **argv;
12641 {
12642
12643         /* pthread test function */
12644 #ifndef PTHREAD_CREATE_DETACHED
12645 #define PTHREAD_CREATE_DETACHED 1
12646 #endif
12647         pthread_t t;
12648         int status;
12649         int detach = PTHREAD_CREATE_DETACHED;
12650
12651 #if HAVE_PTHREADS > 4
12652         /* Final pthreads */
12653         pthread_attr_t attr;
12654
12655         status = pthread_attr_init(&attr);
12656         if( status ) return status;
12657
12658 #if HAVE_PTHREADS < 7
12659         status = pthread_attr_setdetachstate(&attr, &detach);
12660         if( status < 0 ) status = errno;
12661 #else
12662         status = pthread_attr_setdetachstate(&attr, detach);
12663 #endif
12664         if( status ) return status;
12665         status = pthread_create( &t, &attr, task, NULL );
12666 #if HAVE_PTHREADS < 7
12667         if( status < 0 ) status = errno;
12668 #endif
12669         if( status ) return status;
12670 #else
12671         /* Draft 4 pthreads */
12672         status = pthread_create( &t, pthread_attr_default, task, NULL );
12673         if( status ) return errno;
12674
12675         /* give thread a chance to complete */
12676         /* it should remain joinable and hence detachable */
12677         sleep( 1 );
12678
12679         status = pthread_detach( &t );
12680         if( status ) return errno;
12681 #endif
12682
12683 #ifdef HAVE_LINUX_THREADS
12684         pthread_kill_other_threads_np();
12685 #endif
12686
12687         return 0;
12688
12689 }
12690
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12693 then
12694   ol_cv_pthread_mthreads=yes
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -fr conftest*
12699   ol_cv_pthread_mthreads=no
12700 fi
12701 rm -fr conftest*
12702 fi
12703
12704
12705                 # restore the LIBS
12706                 LIBS="$ol_LIBS"
12707         
12708 fi
12709
12710 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12711
12712         if test $ol_cv_pthread_mthreads = yes ; then
12713                 ol_link_pthreads="-mthreads"
12714                 ol_link_threads=posix
12715         fi
12716 fi
12717
12718                 # Pthread try link: -thread (ol_cv_pthread_thread)
12719 if test "$ol_link_threads" = no ; then
12720         # try -thread
12721         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12722 echo "configure:12723: checking for pthread link with -thread" >&5
12723 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12724   echo $ac_n "(cached) $ac_c" 1>&6
12725 else
12726   
12727                 # save the flags
12728                 ol_LIBS="$LIBS"
12729                 LIBS="-thread $LIBS"
12730
12731                 if test "$cross_compiling" = yes; then
12732   cat > conftest.$ac_ext <<EOF
12733 #line 12734 "configure"
12734 #include "confdefs.h"
12735 /* pthread test headers */
12736 #include <pthread.h>
12737 #if HAVE_PTHREADS < 7
12738 #include <errno.h>
12739 #endif
12740 #ifndef NULL
12741 #define NULL (void*)0
12742 #endif
12743
12744 static void *task(p)
12745         void *p;
12746 {
12747         return (void *) (p == NULL);
12748 }
12749
12750 int main() {
12751
12752         /* pthread test function */
12753 #ifndef PTHREAD_CREATE_DETACHED
12754 #define PTHREAD_CREATE_DETACHED 1
12755 #endif
12756         pthread_t t;
12757         int status;
12758         int detach = PTHREAD_CREATE_DETACHED;
12759
12760 #if HAVE_PTHREADS > 4
12761         /* Final pthreads */
12762         pthread_attr_t attr;
12763
12764         status = pthread_attr_init(&attr);
12765         if( status ) return status;
12766
12767 #if HAVE_PTHREADS < 7
12768         status = pthread_attr_setdetachstate(&attr, &detach);
12769         if( status < 0 ) status = errno;
12770 #else
12771         status = pthread_attr_setdetachstate(&attr, detach);
12772 #endif
12773         if( status ) return status;
12774         status = pthread_create( &t, &attr, task, NULL );
12775 #if HAVE_PTHREADS < 7
12776         if( status < 0 ) status = errno;
12777 #endif
12778         if( status ) return status;
12779 #else
12780         /* Draft 4 pthreads */
12781         status = pthread_create( &t, pthread_attr_default, task, NULL );
12782         if( status ) return errno;
12783
12784         /* give thread a chance to complete */
12785         /* it should remain joinable and hence detachable */
12786         sleep( 1 );
12787
12788         status = pthread_detach( &t );
12789         if( status ) return errno;
12790 #endif
12791
12792 #ifdef HAVE_LINUX_THREADS
12793         pthread_kill_other_threads_np();
12794 #endif
12795
12796         return 0;
12797
12798 ; return 0; }
12799 EOF
12800 if { (eval echo configure:12801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12801   rm -rf conftest*
12802   ol_cv_pthread_thread=yes
12803 else
12804   echo "configure: failed program was:" >&5
12805   cat conftest.$ac_ext >&5
12806   rm -rf conftest*
12807   ol_cv_pthread_thread=no
12808 fi
12809 rm -f conftest*
12810 else
12811   cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12814 /* pthread test headers */
12815 #include <pthread.h>
12816 #if HAVE_PTHREADS < 7
12817 #include <errno.h>
12818 #endif
12819 #ifndef NULL
12820 #define NULL (void*)0
12821 #endif
12822
12823 static void *task(p)
12824         void *p;
12825 {
12826         return (void *) (p == NULL);
12827 }
12828
12829
12830 int main(argc, argv)
12831         int argc;
12832         char **argv;
12833 {
12834
12835         /* pthread test function */
12836 #ifndef PTHREAD_CREATE_DETACHED
12837 #define PTHREAD_CREATE_DETACHED 1
12838 #endif
12839         pthread_t t;
12840         int status;
12841         int detach = PTHREAD_CREATE_DETACHED;
12842
12843 #if HAVE_PTHREADS > 4
12844         /* Final pthreads */
12845         pthread_attr_t attr;
12846
12847         status = pthread_attr_init(&attr);
12848         if( status ) return status;
12849
12850 #if HAVE_PTHREADS < 7
12851         status = pthread_attr_setdetachstate(&attr, &detach);
12852         if( status < 0 ) status = errno;
12853 #else
12854         status = pthread_attr_setdetachstate(&attr, detach);
12855 #endif
12856         if( status ) return status;
12857         status = pthread_create( &t, &attr, task, NULL );
12858 #if HAVE_PTHREADS < 7
12859         if( status < 0 ) status = errno;
12860 #endif
12861         if( status ) return status;
12862 #else
12863         /* Draft 4 pthreads */
12864         status = pthread_create( &t, pthread_attr_default, task, NULL );
12865         if( status ) return errno;
12866
12867         /* give thread a chance to complete */
12868         /* it should remain joinable and hence detachable */
12869         sleep( 1 );
12870
12871         status = pthread_detach( &t );
12872         if( status ) return errno;
12873 #endif
12874
12875 #ifdef HAVE_LINUX_THREADS
12876         pthread_kill_other_threads_np();
12877 #endif
12878
12879         return 0;
12880
12881 }
12882
12883 EOF
12884 if { (eval echo configure:12885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12885 then
12886   ol_cv_pthread_thread=yes
12887 else
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -fr conftest*
12891   ol_cv_pthread_thread=no
12892 fi
12893 rm -fr conftest*
12894 fi
12895
12896
12897                 # restore the LIBS
12898                 LIBS="$ol_LIBS"
12899         
12900 fi
12901
12902 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12903
12904         if test $ol_cv_pthread_thread = yes ; then
12905                 ol_link_pthreads="-thread"
12906                 ol_link_threads=posix
12907         fi
12908 fi
12909
12910
12911                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12912 if test "$ol_link_threads" = no ; then
12913         # try -lpthread -lmach -lexc -lc_r
12914         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12915 echo "configure:12916: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12916 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12917   echo $ac_n "(cached) $ac_c" 1>&6
12918 else
12919   
12920                 # save the flags
12921                 ol_LIBS="$LIBS"
12922                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12923
12924                 if test "$cross_compiling" = yes; then
12925   cat > conftest.$ac_ext <<EOF
12926 #line 12927 "configure"
12927 #include "confdefs.h"
12928 /* pthread test headers */
12929 #include <pthread.h>
12930 #if HAVE_PTHREADS < 7
12931 #include <errno.h>
12932 #endif
12933 #ifndef NULL
12934 #define NULL (void*)0
12935 #endif
12936
12937 static void *task(p)
12938         void *p;
12939 {
12940         return (void *) (p == NULL);
12941 }
12942
12943 int main() {
12944
12945         /* pthread test function */
12946 #ifndef PTHREAD_CREATE_DETACHED
12947 #define PTHREAD_CREATE_DETACHED 1
12948 #endif
12949         pthread_t t;
12950         int status;
12951         int detach = PTHREAD_CREATE_DETACHED;
12952
12953 #if HAVE_PTHREADS > 4
12954         /* Final pthreads */
12955         pthread_attr_t attr;
12956
12957         status = pthread_attr_init(&attr);
12958         if( status ) return status;
12959
12960 #if HAVE_PTHREADS < 7
12961         status = pthread_attr_setdetachstate(&attr, &detach);
12962         if( status < 0 ) status = errno;
12963 #else
12964         status = pthread_attr_setdetachstate(&attr, detach);
12965 #endif
12966         if( status ) return status;
12967         status = pthread_create( &t, &attr, task, NULL );
12968 #if HAVE_PTHREADS < 7
12969         if( status < 0 ) status = errno;
12970 #endif
12971         if( status ) return status;
12972 #else
12973         /* Draft 4 pthreads */
12974         status = pthread_create( &t, pthread_attr_default, task, NULL );
12975         if( status ) return errno;
12976
12977         /* give thread a chance to complete */
12978         /* it should remain joinable and hence detachable */
12979         sleep( 1 );
12980
12981         status = pthread_detach( &t );
12982         if( status ) return errno;
12983 #endif
12984
12985 #ifdef HAVE_LINUX_THREADS
12986         pthread_kill_other_threads_np();
12987 #endif
12988
12989         return 0;
12990
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12994   rm -rf conftest*
12995   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13001 fi
13002 rm -f conftest*
13003 else
13004   cat > conftest.$ac_ext <<EOF
13005 #line 13006 "configure"
13006 #include "confdefs.h"
13007 /* pthread test headers */
13008 #include <pthread.h>
13009 #if HAVE_PTHREADS < 7
13010 #include <errno.h>
13011 #endif
13012 #ifndef NULL
13013 #define NULL (void*)0
13014 #endif
13015
13016 static void *task(p)
13017         void *p;
13018 {
13019         return (void *) (p == NULL);
13020 }
13021
13022
13023 int main(argc, argv)
13024         int argc;
13025         char **argv;
13026 {
13027
13028         /* pthread test function */
13029 #ifndef PTHREAD_CREATE_DETACHED
13030 #define PTHREAD_CREATE_DETACHED 1
13031 #endif
13032         pthread_t t;
13033         int status;
13034         int detach = PTHREAD_CREATE_DETACHED;
13035
13036 #if HAVE_PTHREADS > 4
13037         /* Final pthreads */
13038         pthread_attr_t attr;
13039
13040         status = pthread_attr_init(&attr);
13041         if( status ) return status;
13042
13043 #if HAVE_PTHREADS < 7
13044         status = pthread_attr_setdetachstate(&attr, &detach);
13045         if( status < 0 ) status = errno;
13046 #else
13047         status = pthread_attr_setdetachstate(&attr, detach);
13048 #endif
13049         if( status ) return status;
13050         status = pthread_create( &t, &attr, task, NULL );
13051 #if HAVE_PTHREADS < 7
13052         if( status < 0 ) status = errno;
13053 #endif
13054         if( status ) return status;
13055 #else
13056         /* Draft 4 pthreads */
13057         status = pthread_create( &t, pthread_attr_default, task, NULL );
13058         if( status ) return errno;
13059
13060         /* give thread a chance to complete */
13061         /* it should remain joinable and hence detachable */
13062         sleep( 1 );
13063
13064         status = pthread_detach( &t );
13065         if( status ) return errno;
13066 #endif
13067
13068 #ifdef HAVE_LINUX_THREADS
13069         pthread_kill_other_threads_np();
13070 #endif
13071
13072         return 0;
13073
13074 }
13075
13076 EOF
13077 if { (eval echo configure:13078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13078 then
13079   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13080 else
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -fr conftest*
13084   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13085 fi
13086 rm -fr conftest*
13087 fi
13088
13089
13090                 # restore the LIBS
13091                 LIBS="$ol_LIBS"
13092         
13093 fi
13094
13095 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13096
13097         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13098                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13099                 ol_link_threads=posix
13100         fi
13101 fi
13102
13103                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13104 if test "$ol_link_threads" = no ; then
13105         # try -lpthread -lmach -lexc
13106         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13107 echo "configure:13108: checking for pthread link with -lpthread -lmach -lexc" >&5
13108 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13109   echo $ac_n "(cached) $ac_c" 1>&6
13110 else
13111   
13112                 # save the flags
13113                 ol_LIBS="$LIBS"
13114                 LIBS="-lpthread -lmach -lexc $LIBS"
13115
13116                 if test "$cross_compiling" = yes; then
13117   cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 /* pthread test headers */
13121 #include <pthread.h>
13122 #if HAVE_PTHREADS < 7
13123 #include <errno.h>
13124 #endif
13125 #ifndef NULL
13126 #define NULL (void*)0
13127 #endif
13128
13129 static void *task(p)
13130         void *p;
13131 {
13132         return (void *) (p == NULL);
13133 }
13134
13135 int main() {
13136
13137         /* pthread test function */
13138 #ifndef PTHREAD_CREATE_DETACHED
13139 #define PTHREAD_CREATE_DETACHED 1
13140 #endif
13141         pthread_t t;
13142         int status;
13143         int detach = PTHREAD_CREATE_DETACHED;
13144
13145 #if HAVE_PTHREADS > 4
13146         /* Final pthreads */
13147         pthread_attr_t attr;
13148
13149         status = pthread_attr_init(&attr);
13150         if( status ) return status;
13151
13152 #if HAVE_PTHREADS < 7
13153         status = pthread_attr_setdetachstate(&attr, &detach);
13154         if( status < 0 ) status = errno;
13155 #else
13156         status = pthread_attr_setdetachstate(&attr, detach);
13157 #endif
13158         if( status ) return status;
13159         status = pthread_create( &t, &attr, task, NULL );
13160 #if HAVE_PTHREADS < 7
13161         if( status < 0 ) status = errno;
13162 #endif
13163         if( status ) return status;
13164 #else
13165         /* Draft 4 pthreads */
13166         status = pthread_create( &t, pthread_attr_default, task, NULL );
13167         if( status ) return errno;
13168
13169         /* give thread a chance to complete */
13170         /* it should remain joinable and hence detachable */
13171         sleep( 1 );
13172
13173         status = pthread_detach( &t );
13174         if( status ) return errno;
13175 #endif
13176
13177 #ifdef HAVE_LINUX_THREADS
13178         pthread_kill_other_threads_np();
13179 #endif
13180
13181         return 0;
13182
13183 ; return 0; }
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13186   rm -rf conftest*
13187   ol_cv_pthread_lpthread_lmach_lexc=yes
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   ol_cv_pthread_lpthread_lmach_lexc=no
13193 fi
13194 rm -f conftest*
13195 else
13196   cat > conftest.$ac_ext <<EOF
13197 #line 13198 "configure"
13198 #include "confdefs.h"
13199 /* pthread test headers */
13200 #include <pthread.h>
13201 #if HAVE_PTHREADS < 7
13202 #include <errno.h>
13203 #endif
13204 #ifndef NULL
13205 #define NULL (void*)0
13206 #endif
13207
13208 static void *task(p)
13209         void *p;
13210 {
13211         return (void *) (p == NULL);
13212 }
13213
13214
13215 int main(argc, argv)
13216         int argc;
13217         char **argv;
13218 {
13219
13220         /* pthread test function */
13221 #ifndef PTHREAD_CREATE_DETACHED
13222 #define PTHREAD_CREATE_DETACHED 1
13223 #endif
13224         pthread_t t;
13225         int status;
13226         int detach = PTHREAD_CREATE_DETACHED;
13227
13228 #if HAVE_PTHREADS > 4
13229         /* Final pthreads */
13230         pthread_attr_t attr;
13231
13232         status = pthread_attr_init(&attr);
13233         if( status ) return status;
13234
13235 #if HAVE_PTHREADS < 7
13236         status = pthread_attr_setdetachstate(&attr, &detach);
13237         if( status < 0 ) status = errno;
13238 #else
13239         status = pthread_attr_setdetachstate(&attr, detach);
13240 #endif
13241         if( status ) return status;
13242         status = pthread_create( &t, &attr, task, NULL );
13243 #if HAVE_PTHREADS < 7
13244         if( status < 0 ) status = errno;
13245 #endif
13246         if( status ) return status;
13247 #else
13248         /* Draft 4 pthreads */
13249         status = pthread_create( &t, pthread_attr_default, task, NULL );
13250         if( status ) return errno;
13251
13252         /* give thread a chance to complete */
13253         /* it should remain joinable and hence detachable */
13254         sleep( 1 );
13255
13256         status = pthread_detach( &t );
13257         if( status ) return errno;
13258 #endif
13259
13260 #ifdef HAVE_LINUX_THREADS
13261         pthread_kill_other_threads_np();
13262 #endif
13263
13264         return 0;
13265
13266 }
13267
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13270 then
13271   ol_cv_pthread_lpthread_lmach_lexc=yes
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   rm -fr conftest*
13276   ol_cv_pthread_lpthread_lmach_lexc=no
13277 fi
13278 rm -fr conftest*
13279 fi
13280
13281
13282                 # restore the LIBS
13283                 LIBS="$ol_LIBS"
13284         
13285 fi
13286
13287 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13288
13289         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13290                 ol_link_pthreads="-lpthread -lmach -lexc"
13291                 ol_link_threads=posix
13292         fi
13293 fi
13294
13295
13296                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13297 if test "$ol_link_threads" = no ; then
13298         # try -lpthread -Wl,-woff,85
13299         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13300 echo "configure:13301: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13301 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13302   echo $ac_n "(cached) $ac_c" 1>&6
13303 else
13304   
13305                 # save the flags
13306                 ol_LIBS="$LIBS"
13307                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13308
13309                 if test "$cross_compiling" = yes; then
13310   cat > conftest.$ac_ext <<EOF
13311 #line 13312 "configure"
13312 #include "confdefs.h"
13313 /* pthread test headers */
13314 #include <pthread.h>
13315 #if HAVE_PTHREADS < 7
13316 #include <errno.h>
13317 #endif
13318 #ifndef NULL
13319 #define NULL (void*)0
13320 #endif
13321
13322 static void *task(p)
13323         void *p;
13324 {
13325         return (void *) (p == NULL);
13326 }
13327
13328 int main() {
13329
13330         /* pthread test function */
13331 #ifndef PTHREAD_CREATE_DETACHED
13332 #define PTHREAD_CREATE_DETACHED 1
13333 #endif
13334         pthread_t t;
13335         int status;
13336         int detach = PTHREAD_CREATE_DETACHED;
13337
13338 #if HAVE_PTHREADS > 4
13339         /* Final pthreads */
13340         pthread_attr_t attr;
13341
13342         status = pthread_attr_init(&attr);
13343         if( status ) return status;
13344
13345 #if HAVE_PTHREADS < 7
13346         status = pthread_attr_setdetachstate(&attr, &detach);
13347         if( status < 0 ) status = errno;
13348 #else
13349         status = pthread_attr_setdetachstate(&attr, detach);
13350 #endif
13351         if( status ) return status;
13352         status = pthread_create( &t, &attr, task, NULL );
13353 #if HAVE_PTHREADS < 7
13354         if( status < 0 ) status = errno;
13355 #endif
13356         if( status ) return status;
13357 #else
13358         /* Draft 4 pthreads */
13359         status = pthread_create( &t, pthread_attr_default, task, NULL );
13360         if( status ) return errno;
13361
13362         /* give thread a chance to complete */
13363         /* it should remain joinable and hence detachable */
13364         sleep( 1 );
13365
13366         status = pthread_detach( &t );
13367         if( status ) return errno;
13368 #endif
13369
13370 #ifdef HAVE_LINUX_THREADS
13371         pthread_kill_other_threads_np();
13372 #endif
13373
13374         return 0;
13375
13376 ; return 0; }
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13379   rm -rf conftest*
13380   ol_cv_pthread_lib_lpthread_woff=yes
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -rf conftest*
13385   ol_cv_pthread_lib_lpthread_woff=no
13386 fi
13387 rm -f conftest*
13388 else
13389   cat > conftest.$ac_ext <<EOF
13390 #line 13391 "configure"
13391 #include "confdefs.h"
13392 /* pthread test headers */
13393 #include <pthread.h>
13394 #if HAVE_PTHREADS < 7
13395 #include <errno.h>
13396 #endif
13397 #ifndef NULL
13398 #define NULL (void*)0
13399 #endif
13400
13401 static void *task(p)
13402         void *p;
13403 {
13404         return (void *) (p == NULL);
13405 }
13406
13407
13408 int main(argc, argv)
13409         int argc;
13410         char **argv;
13411 {
13412
13413         /* pthread test function */
13414 #ifndef PTHREAD_CREATE_DETACHED
13415 #define PTHREAD_CREATE_DETACHED 1
13416 #endif
13417         pthread_t t;
13418         int status;
13419         int detach = PTHREAD_CREATE_DETACHED;
13420
13421 #if HAVE_PTHREADS > 4
13422         /* Final pthreads */
13423         pthread_attr_t attr;
13424
13425         status = pthread_attr_init(&attr);
13426         if( status ) return status;
13427
13428 #if HAVE_PTHREADS < 7
13429         status = pthread_attr_setdetachstate(&attr, &detach);
13430         if( status < 0 ) status = errno;
13431 #else
13432         status = pthread_attr_setdetachstate(&attr, detach);
13433 #endif
13434         if( status ) return status;
13435         status = pthread_create( &t, &attr, task, NULL );
13436 #if HAVE_PTHREADS < 7
13437         if( status < 0 ) status = errno;
13438 #endif
13439         if( status ) return status;
13440 #else
13441         /* Draft 4 pthreads */
13442         status = pthread_create( &t, pthread_attr_default, task, NULL );
13443         if( status ) return errno;
13444
13445         /* give thread a chance to complete */
13446         /* it should remain joinable and hence detachable */
13447         sleep( 1 );
13448
13449         status = pthread_detach( &t );
13450         if( status ) return errno;
13451 #endif
13452
13453 #ifdef HAVE_LINUX_THREADS
13454         pthread_kill_other_threads_np();
13455 #endif
13456
13457         return 0;
13458
13459 }
13460
13461 EOF
13462 if { (eval echo configure:13463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13463 then
13464   ol_cv_pthread_lib_lpthread_woff=yes
13465 else
13466   echo "configure: failed program was:" >&5
13467   cat conftest.$ac_ext >&5
13468   rm -fr conftest*
13469   ol_cv_pthread_lib_lpthread_woff=no
13470 fi
13471 rm -fr conftest*
13472 fi
13473
13474
13475                 # restore the LIBS
13476                 LIBS="$ol_LIBS"
13477         
13478 fi
13479
13480 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13481
13482         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13483                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13484                 ol_link_threads=posix
13485         fi
13486 fi
13487
13488
13489                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13490 if test "$ol_link_threads" = no ; then
13491         # try -lpthread
13492         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13493 echo "configure:13494: checking for pthread link with -lpthread" >&5
13494 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13495   echo $ac_n "(cached) $ac_c" 1>&6
13496 else
13497   
13498                 # save the flags
13499                 ol_LIBS="$LIBS"
13500                 LIBS="-lpthread $LIBS"
13501
13502                 if test "$cross_compiling" = yes; then
13503   cat > conftest.$ac_ext <<EOF
13504 #line 13505 "configure"
13505 #include "confdefs.h"
13506 /* pthread test headers */
13507 #include <pthread.h>
13508 #if HAVE_PTHREADS < 7
13509 #include <errno.h>
13510 #endif
13511 #ifndef NULL
13512 #define NULL (void*)0
13513 #endif
13514
13515 static void *task(p)
13516         void *p;
13517 {
13518         return (void *) (p == NULL);
13519 }
13520
13521 int main() {
13522
13523         /* pthread test function */
13524 #ifndef PTHREAD_CREATE_DETACHED
13525 #define PTHREAD_CREATE_DETACHED 1
13526 #endif
13527         pthread_t t;
13528         int status;
13529         int detach = PTHREAD_CREATE_DETACHED;
13530
13531 #if HAVE_PTHREADS > 4
13532         /* Final pthreads */
13533         pthread_attr_t attr;
13534
13535         status = pthread_attr_init(&attr);
13536         if( status ) return status;
13537
13538 #if HAVE_PTHREADS < 7
13539         status = pthread_attr_setdetachstate(&attr, &detach);
13540         if( status < 0 ) status = errno;
13541 #else
13542         status = pthread_attr_setdetachstate(&attr, detach);
13543 #endif
13544         if( status ) return status;
13545         status = pthread_create( &t, &attr, task, NULL );
13546 #if HAVE_PTHREADS < 7
13547         if( status < 0 ) status = errno;
13548 #endif
13549         if( status ) return status;
13550 #else
13551         /* Draft 4 pthreads */
13552         status = pthread_create( &t, pthread_attr_default, task, NULL );
13553         if( status ) return errno;
13554
13555         /* give thread a chance to complete */
13556         /* it should remain joinable and hence detachable */
13557         sleep( 1 );
13558
13559         status = pthread_detach( &t );
13560         if( status ) return errno;
13561 #endif
13562
13563 #ifdef HAVE_LINUX_THREADS
13564         pthread_kill_other_threads_np();
13565 #endif
13566
13567         return 0;
13568
13569 ; return 0; }
13570 EOF
13571 if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13572   rm -rf conftest*
13573   ol_cv_pthread_lpthread=yes
13574 else
13575   echo "configure: failed program was:" >&5
13576   cat conftest.$ac_ext >&5
13577   rm -rf conftest*
13578   ol_cv_pthread_lpthread=no
13579 fi
13580 rm -f conftest*
13581 else
13582   cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 /* pthread test headers */
13586 #include <pthread.h>
13587 #if HAVE_PTHREADS < 7
13588 #include <errno.h>
13589 #endif
13590 #ifndef NULL
13591 #define NULL (void*)0
13592 #endif
13593
13594 static void *task(p)
13595         void *p;
13596 {
13597         return (void *) (p == NULL);
13598 }
13599
13600
13601 int main(argc, argv)
13602         int argc;
13603         char **argv;
13604 {
13605
13606         /* pthread test function */
13607 #ifndef PTHREAD_CREATE_DETACHED
13608 #define PTHREAD_CREATE_DETACHED 1
13609 #endif
13610         pthread_t t;
13611         int status;
13612         int detach = PTHREAD_CREATE_DETACHED;
13613
13614 #if HAVE_PTHREADS > 4
13615         /* Final pthreads */
13616         pthread_attr_t attr;
13617
13618         status = pthread_attr_init(&attr);
13619         if( status ) return status;
13620
13621 #if HAVE_PTHREADS < 7
13622         status = pthread_attr_setdetachstate(&attr, &detach);
13623         if( status < 0 ) status = errno;
13624 #else
13625         status = pthread_attr_setdetachstate(&attr, detach);
13626 #endif
13627         if( status ) return status;
13628         status = pthread_create( &t, &attr, task, NULL );
13629 #if HAVE_PTHREADS < 7
13630         if( status < 0 ) status = errno;
13631 #endif
13632         if( status ) return status;
13633 #else
13634         /* Draft 4 pthreads */
13635         status = pthread_create( &t, pthread_attr_default, task, NULL );
13636         if( status ) return errno;
13637
13638         /* give thread a chance to complete */
13639         /* it should remain joinable and hence detachable */
13640         sleep( 1 );
13641
13642         status = pthread_detach( &t );
13643         if( status ) return errno;
13644 #endif
13645
13646 #ifdef HAVE_LINUX_THREADS
13647         pthread_kill_other_threads_np();
13648 #endif
13649
13650         return 0;
13651
13652 }
13653
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13656 then
13657   ol_cv_pthread_lpthread=yes
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -fr conftest*
13662   ol_cv_pthread_lpthread=no
13663 fi
13664 rm -fr conftest*
13665 fi
13666
13667
13668                 # restore the LIBS
13669                 LIBS="$ol_LIBS"
13670         
13671 fi
13672
13673 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13674
13675         if test $ol_cv_pthread_lpthread = yes ; then
13676                 ol_link_pthreads="-lpthread"
13677                 ol_link_threads=posix
13678         fi
13679 fi
13680
13681                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13682 if test "$ol_link_threads" = no ; then
13683         # try -lc_r
13684         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13685 echo "configure:13686: checking for pthread link with -lc_r" >&5
13686 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13687   echo $ac_n "(cached) $ac_c" 1>&6
13688 else
13689   
13690                 # save the flags
13691                 ol_LIBS="$LIBS"
13692                 LIBS="-lc_r $LIBS"
13693
13694                 if test "$cross_compiling" = yes; then
13695   cat > conftest.$ac_ext <<EOF
13696 #line 13697 "configure"
13697 #include "confdefs.h"
13698 /* pthread test headers */
13699 #include <pthread.h>
13700 #if HAVE_PTHREADS < 7
13701 #include <errno.h>
13702 #endif
13703 #ifndef NULL
13704 #define NULL (void*)0
13705 #endif
13706
13707 static void *task(p)
13708         void *p;
13709 {
13710         return (void *) (p == NULL);
13711 }
13712
13713 int main() {
13714
13715         /* pthread test function */
13716 #ifndef PTHREAD_CREATE_DETACHED
13717 #define PTHREAD_CREATE_DETACHED 1
13718 #endif
13719         pthread_t t;
13720         int status;
13721         int detach = PTHREAD_CREATE_DETACHED;
13722
13723 #if HAVE_PTHREADS > 4
13724         /* Final pthreads */
13725         pthread_attr_t attr;
13726
13727         status = pthread_attr_init(&attr);
13728         if( status ) return status;
13729
13730 #if HAVE_PTHREADS < 7
13731         status = pthread_attr_setdetachstate(&attr, &detach);
13732         if( status < 0 ) status = errno;
13733 #else
13734         status = pthread_attr_setdetachstate(&attr, detach);
13735 #endif
13736         if( status ) return status;
13737         status = pthread_create( &t, &attr, task, NULL );
13738 #if HAVE_PTHREADS < 7
13739         if( status < 0 ) status = errno;
13740 #endif
13741         if( status ) return status;
13742 #else
13743         /* Draft 4 pthreads */
13744         status = pthread_create( &t, pthread_attr_default, task, NULL );
13745         if( status ) return errno;
13746
13747         /* give thread a chance to complete */
13748         /* it should remain joinable and hence detachable */
13749         sleep( 1 );
13750
13751         status = pthread_detach( &t );
13752         if( status ) return errno;
13753 #endif
13754
13755 #ifdef HAVE_LINUX_THREADS
13756         pthread_kill_other_threads_np();
13757 #endif
13758
13759         return 0;
13760
13761 ; return 0; }
13762 EOF
13763 if { (eval echo configure:13764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13764   rm -rf conftest*
13765   ol_cv_pthread_lc_r=yes
13766 else
13767   echo "configure: failed program was:" >&5
13768   cat conftest.$ac_ext >&5
13769   rm -rf conftest*
13770   ol_cv_pthread_lc_r=no
13771 fi
13772 rm -f conftest*
13773 else
13774   cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* pthread test headers */
13778 #include <pthread.h>
13779 #if HAVE_PTHREADS < 7
13780 #include <errno.h>
13781 #endif
13782 #ifndef NULL
13783 #define NULL (void*)0
13784 #endif
13785
13786 static void *task(p)
13787         void *p;
13788 {
13789         return (void *) (p == NULL);
13790 }
13791
13792
13793 int main(argc, argv)
13794         int argc;
13795         char **argv;
13796 {
13797
13798         /* pthread test function */
13799 #ifndef PTHREAD_CREATE_DETACHED
13800 #define PTHREAD_CREATE_DETACHED 1
13801 #endif
13802         pthread_t t;
13803         int status;
13804         int detach = PTHREAD_CREATE_DETACHED;
13805
13806 #if HAVE_PTHREADS > 4
13807         /* Final pthreads */
13808         pthread_attr_t attr;
13809
13810         status = pthread_attr_init(&attr);
13811         if( status ) return status;
13812
13813 #if HAVE_PTHREADS < 7
13814         status = pthread_attr_setdetachstate(&attr, &detach);
13815         if( status < 0 ) status = errno;
13816 #else
13817         status = pthread_attr_setdetachstate(&attr, detach);
13818 #endif
13819         if( status ) return status;
13820         status = pthread_create( &t, &attr, task, NULL );
13821 #if HAVE_PTHREADS < 7
13822         if( status < 0 ) status = errno;
13823 #endif
13824         if( status ) return status;
13825 #else
13826         /* Draft 4 pthreads */
13827         status = pthread_create( &t, pthread_attr_default, task, NULL );
13828         if( status ) return errno;
13829
13830         /* give thread a chance to complete */
13831         /* it should remain joinable and hence detachable */
13832         sleep( 1 );
13833
13834         status = pthread_detach( &t );
13835         if( status ) return errno;
13836 #endif
13837
13838 #ifdef HAVE_LINUX_THREADS
13839         pthread_kill_other_threads_np();
13840 #endif
13841
13842         return 0;
13843
13844 }
13845
13846 EOF
13847 if { (eval echo configure:13848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13848 then
13849   ol_cv_pthread_lc_r=yes
13850 else
13851   echo "configure: failed program was:" >&5
13852   cat conftest.$ac_ext >&5
13853   rm -fr conftest*
13854   ol_cv_pthread_lc_r=no
13855 fi
13856 rm -fr conftest*
13857 fi
13858
13859
13860                 # restore the LIBS
13861                 LIBS="$ol_LIBS"
13862         
13863 fi
13864
13865 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13866
13867         if test $ol_cv_pthread_lc_r = yes ; then
13868                 ol_link_pthreads="-lc_r"
13869                 ol_link_threads=posix
13870         fi
13871 fi
13872
13873
13874                 # Pthread try link: -threads (ol_cv_pthread_threads)
13875 if test "$ol_link_threads" = no ; then
13876         # try -threads
13877         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13878 echo "configure:13879: checking for pthread link with -threads" >&5
13879 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13880   echo $ac_n "(cached) $ac_c" 1>&6
13881 else
13882   
13883                 # save the flags
13884                 ol_LIBS="$LIBS"
13885                 LIBS="-threads $LIBS"
13886
13887                 if test "$cross_compiling" = yes; then
13888   cat > conftest.$ac_ext <<EOF
13889 #line 13890 "configure"
13890 #include "confdefs.h"
13891 /* pthread test headers */
13892 #include <pthread.h>
13893 #if HAVE_PTHREADS < 7
13894 #include <errno.h>
13895 #endif
13896 #ifndef NULL
13897 #define NULL (void*)0
13898 #endif
13899
13900 static void *task(p)
13901         void *p;
13902 {
13903         return (void *) (p == NULL);
13904 }
13905
13906 int main() {
13907
13908         /* pthread test function */
13909 #ifndef PTHREAD_CREATE_DETACHED
13910 #define PTHREAD_CREATE_DETACHED 1
13911 #endif
13912         pthread_t t;
13913         int status;
13914         int detach = PTHREAD_CREATE_DETACHED;
13915
13916 #if HAVE_PTHREADS > 4
13917         /* Final pthreads */
13918         pthread_attr_t attr;
13919
13920         status = pthread_attr_init(&attr);
13921         if( status ) return status;
13922
13923 #if HAVE_PTHREADS < 7
13924         status = pthread_attr_setdetachstate(&attr, &detach);
13925         if( status < 0 ) status = errno;
13926 #else
13927         status = pthread_attr_setdetachstate(&attr, detach);
13928 #endif
13929         if( status ) return status;
13930         status = pthread_create( &t, &attr, task, NULL );
13931 #if HAVE_PTHREADS < 7
13932         if( status < 0 ) status = errno;
13933 #endif
13934         if( status ) return status;
13935 #else
13936         /* Draft 4 pthreads */
13937         status = pthread_create( &t, pthread_attr_default, task, NULL );
13938         if( status ) return errno;
13939
13940         /* give thread a chance to complete */
13941         /* it should remain joinable and hence detachable */
13942         sleep( 1 );
13943
13944         status = pthread_detach( &t );
13945         if( status ) return errno;
13946 #endif
13947
13948 #ifdef HAVE_LINUX_THREADS
13949         pthread_kill_other_threads_np();
13950 #endif
13951
13952         return 0;
13953
13954 ; return 0; }
13955 EOF
13956 if { (eval echo configure:13957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13957   rm -rf conftest*
13958   ol_cv_pthread_threads=yes
13959 else
13960   echo "configure: failed program was:" >&5
13961   cat conftest.$ac_ext >&5
13962   rm -rf conftest*
13963   ol_cv_pthread_threads=no
13964 fi
13965 rm -f conftest*
13966 else
13967   cat > conftest.$ac_ext <<EOF
13968 #line 13969 "configure"
13969 #include "confdefs.h"
13970 /* pthread test headers */
13971 #include <pthread.h>
13972 #if HAVE_PTHREADS < 7
13973 #include <errno.h>
13974 #endif
13975 #ifndef NULL
13976 #define NULL (void*)0
13977 #endif
13978
13979 static void *task(p)
13980         void *p;
13981 {
13982         return (void *) (p == NULL);
13983 }
13984
13985
13986 int main(argc, argv)
13987         int argc;
13988         char **argv;
13989 {
13990
13991         /* pthread test function */
13992 #ifndef PTHREAD_CREATE_DETACHED
13993 #define PTHREAD_CREATE_DETACHED 1
13994 #endif
13995         pthread_t t;
13996         int status;
13997         int detach = PTHREAD_CREATE_DETACHED;
13998
13999 #if HAVE_PTHREADS > 4
14000         /* Final pthreads */
14001         pthread_attr_t attr;
14002
14003         status = pthread_attr_init(&attr);
14004         if( status ) return status;
14005
14006 #if HAVE_PTHREADS < 7
14007         status = pthread_attr_setdetachstate(&attr, &detach);
14008         if( status < 0 ) status = errno;
14009 #else
14010         status = pthread_attr_setdetachstate(&attr, detach);
14011 #endif
14012         if( status ) return status;
14013         status = pthread_create( &t, &attr, task, NULL );
14014 #if HAVE_PTHREADS < 7
14015         if( status < 0 ) status = errno;
14016 #endif
14017         if( status ) return status;
14018 #else
14019         /* Draft 4 pthreads */
14020         status = pthread_create( &t, pthread_attr_default, task, NULL );
14021         if( status ) return errno;
14022
14023         /* give thread a chance to complete */
14024         /* it should remain joinable and hence detachable */
14025         sleep( 1 );
14026
14027         status = pthread_detach( &t );
14028         if( status ) return errno;
14029 #endif
14030
14031 #ifdef HAVE_LINUX_THREADS
14032         pthread_kill_other_threads_np();
14033 #endif
14034
14035         return 0;
14036
14037 }
14038
14039 EOF
14040 if { (eval echo configure:14041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14041 then
14042   ol_cv_pthread_threads=yes
14043 else
14044   echo "configure: failed program was:" >&5
14045   cat conftest.$ac_ext >&5
14046   rm -fr conftest*
14047   ol_cv_pthread_threads=no
14048 fi
14049 rm -fr conftest*
14050 fi
14051
14052
14053                 # restore the LIBS
14054                 LIBS="$ol_LIBS"
14055         
14056 fi
14057
14058 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14059
14060         if test $ol_cv_pthread_threads = yes ; then
14061                 ol_link_pthreads="-threads"
14062                 ol_link_threads=posix
14063         fi
14064 fi
14065
14066
14067                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14068 if test "$ol_link_threads" = no ; then
14069         # try -lpthreads -lmach -lexc -lc_r
14070         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14071 echo "configure:14072: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14072 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14073   echo $ac_n "(cached) $ac_c" 1>&6
14074 else
14075   
14076                 # save the flags
14077                 ol_LIBS="$LIBS"
14078                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14079
14080                 if test "$cross_compiling" = yes; then
14081   cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 /* pthread test headers */
14085 #include <pthread.h>
14086 #if HAVE_PTHREADS < 7
14087 #include <errno.h>
14088 #endif
14089 #ifndef NULL
14090 #define NULL (void*)0
14091 #endif
14092
14093 static void *task(p)
14094         void *p;
14095 {
14096         return (void *) (p == NULL);
14097 }
14098
14099 int main() {
14100
14101         /* pthread test function */
14102 #ifndef PTHREAD_CREATE_DETACHED
14103 #define PTHREAD_CREATE_DETACHED 1
14104 #endif
14105         pthread_t t;
14106         int status;
14107         int detach = PTHREAD_CREATE_DETACHED;
14108
14109 #if HAVE_PTHREADS > 4
14110         /* Final pthreads */
14111         pthread_attr_t attr;
14112
14113         status = pthread_attr_init(&attr);
14114         if( status ) return status;
14115
14116 #if HAVE_PTHREADS < 7
14117         status = pthread_attr_setdetachstate(&attr, &detach);
14118         if( status < 0 ) status = errno;
14119 #else
14120         status = pthread_attr_setdetachstate(&attr, detach);
14121 #endif
14122         if( status ) return status;
14123         status = pthread_create( &t, &attr, task, NULL );
14124 #if HAVE_PTHREADS < 7
14125         if( status < 0 ) status = errno;
14126 #endif
14127         if( status ) return status;
14128 #else
14129         /* Draft 4 pthreads */
14130         status = pthread_create( &t, pthread_attr_default, task, NULL );
14131         if( status ) return errno;
14132
14133         /* give thread a chance to complete */
14134         /* it should remain joinable and hence detachable */
14135         sleep( 1 );
14136
14137         status = pthread_detach( &t );
14138         if( status ) return errno;
14139 #endif
14140
14141 #ifdef HAVE_LINUX_THREADS
14142         pthread_kill_other_threads_np();
14143 #endif
14144
14145         return 0;
14146
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14150   rm -rf conftest*
14151   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14157 fi
14158 rm -f conftest*
14159 else
14160   cat > conftest.$ac_ext <<EOF
14161 #line 14162 "configure"
14162 #include "confdefs.h"
14163 /* pthread test headers */
14164 #include <pthread.h>
14165 #if HAVE_PTHREADS < 7
14166 #include <errno.h>
14167 #endif
14168 #ifndef NULL
14169 #define NULL (void*)0
14170 #endif
14171
14172 static void *task(p)
14173         void *p;
14174 {
14175         return (void *) (p == NULL);
14176 }
14177
14178
14179 int main(argc, argv)
14180         int argc;
14181         char **argv;
14182 {
14183
14184         /* pthread test function */
14185 #ifndef PTHREAD_CREATE_DETACHED
14186 #define PTHREAD_CREATE_DETACHED 1
14187 #endif
14188         pthread_t t;
14189         int status;
14190         int detach = PTHREAD_CREATE_DETACHED;
14191
14192 #if HAVE_PTHREADS > 4
14193         /* Final pthreads */
14194         pthread_attr_t attr;
14195
14196         status = pthread_attr_init(&attr);
14197         if( status ) return status;
14198
14199 #if HAVE_PTHREADS < 7
14200         status = pthread_attr_setdetachstate(&attr, &detach);
14201         if( status < 0 ) status = errno;
14202 #else
14203         status = pthread_attr_setdetachstate(&attr, detach);
14204 #endif
14205         if( status ) return status;
14206         status = pthread_create( &t, &attr, task, NULL );
14207 #if HAVE_PTHREADS < 7
14208         if( status < 0 ) status = errno;
14209 #endif
14210         if( status ) return status;
14211 #else
14212         /* Draft 4 pthreads */
14213         status = pthread_create( &t, pthread_attr_default, task, NULL );
14214         if( status ) return errno;
14215
14216         /* give thread a chance to complete */
14217         /* it should remain joinable and hence detachable */
14218         sleep( 1 );
14219
14220         status = pthread_detach( &t );
14221         if( status ) return errno;
14222 #endif
14223
14224 #ifdef HAVE_LINUX_THREADS
14225         pthread_kill_other_threads_np();
14226 #endif
14227
14228         return 0;
14229
14230 }
14231
14232 EOF
14233 if { (eval echo configure:14234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14234 then
14235   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14236 else
14237   echo "configure: failed program was:" >&5
14238   cat conftest.$ac_ext >&5
14239   rm -fr conftest*
14240   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14241 fi
14242 rm -fr conftest*
14243 fi
14244
14245
14246                 # restore the LIBS
14247                 LIBS="$ol_LIBS"
14248         
14249 fi
14250
14251 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14252
14253         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14254                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14255                 ol_link_threads=posix
14256         fi
14257 fi
14258
14259                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14260 if test "$ol_link_threads" = no ; then
14261         # try -lpthreads -lmach -lexc
14262         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14263 echo "configure:14264: checking for pthread link with -lpthreads -lmach -lexc" >&5
14264 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14265   echo $ac_n "(cached) $ac_c" 1>&6
14266 else
14267   
14268                 # save the flags
14269                 ol_LIBS="$LIBS"
14270                 LIBS="-lpthreads -lmach -lexc $LIBS"
14271
14272                 if test "$cross_compiling" = yes; then
14273   cat > conftest.$ac_ext <<EOF
14274 #line 14275 "configure"
14275 #include "confdefs.h"
14276 /* pthread test headers */
14277 #include <pthread.h>
14278 #if HAVE_PTHREADS < 7
14279 #include <errno.h>
14280 #endif
14281 #ifndef NULL
14282 #define NULL (void*)0
14283 #endif
14284
14285 static void *task(p)
14286         void *p;
14287 {
14288         return (void *) (p == NULL);
14289 }
14290
14291 int main() {
14292
14293         /* pthread test function */
14294 #ifndef PTHREAD_CREATE_DETACHED
14295 #define PTHREAD_CREATE_DETACHED 1
14296 #endif
14297         pthread_t t;
14298         int status;
14299         int detach = PTHREAD_CREATE_DETACHED;
14300
14301 #if HAVE_PTHREADS > 4
14302         /* Final pthreads */
14303         pthread_attr_t attr;
14304
14305         status = pthread_attr_init(&attr);
14306         if( status ) return status;
14307
14308 #if HAVE_PTHREADS < 7
14309         status = pthread_attr_setdetachstate(&attr, &detach);
14310         if( status < 0 ) status = errno;
14311 #else
14312         status = pthread_attr_setdetachstate(&attr, detach);
14313 #endif
14314         if( status ) return status;
14315         status = pthread_create( &t, &attr, task, NULL );
14316 #if HAVE_PTHREADS < 7
14317         if( status < 0 ) status = errno;
14318 #endif
14319         if( status ) return status;
14320 #else
14321         /* Draft 4 pthreads */
14322         status = pthread_create( &t, pthread_attr_default, task, NULL );
14323         if( status ) return errno;
14324
14325         /* give thread a chance to complete */
14326         /* it should remain joinable and hence detachable */
14327         sleep( 1 );
14328
14329         status = pthread_detach( &t );
14330         if( status ) return errno;
14331 #endif
14332
14333 #ifdef HAVE_LINUX_THREADS
14334         pthread_kill_other_threads_np();
14335 #endif
14336
14337         return 0;
14338
14339 ; return 0; }
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14342   rm -rf conftest*
14343   ol_cv_pthread_lpthreads_lmach_lexc=yes
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -rf conftest*
14348   ol_cv_pthread_lpthreads_lmach_lexc=no
14349 fi
14350 rm -f conftest*
14351 else
14352   cat > conftest.$ac_ext <<EOF
14353 #line 14354 "configure"
14354 #include "confdefs.h"
14355 /* pthread test headers */
14356 #include <pthread.h>
14357 #if HAVE_PTHREADS < 7
14358 #include <errno.h>
14359 #endif
14360 #ifndef NULL
14361 #define NULL (void*)0
14362 #endif
14363
14364 static void *task(p)
14365         void *p;
14366 {
14367         return (void *) (p == NULL);
14368 }
14369
14370
14371 int main(argc, argv)
14372         int argc;
14373         char **argv;
14374 {
14375
14376         /* pthread test function */
14377 #ifndef PTHREAD_CREATE_DETACHED
14378 #define PTHREAD_CREATE_DETACHED 1
14379 #endif
14380         pthread_t t;
14381         int status;
14382         int detach = PTHREAD_CREATE_DETACHED;
14383
14384 #if HAVE_PTHREADS > 4
14385         /* Final pthreads */
14386         pthread_attr_t attr;
14387
14388         status = pthread_attr_init(&attr);
14389         if( status ) return status;
14390
14391 #if HAVE_PTHREADS < 7
14392         status = pthread_attr_setdetachstate(&attr, &detach);
14393         if( status < 0 ) status = errno;
14394 #else
14395         status = pthread_attr_setdetachstate(&attr, detach);
14396 #endif
14397         if( status ) return status;
14398         status = pthread_create( &t, &attr, task, NULL );
14399 #if HAVE_PTHREADS < 7
14400         if( status < 0 ) status = errno;
14401 #endif
14402         if( status ) return status;
14403 #else
14404         /* Draft 4 pthreads */
14405         status = pthread_create( &t, pthread_attr_default, task, NULL );
14406         if( status ) return errno;
14407
14408         /* give thread a chance to complete */
14409         /* it should remain joinable and hence detachable */
14410         sleep( 1 );
14411
14412         status = pthread_detach( &t );
14413         if( status ) return errno;
14414 #endif
14415
14416 #ifdef HAVE_LINUX_THREADS
14417         pthread_kill_other_threads_np();
14418 #endif
14419
14420         return 0;
14421
14422 }
14423
14424 EOF
14425 if { (eval echo configure:14426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14426 then
14427   ol_cv_pthread_lpthreads_lmach_lexc=yes
14428 else
14429   echo "configure: failed program was:" >&5
14430   cat conftest.$ac_ext >&5
14431   rm -fr conftest*
14432   ol_cv_pthread_lpthreads_lmach_lexc=no
14433 fi
14434 rm -fr conftest*
14435 fi
14436
14437
14438                 # restore the LIBS
14439                 LIBS="$ol_LIBS"
14440         
14441 fi
14442
14443 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14444
14445         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14446                 ol_link_pthreads="-lpthreads -lmach -lexc"
14447                 ol_link_threads=posix
14448         fi
14449 fi
14450
14451                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14452 if test "$ol_link_threads" = no ; then
14453         # try -lpthreads -lexc
14454         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14455 echo "configure:14456: checking for pthread link with -lpthreads -lexc" >&5
14456 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14457   echo $ac_n "(cached) $ac_c" 1>&6
14458 else
14459   
14460                 # save the flags
14461                 ol_LIBS="$LIBS"
14462                 LIBS="-lpthreads -lexc $LIBS"
14463
14464                 if test "$cross_compiling" = yes; then
14465   cat > conftest.$ac_ext <<EOF
14466 #line 14467 "configure"
14467 #include "confdefs.h"
14468 /* pthread test headers */
14469 #include <pthread.h>
14470 #if HAVE_PTHREADS < 7
14471 #include <errno.h>
14472 #endif
14473 #ifndef NULL
14474 #define NULL (void*)0
14475 #endif
14476
14477 static void *task(p)
14478         void *p;
14479 {
14480         return (void *) (p == NULL);
14481 }
14482
14483 int main() {
14484
14485         /* pthread test function */
14486 #ifndef PTHREAD_CREATE_DETACHED
14487 #define PTHREAD_CREATE_DETACHED 1
14488 #endif
14489         pthread_t t;
14490         int status;
14491         int detach = PTHREAD_CREATE_DETACHED;
14492
14493 #if HAVE_PTHREADS > 4
14494         /* Final pthreads */
14495         pthread_attr_t attr;
14496
14497         status = pthread_attr_init(&attr);
14498         if( status ) return status;
14499
14500 #if HAVE_PTHREADS < 7
14501         status = pthread_attr_setdetachstate(&attr, &detach);
14502         if( status < 0 ) status = errno;
14503 #else
14504         status = pthread_attr_setdetachstate(&attr, detach);
14505 #endif
14506         if( status ) return status;
14507         status = pthread_create( &t, &attr, task, NULL );
14508 #if HAVE_PTHREADS < 7
14509         if( status < 0 ) status = errno;
14510 #endif
14511         if( status ) return status;
14512 #else
14513         /* Draft 4 pthreads */
14514         status = pthread_create( &t, pthread_attr_default, task, NULL );
14515         if( status ) return errno;
14516
14517         /* give thread a chance to complete */
14518         /* it should remain joinable and hence detachable */
14519         sleep( 1 );
14520
14521         status = pthread_detach( &t );
14522         if( status ) return errno;
14523 #endif
14524
14525 #ifdef HAVE_LINUX_THREADS
14526         pthread_kill_other_threads_np();
14527 #endif
14528
14529         return 0;
14530
14531 ; return 0; }
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14534   rm -rf conftest*
14535   ol_cv_pthread_lpthreads_lexc=yes
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -rf conftest*
14540   ol_cv_pthread_lpthreads_lexc=no
14541 fi
14542 rm -f conftest*
14543 else
14544   cat > conftest.$ac_ext <<EOF
14545 #line 14546 "configure"
14546 #include "confdefs.h"
14547 /* pthread test headers */
14548 #include <pthread.h>
14549 #if HAVE_PTHREADS < 7
14550 #include <errno.h>
14551 #endif
14552 #ifndef NULL
14553 #define NULL (void*)0
14554 #endif
14555
14556 static void *task(p)
14557         void *p;
14558 {
14559         return (void *) (p == NULL);
14560 }
14561
14562
14563 int main(argc, argv)
14564         int argc;
14565         char **argv;
14566 {
14567
14568         /* pthread test function */
14569 #ifndef PTHREAD_CREATE_DETACHED
14570 #define PTHREAD_CREATE_DETACHED 1
14571 #endif
14572         pthread_t t;
14573         int status;
14574         int detach = PTHREAD_CREATE_DETACHED;
14575
14576 #if HAVE_PTHREADS > 4
14577         /* Final pthreads */
14578         pthread_attr_t attr;
14579
14580         status = pthread_attr_init(&attr);
14581         if( status ) return status;
14582
14583 #if HAVE_PTHREADS < 7
14584         status = pthread_attr_setdetachstate(&attr, &detach);
14585         if( status < 0 ) status = errno;
14586 #else
14587         status = pthread_attr_setdetachstate(&attr, detach);
14588 #endif
14589         if( status ) return status;
14590         status = pthread_create( &t, &attr, task, NULL );
14591 #if HAVE_PTHREADS < 7
14592         if( status < 0 ) status = errno;
14593 #endif
14594         if( status ) return status;
14595 #else
14596         /* Draft 4 pthreads */
14597         status = pthread_create( &t, pthread_attr_default, task, NULL );
14598         if( status ) return errno;
14599
14600         /* give thread a chance to complete */
14601         /* it should remain joinable and hence detachable */
14602         sleep( 1 );
14603
14604         status = pthread_detach( &t );
14605         if( status ) return errno;
14606 #endif
14607
14608 #ifdef HAVE_LINUX_THREADS
14609         pthread_kill_other_threads_np();
14610 #endif
14611
14612         return 0;
14613
14614 }
14615
14616 EOF
14617 if { (eval echo configure:14618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14618 then
14619   ol_cv_pthread_lpthreads_lexc=yes
14620 else
14621   echo "configure: failed program was:" >&5
14622   cat conftest.$ac_ext >&5
14623   rm -fr conftest*
14624   ol_cv_pthread_lpthreads_lexc=no
14625 fi
14626 rm -fr conftest*
14627 fi
14628
14629
14630                 # restore the LIBS
14631                 LIBS="$ol_LIBS"
14632         
14633 fi
14634
14635 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14636
14637         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14638                 ol_link_pthreads="-lpthreads -lexc"
14639                 ol_link_threads=posix
14640         fi
14641 fi
14642
14643
14644                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14645 if test "$ol_link_threads" = no ; then
14646         # try -lpthreads
14647         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14648 echo "configure:14649: checking for pthread link with -lpthreads" >&5
14649 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14650   echo $ac_n "(cached) $ac_c" 1>&6
14651 else
14652   
14653                 # save the flags
14654                 ol_LIBS="$LIBS"
14655                 LIBS="-lpthreads $LIBS"
14656
14657                 if test "$cross_compiling" = yes; then
14658   cat > conftest.$ac_ext <<EOF
14659 #line 14660 "configure"
14660 #include "confdefs.h"
14661 /* pthread test headers */
14662 #include <pthread.h>
14663 #if HAVE_PTHREADS < 7
14664 #include <errno.h>
14665 #endif
14666 #ifndef NULL
14667 #define NULL (void*)0
14668 #endif
14669
14670 static void *task(p)
14671         void *p;
14672 {
14673         return (void *) (p == NULL);
14674 }
14675
14676 int main() {
14677
14678         /* pthread test function */
14679 #ifndef PTHREAD_CREATE_DETACHED
14680 #define PTHREAD_CREATE_DETACHED 1
14681 #endif
14682         pthread_t t;
14683         int status;
14684         int detach = PTHREAD_CREATE_DETACHED;
14685
14686 #if HAVE_PTHREADS > 4
14687         /* Final pthreads */
14688         pthread_attr_t attr;
14689
14690         status = pthread_attr_init(&attr);
14691         if( status ) return status;
14692
14693 #if HAVE_PTHREADS < 7
14694         status = pthread_attr_setdetachstate(&attr, &detach);
14695         if( status < 0 ) status = errno;
14696 #else
14697         status = pthread_attr_setdetachstate(&attr, detach);
14698 #endif
14699         if( status ) return status;
14700         status = pthread_create( &t, &attr, task, NULL );
14701 #if HAVE_PTHREADS < 7
14702         if( status < 0 ) status = errno;
14703 #endif
14704         if( status ) return status;
14705 #else
14706         /* Draft 4 pthreads */
14707         status = pthread_create( &t, pthread_attr_default, task, NULL );
14708         if( status ) return errno;
14709
14710         /* give thread a chance to complete */
14711         /* it should remain joinable and hence detachable */
14712         sleep( 1 );
14713
14714         status = pthread_detach( &t );
14715         if( status ) return errno;
14716 #endif
14717
14718 #ifdef HAVE_LINUX_THREADS
14719         pthread_kill_other_threads_np();
14720 #endif
14721
14722         return 0;
14723
14724 ; return 0; }
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14727   rm -rf conftest*
14728   ol_cv_pthread_lib_lpthreads=yes
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732   rm -rf conftest*
14733   ol_cv_pthread_lib_lpthreads=no
14734 fi
14735 rm -f conftest*
14736 else
14737   cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740 /* pthread test headers */
14741 #include <pthread.h>
14742 #if HAVE_PTHREADS < 7
14743 #include <errno.h>
14744 #endif
14745 #ifndef NULL
14746 #define NULL (void*)0
14747 #endif
14748
14749 static void *task(p)
14750         void *p;
14751 {
14752         return (void *) (p == NULL);
14753 }
14754
14755
14756 int main(argc, argv)
14757         int argc;
14758         char **argv;
14759 {
14760
14761         /* pthread test function */
14762 #ifndef PTHREAD_CREATE_DETACHED
14763 #define PTHREAD_CREATE_DETACHED 1
14764 #endif
14765         pthread_t t;
14766         int status;
14767         int detach = PTHREAD_CREATE_DETACHED;
14768
14769 #if HAVE_PTHREADS > 4
14770         /* Final pthreads */
14771         pthread_attr_t attr;
14772
14773         status = pthread_attr_init(&attr);
14774         if( status ) return status;
14775
14776 #if HAVE_PTHREADS < 7
14777         status = pthread_attr_setdetachstate(&attr, &detach);
14778         if( status < 0 ) status = errno;
14779 #else
14780         status = pthread_attr_setdetachstate(&attr, detach);
14781 #endif
14782         if( status ) return status;
14783         status = pthread_create( &t, &attr, task, NULL );
14784 #if HAVE_PTHREADS < 7
14785         if( status < 0 ) status = errno;
14786 #endif
14787         if( status ) return status;
14788 #else
14789         /* Draft 4 pthreads */
14790         status = pthread_create( &t, pthread_attr_default, task, NULL );
14791         if( status ) return errno;
14792
14793         /* give thread a chance to complete */
14794         /* it should remain joinable and hence detachable */
14795         sleep( 1 );
14796
14797         status = pthread_detach( &t );
14798         if( status ) return errno;
14799 #endif
14800
14801 #ifdef HAVE_LINUX_THREADS
14802         pthread_kill_other_threads_np();
14803 #endif
14804
14805         return 0;
14806
14807 }
14808
14809 EOF
14810 if { (eval echo configure:14811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14811 then
14812   ol_cv_pthread_lib_lpthreads=yes
14813 else
14814   echo "configure: failed program was:" >&5
14815   cat conftest.$ac_ext >&5
14816   rm -fr conftest*
14817   ol_cv_pthread_lib_lpthreads=no
14818 fi
14819 rm -fr conftest*
14820 fi
14821
14822
14823                 # restore the LIBS
14824                 LIBS="$ol_LIBS"
14825         
14826 fi
14827
14828 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14829
14830         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14831                 ol_link_pthreads="-lpthreads"
14832                 ol_link_threads=posix
14833         fi
14834 fi
14835
14836
14837                 if test $ol_link_threads != no ; then
14838                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14839
14840                                                 save_CPPFLAGS="$CPPFLAGS"
14841                         save_LIBS="$LIBS"
14842                         LIBS="$LTHREAD_LIBS $LIBS"
14843
14844                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14845 do
14846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14847 echo "configure:14848: checking for $ac_func" >&5
14848 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14849   echo $ac_n "(cached) $ac_c" 1>&6
14850 else
14851   cat > conftest.$ac_ext <<EOF
14852 #line 14853 "configure"
14853 #include "confdefs.h"
14854 /* System header to define __stub macros and hopefully few prototypes,
14855     which can conflict with char $ac_func(); below.  */
14856 #include <assert.h>
14857 /* Override any gcc2 internal prototype to avoid an error.  */
14858 /* We use char because int might match the return type of a gcc2
14859     builtin and then its argument prototype would still apply.  */
14860 char $ac_func();
14861 char (*f)();
14862
14863 int main() {
14864
14865 /* The GNU C library defines this for functions which it implements
14866     to always fail with ENOSYS.  Some functions are actually named
14867     something starting with __ and the normal name is an alias.  */
14868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14869 choke me
14870 #else
14871 f = $ac_func;
14872 #endif
14873
14874 ; return 0; }
14875 EOF
14876 if { (eval echo configure:14877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14877   rm -rf conftest*
14878   eval "ac_cv_func_$ac_func=yes"
14879 else
14880   echo "configure: failed program was:" >&5
14881   cat conftest.$ac_ext >&5
14882   rm -rf conftest*
14883   eval "ac_cv_func_$ac_func=no"
14884 fi
14885 rm -f conftest*
14886 fi
14887
14888 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14889   echo "$ac_t""yes" 1>&6
14890     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14891   cat >> confdefs.h <<EOF
14892 #define $ac_tr_func 1
14893 EOF
14894  
14895 else
14896   echo "$ac_t""no" 1>&6
14897 fi
14898 done
14899
14900
14901                         if test $ac_cv_func_sched_yield = no -a \
14902                                 $ac_cv_func_pthread_yield = no -a \
14903                                 $ac_cv_func_thr_yield = no ; then
14904                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14905 echo "configure:14906: checking for sched_yield in -lrt" >&5
14906 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14908   echo $ac_n "(cached) $ac_c" 1>&6
14909 else
14910   ac_save_LIBS="$LIBS"
14911 LIBS="-lrt  $LIBS"
14912 cat > conftest.$ac_ext <<EOF
14913 #line 14914 "configure"
14914 #include "confdefs.h"
14915 /* Override any gcc2 internal prototype to avoid an error.  */
14916 /* We use char because int might match the return type of a gcc2
14917     builtin and then its argument prototype would still apply.  */
14918 char sched_yield();
14919
14920 int main() {
14921 sched_yield()
14922 ; return 0; }
14923 EOF
14924 if { (eval echo configure:14925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14925   rm -rf conftest*
14926   eval "ac_cv_lib_$ac_lib_var=yes"
14927 else
14928   echo "configure: failed program was:" >&5
14929   cat conftest.$ac_ext >&5
14930   rm -rf conftest*
14931   eval "ac_cv_lib_$ac_lib_var=no"
14932 fi
14933 rm -f conftest*
14934 LIBS="$ac_save_LIBS"
14935
14936 fi
14937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14938   echo "$ac_t""yes" 1>&6
14939   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14940                                         cat >> confdefs.h <<\EOF
14941 #define HAVE_SCHED_YIELD 1
14942 EOF
14943
14944                                         ac_cv_func_sched_yield=yes
14945 else
14946   echo "$ac_t""no" 1>&6
14947 ac_cv_func_sched_yield=no
14948 fi
14949
14950                         fi
14951                         if test $ac_cv_func_sched_yield = no -a \
14952                                 $ac_cv_func_pthread_yield = no -a \
14953                                 "$ac_cv_func_thr_yield" = no ; then
14954                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14955                         fi
14956
14957                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14958 do
14959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14960 echo "configure:14961: checking for $ac_func" >&5
14961 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14962   echo $ac_n "(cached) $ac_c" 1>&6
14963 else
14964   cat > conftest.$ac_ext <<EOF
14965 #line 14966 "configure"
14966 #include "confdefs.h"
14967 /* System header to define __stub macros and hopefully few prototypes,
14968     which can conflict with char $ac_func(); below.  */
14969 #include <assert.h>
14970 /* Override any gcc2 internal prototype to avoid an error.  */
14971 /* We use char because int might match the return type of a gcc2
14972     builtin and then its argument prototype would still apply.  */
14973 char $ac_func();
14974 char (*f)();
14975
14976 int main() {
14977
14978 /* The GNU C library defines this for functions which it implements
14979     to always fail with ENOSYS.  Some functions are actually named
14980     something starting with __ and the normal name is an alias.  */
14981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14982 choke me
14983 #else
14984 f = $ac_func;
14985 #endif
14986
14987 ; return 0; }
14988 EOF
14989 if { (eval echo configure:14990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14990   rm -rf conftest*
14991   eval "ac_cv_func_$ac_func=yes"
14992 else
14993   echo "configure: failed program was:" >&5
14994   cat conftest.$ac_ext >&5
14995   rm -rf conftest*
14996   eval "ac_cv_func_$ac_func=no"
14997 fi
14998 rm -f conftest*
14999 fi
15000
15001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15002   echo "$ac_t""yes" 1>&6
15003     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15004   cat >> confdefs.h <<EOF
15005 #define $ac_tr_func 1
15006 EOF
15007  
15008 else
15009   echo "$ac_t""no" 1>&6
15010 fi
15011 done
15012
15013
15014                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15015 echo "configure:15016: checking for pthread_detach with <pthread.h>" >&5
15016 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15017   echo $ac_n "(cached) $ac_c" 1>&6
15018 else
15019   
15020                                                                 cat > conftest.$ac_ext <<EOF
15021 #line 15022 "configure"
15022 #include "confdefs.h"
15023
15024 #include <pthread.h>
15025 #ifndef NULL
15026 #define NULL (void*)0
15027 #endif
15028
15029 int main() {
15030 pthread_detach(NULL);
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15034   rm -rf conftest*
15035   ol_cv_func_pthread_detach=yes
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   ol_cv_func_pthread_detach=no
15041 fi
15042 rm -f conftest*
15043                         
15044 fi
15045
15046 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15047
15048                         if test $ol_cv_func_pthread_detach = no ; then
15049                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15050                         fi
15051
15052                         cat >> confdefs.h <<\EOF
15053 #define HAVE_PTHREAD_DETACH 1
15054 EOF
15055
15056
15057                                                 for ac_func in \
15058                                 pthread_setconcurrency \
15059                                 pthread_getconcurrency \
15060                                 thr_setconcurrency \
15061                                 thr_getconcurrency \
15062                         
15063 do
15064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15065 echo "configure:15066: checking for $ac_func" >&5
15066 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15067   echo $ac_n "(cached) $ac_c" 1>&6
15068 else
15069   cat > conftest.$ac_ext <<EOF
15070 #line 15071 "configure"
15071 #include "confdefs.h"
15072 /* System header to define __stub macros and hopefully few prototypes,
15073     which can conflict with char $ac_func(); below.  */
15074 #include <assert.h>
15075 /* Override any gcc2 internal prototype to avoid an error.  */
15076 /* We use char because int might match the return type of a gcc2
15077     builtin and then its argument prototype would still apply.  */
15078 char $ac_func();
15079 char (*f)();
15080
15081 int main() {
15082
15083 /* The GNU C library defines this for functions which it implements
15084     to always fail with ENOSYS.  Some functions are actually named
15085     something starting with __ and the normal name is an alias.  */
15086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15087 choke me
15088 #else
15089 f = $ac_func;
15090 #endif
15091
15092 ; return 0; }
15093 EOF
15094 if { (eval echo configure:15095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15095   rm -rf conftest*
15096   eval "ac_cv_func_$ac_func=yes"
15097 else
15098   echo "configure: failed program was:" >&5
15099   cat conftest.$ac_ext >&5
15100   rm -rf conftest*
15101   eval "ac_cv_func_$ac_func=no"
15102 fi
15103 rm -f conftest*
15104 fi
15105
15106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15107   echo "$ac_t""yes" 1>&6
15108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15109   cat >> confdefs.h <<EOF
15110 #define $ac_tr_func 1
15111 EOF
15112  
15113 else
15114   echo "$ac_t""no" 1>&6
15115 fi
15116 done
15117
15118
15119                         
15120         for ac_func in pthread_kill_other_threads_np
15121 do
15122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15123 echo "configure:15124: checking for $ac_func" >&5
15124 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15125   echo $ac_n "(cached) $ac_c" 1>&6
15126 else
15127   cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 /* System header to define __stub macros and hopefully few prototypes,
15131     which can conflict with char $ac_func(); below.  */
15132 #include <assert.h>
15133 /* Override any gcc2 internal prototype to avoid an error.  */
15134 /* We use char because int might match the return type of a gcc2
15135     builtin and then its argument prototype would still apply.  */
15136 char $ac_func();
15137 char (*f)();
15138
15139 int main() {
15140
15141 /* The GNU C library defines this for functions which it implements
15142     to always fail with ENOSYS.  Some functions are actually named
15143     something starting with __ and the normal name is an alias.  */
15144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15145 choke me
15146 #else
15147 f = $ac_func;
15148 #endif
15149
15150 ; return 0; }
15151 EOF
15152 if { (eval echo configure:15153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15153   rm -rf conftest*
15154   eval "ac_cv_func_$ac_func=yes"
15155 else
15156   echo "configure: failed program was:" >&5
15157   cat conftest.$ac_ext >&5
15158   rm -rf conftest*
15159   eval "ac_cv_func_$ac_func=no"
15160 fi
15161 rm -f conftest*
15162 fi
15163
15164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15165   echo "$ac_t""yes" 1>&6
15166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15167   cat >> confdefs.h <<EOF
15168 #define $ac_tr_func 1
15169 EOF
15170  
15171 else
15172   echo "$ac_t""no" 1>&6
15173 fi
15174 done
15175
15176         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15177 echo "configure:15178: checking for LinuxThreads implementation" >&5
15178 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15179   echo $ac_n "(cached) $ac_c" 1>&6
15180 else
15181   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15182 fi
15183
15184 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15185
15186                         
15187         
15188         
15189         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15190 echo "configure:15191: checking for LinuxThreads consistency" >&5
15191 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15192   echo $ac_n "(cached) $ac_c" 1>&6
15193 else
15194   
15195                 if test $ol_cv_header_linux_threads = yes -a \
15196                         $ol_cv_sys_linux_threads = yes; then
15197                         ol_cv_linux_threads=yes
15198                 elif test $ol_cv_header_linux_threads = no -a \
15199                         $ol_cv_sys_linux_threads = no; then
15200                         ol_cv_linux_threads=no
15201                 else
15202                         ol_cv_linux_threads=error
15203                 fi
15204         
15205 fi
15206
15207 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15208
15209
15210                         if test $ol_cv_linux_threads = error; then
15211                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15212                         fi
15213
15214                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15215 echo "configure:15216: checking if pthread_create() works" >&5
15216 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15217   echo $ac_n "(cached) $ac_c" 1>&6
15218 else
15219   
15220                         if test "$cross_compiling" = yes; then
15221                                 ol_cv_pthread_create_works=yes
15222 else
15223   cat > conftest.$ac_ext <<EOF
15224 #line 15225 "configure"
15225 #include "confdefs.h"
15226 /* pthread test headers */
15227 #include <pthread.h>
15228 #if HAVE_PTHREADS < 7
15229 #include <errno.h>
15230 #endif
15231 #ifndef NULL
15232 #define NULL (void*)0
15233 #endif
15234
15235 static void *task(p)
15236         void *p;
15237 {
15238         return (void *) (p == NULL);
15239 }
15240
15241
15242 int main(argc, argv)
15243         int argc;
15244         char **argv;
15245 {
15246
15247         /* pthread test function */
15248 #ifndef PTHREAD_CREATE_DETACHED
15249 #define PTHREAD_CREATE_DETACHED 1
15250 #endif
15251         pthread_t t;
15252         int status;
15253         int detach = PTHREAD_CREATE_DETACHED;
15254
15255 #if HAVE_PTHREADS > 4
15256         /* Final pthreads */
15257         pthread_attr_t attr;
15258
15259         status = pthread_attr_init(&attr);
15260         if( status ) return status;
15261
15262 #if HAVE_PTHREADS < 7
15263         status = pthread_attr_setdetachstate(&attr, &detach);
15264         if( status < 0 ) status = errno;
15265 #else
15266         status = pthread_attr_setdetachstate(&attr, detach);
15267 #endif
15268         if( status ) return status;
15269         status = pthread_create( &t, &attr, task, NULL );
15270 #if HAVE_PTHREADS < 7
15271         if( status < 0 ) status = errno;
15272 #endif
15273         if( status ) return status;
15274 #else
15275         /* Draft 4 pthreads */
15276         status = pthread_create( &t, pthread_attr_default, task, NULL );
15277         if( status ) return errno;
15278
15279         /* give thread a chance to complete */
15280         /* it should remain joinable and hence detachable */
15281         sleep( 1 );
15282
15283         status = pthread_detach( &t );
15284         if( status ) return errno;
15285 #endif
15286
15287 #ifdef HAVE_LINUX_THREADS
15288         pthread_kill_other_threads_np();
15289 #endif
15290
15291         return 0;
15292
15293 }
15294
15295 EOF
15296 if { (eval echo configure:15297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15297 then
15298   ol_cv_pthread_create_works=yes
15299 else
15300   echo "configure: failed program was:" >&5
15301   cat conftest.$ac_ext >&5
15302   rm -fr conftest*
15303   ol_cv_pthread_create_works=no
15304 fi
15305 rm -fr conftest*
15306 fi
15307
15308 fi
15309
15310 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15311
15312                         if test $ol_cv_pthread_create_works = no ; then
15313                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15314                         fi
15315
15316                                                 if test $ol_with_yielding_select = auto ; then
15317                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15318 echo "configure:15319: checking if select yields when using pthreads" >&5
15319 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15320   echo $ac_n "(cached) $ac_c" 1>&6
15321 else
15322   
15323                                 if test "$cross_compiling" = yes; then
15324   ol_cv_pthread_select_yields=cross
15325 else
15326   cat > conftest.$ac_ext <<EOF
15327 #line 15328 "configure"
15328 #include "confdefs.h"
15329
15330 #include <sys/types.h>
15331 #include <sys/time.h>
15332 #include <unistd.h>
15333 #include <pthread.h>
15334 #ifndef NULL
15335 #define NULL (void*) 0
15336 #endif
15337
15338 static int fildes[2];
15339
15340 static void *task(p)
15341         void *p;
15342 {
15343         int i;
15344         struct timeval tv;
15345
15346         fd_set rfds;
15347
15348         tv.tv_sec=10;
15349         tv.tv_usec=0;
15350
15351         FD_ZERO(&rfds);
15352         FD_SET(fildes[0], &rfds);
15353
15354         /* we're not interested in any fds */
15355         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15356
15357         if(i < 0) {
15358                 perror("select");
15359                 exit(10);
15360         }
15361
15362         exit(0); /* if we exit here, the select blocked the whole process */
15363 }
15364
15365 int main(argc, argv)
15366         int argc;
15367         char **argv;
15368 {
15369         pthread_t t;
15370
15371         /* create a pipe to select */
15372         if(pipe(&fildes[0])) {
15373                 perror("select");
15374                 exit(1);
15375         }
15376
15377 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15378         (void) pthread_setconcurrency(2);
15379 #else
15380 #ifdef HAVE_THR_SETCONCURRENCY
15381         /* Set Solaris LWP concurrency to 2 */
15382         thr_setconcurrency(2);
15383 #endif
15384 #endif
15385
15386 #if HAVE_PTHREADS < 6
15387         pthread_create(&t, pthread_attr_default, task, NULL);
15388 #else
15389         pthread_create(&t, NULL, task, NULL);
15390 #endif
15391
15392         /* make sure task runs first */
15393 #if HAVE_THR_YIELD
15394         thr_yield();
15395 #elif defined( HAVE_SCHED_YIELD )
15396         sched_yield();
15397 #elif defined( HAVE_PTHREAD_YIELD )
15398         pthread_yield();
15399 #endif
15400
15401         exit(2);
15402 }
15403 EOF
15404 if { (eval echo configure:15405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15405 then
15406   ol_cv_pthread_select_yields=no
15407 else
15408   echo "configure: failed program was:" >&5
15409   cat conftest.$ac_ext >&5
15410   rm -fr conftest*
15411   ol_cv_pthread_select_yields=yes
15412 fi
15413 rm -fr conftest*
15414 fi
15415
15416 fi
15417
15418 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15419
15420                                 if test $ol_cv_pthread_select_yields = cross ; then
15421                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15422                                 fi
15423
15424                                 if test $ol_cv_pthread_select_yields = yes ; then
15425                                         ol_with_yielding_select=yes
15426                                 fi
15427                         fi
15428
15429                                                 CPPFLAGS="$save_CPPFLAGS"
15430                         LIBS="$save_LIBS"
15431                 else
15432                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15433                 fi
15434         fi
15435
15436         if test $ol_with_threads = posix ; then
15437                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15438         fi
15439 fi
15440
15441 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15442         -o $ol_with_threads = mach ; then
15443
15444                 for ac_hdr in mach/cthreads.h cthreads.h
15445 do
15446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15448 echo "configure:15449: checking for $ac_hdr" >&5
15449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15450   echo $ac_n "(cached) $ac_c" 1>&6
15451 else
15452   cat > conftest.$ac_ext <<EOF
15453 #line 15454 "configure"
15454 #include "confdefs.h"
15455 #include <$ac_hdr>
15456 EOF
15457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15458 { (eval echo configure:15459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15460 if test -z "$ac_err"; then
15461   rm -rf conftest*
15462   eval "ac_cv_header_$ac_safe=yes"
15463 else
15464   echo "$ac_err" >&5
15465   echo "configure: failed program was:" >&5
15466   cat conftest.$ac_ext >&5
15467   rm -rf conftest*
15468   eval "ac_cv_header_$ac_safe=no"
15469 fi
15470 rm -f conftest*
15471 fi
15472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15473   echo "$ac_t""yes" 1>&6
15474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15475   cat >> confdefs.h <<EOF
15476 #define $ac_tr_hdr 1
15477 EOF
15478  
15479 else
15480   echo "$ac_t""no" 1>&6
15481 fi
15482 done
15483
15484         if test $ac_cv_header_mach_cthreads_h = yes ; then
15485                 ol_with_threads=found
15486
15487                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15488 echo "configure:15489: checking for cthread_fork" >&5
15489 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15490   echo $ac_n "(cached) $ac_c" 1>&6
15491 else
15492   cat > conftest.$ac_ext <<EOF
15493 #line 15494 "configure"
15494 #include "confdefs.h"
15495 /* System header to define __stub macros and hopefully few prototypes,
15496     which can conflict with char cthread_fork(); below.  */
15497 #include <assert.h>
15498 /* Override any gcc2 internal prototype to avoid an error.  */
15499 /* We use char because int might match the return type of a gcc2
15500     builtin and then its argument prototype would still apply.  */
15501 char cthread_fork();
15502 char (*f)();
15503
15504 int main() {
15505
15506 /* The GNU C library defines this for functions which it implements
15507     to always fail with ENOSYS.  Some functions are actually named
15508     something starting with __ and the normal name is an alias.  */
15509 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15510 choke me
15511 #else
15512 f = cthread_fork;
15513 #endif
15514
15515 ; return 0; }
15516 EOF
15517 if { (eval echo configure:15518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15518   rm -rf conftest*
15519   eval "ac_cv_func_cthread_fork=yes"
15520 else
15521   echo "configure: failed program was:" >&5
15522   cat conftest.$ac_ext >&5
15523   rm -rf conftest*
15524   eval "ac_cv_func_cthread_fork=no"
15525 fi
15526 rm -f conftest*
15527 fi
15528
15529 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15530   echo "$ac_t""yes" 1>&6
15531   ol_link_threads=yes
15532 else
15533   echo "$ac_t""no" 1>&6
15534 fi
15535
15536
15537                 if test $ol_link_threads = no ; then
15538                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15539 echo "configure:15540: checking for cthread_fork with -all_load" >&5
15540 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15541   echo $ac_n "(cached) $ac_c" 1>&6
15542 else
15543   
15544                                                                 save_LIBS="$LIBS"
15545                                 LIBS="-all_load $LIBS"
15546                                 cat > conftest.$ac_ext <<EOF
15547 #line 15548 "configure"
15548 #include "confdefs.h"
15549 #include <mach/cthreads.h>
15550 int main() {
15551
15552                                         cthread_fork((void *)0, (void *)0);
15553                                         
15554 ; return 0; }
15555 EOF
15556 if { (eval echo configure:15557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15557   rm -rf conftest*
15558   ol_cv_cthread_all_load=yes
15559 else
15560   echo "configure: failed program was:" >&5
15561   cat conftest.$ac_ext >&5
15562   rm -rf conftest*
15563   ol_cv_cthread_all_load=no
15564 fi
15565 rm -f conftest*
15566                                                                 LIBS="$save_LIBS"
15567                         
15568 fi
15569
15570 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15571
15572                         if test $ol_cv_cthread_all_load = yes ; then
15573                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15574                                 ol_link_threads=mach
15575                                 ol_with_threads=found
15576                         fi
15577                 fi
15578
15579         elif test $ac_cv_header_cthreads_h = yes ; then
15580                                 
15581                 ol_with_threads=found
15582  
15583                                 save_LIBS="$LIBS"
15584                 LIBS="$LIBS -lthreads"
15585                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15586 echo "configure:15587: checking for cthread_fork" >&5
15587 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15588   echo $ac_n "(cached) $ac_c" 1>&6
15589 else
15590   cat > conftest.$ac_ext <<EOF
15591 #line 15592 "configure"
15592 #include "confdefs.h"
15593 /* System header to define __stub macros and hopefully few prototypes,
15594     which can conflict with char cthread_fork(); below.  */
15595 #include <assert.h>
15596 /* Override any gcc2 internal prototype to avoid an error.  */
15597 /* We use char because int might match the return type of a gcc2
15598     builtin and then its argument prototype would still apply.  */
15599 char cthread_fork();
15600 char (*f)();
15601
15602 int main() {
15603
15604 /* The GNU C library defines this for functions which it implements
15605     to always fail with ENOSYS.  Some functions are actually named
15606     something starting with __ and the normal name is an alias.  */
15607 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15608 choke me
15609 #else
15610 f = cthread_fork;
15611 #endif
15612
15613 ; return 0; }
15614 EOF
15615 if { (eval echo configure:15616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15616   rm -rf conftest*
15617   eval "ac_cv_func_cthread_fork=yes"
15618 else
15619   echo "configure: failed program was:" >&5
15620   cat conftest.$ac_ext >&5
15621   rm -rf conftest*
15622   eval "ac_cv_func_cthread_fork=no"
15623 fi
15624 rm -f conftest*
15625 fi
15626
15627 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15628   echo "$ac_t""yes" 1>&6
15629   ol_link_threads=yes
15630 else
15631   echo "$ac_t""no" 1>&6
15632 fi
15633
15634                 LIBS="$save_LIBS"
15635
15636                 if test $ol_link_threads = yes ; then
15637                         LTHREAD_LIBS="-lthreads"
15638                         ol_link_threads=mach
15639                         ol_with_threads=found
15640                 else
15641                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15642                 fi
15643
15644         elif test $ol_with_threads = mach ; then
15645                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15646         fi
15647
15648         if test $ol_link_threads = mach ; then
15649                 cat >> confdefs.h <<\EOF
15650 #define HAVE_MACH_CTHREADS 1
15651 EOF
15652
15653         elif test $ol_with_threads = found ; then
15654                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15655         fi
15656 fi
15657
15658 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15659         -o $ol_with_threads = pth ; then
15660
15661         for ac_hdr in pth.h
15662 do
15663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15665 echo "configure:15666: checking for $ac_hdr" >&5
15666 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15667   echo $ac_n "(cached) $ac_c" 1>&6
15668 else
15669   cat > conftest.$ac_ext <<EOF
15670 #line 15671 "configure"
15671 #include "confdefs.h"
15672 #include <$ac_hdr>
15673 EOF
15674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15675 { (eval echo configure:15676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15677 if test -z "$ac_err"; then
15678   rm -rf conftest*
15679   eval "ac_cv_header_$ac_safe=yes"
15680 else
15681   echo "$ac_err" >&5
15682   echo "configure: failed program was:" >&5
15683   cat conftest.$ac_ext >&5
15684   rm -rf conftest*
15685   eval "ac_cv_header_$ac_safe=no"
15686 fi
15687 rm -f conftest*
15688 fi
15689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15690   echo "$ac_t""yes" 1>&6
15691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15692   cat >> confdefs.h <<EOF
15693 #define $ac_tr_hdr 1
15694 EOF
15695  
15696 else
15697   echo "$ac_t""no" 1>&6
15698 fi
15699 done
15700
15701
15702         if test $ac_cv_header_pth_h = yes ; then
15703                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15704 echo "configure:15705: checking for pth_version in -lpth" >&5
15705 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15707   echo $ac_n "(cached) $ac_c" 1>&6
15708 else
15709   ac_save_LIBS="$LIBS"
15710 LIBS="-lpth  $LIBS"
15711 cat > conftest.$ac_ext <<EOF
15712 #line 15713 "configure"
15713 #include "confdefs.h"
15714 /* Override any gcc2 internal prototype to avoid an error.  */
15715 /* We use char because int might match the return type of a gcc2
15716     builtin and then its argument prototype would still apply.  */
15717 char pth_version();
15718
15719 int main() {
15720 pth_version()
15721 ; return 0; }
15722 EOF
15723 if { (eval echo configure:15724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15724   rm -rf conftest*
15725   eval "ac_cv_lib_$ac_lib_var=yes"
15726 else
15727   echo "configure: failed program was:" >&5
15728   cat conftest.$ac_ext >&5
15729   rm -rf conftest*
15730   eval "ac_cv_lib_$ac_lib_var=no"
15731 fi
15732 rm -f conftest*
15733 LIBS="$ac_save_LIBS"
15734
15735 fi
15736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738   have_pth=yes
15739 else
15740   echo "$ac_t""no" 1>&6
15741 have_pth=no
15742 fi
15743
15744
15745                 if test $have_pth = yes ; then
15746                         cat >> confdefs.h <<\EOF
15747 #define HAVE_GNU_PTH 1
15748 EOF
15749
15750                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15751                         ol_link_threads=pth
15752                         ol_with_threads=found
15753
15754                         if test $ol_with_yielding_select = auto ; then
15755                                 ol_with_yielding_select=yes
15756                         fi
15757                 fi
15758         fi
15759 fi
15760
15761 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15762         -o $ol_with_threads = lwp ; then
15763
15764                 for ac_hdr in thread.h synch.h
15765 do
15766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15768 echo "configure:15769: checking for $ac_hdr" >&5
15769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15770   echo $ac_n "(cached) $ac_c" 1>&6
15771 else
15772   cat > conftest.$ac_ext <<EOF
15773 #line 15774 "configure"
15774 #include "confdefs.h"
15775 #include <$ac_hdr>
15776 EOF
15777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15778 { (eval echo configure:15779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15780 if test -z "$ac_err"; then
15781   rm -rf conftest*
15782   eval "ac_cv_header_$ac_safe=yes"
15783 else
15784   echo "$ac_err" >&5
15785   echo "configure: failed program was:" >&5
15786   cat conftest.$ac_ext >&5
15787   rm -rf conftest*
15788   eval "ac_cv_header_$ac_safe=no"
15789 fi
15790 rm -f conftest*
15791 fi
15792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15793   echo "$ac_t""yes" 1>&6
15794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15795   cat >> confdefs.h <<EOF
15796 #define $ac_tr_hdr 1
15797 EOF
15798  
15799 else
15800   echo "$ac_t""no" 1>&6
15801 fi
15802 done
15803
15804         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15805                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15806 echo "configure:15807: checking for thr_create in -lthread" >&5
15807 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15809   echo $ac_n "(cached) $ac_c" 1>&6
15810 else
15811   ac_save_LIBS="$LIBS"
15812 LIBS="-lthread  $LIBS"
15813 cat > conftest.$ac_ext <<EOF
15814 #line 15815 "configure"
15815 #include "confdefs.h"
15816 /* Override any gcc2 internal prototype to avoid an error.  */
15817 /* We use char because int might match the return type of a gcc2
15818     builtin and then its argument prototype would still apply.  */
15819 char thr_create();
15820
15821 int main() {
15822 thr_create()
15823 ; return 0; }
15824 EOF
15825 if { (eval echo configure:15826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15826   rm -rf conftest*
15827   eval "ac_cv_lib_$ac_lib_var=yes"
15828 else
15829   echo "configure: failed program was:" >&5
15830   cat conftest.$ac_ext >&5
15831   rm -rf conftest*
15832   eval "ac_cv_lib_$ac_lib_var=no"
15833 fi
15834 rm -f conftest*
15835 LIBS="$ac_save_LIBS"
15836
15837 fi
15838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15839   echo "$ac_t""yes" 1>&6
15840   have_thr=yes
15841 else
15842   echo "$ac_t""no" 1>&6
15843 have_thr=no
15844 fi
15845
15846
15847                 if test $have_thr = yes ; then
15848                         cat >> confdefs.h <<\EOF
15849 #define HAVE_THR 1
15850 EOF
15851
15852                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15853                         ol_link_threads=thr
15854
15855                         if test $ol_with_yielding_select = auto ; then
15856                                 ol_with_yielding_select=yes
15857                         fi
15858
15859                                                 for ac_func in \
15860                                 thr_setconcurrency \
15861                                 thr_getconcurrency \
15862                         
15863 do
15864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15865 echo "configure:15866: checking for $ac_func" >&5
15866 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15867   echo $ac_n "(cached) $ac_c" 1>&6
15868 else
15869   cat > conftest.$ac_ext <<EOF
15870 #line 15871 "configure"
15871 #include "confdefs.h"
15872 /* System header to define __stub macros and hopefully few prototypes,
15873     which can conflict with char $ac_func(); below.  */
15874 #include <assert.h>
15875 /* Override any gcc2 internal prototype to avoid an error.  */
15876 /* We use char because int might match the return type of a gcc2
15877     builtin and then its argument prototype would still apply.  */
15878 char $ac_func();
15879 char (*f)();
15880
15881 int main() {
15882
15883 /* The GNU C library defines this for functions which it implements
15884     to always fail with ENOSYS.  Some functions are actually named
15885     something starting with __ and the normal name is an alias.  */
15886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15887 choke me
15888 #else
15889 f = $ac_func;
15890 #endif
15891
15892 ; return 0; }
15893 EOF
15894 if { (eval echo configure:15895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15895   rm -rf conftest*
15896   eval "ac_cv_func_$ac_func=yes"
15897 else
15898   echo "configure: failed program was:" >&5
15899   cat conftest.$ac_ext >&5
15900   rm -rf conftest*
15901   eval "ac_cv_func_$ac_func=no"
15902 fi
15903 rm -f conftest*
15904 fi
15905
15906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15907   echo "$ac_t""yes" 1>&6
15908     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15909   cat >> confdefs.h <<EOF
15910 #define $ac_tr_func 1
15911 EOF
15912  
15913 else
15914   echo "$ac_t""no" 1>&6
15915 fi
15916 done
15917
15918                 fi
15919         fi
15920
15921                 for ac_hdr in lwp/lwp.h
15922 do
15923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15925 echo "configure:15926: checking for $ac_hdr" >&5
15926 if eval "test \"\${ac_cv_header_$ac_safe+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 #include <$ac_hdr>
15933 EOF
15934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15935 { (eval echo configure:15936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15937 if test -z "$ac_err"; then
15938   rm -rf conftest*
15939   eval "ac_cv_header_$ac_safe=yes"
15940 else
15941   echo "$ac_err" >&5
15942   echo "configure: failed program was:" >&5
15943   cat conftest.$ac_ext >&5
15944   rm -rf conftest*
15945   eval "ac_cv_header_$ac_safe=no"
15946 fi
15947 rm -f conftest*
15948 fi
15949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15950   echo "$ac_t""yes" 1>&6
15951     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15952   cat >> confdefs.h <<EOF
15953 #define $ac_tr_hdr 1
15954 EOF
15955  
15956 else
15957   echo "$ac_t""no" 1>&6
15958 fi
15959 done
15960
15961         if test $ac_cv_header_lwp_lwp_h = yes ; then
15962                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15963 echo "configure:15964: checking for lwp_create in -llwp" >&5
15964 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15965 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15966   echo $ac_n "(cached) $ac_c" 1>&6
15967 else
15968   ac_save_LIBS="$LIBS"
15969 LIBS="-llwp  $LIBS"
15970 cat > conftest.$ac_ext <<EOF
15971 #line 15972 "configure"
15972 #include "confdefs.h"
15973 /* Override any gcc2 internal prototype to avoid an error.  */
15974 /* We use char because int might match the return type of a gcc2
15975     builtin and then its argument prototype would still apply.  */
15976 char lwp_create();
15977
15978 int main() {
15979 lwp_create()
15980 ; return 0; }
15981 EOF
15982 if { (eval echo configure:15983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15983   rm -rf conftest*
15984   eval "ac_cv_lib_$ac_lib_var=yes"
15985 else
15986   echo "configure: failed program was:" >&5
15987   cat conftest.$ac_ext >&5
15988   rm -rf conftest*
15989   eval "ac_cv_lib_$ac_lib_var=no"
15990 fi
15991 rm -f conftest*
15992 LIBS="$ac_save_LIBS"
15993
15994 fi
15995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15996   echo "$ac_t""yes" 1>&6
15997   have_lwp=yes
15998 else
15999   echo "$ac_t""no" 1>&6
16000 have_lwp=no
16001 fi
16002
16003
16004                 if test $have_lwp = yes ; then
16005                         cat >> confdefs.h <<\EOF
16006 #define HAVE_LWP 1
16007 EOF
16008
16009                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16010                         ol_link_threads=lwp
16011
16012                         if test $ol_with_yielding_select = auto ; then
16013                                 ol_with_yielding_select=no
16014                         fi
16015                 fi
16016         fi
16017 fi
16018
16019 if test $ol_with_yielding_select = yes ; then
16020         cat >> confdefs.h <<\EOF
16021 #define HAVE_YIELDING_SELECT 1
16022 EOF
16023
16024 fi
16025
16026 if test $ol_with_threads = manual ; then
16027                 ol_link_threads=yes
16028
16029         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16030
16031         for ac_hdr in pthread.h sched.h
16032 do
16033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16035 echo "configure:16036: checking for $ac_hdr" >&5
16036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <$ac_hdr>
16043 EOF
16044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16045 { (eval echo configure:16046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16047 if test -z "$ac_err"; then
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=yes"
16050 else
16051   echo "$ac_err" >&5
16052   echo "configure: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   rm -rf conftest*
16055   eval "ac_cv_header_$ac_safe=no"
16056 fi
16057 rm -f conftest*
16058 fi
16059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16060   echo "$ac_t""yes" 1>&6
16061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16062   cat >> confdefs.h <<EOF
16063 #define $ac_tr_hdr 1
16064 EOF
16065  
16066 else
16067   echo "$ac_t""no" 1>&6
16068 fi
16069 done
16070
16071         for ac_func in sched_yield pthread_yield
16072 do
16073 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16074 echo "configure:16075: checking for $ac_func" >&5
16075 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16076   echo $ac_n "(cached) $ac_c" 1>&6
16077 else
16078   cat > conftest.$ac_ext <<EOF
16079 #line 16080 "configure"
16080 #include "confdefs.h"
16081 /* System header to define __stub macros and hopefully few prototypes,
16082     which can conflict with char $ac_func(); below.  */
16083 #include <assert.h>
16084 /* Override any gcc2 internal prototype to avoid an error.  */
16085 /* We use char because int might match the return type of a gcc2
16086     builtin and then its argument prototype would still apply.  */
16087 char $ac_func();
16088 char (*f)();
16089
16090 int main() {
16091
16092 /* The GNU C library defines this for functions which it implements
16093     to always fail with ENOSYS.  Some functions are actually named
16094     something starting with __ and the normal name is an alias.  */
16095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16096 choke me
16097 #else
16098 f = $ac_func;
16099 #endif
16100
16101 ; return 0; }
16102 EOF
16103 if { (eval echo configure:16104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16104   rm -rf conftest*
16105   eval "ac_cv_func_$ac_func=yes"
16106 else
16107   echo "configure: failed program was:" >&5
16108   cat conftest.$ac_ext >&5
16109   rm -rf conftest*
16110   eval "ac_cv_func_$ac_func=no"
16111 fi
16112 rm -f conftest*
16113 fi
16114
16115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16116   echo "$ac_t""yes" 1>&6
16117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16118   cat >> confdefs.h <<EOF
16119 #define $ac_tr_func 1
16120 EOF
16121  
16122 else
16123   echo "$ac_t""no" 1>&6
16124 fi
16125 done
16126
16127         
16128         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16129 echo "configure:16130: checking for LinuxThreads pthread.h" >&5
16130 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16131   echo $ac_n "(cached) $ac_c" 1>&6
16132 else
16133   cat > conftest.$ac_ext <<EOF
16134 #line 16135 "configure"
16135 #include "confdefs.h"
16136 #include <pthread.h>
16137 EOF
16138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16139   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16140   rm -rf conftest*
16141   ol_cv_header_linux_threads=yes
16142 else
16143   rm -rf conftest*
16144   ol_cv_header_linux_threads=no
16145 fi
16146 rm -f conftest*
16147
16148                 
16149 fi
16150
16151 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16152         if test $ol_cv_header_linux_threads = yes; then
16153                 cat >> confdefs.h <<\EOF
16154 #define HAVE_LINUX_THREADS 1
16155 EOF
16156
16157         fi
16158
16159
16160         for ac_hdr in mach/cthreads.h
16161 do
16162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16164 echo "configure:16165: checking for $ac_hdr" >&5
16165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16166   echo $ac_n "(cached) $ac_c" 1>&6
16167 else
16168   cat > conftest.$ac_ext <<EOF
16169 #line 16170 "configure"
16170 #include "confdefs.h"
16171 #include <$ac_hdr>
16172 EOF
16173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16174 { (eval echo configure:16175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16176 if test -z "$ac_err"; then
16177   rm -rf conftest*
16178   eval "ac_cv_header_$ac_safe=yes"
16179 else
16180   echo "$ac_err" >&5
16181   echo "configure: failed program was:" >&5
16182   cat conftest.$ac_ext >&5
16183   rm -rf conftest*
16184   eval "ac_cv_header_$ac_safe=no"
16185 fi
16186 rm -f conftest*
16187 fi
16188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16189   echo "$ac_t""yes" 1>&6
16190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16191   cat >> confdefs.h <<EOF
16192 #define $ac_tr_hdr 1
16193 EOF
16194  
16195 else
16196   echo "$ac_t""no" 1>&6
16197 fi
16198 done
16199
16200         for ac_hdr in lwp/lwp.h
16201 do
16202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16204 echo "configure:16205: checking for $ac_hdr" >&5
16205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16206   echo $ac_n "(cached) $ac_c" 1>&6
16207 else
16208   cat > conftest.$ac_ext <<EOF
16209 #line 16210 "configure"
16210 #include "confdefs.h"
16211 #include <$ac_hdr>
16212 EOF
16213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16214 { (eval echo configure:16215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16216 if test -z "$ac_err"; then
16217   rm -rf conftest*
16218   eval "ac_cv_header_$ac_safe=yes"
16219 else
16220   echo "$ac_err" >&5
16221   echo "configure: failed program was:" >&5
16222   cat conftest.$ac_ext >&5
16223   rm -rf conftest*
16224   eval "ac_cv_header_$ac_safe=no"
16225 fi
16226 rm -f conftest*
16227 fi
16228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16229   echo "$ac_t""yes" 1>&6
16230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16231   cat >> confdefs.h <<EOF
16232 #define $ac_tr_hdr 1
16233 EOF
16234  
16235 else
16236   echo "$ac_t""no" 1>&6
16237 fi
16238 done
16239
16240         for ac_hdr in thread.h synch.h
16241 do
16242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16244 echo "configure:16245: checking for $ac_hdr" >&5
16245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16246   echo $ac_n "(cached) $ac_c" 1>&6
16247 else
16248   cat > conftest.$ac_ext <<EOF
16249 #line 16250 "configure"
16250 #include "confdefs.h"
16251 #include <$ac_hdr>
16252 EOF
16253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16254 { (eval echo configure:16255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16256 if test -z "$ac_err"; then
16257   rm -rf conftest*
16258   eval "ac_cv_header_$ac_safe=yes"
16259 else
16260   echo "$ac_err" >&5
16261   echo "configure: failed program was:" >&5
16262   cat conftest.$ac_ext >&5
16263   rm -rf conftest*
16264   eval "ac_cv_header_$ac_safe=no"
16265 fi
16266 rm -f conftest*
16267 fi
16268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16269   echo "$ac_t""yes" 1>&6
16270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16271   cat >> confdefs.h <<EOF
16272 #define $ac_tr_hdr 1
16273 EOF
16274  
16275 else
16276   echo "$ac_t""no" 1>&6
16277 fi
16278 done
16279
16280 fi
16281
16282 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16283                         cat >> confdefs.h <<\EOF
16284 #define REENTRANT 1
16285 EOF
16286
16287         cat >> confdefs.h <<\EOF
16288 #define _REENTRANT 1
16289 EOF
16290
16291         cat >> confdefs.h <<\EOF
16292 #define THREAD_SAFE 1
16293 EOF
16294
16295         cat >> confdefs.h <<\EOF
16296 #define _THREAD_SAFE 1
16297 EOF
16298
16299         cat >> confdefs.h <<\EOF
16300 #define THREADSAFE 1
16301 EOF
16302
16303         cat >> confdefs.h <<\EOF
16304 #define _THREADSAFE 1
16305 EOF
16306
16307         cat >> confdefs.h <<\EOF
16308 #define _SGI_MP_SOURCE 1
16309 EOF
16310
16311
16312                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16313 echo "configure:16314: checking for thread specific errno" >&5
16314 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16315   echo $ac_n "(cached) $ac_c" 1>&6
16316 else
16317   
16318                 cat > conftest.$ac_ext <<EOF
16319 #line 16320 "configure"
16320 #include "confdefs.h"
16321 #include <errno.h>
16322 int main() {
16323 errno = 0;
16324 ; return 0; }
16325 EOF
16326 if { (eval echo configure:16327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16327   rm -rf conftest*
16328   ol_cv_errno_thread_specific=yes
16329 else
16330   echo "configure: failed program was:" >&5
16331   cat conftest.$ac_ext >&5
16332   rm -rf conftest*
16333   ol_cv_errno_thread_specific=no
16334 fi
16335 rm -f conftest*
16336         
16337 fi
16338
16339 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16340
16341                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16342 echo "configure:16343: checking for thread specific h_errno" >&5
16343 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16344   echo $ac_n "(cached) $ac_c" 1>&6
16345 else
16346   
16347                 cat > conftest.$ac_ext <<EOF
16348 #line 16349 "configure"
16349 #include "confdefs.h"
16350 #include <netdb.h>
16351 int main() {
16352 h_errno = 0;
16353 ; return 0; }
16354 EOF
16355 if { (eval echo configure:16356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16356   rm -rf conftest*
16357   ol_cv_h_errno_thread_specific=yes
16358 else
16359   echo "configure: failed program was:" >&5
16360   cat conftest.$ac_ext >&5
16361   rm -rf conftest*
16362   ol_cv_h_errno_thread_specific=no
16363 fi
16364 rm -f conftest*
16365         
16366 fi
16367
16368 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16369
16370         if test $ol_cv_errno_thread_specific != yes \
16371                 -o $ol_cv_h_errno_thread_specific != yes ; then
16372                 LIBS="$LTHREAD_LIBS $LIBS"
16373                 LTHREAD_LIBS=""
16374         fi
16375
16376 fi  
16377
16378 if test $ol_link_threads = no ; then
16379         if test $ol_with_threads = yes ; then
16380                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16381         fi
16382
16383         if test $ol_with_threads = auto ; then
16384                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16385                 ol_with_threads=no
16386         fi
16387
16388         cat >> confdefs.h <<\EOF
16389 #define NO_THREADS 1
16390 EOF
16391
16392         LTHREAD_LIBS=""
16393 fi
16394
16395 if test $ol_link_threads != no ; then
16396         cat >> confdefs.h <<\EOF
16397 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16398 EOF
16399
16400 fi
16401
16402 for ac_func in \
16403         ctime_r                 \
16404         gethostbyname_r gethostbyaddr_r \
16405
16406 do
16407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16408 echo "configure:16409: checking for $ac_func" >&5
16409 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16410   echo $ac_n "(cached) $ac_c" 1>&6
16411 else
16412   cat > conftest.$ac_ext <<EOF
16413 #line 16414 "configure"
16414 #include "confdefs.h"
16415 /* System header to define __stub macros and hopefully few prototypes,
16416     which can conflict with char $ac_func(); below.  */
16417 #include <assert.h>
16418 /* Override any gcc2 internal prototype to avoid an error.  */
16419 /* We use char because int might match the return type of a gcc2
16420     builtin and then its argument prototype would still apply.  */
16421 char $ac_func();
16422 char (*f)();
16423
16424 int main() {
16425
16426 /* The GNU C library defines this for functions which it implements
16427     to always fail with ENOSYS.  Some functions are actually named
16428     something starting with __ and the normal name is an alias.  */
16429 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16430 choke me
16431 #else
16432 f = $ac_func;
16433 #endif
16434
16435 ; return 0; }
16436 EOF
16437 if { (eval echo configure:16438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16438   rm -rf conftest*
16439   eval "ac_cv_func_$ac_func=yes"
16440 else
16441   echo "configure: failed program was:" >&5
16442   cat conftest.$ac_ext >&5
16443   rm -rf conftest*
16444   eval "ac_cv_func_$ac_func=no"
16445 fi
16446 rm -f conftest*
16447 fi
16448
16449 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16450   echo "$ac_t""yes" 1>&6
16451     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16452   cat >> confdefs.h <<EOF
16453 #define $ac_tr_func 1
16454 EOF
16455  
16456 else
16457   echo "$ac_t""no" 1>&6
16458 fi
16459 done
16460
16461
16462 if test "$ac_cv_func_ctime_r" = no ; then
16463         ol_cv_func_ctime_r_nargs=0
16464 else
16465         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16466 echo "configure:16467: checking number of arguments of ctime_r" >&5
16467 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16468   echo $ac_n "(cached) $ac_c" 1>&6
16469 else
16470   cat > conftest.$ac_ext <<EOF
16471 #line 16472 "configure"
16472 #include "confdefs.h"
16473 #include <time.h>
16474 int main() {
16475 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16476 ; return 0; }
16477 EOF
16478 if { (eval echo configure:16479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16479   rm -rf conftest*
16480   ol_cv_func_ctime_r_nargs3=yes
16481 else
16482   echo "configure: failed program was:" >&5
16483   cat conftest.$ac_ext >&5
16484   rm -rf conftest*
16485   ol_cv_func_ctime_r_nargs3=no
16486 fi
16487 rm -f conftest*
16488
16489         cat > conftest.$ac_ext <<EOF
16490 #line 16491 "configure"
16491 #include "confdefs.h"
16492 #include <time.h>
16493 int main() {
16494 time_t ti; char *buffer; ctime_r(&ti,buffer);
16495 ; return 0; }
16496 EOF
16497 if { (eval echo configure:16498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16498   rm -rf conftest*
16499   ol_cv_func_ctime_r_nargs2=yes
16500 else
16501   echo "configure: failed program was:" >&5
16502   cat conftest.$ac_ext >&5
16503   rm -rf conftest*
16504   ol_cv_func_ctime_r_nargs2=no
16505 fi
16506 rm -f conftest*
16507
16508         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16509                 $ol_cv_func_ctime_r_nargs2 = no ; then
16510
16511                 ol_cv_func_ctime_r_nargs=3
16512
16513         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16514                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16515
16516                 ol_cv_func_ctime_r_nargs=2
16517
16518         else
16519                 ol_cv_func_ctime_r_nargs=0
16520         fi
16521   
16522 fi
16523
16524 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16525
16526   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16527         cat >> confdefs.h <<EOF
16528 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16529 EOF
16530
16531   fi
16532
16533 fi
16534
16535 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16536         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16537 echo "configure:16538: checking number of arguments of gethostbyname_r" >&5
16538 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16539   echo $ac_n "(cached) $ac_c" 1>&6
16540 else
16541   cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 #include <sys/types.h>
16545 #include <sys/socket.h>
16546 #include <netinet/in.h>
16547 #include <netdb.h>
16548 #define BUFSIZE (sizeof(struct hostent)+10)
16549 int main() {
16550 struct hostent hent; char buffer[BUFSIZE];
16551                 int bufsize=BUFSIZE;int h_errno;
16552                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16553                         buffer, bufsize, &h_errno);
16554 ; return 0; }
16555 EOF
16556 if { (eval echo configure:16557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16557   rm -rf conftest*
16558   ol_cv_func_gethostbyname_r_nargs5=yes
16559 else
16560   echo "configure: failed program was:" >&5
16561   cat conftest.$ac_ext >&5
16562   rm -rf conftest*
16563   ol_cv_func_gethostbyname_r_nargs5=no
16564 fi
16565 rm -f conftest*
16566
16567         cat > conftest.$ac_ext <<EOF
16568 #line 16569 "configure"
16569 #include "confdefs.h"
16570 #include <sys/types.h>
16571 #include <sys/socket.h>
16572 #include <netinet/in.h>
16573 #include <netdb.h>
16574 #define BUFSIZE (sizeof(struct hostent)+10)
16575 int main() {
16576 struct hostent hent;struct hostent *rhent;
16577                 char buffer[BUFSIZE];
16578                 int bufsize=BUFSIZE;int h_errno;
16579                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16580                         &rhent, &h_errno);
16581 ; return 0; }
16582 EOF
16583 if { (eval echo configure:16584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16584   rm -rf conftest*
16585   ol_cv_func_gethostbyname_r_nargs6=yes
16586 else
16587   echo "configure: failed program was:" >&5
16588   cat conftest.$ac_ext >&5
16589   rm -rf conftest*
16590   ol_cv_func_gethostbyname_r_nargs6=no
16591 fi
16592 rm -f conftest*
16593
16594         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16595                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16596
16597                 ol_cv_func_gethostbyname_r_nargs=5
16598
16599         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16600                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16601
16602                 ol_cv_func_gethostbyname_r_nargs=6
16603
16604         else
16605                 ol_cv_func_gethostbyname_r_nargs=0
16606         fi
16607   
16608 fi
16609
16610 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16611   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16612         cat >> confdefs.h <<EOF
16613 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16614 EOF
16615
16616   fi
16617
16618 else
16619         ol_cv_func_gethostbyname_r_nargs=0
16620 fi
16621  
16622 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16623         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16624 echo "configure:16625: checking number of arguments of gethostbyaddr_r" >&5
16625 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16626   echo $ac_n "(cached) $ac_c" 1>&6
16627 else
16628   cat > conftest.$ac_ext <<EOF
16629 #line 16630 "configure"
16630 #include "confdefs.h"
16631 #include <sys/types.h>
16632 #include <sys/socket.h>
16633 #include <netinet/in.h>
16634 #include <netdb.h>
16635 #define BUFSIZE (sizeof(struct hostent)+10)
16636 int main() {
16637 struct hostent hent; char buffer[BUFSIZE]; 
16638             struct in_addr add;
16639             size_t alen=sizeof(struct in_addr);
16640             int bufsize=BUFSIZE;int h_errno;
16641                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16642                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16643 ; return 0; }
16644 EOF
16645 if { (eval echo configure:16646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16646   rm -rf conftest*
16647   ol_cv_func_gethostbyaddr_r_nargs7=yes
16648 else
16649   echo "configure: failed program was:" >&5
16650   cat conftest.$ac_ext >&5
16651   rm -rf conftest*
16652   ol_cv_func_gethostbyaddr_r_nargs7=no
16653 fi
16654 rm -f conftest*
16655
16656         cat > conftest.$ac_ext <<EOF
16657 #line 16658 "configure"
16658 #include "confdefs.h"
16659 #include <sys/types.h>
16660 #include <sys/socket.h>
16661 #include <netinet/in.h>
16662 #include <netdb.h>
16663 #define BUFSIZE (sizeof(struct hostent)+10)
16664 int main() {
16665 struct hostent hent;
16666                 struct hostent *rhent; char buffer[BUFSIZE]; 
16667                 struct in_addr add;
16668                 size_t alen=sizeof(struct in_addr);
16669                 int bufsize=BUFSIZE;int h_errno;
16670                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16671                         alen, AF_INET, &hent, buffer, bufsize, 
16672                         &rhent, &h_errno);
16673 ; return 0; }
16674 EOF
16675 if { (eval echo configure:16676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16676   rm -rf conftest*
16677   ol_cv_func_gethostbyaddr_r_nargs8=yes
16678 else
16679   echo "configure: failed program was:" >&5
16680   cat conftest.$ac_ext >&5
16681   rm -rf conftest*
16682   ol_cv_func_gethostbyaddr_r_nargs8=no
16683 fi
16684 rm -f conftest*
16685
16686         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16687                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16688
16689                 ol_cv_func_gethostbyaddr_r_nargs=7
16690
16691         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16692                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16693
16694                 ol_cv_func_gethostbyaddr_r_nargs=8
16695
16696         else
16697                 ol_cv_func_gethostbyaddr_r_nargs=0
16698         fi
16699   
16700 fi
16701
16702 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16703   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16704     cat >> confdefs.h <<EOF
16705 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16706 EOF
16707
16708   fi
16709
16710 else
16711         ol_cv_func_gethostbyaddr_r_nargs=0
16712 fi
16713
16714 ol_link_ldbm=no 
16715
16716 if test $ol_with_ldbm_api = auto \
16717         -o $ol_with_ldbm_api = berkeley \
16718         -o $ol_with_ldbm_api = bcompat ; then
16719
16720         if test $ol_with_ldbm_api = bcompat; then \
16721                 for ac_hdr in db_185.h db.h
16722 do
16723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16725 echo "configure:16726: checking for $ac_hdr" >&5
16726 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16727   echo $ac_n "(cached) $ac_c" 1>&6
16728 else
16729   cat > conftest.$ac_ext <<EOF
16730 #line 16731 "configure"
16731 #include "confdefs.h"
16732 #include <$ac_hdr>
16733 EOF
16734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16735 { (eval echo configure:16736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16737 if test -z "$ac_err"; then
16738   rm -rf conftest*
16739   eval "ac_cv_header_$ac_safe=yes"
16740 else
16741   echo "$ac_err" >&5
16742   echo "configure: failed program was:" >&5
16743   cat conftest.$ac_ext >&5
16744   rm -rf conftest*
16745   eval "ac_cv_header_$ac_safe=no"
16746 fi
16747 rm -f conftest*
16748 fi
16749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16750   echo "$ac_t""yes" 1>&6
16751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16752   cat >> confdefs.h <<EOF
16753 #define $ac_tr_hdr 1
16754 EOF
16755  
16756 else
16757   echo "$ac_t""no" 1>&6
16758 fi
16759 done
16760
16761 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16762         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16763 echo "configure:16764: checking if Berkeley DB header compatibility" >&5
16764 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16765   echo $ac_n "(cached) $ac_c" 1>&6
16766 else
16767   
16768                 cat > conftest.$ac_ext <<EOF
16769 #line 16770 "configure"
16770 #include "confdefs.h"
16771
16772 #if HAVE_DB_185_H
16773 #       include <db_185.h>
16774 #else
16775 #       include <db.h>
16776 #endif
16777
16778  /* this check could be improved */
16779 #ifndef DB_VERSION_MAJOR
16780 #       define DB_VERSION_MAJOR 1
16781 #endif
16782
16783 #if DB_VERSION_MAJOR == 1 
16784         __db_version_1
16785 #endif
16786
16787 EOF
16788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16789   egrep "__db_version_1" >/dev/null 2>&1; then
16790   rm -rf conftest*
16791   ol_cv_header_db1=yes
16792 else
16793   rm -rf conftest*
16794   ol_cv_header_db1=no
16795 fi
16796 rm -f conftest*
16797
16798 fi
16799
16800 echo "$ac_t""$ol_cv_header_db1" 1>&6
16801
16802         if test $ol_cv_header_db1 = yes ; then
16803                 ol_cv_lib_db=no
16804 if test $ol_cv_lib_db = no ; then
16805         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16806 echo "configure:16807: checking for Berkeley DB link (default)" >&5
16807 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16808   echo $ac_n "(cached) $ac_c" 1>&6
16809 else
16810   
16811         ol_DB_LIB=
16812         ol_LIBS=$LIBS
16813         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16814
16815         cat > conftest.$ac_ext <<EOF
16816 #line 16817 "configure"
16817 #include "confdefs.h"
16818
16819 #ifdef HAVE_DB_185_H
16820 # include <db_185.h>
16821 #else
16822 # include <db.h>
16823 #endif
16824
16825 #ifndef DB_VERSION_MAJOR
16826 # define DB_VERSION_MAJOR 1
16827 #endif
16828
16829 #ifndef NULL
16830 #define NULL ((void*)0)
16831 #endif
16832
16833 int main() {
16834
16835 #if DB_VERSION_MAJOR > 1
16836         {
16837                 char *version;
16838                 int major, minor, patch;
16839
16840                 version = db_version( &major, &minor, &patch );
16841
16842                 if( major != DB_VERSION_MAJOR ||
16843                         minor < DB_VERSION_MINOR )
16844                 {
16845                         printf("Berkeley DB version mismatch\n"
16846                                 "\theader: %s\n\tlibrary: %s\n",
16847                                 DB_VERSION_STRING, version);
16848                         return 1;
16849                 }
16850         }
16851 #endif
16852
16853 #if DB_VERSION_MAJOR > 2
16854         db_env_create( NULL, 0 );
16855 #elif DB_VERSION_MAJOR > 1
16856         db_appexit( NULL );
16857 #else
16858         (void) dbopen( NULL, 0, 0, 0, NULL);
16859 #endif
16860
16861 ; return 0; }
16862 EOF
16863 if { (eval echo configure:16864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16864   rm -rf conftest*
16865   ol_cv_db_none=yes
16866 else
16867   echo "configure: failed program was:" >&5
16868   cat conftest.$ac_ext >&5
16869   rm -rf conftest*
16870   ol_cv_db_none=no
16871 fi
16872 rm -f conftest*
16873
16874         LIBS="$ol_LIBS"
16875
16876 fi
16877
16878 echo "$ac_t""$ol_cv_db_none" 1>&6
16879
16880         if test $ol_cv_db_none = yes ; then
16881                 ol_cv_lib_db=yes
16882         fi
16883 fi
16884
16885 if test $ol_cv_lib_db = no ; then
16886         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16887 echo "configure:16888: checking for Berkeley DB link (-ldb42)" >&5
16888 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16889   echo $ac_n "(cached) $ac_c" 1>&6
16890 else
16891   
16892         ol_DB_LIB=-ldb42
16893         ol_LIBS=$LIBS
16894         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16895
16896         cat > conftest.$ac_ext <<EOF
16897 #line 16898 "configure"
16898 #include "confdefs.h"
16899
16900 #ifdef HAVE_DB_185_H
16901 # include <db_185.h>
16902 #else
16903 # include <db.h>
16904 #endif
16905
16906 #ifndef DB_VERSION_MAJOR
16907 # define DB_VERSION_MAJOR 1
16908 #endif
16909
16910 #ifndef NULL
16911 #define NULL ((void*)0)
16912 #endif
16913
16914 int main() {
16915
16916 #if DB_VERSION_MAJOR > 1
16917         {
16918                 char *version;
16919                 int major, minor, patch;
16920
16921                 version = db_version( &major, &minor, &patch );
16922
16923                 if( major != DB_VERSION_MAJOR ||
16924                         minor < DB_VERSION_MINOR )
16925                 {
16926                         printf("Berkeley DB version mismatch\n"
16927                                 "\theader: %s\n\tlibrary: %s\n",
16928                                 DB_VERSION_STRING, version);
16929                         return 1;
16930                 }
16931         }
16932 #endif
16933
16934 #if DB_VERSION_MAJOR > 2
16935         db_env_create( NULL, 0 );
16936 #elif DB_VERSION_MAJOR > 1
16937         db_appexit( NULL );
16938 #else
16939         (void) dbopen( NULL, 0, 0, 0, NULL);
16940 #endif
16941
16942 ; return 0; }
16943 EOF
16944 if { (eval echo configure:16945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16945   rm -rf conftest*
16946   ol_cv_db_db42=yes
16947 else
16948   echo "configure: failed program was:" >&5
16949   cat conftest.$ac_ext >&5
16950   rm -rf conftest*
16951   ol_cv_db_db42=no
16952 fi
16953 rm -f conftest*
16954
16955         LIBS="$ol_LIBS"
16956
16957 fi
16958
16959 echo "$ac_t""$ol_cv_db_db42" 1>&6
16960
16961         if test $ol_cv_db_db42 = yes ; then
16962                 ol_cv_lib_db=-ldb42
16963         fi
16964 fi
16965
16966 if test $ol_cv_lib_db = no ; then
16967         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16968 echo "configure:16969: checking for Berkeley DB link (-ldb-42)" >&5
16969 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16970   echo $ac_n "(cached) $ac_c" 1>&6
16971 else
16972   
16973         ol_DB_LIB=-ldb-42
16974         ol_LIBS=$LIBS
16975         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16976
16977         cat > conftest.$ac_ext <<EOF
16978 #line 16979 "configure"
16979 #include "confdefs.h"
16980
16981 #ifdef HAVE_DB_185_H
16982 # include <db_185.h>
16983 #else
16984 # include <db.h>
16985 #endif
16986
16987 #ifndef DB_VERSION_MAJOR
16988 # define DB_VERSION_MAJOR 1
16989 #endif
16990
16991 #ifndef NULL
16992 #define NULL ((void*)0)
16993 #endif
16994
16995 int main() {
16996
16997 #if DB_VERSION_MAJOR > 1
16998         {
16999                 char *version;
17000                 int major, minor, patch;
17001
17002                 version = db_version( &major, &minor, &patch );
17003
17004                 if( major != DB_VERSION_MAJOR ||
17005                         minor < DB_VERSION_MINOR )
17006                 {
17007                         printf("Berkeley DB version mismatch\n"
17008                                 "\theader: %s\n\tlibrary: %s\n",
17009                                 DB_VERSION_STRING, version);
17010                         return 1;
17011                 }
17012         }
17013 #endif
17014
17015 #if DB_VERSION_MAJOR > 2
17016         db_env_create( NULL, 0 );
17017 #elif DB_VERSION_MAJOR > 1
17018         db_appexit( NULL );
17019 #else
17020         (void) dbopen( NULL, 0, 0, 0, NULL);
17021 #endif
17022
17023 ; return 0; }
17024 EOF
17025 if { (eval echo configure:17026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17026   rm -rf conftest*
17027   ol_cv_db_db_42=yes
17028 else
17029   echo "configure: failed program was:" >&5
17030   cat conftest.$ac_ext >&5
17031   rm -rf conftest*
17032   ol_cv_db_db_42=no
17033 fi
17034 rm -f conftest*
17035
17036         LIBS="$ol_LIBS"
17037
17038 fi
17039
17040 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17041
17042         if test $ol_cv_db_db_42 = yes ; then
17043                 ol_cv_lib_db=-ldb-42
17044         fi
17045 fi
17046
17047 if test $ol_cv_lib_db = no ; then
17048         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17049 echo "configure:17050: checking for Berkeley DB link (-ldb-4.2)" >&5
17050 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17051   echo $ac_n "(cached) $ac_c" 1>&6
17052 else
17053   
17054         ol_DB_LIB=-ldb-4.2
17055         ol_LIBS=$LIBS
17056         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17057
17058         cat > conftest.$ac_ext <<EOF
17059 #line 17060 "configure"
17060 #include "confdefs.h"
17061
17062 #ifdef HAVE_DB_185_H
17063 # include <db_185.h>
17064 #else
17065 # include <db.h>
17066 #endif
17067
17068 #ifndef DB_VERSION_MAJOR
17069 # define DB_VERSION_MAJOR 1
17070 #endif
17071
17072 #ifndef NULL
17073 #define NULL ((void*)0)
17074 #endif
17075
17076 int main() {
17077
17078 #if DB_VERSION_MAJOR > 1
17079         {
17080                 char *version;
17081                 int major, minor, patch;
17082
17083                 version = db_version( &major, &minor, &patch );
17084
17085                 if( major != DB_VERSION_MAJOR ||
17086                         minor < DB_VERSION_MINOR )
17087                 {
17088                         printf("Berkeley DB version mismatch\n"
17089                                 "\theader: %s\n\tlibrary: %s\n",
17090                                 DB_VERSION_STRING, version);
17091                         return 1;
17092                 }
17093         }
17094 #endif
17095
17096 #if DB_VERSION_MAJOR > 2
17097         db_env_create( NULL, 0 );
17098 #elif DB_VERSION_MAJOR > 1
17099         db_appexit( NULL );
17100 #else
17101         (void) dbopen( NULL, 0, 0, 0, NULL);
17102 #endif
17103
17104 ; return 0; }
17105 EOF
17106 if { (eval echo configure:17107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17107   rm -rf conftest*
17108   ol_cv_db_db_4_dot_2=yes
17109 else
17110   echo "configure: failed program was:" >&5
17111   cat conftest.$ac_ext >&5
17112   rm -rf conftest*
17113   ol_cv_db_db_4_dot_2=no
17114 fi
17115 rm -f conftest*
17116
17117         LIBS="$ol_LIBS"
17118
17119 fi
17120
17121 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17122
17123         if test $ol_cv_db_db_4_dot_2 = yes ; then
17124                 ol_cv_lib_db=-ldb-4.2
17125         fi
17126 fi
17127
17128 if test $ol_cv_lib_db = no ; then
17129         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17130 echo "configure:17131: checking for Berkeley DB link (-ldb-4-2)" >&5
17131 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17132   echo $ac_n "(cached) $ac_c" 1>&6
17133 else
17134   
17135         ol_DB_LIB=-ldb-4-2
17136         ol_LIBS=$LIBS
17137         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17138
17139         cat > conftest.$ac_ext <<EOF
17140 #line 17141 "configure"
17141 #include "confdefs.h"
17142
17143 #ifdef HAVE_DB_185_H
17144 # include <db_185.h>
17145 #else
17146 # include <db.h>
17147 #endif
17148
17149 #ifndef DB_VERSION_MAJOR
17150 # define DB_VERSION_MAJOR 1
17151 #endif
17152
17153 #ifndef NULL
17154 #define NULL ((void*)0)
17155 #endif
17156
17157 int main() {
17158
17159 #if DB_VERSION_MAJOR > 1
17160         {
17161                 char *version;
17162                 int major, minor, patch;
17163
17164                 version = db_version( &major, &minor, &patch );
17165
17166                 if( major != DB_VERSION_MAJOR ||
17167                         minor < DB_VERSION_MINOR )
17168                 {
17169                         printf("Berkeley DB version mismatch\n"
17170                                 "\theader: %s\n\tlibrary: %s\n",
17171                                 DB_VERSION_STRING, version);
17172                         return 1;
17173                 }
17174         }
17175 #endif
17176
17177 #if DB_VERSION_MAJOR > 2
17178         db_env_create( NULL, 0 );
17179 #elif DB_VERSION_MAJOR > 1
17180         db_appexit( NULL );
17181 #else
17182         (void) dbopen( NULL, 0, 0, 0, NULL);
17183 #endif
17184
17185 ; return 0; }
17186 EOF
17187 if { (eval echo configure:17188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17188   rm -rf conftest*
17189   ol_cv_db_db_4_2=yes
17190 else
17191   echo "configure: failed program was:" >&5
17192   cat conftest.$ac_ext >&5
17193   rm -rf conftest*
17194   ol_cv_db_db_4_2=no
17195 fi
17196 rm -f conftest*
17197
17198         LIBS="$ol_LIBS"
17199
17200 fi
17201
17202 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17203
17204         if test $ol_cv_db_db_4_2 = yes ; then
17205                 ol_cv_lib_db=-ldb-4-2
17206         fi
17207 fi
17208
17209 if test $ol_cv_lib_db = no ; then
17210         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17211 echo "configure:17212: checking for Berkeley DB link (-ldb-4)" >&5
17212 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17213   echo $ac_n "(cached) $ac_c" 1>&6
17214 else
17215   
17216         ol_DB_LIB=-ldb-4
17217         ol_LIBS=$LIBS
17218         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17219
17220         cat > conftest.$ac_ext <<EOF
17221 #line 17222 "configure"
17222 #include "confdefs.h"
17223
17224 #ifdef HAVE_DB_185_H
17225 # include <db_185.h>
17226 #else
17227 # include <db.h>
17228 #endif
17229
17230 #ifndef DB_VERSION_MAJOR
17231 # define DB_VERSION_MAJOR 1
17232 #endif
17233
17234 #ifndef NULL
17235 #define NULL ((void*)0)
17236 #endif
17237
17238 int main() {
17239
17240 #if DB_VERSION_MAJOR > 1
17241         {
17242                 char *version;
17243                 int major, minor, patch;
17244
17245                 version = db_version( &major, &minor, &patch );
17246
17247                 if( major != DB_VERSION_MAJOR ||
17248                         minor < DB_VERSION_MINOR )
17249                 {
17250                         printf("Berkeley DB version mismatch\n"
17251                                 "\theader: %s\n\tlibrary: %s\n",
17252                                 DB_VERSION_STRING, version);
17253                         return 1;
17254                 }
17255         }
17256 #endif
17257
17258 #if DB_VERSION_MAJOR > 2
17259         db_env_create( NULL, 0 );
17260 #elif DB_VERSION_MAJOR > 1
17261         db_appexit( NULL );
17262 #else
17263         (void) dbopen( NULL, 0, 0, 0, NULL);
17264 #endif
17265
17266 ; return 0; }
17267 EOF
17268 if { (eval echo configure:17269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17269   rm -rf conftest*
17270   ol_cv_db_db_4=yes
17271 else
17272   echo "configure: failed program was:" >&5
17273   cat conftest.$ac_ext >&5
17274   rm -rf conftest*
17275   ol_cv_db_db_4=no
17276 fi
17277 rm -f conftest*
17278
17279         LIBS="$ol_LIBS"
17280
17281 fi
17282
17283 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17284
17285         if test $ol_cv_db_db_4 = yes ; then
17286                 ol_cv_lib_db=-ldb-4
17287         fi
17288 fi
17289
17290 if test $ol_cv_lib_db = no ; then
17291         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17292 echo "configure:17293: checking for Berkeley DB link (-ldb4)" >&5
17293 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17294   echo $ac_n "(cached) $ac_c" 1>&6
17295 else
17296   
17297         ol_DB_LIB=-ldb4
17298         ol_LIBS=$LIBS
17299         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17300
17301         cat > conftest.$ac_ext <<EOF
17302 #line 17303 "configure"
17303 #include "confdefs.h"
17304
17305 #ifdef HAVE_DB_185_H
17306 # include <db_185.h>
17307 #else
17308 # include <db.h>
17309 #endif
17310
17311 #ifndef DB_VERSION_MAJOR
17312 # define DB_VERSION_MAJOR 1
17313 #endif
17314
17315 #ifndef NULL
17316 #define NULL ((void*)0)
17317 #endif
17318
17319 int main() {
17320
17321 #if DB_VERSION_MAJOR > 1
17322         {
17323                 char *version;
17324                 int major, minor, patch;
17325
17326                 version = db_version( &major, &minor, &patch );
17327
17328                 if( major != DB_VERSION_MAJOR ||
17329                         minor < DB_VERSION_MINOR )
17330                 {
17331                         printf("Berkeley DB version mismatch\n"
17332                                 "\theader: %s\n\tlibrary: %s\n",
17333                                 DB_VERSION_STRING, version);
17334                         return 1;
17335                 }
17336         }
17337 #endif
17338
17339 #if DB_VERSION_MAJOR > 2
17340         db_env_create( NULL, 0 );
17341 #elif DB_VERSION_MAJOR > 1
17342         db_appexit( NULL );
17343 #else
17344         (void) dbopen( NULL, 0, 0, 0, NULL);
17345 #endif
17346
17347 ; return 0; }
17348 EOF
17349 if { (eval echo configure:17350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17350   rm -rf conftest*
17351   ol_cv_db_db4=yes
17352 else
17353   echo "configure: failed program was:" >&5
17354   cat conftest.$ac_ext >&5
17355   rm -rf conftest*
17356   ol_cv_db_db4=no
17357 fi
17358 rm -f conftest*
17359
17360         LIBS="$ol_LIBS"
17361
17362 fi
17363
17364 echo "$ac_t""$ol_cv_db_db4" 1>&6
17365
17366         if test $ol_cv_db_db4 = yes ; then
17367                 ol_cv_lib_db=-ldb4
17368         fi
17369 fi
17370
17371 if test $ol_cv_lib_db = no ; then
17372         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17373 echo "configure:17374: checking for Berkeley DB link (-ldb)" >&5
17374 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17375   echo $ac_n "(cached) $ac_c" 1>&6
17376 else
17377   
17378         ol_DB_LIB=-ldb
17379         ol_LIBS=$LIBS
17380         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17381
17382         cat > conftest.$ac_ext <<EOF
17383 #line 17384 "configure"
17384 #include "confdefs.h"
17385
17386 #ifdef HAVE_DB_185_H
17387 # include <db_185.h>
17388 #else
17389 # include <db.h>
17390 #endif
17391
17392 #ifndef DB_VERSION_MAJOR
17393 # define DB_VERSION_MAJOR 1
17394 #endif
17395
17396 #ifndef NULL
17397 #define NULL ((void*)0)
17398 #endif
17399
17400 int main() {
17401
17402 #if DB_VERSION_MAJOR > 1
17403         {
17404                 char *version;
17405                 int major, minor, patch;
17406
17407                 version = db_version( &major, &minor, &patch );
17408
17409                 if( major != DB_VERSION_MAJOR ||
17410                         minor < DB_VERSION_MINOR )
17411                 {
17412                         printf("Berkeley DB version mismatch\n"
17413                                 "\theader: %s\n\tlibrary: %s\n",
17414                                 DB_VERSION_STRING, version);
17415                         return 1;
17416                 }
17417         }
17418 #endif
17419
17420 #if DB_VERSION_MAJOR > 2
17421         db_env_create( NULL, 0 );
17422 #elif DB_VERSION_MAJOR > 1
17423         db_appexit( NULL );
17424 #else
17425         (void) dbopen( NULL, 0, 0, 0, NULL);
17426 #endif
17427
17428 ; return 0; }
17429 EOF
17430 if { (eval echo configure:17431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17431   rm -rf conftest*
17432   ol_cv_db_db=yes
17433 else
17434   echo "configure: failed program was:" >&5
17435   cat conftest.$ac_ext >&5
17436   rm -rf conftest*
17437   ol_cv_db_db=no
17438 fi
17439 rm -f conftest*
17440
17441         LIBS="$ol_LIBS"
17442
17443 fi
17444
17445 echo "$ac_t""$ol_cv_db_db" 1>&6
17446
17447         if test $ol_cv_db_db = yes ; then
17448                 ol_cv_lib_db=-ldb
17449         fi
17450 fi
17451
17452 if test $ol_cv_lib_db = no ; then
17453         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17454 echo "configure:17455: checking for Berkeley DB link (-ldb41)" >&5
17455 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17456   echo $ac_n "(cached) $ac_c" 1>&6
17457 else
17458   
17459         ol_DB_LIB=-ldb41
17460         ol_LIBS=$LIBS
17461         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17462
17463         cat > conftest.$ac_ext <<EOF
17464 #line 17465 "configure"
17465 #include "confdefs.h"
17466
17467 #ifdef HAVE_DB_185_H
17468 # include <db_185.h>
17469 #else
17470 # include <db.h>
17471 #endif
17472
17473 #ifndef DB_VERSION_MAJOR
17474 # define DB_VERSION_MAJOR 1
17475 #endif
17476
17477 #ifndef NULL
17478 #define NULL ((void*)0)
17479 #endif
17480
17481 int main() {
17482
17483 #if DB_VERSION_MAJOR > 1
17484         {
17485                 char *version;
17486                 int major, minor, patch;
17487
17488                 version = db_version( &major, &minor, &patch );
17489
17490                 if( major != DB_VERSION_MAJOR ||
17491                         minor < DB_VERSION_MINOR )
17492                 {
17493                         printf("Berkeley DB version mismatch\n"
17494                                 "\theader: %s\n\tlibrary: %s\n",
17495                                 DB_VERSION_STRING, version);
17496                         return 1;
17497                 }
17498         }
17499 #endif
17500
17501 #if DB_VERSION_MAJOR > 2
17502         db_env_create( NULL, 0 );
17503 #elif DB_VERSION_MAJOR > 1
17504         db_appexit( NULL );
17505 #else
17506         (void) dbopen( NULL, 0, 0, 0, NULL);
17507 #endif
17508
17509 ; return 0; }
17510 EOF
17511 if { (eval echo configure:17512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17512   rm -rf conftest*
17513   ol_cv_db_db41=yes
17514 else
17515   echo "configure: failed program was:" >&5
17516   cat conftest.$ac_ext >&5
17517   rm -rf conftest*
17518   ol_cv_db_db41=no
17519 fi
17520 rm -f conftest*
17521
17522         LIBS="$ol_LIBS"
17523
17524 fi
17525
17526 echo "$ac_t""$ol_cv_db_db41" 1>&6
17527
17528         if test $ol_cv_db_db41 = yes ; then
17529                 ol_cv_lib_db=-ldb41
17530         fi
17531 fi
17532
17533 if test $ol_cv_lib_db = no ; then
17534         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17535 echo "configure:17536: checking for Berkeley DB link (-ldb-41)" >&5
17536 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17537   echo $ac_n "(cached) $ac_c" 1>&6
17538 else
17539   
17540         ol_DB_LIB=-ldb-41
17541         ol_LIBS=$LIBS
17542         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17543
17544         cat > conftest.$ac_ext <<EOF
17545 #line 17546 "configure"
17546 #include "confdefs.h"
17547
17548 #ifdef HAVE_DB_185_H
17549 # include <db_185.h>
17550 #else
17551 # include <db.h>
17552 #endif
17553
17554 #ifndef DB_VERSION_MAJOR
17555 # define DB_VERSION_MAJOR 1
17556 #endif
17557
17558 #ifndef NULL
17559 #define NULL ((void*)0)
17560 #endif
17561
17562 int main() {
17563
17564 #if DB_VERSION_MAJOR > 1
17565         {
17566                 char *version;
17567                 int major, minor, patch;
17568
17569                 version = db_version( &major, &minor, &patch );
17570
17571                 if( major != DB_VERSION_MAJOR ||
17572                         minor < DB_VERSION_MINOR )
17573                 {
17574                         printf("Berkeley DB version mismatch\n"
17575                                 "\theader: %s\n\tlibrary: %s\n",
17576                                 DB_VERSION_STRING, version);
17577                         return 1;
17578                 }
17579         }
17580 #endif
17581
17582 #if DB_VERSION_MAJOR > 2
17583         db_env_create( NULL, 0 );
17584 #elif DB_VERSION_MAJOR > 1
17585         db_appexit( NULL );
17586 #else
17587         (void) dbopen( NULL, 0, 0, 0, NULL);
17588 #endif
17589
17590 ; return 0; }
17591 EOF
17592 if { (eval echo configure:17593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17593   rm -rf conftest*
17594   ol_cv_db_db_41=yes
17595 else
17596   echo "configure: failed program was:" >&5
17597   cat conftest.$ac_ext >&5
17598   rm -rf conftest*
17599   ol_cv_db_db_41=no
17600 fi
17601 rm -f conftest*
17602
17603         LIBS="$ol_LIBS"
17604
17605 fi
17606
17607 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17608
17609         if test $ol_cv_db_db_41 = yes ; then
17610                 ol_cv_lib_db=-ldb-41
17611         fi
17612 fi
17613
17614 if test $ol_cv_lib_db = no ; then
17615         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17616 echo "configure:17617: checking for Berkeley DB link (-ldb-4.1)" >&5
17617 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17618   echo $ac_n "(cached) $ac_c" 1>&6
17619 else
17620   
17621         ol_DB_LIB=-ldb-4.1
17622         ol_LIBS=$LIBS
17623         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17624
17625         cat > conftest.$ac_ext <<EOF
17626 #line 17627 "configure"
17627 #include "confdefs.h"
17628
17629 #ifdef HAVE_DB_185_H
17630 # include <db_185.h>
17631 #else
17632 # include <db.h>
17633 #endif
17634
17635 #ifndef DB_VERSION_MAJOR
17636 # define DB_VERSION_MAJOR 1
17637 #endif
17638
17639 #ifndef NULL
17640 #define NULL ((void*)0)
17641 #endif
17642
17643 int main() {
17644
17645 #if DB_VERSION_MAJOR > 1
17646         {
17647                 char *version;
17648                 int major, minor, patch;
17649
17650                 version = db_version( &major, &minor, &patch );
17651
17652                 if( major != DB_VERSION_MAJOR ||
17653                         minor < DB_VERSION_MINOR )
17654                 {
17655                         printf("Berkeley DB version mismatch\n"
17656                                 "\theader: %s\n\tlibrary: %s\n",
17657                                 DB_VERSION_STRING, version);
17658                         return 1;
17659                 }
17660         }
17661 #endif
17662
17663 #if DB_VERSION_MAJOR > 2
17664         db_env_create( NULL, 0 );
17665 #elif DB_VERSION_MAJOR > 1
17666         db_appexit( NULL );
17667 #else
17668         (void) dbopen( NULL, 0, 0, 0, NULL);
17669 #endif
17670
17671 ; return 0; }
17672 EOF
17673 if { (eval echo configure:17674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17674   rm -rf conftest*
17675   ol_cv_db_db_4_dot_1=yes
17676 else
17677   echo "configure: failed program was:" >&5
17678   cat conftest.$ac_ext >&5
17679   rm -rf conftest*
17680   ol_cv_db_db_4_dot_1=no
17681 fi
17682 rm -f conftest*
17683
17684         LIBS="$ol_LIBS"
17685
17686 fi
17687
17688 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17689
17690         if test $ol_cv_db_db_4_dot_1 = yes ; then
17691                 ol_cv_lib_db=-ldb-4.1
17692         fi
17693 fi
17694
17695 if test $ol_cv_lib_db = no ; then
17696         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17697 echo "configure:17698: checking for Berkeley DB link (-ldb-4-1)" >&5
17698 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17699   echo $ac_n "(cached) $ac_c" 1>&6
17700 else
17701   
17702         ol_DB_LIB=-ldb-4-1
17703         ol_LIBS=$LIBS
17704         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17705
17706         cat > conftest.$ac_ext <<EOF
17707 #line 17708 "configure"
17708 #include "confdefs.h"
17709
17710 #ifdef HAVE_DB_185_H
17711 # include <db_185.h>
17712 #else
17713 # include <db.h>
17714 #endif
17715
17716 #ifndef DB_VERSION_MAJOR
17717 # define DB_VERSION_MAJOR 1
17718 #endif
17719
17720 #ifndef NULL
17721 #define NULL ((void*)0)
17722 #endif
17723
17724 int main() {
17725
17726 #if DB_VERSION_MAJOR > 1
17727         {
17728                 char *version;
17729                 int major, minor, patch;
17730
17731                 version = db_version( &major, &minor, &patch );
17732
17733                 if( major != DB_VERSION_MAJOR ||
17734                         minor < DB_VERSION_MINOR )
17735                 {
17736                         printf("Berkeley DB version mismatch\n"
17737                                 "\theader: %s\n\tlibrary: %s\n",
17738                                 DB_VERSION_STRING, version);
17739                         return 1;
17740                 }
17741         }
17742 #endif
17743
17744 #if DB_VERSION_MAJOR > 2
17745         db_env_create( NULL, 0 );
17746 #elif DB_VERSION_MAJOR > 1
17747         db_appexit( NULL );
17748 #else
17749         (void) dbopen( NULL, 0, 0, 0, NULL);
17750 #endif
17751
17752 ; return 0; }
17753 EOF
17754 if { (eval echo configure:17755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17755   rm -rf conftest*
17756   ol_cv_db_db_4_1=yes
17757 else
17758   echo "configure: failed program was:" >&5
17759   cat conftest.$ac_ext >&5
17760   rm -rf conftest*
17761   ol_cv_db_db_4_1=no
17762 fi
17763 rm -f conftest*
17764
17765         LIBS="$ol_LIBS"
17766
17767 fi
17768
17769 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17770
17771         if test $ol_cv_db_db_4_1 = yes ; then
17772                 ol_cv_lib_db=-ldb-4-1
17773         fi
17774 fi
17775
17776 if test $ol_cv_lib_db = no ; then
17777         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17778 echo "configure:17779: checking for Berkeley DB link (-ldb3)" >&5
17779 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17780   echo $ac_n "(cached) $ac_c" 1>&6
17781 else
17782   
17783         ol_DB_LIB=-ldb3
17784         ol_LIBS=$LIBS
17785         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17786
17787         cat > conftest.$ac_ext <<EOF
17788 #line 17789 "configure"
17789 #include "confdefs.h"
17790
17791 #ifdef HAVE_DB_185_H
17792 # include <db_185.h>
17793 #else
17794 # include <db.h>
17795 #endif
17796
17797 #ifndef DB_VERSION_MAJOR
17798 # define DB_VERSION_MAJOR 1
17799 #endif
17800
17801 #ifndef NULL
17802 #define NULL ((void*)0)
17803 #endif
17804
17805 int main() {
17806
17807 #if DB_VERSION_MAJOR > 1
17808         {
17809                 char *version;
17810                 int major, minor, patch;
17811
17812                 version = db_version( &major, &minor, &patch );
17813
17814                 if( major != DB_VERSION_MAJOR ||
17815                         minor < DB_VERSION_MINOR )
17816                 {
17817                         printf("Berkeley DB version mismatch\n"
17818                                 "\theader: %s\n\tlibrary: %s\n",
17819                                 DB_VERSION_STRING, version);
17820                         return 1;
17821                 }
17822         }
17823 #endif
17824
17825 #if DB_VERSION_MAJOR > 2
17826         db_env_create( NULL, 0 );
17827 #elif DB_VERSION_MAJOR > 1
17828         db_appexit( NULL );
17829 #else
17830         (void) dbopen( NULL, 0, 0, 0, NULL);
17831 #endif
17832
17833 ; return 0; }
17834 EOF
17835 if { (eval echo configure:17836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17836   rm -rf conftest*
17837   ol_cv_db_db3=yes
17838 else
17839   echo "configure: failed program was:" >&5
17840   cat conftest.$ac_ext >&5
17841   rm -rf conftest*
17842   ol_cv_db_db3=no
17843 fi
17844 rm -f conftest*
17845
17846         LIBS="$ol_LIBS"
17847
17848 fi
17849
17850 echo "$ac_t""$ol_cv_db_db3" 1>&6
17851
17852         if test $ol_cv_db_db3 = yes ; then
17853                 ol_cv_lib_db=-ldb3
17854         fi
17855 fi
17856
17857 if test $ol_cv_lib_db = no ; then
17858         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17859 echo "configure:17860: checking for Berkeley DB link (-ldb-3)" >&5
17860 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17861   echo $ac_n "(cached) $ac_c" 1>&6
17862 else
17863   
17864         ol_DB_LIB=-ldb-3
17865         ol_LIBS=$LIBS
17866         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17867
17868         cat > conftest.$ac_ext <<EOF
17869 #line 17870 "configure"
17870 #include "confdefs.h"
17871
17872 #ifdef HAVE_DB_185_H
17873 # include <db_185.h>
17874 #else
17875 # include <db.h>
17876 #endif
17877
17878 #ifndef DB_VERSION_MAJOR
17879 # define DB_VERSION_MAJOR 1
17880 #endif
17881
17882 #ifndef NULL
17883 #define NULL ((void*)0)
17884 #endif
17885
17886 int main() {
17887
17888 #if DB_VERSION_MAJOR > 1
17889         {
17890                 char *version;
17891                 int major, minor, patch;
17892
17893                 version = db_version( &major, &minor, &patch );
17894
17895                 if( major != DB_VERSION_MAJOR ||
17896                         minor < DB_VERSION_MINOR )
17897                 {
17898                         printf("Berkeley DB version mismatch\n"
17899                                 "\theader: %s\n\tlibrary: %s\n",
17900                                 DB_VERSION_STRING, version);
17901                         return 1;
17902                 }
17903         }
17904 #endif
17905
17906 #if DB_VERSION_MAJOR > 2
17907         db_env_create( NULL, 0 );
17908 #elif DB_VERSION_MAJOR > 1
17909         db_appexit( NULL );
17910 #else
17911         (void) dbopen( NULL, 0, 0, 0, NULL);
17912 #endif
17913
17914 ; return 0; }
17915 EOF
17916 if { (eval echo configure:17917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17917   rm -rf conftest*
17918   ol_cv_db_db_3=yes
17919 else
17920   echo "configure: failed program was:" >&5
17921   cat conftest.$ac_ext >&5
17922   rm -rf conftest*
17923   ol_cv_db_db_3=no
17924 fi
17925 rm -f conftest*
17926
17927         LIBS="$ol_LIBS"
17928
17929 fi
17930
17931 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17932
17933         if test $ol_cv_db_db_3 = yes ; then
17934                 ol_cv_lib_db=-ldb-3
17935         fi
17936 fi
17937
17938 if test $ol_cv_lib_db = no ; then
17939         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17940 echo "configure:17941: checking for Berkeley DB link (-ldb2)" >&5
17941 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17942   echo $ac_n "(cached) $ac_c" 1>&6
17943 else
17944   
17945         ol_DB_LIB=-ldb2
17946         ol_LIBS=$LIBS
17947         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17948
17949         cat > conftest.$ac_ext <<EOF
17950 #line 17951 "configure"
17951 #include "confdefs.h"
17952
17953 #ifdef HAVE_DB_185_H
17954 # include <db_185.h>
17955 #else
17956 # include <db.h>
17957 #endif
17958
17959 #ifndef DB_VERSION_MAJOR
17960 # define DB_VERSION_MAJOR 1
17961 #endif
17962
17963 #ifndef NULL
17964 #define NULL ((void*)0)
17965 #endif
17966
17967 int main() {
17968
17969 #if DB_VERSION_MAJOR > 1
17970         {
17971                 char *version;
17972                 int major, minor, patch;
17973
17974                 version = db_version( &major, &minor, &patch );
17975
17976                 if( major != DB_VERSION_MAJOR ||
17977                         minor < DB_VERSION_MINOR )
17978                 {
17979                         printf("Berkeley DB version mismatch\n"
17980                                 "\theader: %s\n\tlibrary: %s\n",
17981                                 DB_VERSION_STRING, version);
17982                         return 1;
17983                 }
17984         }
17985 #endif
17986
17987 #if DB_VERSION_MAJOR > 2
17988         db_env_create( NULL, 0 );
17989 #elif DB_VERSION_MAJOR > 1
17990         db_appexit( NULL );
17991 #else
17992         (void) dbopen( NULL, 0, 0, 0, NULL);
17993 #endif
17994
17995 ; return 0; }
17996 EOF
17997 if { (eval echo configure:17998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17998   rm -rf conftest*
17999   ol_cv_db_db2=yes
18000 else
18001   echo "configure: failed program was:" >&5
18002   cat conftest.$ac_ext >&5
18003   rm -rf conftest*
18004   ol_cv_db_db2=no
18005 fi
18006 rm -f conftest*
18007
18008         LIBS="$ol_LIBS"
18009
18010 fi
18011
18012 echo "$ac_t""$ol_cv_db_db2" 1>&6
18013
18014         if test $ol_cv_db_db2 = yes ; then
18015                 ol_cv_lib_db=-ldb2
18016         fi
18017 fi
18018
18019 if test $ol_cv_lib_db = no ; then
18020         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18021 echo "configure:18022: checking for Berkeley DB link (-ldb-2)" >&5
18022 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18023   echo $ac_n "(cached) $ac_c" 1>&6
18024 else
18025   
18026         ol_DB_LIB=-ldb-2
18027         ol_LIBS=$LIBS
18028         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18029
18030         cat > conftest.$ac_ext <<EOF
18031 #line 18032 "configure"
18032 #include "confdefs.h"
18033
18034 #ifdef HAVE_DB_185_H
18035 # include <db_185.h>
18036 #else
18037 # include <db.h>
18038 #endif
18039
18040 #ifndef DB_VERSION_MAJOR
18041 # define DB_VERSION_MAJOR 1
18042 #endif
18043
18044 #ifndef NULL
18045 #define NULL ((void*)0)
18046 #endif
18047
18048 int main() {
18049
18050 #if DB_VERSION_MAJOR > 1
18051         {
18052                 char *version;
18053                 int major, minor, patch;
18054
18055                 version = db_version( &major, &minor, &patch );
18056
18057                 if( major != DB_VERSION_MAJOR ||
18058                         minor < DB_VERSION_MINOR )
18059                 {
18060                         printf("Berkeley DB version mismatch\n"
18061                                 "\theader: %s\n\tlibrary: %s\n",
18062                                 DB_VERSION_STRING, version);
18063                         return 1;
18064                 }
18065         }
18066 #endif
18067
18068 #if DB_VERSION_MAJOR > 2
18069         db_env_create( NULL, 0 );
18070 #elif DB_VERSION_MAJOR > 1
18071         db_appexit( NULL );
18072 #else
18073         (void) dbopen( NULL, 0, 0, 0, NULL);
18074 #endif
18075
18076 ; return 0; }
18077 EOF
18078 if { (eval echo configure:18079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18079   rm -rf conftest*
18080   ol_cv_db_db_2=yes
18081 else
18082   echo "configure: failed program was:" >&5
18083   cat conftest.$ac_ext >&5
18084   rm -rf conftest*
18085   ol_cv_db_db_2=no
18086 fi
18087 rm -f conftest*
18088
18089         LIBS="$ol_LIBS"
18090
18091 fi
18092
18093 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18094
18095         if test $ol_cv_db_db_2 = yes ; then
18096                 ol_cv_lib_db=-ldb-2
18097         fi
18098 fi
18099
18100 if test $ol_cv_lib_db = no ; then
18101         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18102 echo "configure:18103: checking for Berkeley DB link (-ldb1)" >&5
18103 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18104   echo $ac_n "(cached) $ac_c" 1>&6
18105 else
18106   
18107         ol_DB_LIB=-ldb1
18108         ol_LIBS=$LIBS
18109         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18110
18111         cat > conftest.$ac_ext <<EOF
18112 #line 18113 "configure"
18113 #include "confdefs.h"
18114
18115 #ifdef HAVE_DB_185_H
18116 # include <db_185.h>
18117 #else
18118 # include <db.h>
18119 #endif
18120
18121 #ifndef DB_VERSION_MAJOR
18122 # define DB_VERSION_MAJOR 1
18123 #endif
18124
18125 #ifndef NULL
18126 #define NULL ((void*)0)
18127 #endif
18128
18129 int main() {
18130
18131 #if DB_VERSION_MAJOR > 1
18132         {
18133                 char *version;
18134                 int major, minor, patch;
18135
18136                 version = db_version( &major, &minor, &patch );
18137
18138                 if( major != DB_VERSION_MAJOR ||
18139                         minor < DB_VERSION_MINOR )
18140                 {
18141                         printf("Berkeley DB version mismatch\n"
18142                                 "\theader: %s\n\tlibrary: %s\n",
18143                                 DB_VERSION_STRING, version);
18144                         return 1;
18145                 }
18146         }
18147 #endif
18148
18149 #if DB_VERSION_MAJOR > 2
18150         db_env_create( NULL, 0 );
18151 #elif DB_VERSION_MAJOR > 1
18152         db_appexit( NULL );
18153 #else
18154         (void) dbopen( NULL, 0, 0, 0, NULL);
18155 #endif
18156
18157 ; return 0; }
18158 EOF
18159 if { (eval echo configure:18160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18160   rm -rf conftest*
18161   ol_cv_db_db1=yes
18162 else
18163   echo "configure: failed program was:" >&5
18164   cat conftest.$ac_ext >&5
18165   rm -rf conftest*
18166   ol_cv_db_db1=no
18167 fi
18168 rm -f conftest*
18169
18170         LIBS="$ol_LIBS"
18171
18172 fi
18173
18174 echo "$ac_t""$ol_cv_db_db1" 1>&6
18175
18176         if test $ol_cv_db_db1 = yes ; then
18177                 ol_cv_lib_db=-ldb1
18178         fi
18179 fi
18180
18181 if test $ol_cv_lib_db = no ; then
18182         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18183 echo "configure:18184: checking for Berkeley DB link (-ldb-1)" >&5
18184 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18185   echo $ac_n "(cached) $ac_c" 1>&6
18186 else
18187   
18188         ol_DB_LIB=-ldb-1
18189         ol_LIBS=$LIBS
18190         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18191
18192         cat > conftest.$ac_ext <<EOF
18193 #line 18194 "configure"
18194 #include "confdefs.h"
18195
18196 #ifdef HAVE_DB_185_H
18197 # include <db_185.h>
18198 #else
18199 # include <db.h>
18200 #endif
18201
18202 #ifndef DB_VERSION_MAJOR
18203 # define DB_VERSION_MAJOR 1
18204 #endif
18205
18206 #ifndef NULL
18207 #define NULL ((void*)0)
18208 #endif
18209
18210 int main() {
18211
18212 #if DB_VERSION_MAJOR > 1
18213         {
18214                 char *version;
18215                 int major, minor, patch;
18216
18217                 version = db_version( &major, &minor, &patch );
18218
18219                 if( major != DB_VERSION_MAJOR ||
18220                         minor < DB_VERSION_MINOR )
18221                 {
18222                         printf("Berkeley DB version mismatch\n"
18223                                 "\theader: %s\n\tlibrary: %s\n",
18224                                 DB_VERSION_STRING, version);
18225                         return 1;
18226                 }
18227         }
18228 #endif
18229
18230 #if DB_VERSION_MAJOR > 2
18231         db_env_create( NULL, 0 );
18232 #elif DB_VERSION_MAJOR > 1
18233         db_appexit( NULL );
18234 #else
18235         (void) dbopen( NULL, 0, 0, 0, NULL);
18236 #endif
18237
18238 ; return 0; }
18239 EOF
18240 if { (eval echo configure:18241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18241   rm -rf conftest*
18242   ol_cv_db_db_1=yes
18243 else
18244   echo "configure: failed program was:" >&5
18245   cat conftest.$ac_ext >&5
18246   rm -rf conftest*
18247   ol_cv_db_db_1=no
18248 fi
18249 rm -f conftest*
18250
18251         LIBS="$ol_LIBS"
18252
18253 fi
18254
18255 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18256
18257         if test $ol_cv_db_db_1 = yes ; then
18258                 ol_cv_lib_db=-ldb-1
18259         fi
18260 fi
18261
18262
18263                 if test "$ol_cv_lib_db" != no ; then
18264                         ol_cv_berkeley_db=yes
18265                 fi
18266         fi
18267 fi
18268
18269         else
18270                 ol_cv_berkeley_db=no
18271 for ac_hdr in db.h
18272 do
18273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18275 echo "configure:18276: checking for $ac_hdr" >&5
18276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18277   echo $ac_n "(cached) $ac_c" 1>&6
18278 else
18279   cat > conftest.$ac_ext <<EOF
18280 #line 18281 "configure"
18281 #include "confdefs.h"
18282 #include <$ac_hdr>
18283 EOF
18284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18285 { (eval echo configure:18286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18287 if test -z "$ac_err"; then
18288   rm -rf conftest*
18289   eval "ac_cv_header_$ac_safe=yes"
18290 else
18291   echo "$ac_err" >&5
18292   echo "configure: failed program was:" >&5
18293   cat conftest.$ac_ext >&5
18294   rm -rf conftest*
18295   eval "ac_cv_header_$ac_safe=no"
18296 fi
18297 rm -f conftest*
18298 fi
18299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18300   echo "$ac_t""yes" 1>&6
18301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18302   cat >> confdefs.h <<EOF
18303 #define $ac_tr_hdr 1
18304 EOF
18305  
18306 else
18307   echo "$ac_t""no" 1>&6
18308 fi
18309 done
18310
18311 if test $ac_cv_header_db_h = yes; then
18312         ol_cv_lib_db=no
18313 if test $ol_cv_lib_db = no ; then
18314         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18315 echo "configure:18316: checking for Berkeley DB link (default)" >&5
18316 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18317   echo $ac_n "(cached) $ac_c" 1>&6
18318 else
18319   
18320         ol_DB_LIB=
18321         ol_LIBS=$LIBS
18322         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18323
18324         cat > conftest.$ac_ext <<EOF
18325 #line 18326 "configure"
18326 #include "confdefs.h"
18327
18328 #ifdef HAVE_DB_185_H
18329 # include <db_185.h>
18330 #else
18331 # include <db.h>
18332 #endif
18333
18334 #ifndef DB_VERSION_MAJOR
18335 # define DB_VERSION_MAJOR 1
18336 #endif
18337
18338 #ifndef NULL
18339 #define NULL ((void*)0)
18340 #endif
18341
18342 int main() {
18343
18344 #if DB_VERSION_MAJOR > 1
18345         {
18346                 char *version;
18347                 int major, minor, patch;
18348
18349                 version = db_version( &major, &minor, &patch );
18350
18351                 if( major != DB_VERSION_MAJOR ||
18352                         minor < DB_VERSION_MINOR )
18353                 {
18354                         printf("Berkeley DB version mismatch\n"
18355                                 "\theader: %s\n\tlibrary: %s\n",
18356                                 DB_VERSION_STRING, version);
18357                         return 1;
18358                 }
18359         }
18360 #endif
18361
18362 #if DB_VERSION_MAJOR > 2
18363         db_env_create( NULL, 0 );
18364 #elif DB_VERSION_MAJOR > 1
18365         db_appexit( NULL );
18366 #else
18367         (void) dbopen( NULL, 0, 0, 0, NULL);
18368 #endif
18369
18370 ; return 0; }
18371 EOF
18372 if { (eval echo configure:18373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18373   rm -rf conftest*
18374   ol_cv_db_none=yes
18375 else
18376   echo "configure: failed program was:" >&5
18377   cat conftest.$ac_ext >&5
18378   rm -rf conftest*
18379   ol_cv_db_none=no
18380 fi
18381 rm -f conftest*
18382
18383         LIBS="$ol_LIBS"
18384
18385 fi
18386
18387 echo "$ac_t""$ol_cv_db_none" 1>&6
18388
18389         if test $ol_cv_db_none = yes ; then
18390                 ol_cv_lib_db=yes
18391         fi
18392 fi
18393
18394 if test $ol_cv_lib_db = no ; then
18395         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18396 echo "configure:18397: checking for Berkeley DB link (-ldb42)" >&5
18397 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18398   echo $ac_n "(cached) $ac_c" 1>&6
18399 else
18400   
18401         ol_DB_LIB=-ldb42
18402         ol_LIBS=$LIBS
18403         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18404
18405         cat > conftest.$ac_ext <<EOF
18406 #line 18407 "configure"
18407 #include "confdefs.h"
18408
18409 #ifdef HAVE_DB_185_H
18410 # include <db_185.h>
18411 #else
18412 # include <db.h>
18413 #endif
18414
18415 #ifndef DB_VERSION_MAJOR
18416 # define DB_VERSION_MAJOR 1
18417 #endif
18418
18419 #ifndef NULL
18420 #define NULL ((void*)0)
18421 #endif
18422
18423 int main() {
18424
18425 #if DB_VERSION_MAJOR > 1
18426         {
18427                 char *version;
18428                 int major, minor, patch;
18429
18430                 version = db_version( &major, &minor, &patch );
18431
18432                 if( major != DB_VERSION_MAJOR ||
18433                         minor < DB_VERSION_MINOR )
18434                 {
18435                         printf("Berkeley DB version mismatch\n"
18436                                 "\theader: %s\n\tlibrary: %s\n",
18437                                 DB_VERSION_STRING, version);
18438                         return 1;
18439                 }
18440         }
18441 #endif
18442
18443 #if DB_VERSION_MAJOR > 2
18444         db_env_create( NULL, 0 );
18445 #elif DB_VERSION_MAJOR > 1
18446         db_appexit( NULL );
18447 #else
18448         (void) dbopen( NULL, 0, 0, 0, NULL);
18449 #endif
18450
18451 ; return 0; }
18452 EOF
18453 if { (eval echo configure:18454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18454   rm -rf conftest*
18455   ol_cv_db_db42=yes
18456 else
18457   echo "configure: failed program was:" >&5
18458   cat conftest.$ac_ext >&5
18459   rm -rf conftest*
18460   ol_cv_db_db42=no
18461 fi
18462 rm -f conftest*
18463
18464         LIBS="$ol_LIBS"
18465
18466 fi
18467
18468 echo "$ac_t""$ol_cv_db_db42" 1>&6
18469
18470         if test $ol_cv_db_db42 = yes ; then
18471                 ol_cv_lib_db=-ldb42
18472         fi
18473 fi
18474
18475 if test $ol_cv_lib_db = no ; then
18476         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18477 echo "configure:18478: checking for Berkeley DB link (-ldb-42)" >&5
18478 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18479   echo $ac_n "(cached) $ac_c" 1>&6
18480 else
18481   
18482         ol_DB_LIB=-ldb-42
18483         ol_LIBS=$LIBS
18484         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18485
18486         cat > conftest.$ac_ext <<EOF
18487 #line 18488 "configure"
18488 #include "confdefs.h"
18489
18490 #ifdef HAVE_DB_185_H
18491 # include <db_185.h>
18492 #else
18493 # include <db.h>
18494 #endif
18495
18496 #ifndef DB_VERSION_MAJOR
18497 # define DB_VERSION_MAJOR 1
18498 #endif
18499
18500 #ifndef NULL
18501 #define NULL ((void*)0)
18502 #endif
18503
18504 int main() {
18505
18506 #if DB_VERSION_MAJOR > 1
18507         {
18508                 char *version;
18509                 int major, minor, patch;
18510
18511                 version = db_version( &major, &minor, &patch );
18512
18513                 if( major != DB_VERSION_MAJOR ||
18514                         minor < DB_VERSION_MINOR )
18515                 {
18516                         printf("Berkeley DB version mismatch\n"
18517                                 "\theader: %s\n\tlibrary: %s\n",
18518                                 DB_VERSION_STRING, version);
18519                         return 1;
18520                 }
18521         }
18522 #endif
18523
18524 #if DB_VERSION_MAJOR > 2
18525         db_env_create( NULL, 0 );
18526 #elif DB_VERSION_MAJOR > 1
18527         db_appexit( NULL );
18528 #else
18529         (void) dbopen( NULL, 0, 0, 0, NULL);
18530 #endif
18531
18532 ; return 0; }
18533 EOF
18534 if { (eval echo configure:18535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18535   rm -rf conftest*
18536   ol_cv_db_db_42=yes
18537 else
18538   echo "configure: failed program was:" >&5
18539   cat conftest.$ac_ext >&5
18540   rm -rf conftest*
18541   ol_cv_db_db_42=no
18542 fi
18543 rm -f conftest*
18544
18545         LIBS="$ol_LIBS"
18546
18547 fi
18548
18549 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18550
18551         if test $ol_cv_db_db_42 = yes ; then
18552                 ol_cv_lib_db=-ldb-42
18553         fi
18554 fi
18555
18556 if test $ol_cv_lib_db = no ; then
18557         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18558 echo "configure:18559: checking for Berkeley DB link (-ldb-4.2)" >&5
18559 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18560   echo $ac_n "(cached) $ac_c" 1>&6
18561 else
18562   
18563         ol_DB_LIB=-ldb-4.2
18564         ol_LIBS=$LIBS
18565         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18566
18567         cat > conftest.$ac_ext <<EOF
18568 #line 18569 "configure"
18569 #include "confdefs.h"
18570
18571 #ifdef HAVE_DB_185_H
18572 # include <db_185.h>
18573 #else
18574 # include <db.h>
18575 #endif
18576
18577 #ifndef DB_VERSION_MAJOR
18578 # define DB_VERSION_MAJOR 1
18579 #endif
18580
18581 #ifndef NULL
18582 #define NULL ((void*)0)
18583 #endif
18584
18585 int main() {
18586
18587 #if DB_VERSION_MAJOR > 1
18588         {
18589                 char *version;
18590                 int major, minor, patch;
18591
18592                 version = db_version( &major, &minor, &patch );
18593
18594                 if( major != DB_VERSION_MAJOR ||
18595                         minor < DB_VERSION_MINOR )
18596                 {
18597                         printf("Berkeley DB version mismatch\n"
18598                                 "\theader: %s\n\tlibrary: %s\n",
18599                                 DB_VERSION_STRING, version);
18600                         return 1;
18601                 }
18602         }
18603 #endif
18604
18605 #if DB_VERSION_MAJOR > 2
18606         db_env_create( NULL, 0 );
18607 #elif DB_VERSION_MAJOR > 1
18608         db_appexit( NULL );
18609 #else
18610         (void) dbopen( NULL, 0, 0, 0, NULL);
18611 #endif
18612
18613 ; return 0; }
18614 EOF
18615 if { (eval echo configure:18616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18616   rm -rf conftest*
18617   ol_cv_db_db_4_dot_2=yes
18618 else
18619   echo "configure: failed program was:" >&5
18620   cat conftest.$ac_ext >&5
18621   rm -rf conftest*
18622   ol_cv_db_db_4_dot_2=no
18623 fi
18624 rm -f conftest*
18625
18626         LIBS="$ol_LIBS"
18627
18628 fi
18629
18630 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18631
18632         if test $ol_cv_db_db_4_dot_2 = yes ; then
18633                 ol_cv_lib_db=-ldb-4.2
18634         fi
18635 fi
18636
18637 if test $ol_cv_lib_db = no ; then
18638         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18639 echo "configure:18640: checking for Berkeley DB link (-ldb-4-2)" >&5
18640 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18641   echo $ac_n "(cached) $ac_c" 1>&6
18642 else
18643   
18644         ol_DB_LIB=-ldb-4-2
18645         ol_LIBS=$LIBS
18646         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18647
18648         cat > conftest.$ac_ext <<EOF
18649 #line 18650 "configure"
18650 #include "confdefs.h"
18651
18652 #ifdef HAVE_DB_185_H
18653 # include <db_185.h>
18654 #else
18655 # include <db.h>
18656 #endif
18657
18658 #ifndef DB_VERSION_MAJOR
18659 # define DB_VERSION_MAJOR 1
18660 #endif
18661
18662 #ifndef NULL
18663 #define NULL ((void*)0)
18664 #endif
18665
18666 int main() {
18667
18668 #if DB_VERSION_MAJOR > 1
18669         {
18670                 char *version;
18671                 int major, minor, patch;
18672
18673                 version = db_version( &major, &minor, &patch );
18674
18675                 if( major != DB_VERSION_MAJOR ||
18676                         minor < DB_VERSION_MINOR )
18677                 {
18678                         printf("Berkeley DB version mismatch\n"
18679                                 "\theader: %s\n\tlibrary: %s\n",
18680                                 DB_VERSION_STRING, version);
18681                         return 1;
18682                 }
18683         }
18684 #endif
18685
18686 #if DB_VERSION_MAJOR > 2
18687         db_env_create( NULL, 0 );
18688 #elif DB_VERSION_MAJOR > 1
18689         db_appexit( NULL );
18690 #else
18691         (void) dbopen( NULL, 0, 0, 0, NULL);
18692 #endif
18693
18694 ; return 0; }
18695 EOF
18696 if { (eval echo configure:18697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18697   rm -rf conftest*
18698   ol_cv_db_db_4_2=yes
18699 else
18700   echo "configure: failed program was:" >&5
18701   cat conftest.$ac_ext >&5
18702   rm -rf conftest*
18703   ol_cv_db_db_4_2=no
18704 fi
18705 rm -f conftest*
18706
18707         LIBS="$ol_LIBS"
18708
18709 fi
18710
18711 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18712
18713         if test $ol_cv_db_db_4_2 = yes ; then
18714                 ol_cv_lib_db=-ldb-4-2
18715         fi
18716 fi
18717
18718 if test $ol_cv_lib_db = no ; then
18719         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18720 echo "configure:18721: checking for Berkeley DB link (-ldb-4)" >&5
18721 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18722   echo $ac_n "(cached) $ac_c" 1>&6
18723 else
18724   
18725         ol_DB_LIB=-ldb-4
18726         ol_LIBS=$LIBS
18727         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18728
18729         cat > conftest.$ac_ext <<EOF
18730 #line 18731 "configure"
18731 #include "confdefs.h"
18732
18733 #ifdef HAVE_DB_185_H
18734 # include <db_185.h>
18735 #else
18736 # include <db.h>
18737 #endif
18738
18739 #ifndef DB_VERSION_MAJOR
18740 # define DB_VERSION_MAJOR 1
18741 #endif
18742
18743 #ifndef NULL
18744 #define NULL ((void*)0)
18745 #endif
18746
18747 int main() {
18748
18749 #if DB_VERSION_MAJOR > 1
18750         {
18751                 char *version;
18752                 int major, minor, patch;
18753
18754                 version = db_version( &major, &minor, &patch );
18755
18756                 if( major != DB_VERSION_MAJOR ||
18757                         minor < DB_VERSION_MINOR )
18758                 {
18759                         printf("Berkeley DB version mismatch\n"
18760                                 "\theader: %s\n\tlibrary: %s\n",
18761                                 DB_VERSION_STRING, version);
18762                         return 1;
18763                 }
18764         }
18765 #endif
18766
18767 #if DB_VERSION_MAJOR > 2
18768         db_env_create( NULL, 0 );
18769 #elif DB_VERSION_MAJOR > 1
18770         db_appexit( NULL );
18771 #else
18772         (void) dbopen( NULL, 0, 0, 0, NULL);
18773 #endif
18774
18775 ; return 0; }
18776 EOF
18777 if { (eval echo configure:18778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18778   rm -rf conftest*
18779   ol_cv_db_db_4=yes
18780 else
18781   echo "configure: failed program was:" >&5
18782   cat conftest.$ac_ext >&5
18783   rm -rf conftest*
18784   ol_cv_db_db_4=no
18785 fi
18786 rm -f conftest*
18787
18788         LIBS="$ol_LIBS"
18789
18790 fi
18791
18792 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18793
18794         if test $ol_cv_db_db_4 = yes ; then
18795                 ol_cv_lib_db=-ldb-4
18796         fi
18797 fi
18798
18799 if test $ol_cv_lib_db = no ; then
18800         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18801 echo "configure:18802: checking for Berkeley DB link (-ldb4)" >&5
18802 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18803   echo $ac_n "(cached) $ac_c" 1>&6
18804 else
18805   
18806         ol_DB_LIB=-ldb4
18807         ol_LIBS=$LIBS
18808         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18809
18810         cat > conftest.$ac_ext <<EOF
18811 #line 18812 "configure"
18812 #include "confdefs.h"
18813
18814 #ifdef HAVE_DB_185_H
18815 # include <db_185.h>
18816 #else
18817 # include <db.h>
18818 #endif
18819
18820 #ifndef DB_VERSION_MAJOR
18821 # define DB_VERSION_MAJOR 1
18822 #endif
18823
18824 #ifndef NULL
18825 #define NULL ((void*)0)
18826 #endif
18827
18828 int main() {
18829
18830 #if DB_VERSION_MAJOR > 1
18831         {
18832                 char *version;
18833                 int major, minor, patch;
18834
18835                 version = db_version( &major, &minor, &patch );
18836
18837                 if( major != DB_VERSION_MAJOR ||
18838                         minor < DB_VERSION_MINOR )
18839                 {
18840                         printf("Berkeley DB version mismatch\n"
18841                                 "\theader: %s\n\tlibrary: %s\n",
18842                                 DB_VERSION_STRING, version);
18843                         return 1;
18844                 }
18845         }
18846 #endif
18847
18848 #if DB_VERSION_MAJOR > 2
18849         db_env_create( NULL, 0 );
18850 #elif DB_VERSION_MAJOR > 1
18851         db_appexit( NULL );
18852 #else
18853         (void) dbopen( NULL, 0, 0, 0, NULL);
18854 #endif
18855
18856 ; return 0; }
18857 EOF
18858 if { (eval echo configure:18859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18859   rm -rf conftest*
18860   ol_cv_db_db4=yes
18861 else
18862   echo "configure: failed program was:" >&5
18863   cat conftest.$ac_ext >&5
18864   rm -rf conftest*
18865   ol_cv_db_db4=no
18866 fi
18867 rm -f conftest*
18868
18869         LIBS="$ol_LIBS"
18870
18871 fi
18872
18873 echo "$ac_t""$ol_cv_db_db4" 1>&6
18874
18875         if test $ol_cv_db_db4 = yes ; then
18876                 ol_cv_lib_db=-ldb4
18877         fi
18878 fi
18879
18880 if test $ol_cv_lib_db = no ; then
18881         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18882 echo "configure:18883: checking for Berkeley DB link (-ldb)" >&5
18883 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18884   echo $ac_n "(cached) $ac_c" 1>&6
18885 else
18886   
18887         ol_DB_LIB=-ldb
18888         ol_LIBS=$LIBS
18889         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18890
18891         cat > conftest.$ac_ext <<EOF
18892 #line 18893 "configure"
18893 #include "confdefs.h"
18894
18895 #ifdef HAVE_DB_185_H
18896 # include <db_185.h>
18897 #else
18898 # include <db.h>
18899 #endif
18900
18901 #ifndef DB_VERSION_MAJOR
18902 # define DB_VERSION_MAJOR 1
18903 #endif
18904
18905 #ifndef NULL
18906 #define NULL ((void*)0)
18907 #endif
18908
18909 int main() {
18910
18911 #if DB_VERSION_MAJOR > 1
18912         {
18913                 char *version;
18914                 int major, minor, patch;
18915
18916                 version = db_version( &major, &minor, &patch );
18917
18918                 if( major != DB_VERSION_MAJOR ||
18919                         minor < DB_VERSION_MINOR )
18920                 {
18921                         printf("Berkeley DB version mismatch\n"
18922                                 "\theader: %s\n\tlibrary: %s\n",
18923                                 DB_VERSION_STRING, version);
18924                         return 1;
18925                 }
18926         }
18927 #endif
18928
18929 #if DB_VERSION_MAJOR > 2
18930         db_env_create( NULL, 0 );
18931 #elif DB_VERSION_MAJOR > 1
18932         db_appexit( NULL );
18933 #else
18934         (void) dbopen( NULL, 0, 0, 0, NULL);
18935 #endif
18936
18937 ; return 0; }
18938 EOF
18939 if { (eval echo configure:18940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18940   rm -rf conftest*
18941   ol_cv_db_db=yes
18942 else
18943   echo "configure: failed program was:" >&5
18944   cat conftest.$ac_ext >&5
18945   rm -rf conftest*
18946   ol_cv_db_db=no
18947 fi
18948 rm -f conftest*
18949
18950         LIBS="$ol_LIBS"
18951
18952 fi
18953
18954 echo "$ac_t""$ol_cv_db_db" 1>&6
18955
18956         if test $ol_cv_db_db = yes ; then
18957                 ol_cv_lib_db=-ldb
18958         fi
18959 fi
18960
18961 if test $ol_cv_lib_db = no ; then
18962         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18963 echo "configure:18964: checking for Berkeley DB link (-ldb41)" >&5
18964 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18965   echo $ac_n "(cached) $ac_c" 1>&6
18966 else
18967   
18968         ol_DB_LIB=-ldb41
18969         ol_LIBS=$LIBS
18970         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18971
18972         cat > conftest.$ac_ext <<EOF
18973 #line 18974 "configure"
18974 #include "confdefs.h"
18975
18976 #ifdef HAVE_DB_185_H
18977 # include <db_185.h>
18978 #else
18979 # include <db.h>
18980 #endif
18981
18982 #ifndef DB_VERSION_MAJOR
18983 # define DB_VERSION_MAJOR 1
18984 #endif
18985
18986 #ifndef NULL
18987 #define NULL ((void*)0)
18988 #endif
18989
18990 int main() {
18991
18992 #if DB_VERSION_MAJOR > 1
18993         {
18994                 char *version;
18995                 int major, minor, patch;
18996
18997                 version = db_version( &major, &minor, &patch );
18998
18999                 if( major != DB_VERSION_MAJOR ||
19000                         minor < DB_VERSION_MINOR )
19001                 {
19002                         printf("Berkeley DB version mismatch\n"
19003                                 "\theader: %s\n\tlibrary: %s\n",
19004                                 DB_VERSION_STRING, version);
19005                         return 1;
19006                 }
19007         }
19008 #endif
19009
19010 #if DB_VERSION_MAJOR > 2
19011         db_env_create( NULL, 0 );
19012 #elif DB_VERSION_MAJOR > 1
19013         db_appexit( NULL );
19014 #else
19015         (void) dbopen( NULL, 0, 0, 0, NULL);
19016 #endif
19017
19018 ; return 0; }
19019 EOF
19020 if { (eval echo configure:19021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19021   rm -rf conftest*
19022   ol_cv_db_db41=yes
19023 else
19024   echo "configure: failed program was:" >&5
19025   cat conftest.$ac_ext >&5
19026   rm -rf conftest*
19027   ol_cv_db_db41=no
19028 fi
19029 rm -f conftest*
19030
19031         LIBS="$ol_LIBS"
19032
19033 fi
19034
19035 echo "$ac_t""$ol_cv_db_db41" 1>&6
19036
19037         if test $ol_cv_db_db41 = yes ; then
19038                 ol_cv_lib_db=-ldb41
19039         fi
19040 fi
19041
19042 if test $ol_cv_lib_db = no ; then
19043         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19044 echo "configure:19045: checking for Berkeley DB link (-ldb-41)" >&5
19045 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19046   echo $ac_n "(cached) $ac_c" 1>&6
19047 else
19048   
19049         ol_DB_LIB=-ldb-41
19050         ol_LIBS=$LIBS
19051         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19052
19053         cat > conftest.$ac_ext <<EOF
19054 #line 19055 "configure"
19055 #include "confdefs.h"
19056
19057 #ifdef HAVE_DB_185_H
19058 # include <db_185.h>
19059 #else
19060 # include <db.h>
19061 #endif
19062
19063 #ifndef DB_VERSION_MAJOR
19064 # define DB_VERSION_MAJOR 1
19065 #endif
19066
19067 #ifndef NULL
19068 #define NULL ((void*)0)
19069 #endif
19070
19071 int main() {
19072
19073 #if DB_VERSION_MAJOR > 1
19074         {
19075                 char *version;
19076                 int major, minor, patch;
19077
19078                 version = db_version( &major, &minor, &patch );
19079
19080                 if( major != DB_VERSION_MAJOR ||
19081                         minor < DB_VERSION_MINOR )
19082                 {
19083                         printf("Berkeley DB version mismatch\n"
19084                                 "\theader: %s\n\tlibrary: %s\n",
19085                                 DB_VERSION_STRING, version);
19086                         return 1;
19087                 }
19088         }
19089 #endif
19090
19091 #if DB_VERSION_MAJOR > 2
19092         db_env_create( NULL, 0 );
19093 #elif DB_VERSION_MAJOR > 1
19094         db_appexit( NULL );
19095 #else
19096         (void) dbopen( NULL, 0, 0, 0, NULL);
19097 #endif
19098
19099 ; return 0; }
19100 EOF
19101 if { (eval echo configure:19102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19102   rm -rf conftest*
19103   ol_cv_db_db_41=yes
19104 else
19105   echo "configure: failed program was:" >&5
19106   cat conftest.$ac_ext >&5
19107   rm -rf conftest*
19108   ol_cv_db_db_41=no
19109 fi
19110 rm -f conftest*
19111
19112         LIBS="$ol_LIBS"
19113
19114 fi
19115
19116 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19117
19118         if test $ol_cv_db_db_41 = yes ; then
19119                 ol_cv_lib_db=-ldb-41
19120         fi
19121 fi
19122
19123 if test $ol_cv_lib_db = no ; then
19124         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19125 echo "configure:19126: checking for Berkeley DB link (-ldb-4.1)" >&5
19126 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19127   echo $ac_n "(cached) $ac_c" 1>&6
19128 else
19129   
19130         ol_DB_LIB=-ldb-4.1
19131         ol_LIBS=$LIBS
19132         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19133
19134         cat > conftest.$ac_ext <<EOF
19135 #line 19136 "configure"
19136 #include "confdefs.h"
19137
19138 #ifdef HAVE_DB_185_H
19139 # include <db_185.h>
19140 #else
19141 # include <db.h>
19142 #endif
19143
19144 #ifndef DB_VERSION_MAJOR
19145 # define DB_VERSION_MAJOR 1
19146 #endif
19147
19148 #ifndef NULL
19149 #define NULL ((void*)0)
19150 #endif
19151
19152 int main() {
19153
19154 #if DB_VERSION_MAJOR > 1
19155         {
19156                 char *version;
19157                 int major, minor, patch;
19158
19159                 version = db_version( &major, &minor, &patch );
19160
19161                 if( major != DB_VERSION_MAJOR ||
19162                         minor < DB_VERSION_MINOR )
19163                 {
19164                         printf("Berkeley DB version mismatch\n"
19165                                 "\theader: %s\n\tlibrary: %s\n",
19166                                 DB_VERSION_STRING, version);
19167                         return 1;
19168                 }
19169         }
19170 #endif
19171
19172 #if DB_VERSION_MAJOR > 2
19173         db_env_create( NULL, 0 );
19174 #elif DB_VERSION_MAJOR > 1
19175         db_appexit( NULL );
19176 #else
19177         (void) dbopen( NULL, 0, 0, 0, NULL);
19178 #endif
19179
19180 ; return 0; }
19181 EOF
19182 if { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19183   rm -rf conftest*
19184   ol_cv_db_db_4_dot_1=yes
19185 else
19186   echo "configure: failed program was:" >&5
19187   cat conftest.$ac_ext >&5
19188   rm -rf conftest*
19189   ol_cv_db_db_4_dot_1=no
19190 fi
19191 rm -f conftest*
19192
19193         LIBS="$ol_LIBS"
19194
19195 fi
19196
19197 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19198
19199         if test $ol_cv_db_db_4_dot_1 = yes ; then
19200                 ol_cv_lib_db=-ldb-4.1
19201         fi
19202 fi
19203
19204 if test $ol_cv_lib_db = no ; then
19205         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19206 echo "configure:19207: checking for Berkeley DB link (-ldb-4-1)" >&5
19207 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19208   echo $ac_n "(cached) $ac_c" 1>&6
19209 else
19210   
19211         ol_DB_LIB=-ldb-4-1
19212         ol_LIBS=$LIBS
19213         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19214
19215         cat > conftest.$ac_ext <<EOF
19216 #line 19217 "configure"
19217 #include "confdefs.h"
19218
19219 #ifdef HAVE_DB_185_H
19220 # include <db_185.h>
19221 #else
19222 # include <db.h>
19223 #endif
19224
19225 #ifndef DB_VERSION_MAJOR
19226 # define DB_VERSION_MAJOR 1
19227 #endif
19228
19229 #ifndef NULL
19230 #define NULL ((void*)0)
19231 #endif
19232
19233 int main() {
19234
19235 #if DB_VERSION_MAJOR > 1
19236         {
19237                 char *version;
19238                 int major, minor, patch;
19239
19240                 version = db_version( &major, &minor, &patch );
19241
19242                 if( major != DB_VERSION_MAJOR ||
19243                         minor < DB_VERSION_MINOR )
19244                 {
19245                         printf("Berkeley DB version mismatch\n"
19246                                 "\theader: %s\n\tlibrary: %s\n",
19247                                 DB_VERSION_STRING, version);
19248                         return 1;
19249                 }
19250         }
19251 #endif
19252
19253 #if DB_VERSION_MAJOR > 2
19254         db_env_create( NULL, 0 );
19255 #elif DB_VERSION_MAJOR > 1
19256         db_appexit( NULL );
19257 #else
19258         (void) dbopen( NULL, 0, 0, 0, NULL);
19259 #endif
19260
19261 ; return 0; }
19262 EOF
19263 if { (eval echo configure:19264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19264   rm -rf conftest*
19265   ol_cv_db_db_4_1=yes
19266 else
19267   echo "configure: failed program was:" >&5
19268   cat conftest.$ac_ext >&5
19269   rm -rf conftest*
19270   ol_cv_db_db_4_1=no
19271 fi
19272 rm -f conftest*
19273
19274         LIBS="$ol_LIBS"
19275
19276 fi
19277
19278 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19279
19280         if test $ol_cv_db_db_4_1 = yes ; then
19281                 ol_cv_lib_db=-ldb-4-1
19282         fi
19283 fi
19284
19285 if test $ol_cv_lib_db = no ; then
19286         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19287 echo "configure:19288: checking for Berkeley DB link (-ldb3)" >&5
19288 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19289   echo $ac_n "(cached) $ac_c" 1>&6
19290 else
19291   
19292         ol_DB_LIB=-ldb3
19293         ol_LIBS=$LIBS
19294         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19295
19296         cat > conftest.$ac_ext <<EOF
19297 #line 19298 "configure"
19298 #include "confdefs.h"
19299
19300 #ifdef HAVE_DB_185_H
19301 # include <db_185.h>
19302 #else
19303 # include <db.h>
19304 #endif
19305
19306 #ifndef DB_VERSION_MAJOR
19307 # define DB_VERSION_MAJOR 1
19308 #endif
19309
19310 #ifndef NULL
19311 #define NULL ((void*)0)
19312 #endif
19313
19314 int main() {
19315
19316 #if DB_VERSION_MAJOR > 1
19317         {
19318                 char *version;
19319                 int major, minor, patch;
19320
19321                 version = db_version( &major, &minor, &patch );
19322
19323                 if( major != DB_VERSION_MAJOR ||
19324                         minor < DB_VERSION_MINOR )
19325                 {
19326                         printf("Berkeley DB version mismatch\n"
19327                                 "\theader: %s\n\tlibrary: %s\n",
19328                                 DB_VERSION_STRING, version);
19329                         return 1;
19330                 }
19331         }
19332 #endif
19333
19334 #if DB_VERSION_MAJOR > 2
19335         db_env_create( NULL, 0 );
19336 #elif DB_VERSION_MAJOR > 1
19337         db_appexit( NULL );
19338 #else
19339         (void) dbopen( NULL, 0, 0, 0, NULL);
19340 #endif
19341
19342 ; return 0; }
19343 EOF
19344 if { (eval echo configure:19345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19345   rm -rf conftest*
19346   ol_cv_db_db3=yes
19347 else
19348   echo "configure: failed program was:" >&5
19349   cat conftest.$ac_ext >&5
19350   rm -rf conftest*
19351   ol_cv_db_db3=no
19352 fi
19353 rm -f conftest*
19354
19355         LIBS="$ol_LIBS"
19356
19357 fi
19358
19359 echo "$ac_t""$ol_cv_db_db3" 1>&6
19360
19361         if test $ol_cv_db_db3 = yes ; then
19362                 ol_cv_lib_db=-ldb3
19363         fi
19364 fi
19365
19366 if test $ol_cv_lib_db = no ; then
19367         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19368 echo "configure:19369: checking for Berkeley DB link (-ldb-3)" >&5
19369 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19370   echo $ac_n "(cached) $ac_c" 1>&6
19371 else
19372   
19373         ol_DB_LIB=-ldb-3
19374         ol_LIBS=$LIBS
19375         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19376
19377         cat > conftest.$ac_ext <<EOF
19378 #line 19379 "configure"
19379 #include "confdefs.h"
19380
19381 #ifdef HAVE_DB_185_H
19382 # include <db_185.h>
19383 #else
19384 # include <db.h>
19385 #endif
19386
19387 #ifndef DB_VERSION_MAJOR
19388 # define DB_VERSION_MAJOR 1
19389 #endif
19390
19391 #ifndef NULL
19392 #define NULL ((void*)0)
19393 #endif
19394
19395 int main() {
19396
19397 #if DB_VERSION_MAJOR > 1
19398         {
19399                 char *version;
19400                 int major, minor, patch;
19401
19402                 version = db_version( &major, &minor, &patch );
19403
19404                 if( major != DB_VERSION_MAJOR ||
19405                         minor < DB_VERSION_MINOR )
19406                 {
19407                         printf("Berkeley DB version mismatch\n"
19408                                 "\theader: %s\n\tlibrary: %s\n",
19409                                 DB_VERSION_STRING, version);
19410                         return 1;
19411                 }
19412         }
19413 #endif
19414
19415 #if DB_VERSION_MAJOR > 2
19416         db_env_create( NULL, 0 );
19417 #elif DB_VERSION_MAJOR > 1
19418         db_appexit( NULL );
19419 #else
19420         (void) dbopen( NULL, 0, 0, 0, NULL);
19421 #endif
19422
19423 ; return 0; }
19424 EOF
19425 if { (eval echo configure:19426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19426   rm -rf conftest*
19427   ol_cv_db_db_3=yes
19428 else
19429   echo "configure: failed program was:" >&5
19430   cat conftest.$ac_ext >&5
19431   rm -rf conftest*
19432   ol_cv_db_db_3=no
19433 fi
19434 rm -f conftest*
19435
19436         LIBS="$ol_LIBS"
19437
19438 fi
19439
19440 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19441
19442         if test $ol_cv_db_db_3 = yes ; then
19443                 ol_cv_lib_db=-ldb-3
19444         fi
19445 fi
19446
19447 if test $ol_cv_lib_db = no ; then
19448         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19449 echo "configure:19450: checking for Berkeley DB link (-ldb2)" >&5
19450 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19451   echo $ac_n "(cached) $ac_c" 1>&6
19452 else
19453   
19454         ol_DB_LIB=-ldb2
19455         ol_LIBS=$LIBS
19456         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19457
19458         cat > conftest.$ac_ext <<EOF
19459 #line 19460 "configure"
19460 #include "confdefs.h"
19461
19462 #ifdef HAVE_DB_185_H
19463 # include <db_185.h>
19464 #else
19465 # include <db.h>
19466 #endif
19467
19468 #ifndef DB_VERSION_MAJOR
19469 # define DB_VERSION_MAJOR 1
19470 #endif
19471
19472 #ifndef NULL
19473 #define NULL ((void*)0)
19474 #endif
19475
19476 int main() {
19477
19478 #if DB_VERSION_MAJOR > 1
19479         {
19480                 char *version;
19481                 int major, minor, patch;
19482
19483                 version = db_version( &major, &minor, &patch );
19484
19485                 if( major != DB_VERSION_MAJOR ||
19486                         minor < DB_VERSION_MINOR )
19487                 {
19488                         printf("Berkeley DB version mismatch\n"
19489                                 "\theader: %s\n\tlibrary: %s\n",
19490                                 DB_VERSION_STRING, version);
19491                         return 1;
19492                 }
19493         }
19494 #endif
19495
19496 #if DB_VERSION_MAJOR > 2
19497         db_env_create( NULL, 0 );
19498 #elif DB_VERSION_MAJOR > 1
19499         db_appexit( NULL );
19500 #else
19501         (void) dbopen( NULL, 0, 0, 0, NULL);
19502 #endif
19503
19504 ; return 0; }
19505 EOF
19506 if { (eval echo configure:19507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19507   rm -rf conftest*
19508   ol_cv_db_db2=yes
19509 else
19510   echo "configure: failed program was:" >&5
19511   cat conftest.$ac_ext >&5
19512   rm -rf conftest*
19513   ol_cv_db_db2=no
19514 fi
19515 rm -f conftest*
19516
19517         LIBS="$ol_LIBS"
19518
19519 fi
19520
19521 echo "$ac_t""$ol_cv_db_db2" 1>&6
19522
19523         if test $ol_cv_db_db2 = yes ; then
19524                 ol_cv_lib_db=-ldb2
19525         fi
19526 fi
19527
19528 if test $ol_cv_lib_db = no ; then
19529         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19530 echo "configure:19531: checking for Berkeley DB link (-ldb-2)" >&5
19531 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19532   echo $ac_n "(cached) $ac_c" 1>&6
19533 else
19534   
19535         ol_DB_LIB=-ldb-2
19536         ol_LIBS=$LIBS
19537         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19538
19539         cat > conftest.$ac_ext <<EOF
19540 #line 19541 "configure"
19541 #include "confdefs.h"
19542
19543 #ifdef HAVE_DB_185_H
19544 # include <db_185.h>
19545 #else
19546 # include <db.h>
19547 #endif
19548
19549 #ifndef DB_VERSION_MAJOR
19550 # define DB_VERSION_MAJOR 1
19551 #endif
19552
19553 #ifndef NULL
19554 #define NULL ((void*)0)
19555 #endif
19556
19557 int main() {
19558
19559 #if DB_VERSION_MAJOR > 1
19560         {
19561                 char *version;
19562                 int major, minor, patch;
19563
19564                 version = db_version( &major, &minor, &patch );
19565
19566                 if( major != DB_VERSION_MAJOR ||
19567                         minor < DB_VERSION_MINOR )
19568                 {
19569                         printf("Berkeley DB version mismatch\n"
19570                                 "\theader: %s\n\tlibrary: %s\n",
19571                                 DB_VERSION_STRING, version);
19572                         return 1;
19573                 }
19574         }
19575 #endif
19576
19577 #if DB_VERSION_MAJOR > 2
19578         db_env_create( NULL, 0 );
19579 #elif DB_VERSION_MAJOR > 1
19580         db_appexit( NULL );
19581 #else
19582         (void) dbopen( NULL, 0, 0, 0, NULL);
19583 #endif
19584
19585 ; return 0; }
19586 EOF
19587 if { (eval echo configure:19588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19588   rm -rf conftest*
19589   ol_cv_db_db_2=yes
19590 else
19591   echo "configure: failed program was:" >&5
19592   cat conftest.$ac_ext >&5
19593   rm -rf conftest*
19594   ol_cv_db_db_2=no
19595 fi
19596 rm -f conftest*
19597
19598         LIBS="$ol_LIBS"
19599
19600 fi
19601
19602 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19603
19604         if test $ol_cv_db_db_2 = yes ; then
19605                 ol_cv_lib_db=-ldb-2
19606         fi
19607 fi
19608
19609 if test $ol_cv_lib_db = no ; then
19610         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19611 echo "configure:19612: checking for Berkeley DB link (-ldb1)" >&5
19612 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19613   echo $ac_n "(cached) $ac_c" 1>&6
19614 else
19615   
19616         ol_DB_LIB=-ldb1
19617         ol_LIBS=$LIBS
19618         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19619
19620         cat > conftest.$ac_ext <<EOF
19621 #line 19622 "configure"
19622 #include "confdefs.h"
19623
19624 #ifdef HAVE_DB_185_H
19625 # include <db_185.h>
19626 #else
19627 # include <db.h>
19628 #endif
19629
19630 #ifndef DB_VERSION_MAJOR
19631 # define DB_VERSION_MAJOR 1
19632 #endif
19633
19634 #ifndef NULL
19635 #define NULL ((void*)0)
19636 #endif
19637
19638 int main() {
19639
19640 #if DB_VERSION_MAJOR > 1
19641         {
19642                 char *version;
19643                 int major, minor, patch;
19644
19645                 version = db_version( &major, &minor, &patch );
19646
19647                 if( major != DB_VERSION_MAJOR ||
19648                         minor < DB_VERSION_MINOR )
19649                 {
19650                         printf("Berkeley DB version mismatch\n"
19651                                 "\theader: %s\n\tlibrary: %s\n",
19652                                 DB_VERSION_STRING, version);
19653                         return 1;
19654                 }
19655         }
19656 #endif
19657
19658 #if DB_VERSION_MAJOR > 2
19659         db_env_create( NULL, 0 );
19660 #elif DB_VERSION_MAJOR > 1
19661         db_appexit( NULL );
19662 #else
19663         (void) dbopen( NULL, 0, 0, 0, NULL);
19664 #endif
19665
19666 ; return 0; }
19667 EOF
19668 if { (eval echo configure:19669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19669   rm -rf conftest*
19670   ol_cv_db_db1=yes
19671 else
19672   echo "configure: failed program was:" >&5
19673   cat conftest.$ac_ext >&5
19674   rm -rf conftest*
19675   ol_cv_db_db1=no
19676 fi
19677 rm -f conftest*
19678
19679         LIBS="$ol_LIBS"
19680
19681 fi
19682
19683 echo "$ac_t""$ol_cv_db_db1" 1>&6
19684
19685         if test $ol_cv_db_db1 = yes ; then
19686                 ol_cv_lib_db=-ldb1
19687         fi
19688 fi
19689
19690 if test $ol_cv_lib_db = no ; then
19691         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19692 echo "configure:19693: checking for Berkeley DB link (-ldb-1)" >&5
19693 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19694   echo $ac_n "(cached) $ac_c" 1>&6
19695 else
19696   
19697         ol_DB_LIB=-ldb-1
19698         ol_LIBS=$LIBS
19699         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19700
19701         cat > conftest.$ac_ext <<EOF
19702 #line 19703 "configure"
19703 #include "confdefs.h"
19704
19705 #ifdef HAVE_DB_185_H
19706 # include <db_185.h>
19707 #else
19708 # include <db.h>
19709 #endif
19710
19711 #ifndef DB_VERSION_MAJOR
19712 # define DB_VERSION_MAJOR 1
19713 #endif
19714
19715 #ifndef NULL
19716 #define NULL ((void*)0)
19717 #endif
19718
19719 int main() {
19720
19721 #if DB_VERSION_MAJOR > 1
19722         {
19723                 char *version;
19724                 int major, minor, patch;
19725
19726                 version = db_version( &major, &minor, &patch );
19727
19728                 if( major != DB_VERSION_MAJOR ||
19729                         minor < DB_VERSION_MINOR )
19730                 {
19731                         printf("Berkeley DB version mismatch\n"
19732                                 "\theader: %s\n\tlibrary: %s\n",
19733                                 DB_VERSION_STRING, version);
19734                         return 1;
19735                 }
19736         }
19737 #endif
19738
19739 #if DB_VERSION_MAJOR > 2
19740         db_env_create( NULL, 0 );
19741 #elif DB_VERSION_MAJOR > 1
19742         db_appexit( NULL );
19743 #else
19744         (void) dbopen( NULL, 0, 0, 0, NULL);
19745 #endif
19746
19747 ; return 0; }
19748 EOF
19749 if { (eval echo configure:19750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19750   rm -rf conftest*
19751   ol_cv_db_db_1=yes
19752 else
19753   echo "configure: failed program was:" >&5
19754   cat conftest.$ac_ext >&5
19755   rm -rf conftest*
19756   ol_cv_db_db_1=no
19757 fi
19758 rm -f conftest*
19759
19760         LIBS="$ol_LIBS"
19761
19762 fi
19763
19764 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19765
19766         if test $ol_cv_db_db_1 = yes ; then
19767                 ol_cv_lib_db=-ldb-1
19768         fi
19769 fi
19770
19771
19772         if test "$ol_cv_lib_db" != no ; then
19773                 ol_cv_berkeley_db=yes
19774                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19775 echo "configure:19776: checking for Berkeley DB version match" >&5
19776 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19777   echo $ac_n "(cached) $ac_c" 1>&6
19778 else
19779   
19780         ol_LIBS="$LIBS"
19781         LIBS="$LTHREAD_LIBS $LIBS"
19782         if test $ol_cv_lib_db != yes ; then
19783                 LIBS="$ol_cv_lib_db $LIBS"
19784         fi
19785
19786         if test "$cross_compiling" = yes; then
19787   ol_cv_berkeley_db_version=cross
19788 else
19789   cat > conftest.$ac_ext <<EOF
19790 #line 19791 "configure"
19791 #include "confdefs.h"
19792
19793 #ifdef HAVE_DB_185_H
19794         choke me;
19795 #else
19796 #include <db.h>
19797 #endif
19798 #ifndef DB_VERSION_MAJOR
19799 # define DB_VERSION_MAJOR 1
19800 #endif
19801 #ifndef NULL
19802 #define NULL ((void *)0)
19803 #endif
19804 main()
19805 {
19806 #if DB_VERSION_MAJOR > 1
19807         char *version;
19808         int major, minor, patch;
19809
19810         version = db_version( &major, &minor, &patch );
19811
19812         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19813                 printf("Berkeley DB version mismatch\n"
19814                         "\theader: %s\n\tlibrary: %s\n",
19815                         DB_VERSION_STRING, version);
19816                 return 1;
19817         }
19818 #endif
19819
19820         return 0;
19821 }
19822 EOF
19823 if { (eval echo configure:19824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19824 then
19825   ol_cv_berkeley_db_version=yes
19826 else
19827   echo "configure: failed program was:" >&5
19828   cat conftest.$ac_ext >&5
19829   rm -fr conftest*
19830   ol_cv_berkeley_db_version=no
19831 fi
19832 rm -fr conftest*
19833 fi
19834
19835
19836         LIBS="$ol_LIBS"
19837
19838 fi
19839
19840 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19841
19842         if test $ol_cv_berkeley_db_version = no ; then
19843                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19844         fi
19845
19846                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19847 echo "configure:19848: checking for Berkeley DB thread support" >&5
19848 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19849   echo $ac_n "(cached) $ac_c" 1>&6
19850 else
19851   
19852         ol_LIBS="$LIBS"
19853         LIBS="$LTHREAD_LIBS $LIBS"
19854         if test $ol_cv_lib_db != yes ; then
19855                 LIBS="$ol_cv_lib_db $LIBS"
19856         fi
19857
19858         if test "$cross_compiling" = yes; then
19859   ol_cv_berkeley_db_thread=cross
19860 else
19861   cat > conftest.$ac_ext <<EOF
19862 #line 19863 "configure"
19863 #include "confdefs.h"
19864
19865 #ifdef HAVE_DB_185_H
19866         choke me;
19867 #else
19868 #include <db.h>
19869 #endif
19870 #ifndef NULL
19871 #define NULL ((void *)0)
19872 #endif
19873 main()
19874 {
19875         int rc;
19876         u_int32_t flags = DB_CREATE |
19877 #ifdef DB_PRIVATE
19878                 DB_PRIVATE |
19879 #endif
19880                 DB_THREAD;
19881
19882 #if DB_VERSION_MAJOR > 2
19883         DB_ENV *env = NULL;
19884
19885         rc = db_env_create( &env, 0 );
19886
19887         flags |= DB_INIT_MPOOL;
19888 #ifdef DB_MPOOL_PRIVATE
19889         flags |= DB_MPOOL_PRIVATE;
19890 #endif
19891
19892         if( rc ) {
19893                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19894                 return rc;
19895         }
19896
19897 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19898         rc = env->open( env, NULL, flags, 0 );
19899 #else
19900         rc = env->open( env, NULL, NULL, flags, 0 );
19901 #endif
19902
19903         if ( rc == 0 ) {
19904                 rc = env->close( env, 0 );
19905         }
19906
19907         if( rc ) {
19908                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19909                 return rc;
19910         }
19911
19912 #else
19913         DB_ENV env;
19914         memset( &env, '\0', sizeof(env) );
19915
19916         rc = db_appinit( NULL, NULL, &env, flags );
19917
19918         if( rc == 0 ) {
19919                 db_appexit( &env );
19920         }
19921
19922         unlink("__db_mpool.share");
19923         unlink("__db_lock.share");
19924 #endif
19925
19926         return rc;
19927 }
19928 EOF
19929 if { (eval echo configure:19930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19930 then
19931   ol_cv_berkeley_db_thread=yes
19932 else
19933   echo "configure: failed program was:" >&5
19934   cat conftest.$ac_ext >&5
19935   rm -fr conftest*
19936   ol_cv_berkeley_db_thread=no
19937 fi
19938 rm -fr conftest*
19939 fi
19940
19941
19942         LIBS="$ol_LIBS"
19943
19944 fi
19945
19946 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19947
19948         if test $ol_cv_berkeley_db_thread != no ; then
19949                 cat >> confdefs.h <<\EOF
19950 #define HAVE_BERKELEY_DB_THREAD 1
19951 EOF
19952
19953         fi
19954
19955         fi
19956 fi
19957
19958         fi
19959
19960         if test $ol_cv_berkeley_db != no ; then
19961                 cat >> confdefs.h <<\EOF
19962 #define HAVE_BERKELEY_DB 1
19963 EOF
19964
19965
19966                 ol_link_ldbm=berkeley
19967                 ol_with_ldbm_api=berkeley
19968
19969                 if test $ol_with_ldbm_type = hash ; then
19970                         cat >> confdefs.h <<\EOF
19971 #define LDBM_USE_DBHASH 1
19972 EOF
19973
19974                 else
19975                         cat >> confdefs.h <<\EOF
19976 #define LDBM_USE_DBBTREE 1
19977 EOF
19978
19979                 fi
19980
19981                                                 if test $ol_cv_lib_db != yes ; then
19982                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19983                 fi
19984         fi
19985 fi
19986
19987 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
19988         if test $ol_link_ldbm != berkeley ; then
19989                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
19990         else
19991                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19992 echo "configure:19993: checking Berkeley DB version for BDB backend" >&5
19993 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19994   echo $ac_n "(cached) $ac_c" 1>&6
19995 else
19996   
19997         cat > conftest.$ac_ext <<EOF
19998 #line 19999 "configure"
19999 #include "confdefs.h"
20000
20001 #include <db.h>
20002
20003  /* this check could be improved */
20004 #ifndef DB_VERSION_MAJOR
20005 #       define DB_VERSION_MAJOR 1
20006 #endif
20007 #ifndef DB_VERSION_MINOR
20008 #       define DB_VERSION_MINOR 0
20009 #endif
20010
20011 /* require 4.2 or later */
20012 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20013         __db_version_compat
20014 #endif
20015         
20016 EOF
20017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20018   egrep "__db_version_compat" >/dev/null 2>&1; then
20019   rm -rf conftest*
20020   ol_cv_bdb_compat=yes
20021 else
20022   rm -rf conftest*
20023   ol_cv_bdb_compat=no
20024 fi
20025 rm -f conftest*
20026
20027 fi
20028
20029 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20030
20031
20032                 if test $ol_cv_bdb_compat != yes ; then
20033                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20034                 fi
20035         fi
20036 fi
20037
20038 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20039         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20040         ol_with_ldbm_api=none
20041 fi
20042
20043 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20044         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20045 echo "configure:20046: checking for MDBM library" >&5
20046 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20047   echo $ac_n "(cached) $ac_c" 1>&6
20048 else
20049         ol_LIBS="$LIBS"
20050         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20051 echo "configure:20052: checking for mdbm_set_chain" >&5
20052 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20053   echo $ac_n "(cached) $ac_c" 1>&6
20054 else
20055   cat > conftest.$ac_ext <<EOF
20056 #line 20057 "configure"
20057 #include "confdefs.h"
20058 /* System header to define __stub macros and hopefully few prototypes,
20059     which can conflict with char mdbm_set_chain(); below.  */
20060 #include <assert.h>
20061 /* Override any gcc2 internal prototype to avoid an error.  */
20062 /* We use char because int might match the return type of a gcc2
20063     builtin and then its argument prototype would still apply.  */
20064 char mdbm_set_chain();
20065 char (*f)();
20066
20067 int main() {
20068
20069 /* The GNU C library defines this for functions which it implements
20070     to always fail with ENOSYS.  Some functions are actually named
20071     something starting with __ and the normal name is an alias.  */
20072 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20073 choke me
20074 #else
20075 f = mdbm_set_chain;
20076 #endif
20077
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_func_mdbm_set_chain=yes"
20083 else
20084   echo "configure: failed program was:" >&5
20085   cat conftest.$ac_ext >&5
20086   rm -rf conftest*
20087   eval "ac_cv_func_mdbm_set_chain=no"
20088 fi
20089 rm -f conftest*
20090 fi
20091
20092 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20093   echo "$ac_t""yes" 1>&6
20094   ol_cv_lib_mdbm=yes
20095 else
20096   echo "$ac_t""no" 1>&6
20097
20098                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20099 echo "configure:20100: checking for mdbm_set_chain in -lmdbm" >&5
20100 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20102   echo $ac_n "(cached) $ac_c" 1>&6
20103 else
20104   ac_save_LIBS="$LIBS"
20105 LIBS="-lmdbm  $LIBS"
20106 cat > conftest.$ac_ext <<EOF
20107 #line 20108 "configure"
20108 #include "confdefs.h"
20109 /* Override any gcc2 internal prototype to avoid an error.  */
20110 /* We use char because int might match the return type of a gcc2
20111     builtin and then its argument prototype would still apply.  */
20112 char mdbm_set_chain();
20113
20114 int main() {
20115 mdbm_set_chain()
20116 ; return 0; }
20117 EOF
20118 if { (eval echo configure:20119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20119   rm -rf conftest*
20120   eval "ac_cv_lib_$ac_lib_var=yes"
20121 else
20122   echo "configure: failed program was:" >&5
20123   cat conftest.$ac_ext >&5
20124   rm -rf conftest*
20125   eval "ac_cv_lib_$ac_lib_var=no"
20126 fi
20127 rm -f conftest*
20128 LIBS="$ac_save_LIBS"
20129
20130 fi
20131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20132   echo "$ac_t""yes" 1>&6
20133   ol_cv_lib_mdbm=-lmdbm
20134 else
20135   echo "$ac_t""no" 1>&6
20136 ol_cv_lib_mdbm=no
20137 fi
20138
20139         
20140 fi
20141
20142         LIBS="$ol_LIBS"
20143
20144 fi
20145
20146 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20147
20148
20149  for ac_hdr in mdbm.h
20150 do
20151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20153 echo "configure:20154: checking for $ac_hdr" >&5
20154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20155   echo $ac_n "(cached) $ac_c" 1>&6
20156 else
20157   cat > conftest.$ac_ext <<EOF
20158 #line 20159 "configure"
20159 #include "confdefs.h"
20160 #include <$ac_hdr>
20161 EOF
20162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20163 { (eval echo configure:20164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20165 if test -z "$ac_err"; then
20166   rm -rf conftest*
20167   eval "ac_cv_header_$ac_safe=yes"
20168 else
20169   echo "$ac_err" >&5
20170   echo "configure: failed program was:" >&5
20171   cat conftest.$ac_ext >&5
20172   rm -rf conftest*
20173   eval "ac_cv_header_$ac_safe=no"
20174 fi
20175 rm -f conftest*
20176 fi
20177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20178   echo "$ac_t""yes" 1>&6
20179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20180   cat >> confdefs.h <<EOF
20181 #define $ac_tr_hdr 1
20182 EOF
20183  
20184 else
20185   echo "$ac_t""no" 1>&6
20186 fi
20187 done
20188
20189  echo $ac_n "checking for db""... $ac_c" 1>&6
20190 echo "configure:20191: checking for db" >&5
20191 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20192   echo $ac_n "(cached) $ac_c" 1>&6
20193 else
20194   
20195         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20196                 ol_cv_mdbm=no
20197         else
20198                 ol_cv_mdbm=yes
20199         fi
20200
20201 fi
20202
20203 echo "$ac_t""$ol_cv_mdbm" 1>&6
20204  if test $ol_cv_mdbm = yes ; then
20205         cat >> confdefs.h <<\EOF
20206 #define HAVE_MDBM 1
20207 EOF
20208
20209  fi
20210
20211
20212         if test $ol_cv_mdbm = yes ; then
20213                 ol_link_ldbm=mdbm
20214                 ol_with_ldbm_api=mdbm
20215                 if test $ol_cv_lib_mdbm != yes ; then
20216                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20217                 fi
20218         fi
20219 fi
20220
20221 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20222         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20223 echo "configure:20224: checking for GDBM library" >&5
20224 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20225   echo $ac_n "(cached) $ac_c" 1>&6
20226 else
20227         ol_LIBS="$LIBS"
20228         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20229 echo "configure:20230: checking for gdbm_open" >&5
20230 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20231   echo $ac_n "(cached) $ac_c" 1>&6
20232 else
20233   cat > conftest.$ac_ext <<EOF
20234 #line 20235 "configure"
20235 #include "confdefs.h"
20236 /* System header to define __stub macros and hopefully few prototypes,
20237     which can conflict with char gdbm_open(); below.  */
20238 #include <assert.h>
20239 /* Override any gcc2 internal prototype to avoid an error.  */
20240 /* We use char because int might match the return type of a gcc2
20241     builtin and then its argument prototype would still apply.  */
20242 char gdbm_open();
20243 char (*f)();
20244
20245 int main() {
20246
20247 /* The GNU C library defines this for functions which it implements
20248     to always fail with ENOSYS.  Some functions are actually named
20249     something starting with __ and the normal name is an alias.  */
20250 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20251 choke me
20252 #else
20253 f = gdbm_open;
20254 #endif
20255
20256 ; return 0; }
20257 EOF
20258 if { (eval echo configure:20259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20259   rm -rf conftest*
20260   eval "ac_cv_func_gdbm_open=yes"
20261 else
20262   echo "configure: failed program was:" >&5
20263   cat conftest.$ac_ext >&5
20264   rm -rf conftest*
20265   eval "ac_cv_func_gdbm_open=no"
20266 fi
20267 rm -f conftest*
20268 fi
20269
20270 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20271   echo "$ac_t""yes" 1>&6
20272   ol_cv_lib_gdbm=yes
20273 else
20274   echo "$ac_t""no" 1>&6
20275
20276                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20277 echo "configure:20278: checking for gdbm_open in -lgdbm" >&5
20278 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20280   echo $ac_n "(cached) $ac_c" 1>&6
20281 else
20282   ac_save_LIBS="$LIBS"
20283 LIBS="-lgdbm  $LIBS"
20284 cat > conftest.$ac_ext <<EOF
20285 #line 20286 "configure"
20286 #include "confdefs.h"
20287 /* Override any gcc2 internal prototype to avoid an error.  */
20288 /* We use char because int might match the return type of a gcc2
20289     builtin and then its argument prototype would still apply.  */
20290 char gdbm_open();
20291
20292 int main() {
20293 gdbm_open()
20294 ; return 0; }
20295 EOF
20296 if { (eval echo configure:20297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20297   rm -rf conftest*
20298   eval "ac_cv_lib_$ac_lib_var=yes"
20299 else
20300   echo "configure: failed program was:" >&5
20301   cat conftest.$ac_ext >&5
20302   rm -rf conftest*
20303   eval "ac_cv_lib_$ac_lib_var=no"
20304 fi
20305 rm -f conftest*
20306 LIBS="$ac_save_LIBS"
20307
20308 fi
20309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20310   echo "$ac_t""yes" 1>&6
20311   ol_cv_lib_gdbm=-lgdbm
20312 else
20313   echo "$ac_t""no" 1>&6
20314 ol_cv_lib_gdbm=no
20315 fi
20316
20317         
20318 fi
20319
20320         LIBS="$ol_LIBS"
20321
20322 fi
20323
20324 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20325
20326
20327  for ac_hdr in gdbm.h
20328 do
20329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20331 echo "configure:20332: checking for $ac_hdr" >&5
20332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20333   echo $ac_n "(cached) $ac_c" 1>&6
20334 else
20335   cat > conftest.$ac_ext <<EOF
20336 #line 20337 "configure"
20337 #include "confdefs.h"
20338 #include <$ac_hdr>
20339 EOF
20340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20341 { (eval echo configure:20342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20343 if test -z "$ac_err"; then
20344   rm -rf conftest*
20345   eval "ac_cv_header_$ac_safe=yes"
20346 else
20347   echo "$ac_err" >&5
20348   echo "configure: failed program was:" >&5
20349   cat conftest.$ac_ext >&5
20350   rm -rf conftest*
20351   eval "ac_cv_header_$ac_safe=no"
20352 fi
20353 rm -f conftest*
20354 fi
20355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20356   echo "$ac_t""yes" 1>&6
20357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20358   cat >> confdefs.h <<EOF
20359 #define $ac_tr_hdr 1
20360 EOF
20361  
20362 else
20363   echo "$ac_t""no" 1>&6
20364 fi
20365 done
20366
20367  echo $ac_n "checking for db""... $ac_c" 1>&6
20368 echo "configure:20369: checking for db" >&5
20369 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20370   echo $ac_n "(cached) $ac_c" 1>&6
20371 else
20372   
20373         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20374                 ol_cv_gdbm=no
20375         else
20376                 ol_cv_gdbm=yes
20377         fi
20378
20379 fi
20380
20381 echo "$ac_t""$ol_cv_gdbm" 1>&6
20382  if test $ol_cv_gdbm = yes ; then
20383         cat >> confdefs.h <<\EOF
20384 #define HAVE_GDBM 1
20385 EOF
20386
20387  fi
20388
20389
20390         if test $ol_cv_gdbm = yes ; then
20391                 ol_link_ldbm=gdbm
20392                 ol_with_ldbm_api=gdbm
20393
20394                 if test $ol_cv_lib_gdbm != yes ; then
20395                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20396                 fi
20397         fi
20398 fi
20399
20400 if test $ol_with_ldbm_api = ndbm ; then
20401         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20402 echo "configure:20403: checking for NDBM library" >&5
20403 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20404   echo $ac_n "(cached) $ac_c" 1>&6
20405 else
20406         ol_LIBS="$LIBS"
20407         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20408 echo "configure:20409: checking for dbm_open" >&5
20409 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20410   echo $ac_n "(cached) $ac_c" 1>&6
20411 else
20412   cat > conftest.$ac_ext <<EOF
20413 #line 20414 "configure"
20414 #include "confdefs.h"
20415 /* System header to define __stub macros and hopefully few prototypes,
20416     which can conflict with char dbm_open(); below.  */
20417 #include <assert.h>
20418 /* Override any gcc2 internal prototype to avoid an error.  */
20419 /* We use char because int might match the return type of a gcc2
20420     builtin and then its argument prototype would still apply.  */
20421 char dbm_open();
20422 char (*f)();
20423
20424 int main() {
20425
20426 /* The GNU C library defines this for functions which it implements
20427     to always fail with ENOSYS.  Some functions are actually named
20428     something starting with __ and the normal name is an alias.  */
20429 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20430 choke me
20431 #else
20432 f = dbm_open;
20433 #endif
20434
20435 ; return 0; }
20436 EOF
20437 if { (eval echo configure:20438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20438   rm -rf conftest*
20439   eval "ac_cv_func_dbm_open=yes"
20440 else
20441   echo "configure: failed program was:" >&5
20442   cat conftest.$ac_ext >&5
20443   rm -rf conftest*
20444   eval "ac_cv_func_dbm_open=no"
20445 fi
20446 rm -f conftest*
20447 fi
20448
20449 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20450   echo "$ac_t""yes" 1>&6
20451   ol_cv_lib_ndbm=yes
20452 else
20453   echo "$ac_t""no" 1>&6
20454
20455                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20456 echo "configure:20457: checking for dbm_open in -lndbm" >&5
20457 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20459   echo $ac_n "(cached) $ac_c" 1>&6
20460 else
20461   ac_save_LIBS="$LIBS"
20462 LIBS="-lndbm  $LIBS"
20463 cat > conftest.$ac_ext <<EOF
20464 #line 20465 "configure"
20465 #include "confdefs.h"
20466 /* Override any gcc2 internal prototype to avoid an error.  */
20467 /* We use char because int might match the return type of a gcc2
20468     builtin and then its argument prototype would still apply.  */
20469 char dbm_open();
20470
20471 int main() {
20472 dbm_open()
20473 ; return 0; }
20474 EOF
20475 if { (eval echo configure:20476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20476   rm -rf conftest*
20477   eval "ac_cv_lib_$ac_lib_var=yes"
20478 else
20479   echo "configure: failed program was:" >&5
20480   cat conftest.$ac_ext >&5
20481   rm -rf conftest*
20482   eval "ac_cv_lib_$ac_lib_var=no"
20483 fi
20484 rm -f conftest*
20485 LIBS="$ac_save_LIBS"
20486
20487 fi
20488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20489   echo "$ac_t""yes" 1>&6
20490   ol_cv_lib_ndbm=-lndbm
20491 else
20492   echo "$ac_t""no" 1>&6
20493
20494                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20495 echo "configure:20496: checking for dbm_open in -ldbm" >&5
20496 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20498   echo $ac_n "(cached) $ac_c" 1>&6
20499 else
20500   ac_save_LIBS="$LIBS"
20501 LIBS="-ldbm  $LIBS"
20502 cat > conftest.$ac_ext <<EOF
20503 #line 20504 "configure"
20504 #include "confdefs.h"
20505 /* Override any gcc2 internal prototype to avoid an error.  */
20506 /* We use char because int might match the return type of a gcc2
20507     builtin and then its argument prototype would still apply.  */
20508 char dbm_open();
20509
20510 int main() {
20511 dbm_open()
20512 ; return 0; }
20513 EOF
20514 if { (eval echo configure:20515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20515   rm -rf conftest*
20516   eval "ac_cv_lib_$ac_lib_var=yes"
20517 else
20518   echo "configure: failed program was:" >&5
20519   cat conftest.$ac_ext >&5
20520   rm -rf conftest*
20521   eval "ac_cv_lib_$ac_lib_var=no"
20522 fi
20523 rm -f conftest*
20524 LIBS="$ac_save_LIBS"
20525
20526 fi
20527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20528   echo "$ac_t""yes" 1>&6
20529   ol_cv_lib_ndbm=-ldbm
20530 else
20531   echo "$ac_t""no" 1>&6
20532 ol_cv_lib_ndbm=no
20533 fi
20534                 
20535 fi
20536
20537         
20538 fi
20539
20540         LIBS="$ol_LIBS"
20541
20542 fi
20543
20544 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20545
20546
20547  for ac_hdr in ndbm.h
20548 do
20549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20551 echo "configure:20552: checking for $ac_hdr" >&5
20552 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20553   echo $ac_n "(cached) $ac_c" 1>&6
20554 else
20555   cat > conftest.$ac_ext <<EOF
20556 #line 20557 "configure"
20557 #include "confdefs.h"
20558 #include <$ac_hdr>
20559 EOF
20560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20561 { (eval echo configure:20562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20563 if test -z "$ac_err"; then
20564   rm -rf conftest*
20565   eval "ac_cv_header_$ac_safe=yes"
20566 else
20567   echo "$ac_err" >&5
20568   echo "configure: failed program was:" >&5
20569   cat conftest.$ac_ext >&5
20570   rm -rf conftest*
20571   eval "ac_cv_header_$ac_safe=no"
20572 fi
20573 rm -f conftest*
20574 fi
20575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20576   echo "$ac_t""yes" 1>&6
20577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20578   cat >> confdefs.h <<EOF
20579 #define $ac_tr_hdr 1
20580 EOF
20581  
20582 else
20583   echo "$ac_t""no" 1>&6
20584 fi
20585 done
20586
20587  echo $ac_n "checking for db""... $ac_c" 1>&6
20588 echo "configure:20589: checking for db" >&5
20589 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20590   echo $ac_n "(cached) $ac_c" 1>&6
20591 else
20592   
20593         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20594                 ol_cv_ndbm=no
20595         else
20596                 ol_cv_ndbm=yes
20597         fi
20598
20599 fi
20600
20601 echo "$ac_t""$ol_cv_ndbm" 1>&6
20602  if test $ol_cv_ndbm = yes ; then
20603         cat >> confdefs.h <<\EOF
20604 #define HAVE_NDBM 1
20605 EOF
20606
20607  fi
20608
20609
20610         if test $ol_cv_ndbm = yes ; then
20611                 ol_link_ldbm=ndbm
20612                 ol_with_ldbm_api=ndbm
20613
20614                 if test $ol_cv_lib_ndbm != yes ; then
20615                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20616                 fi
20617         fi
20618 fi
20619
20620 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20621         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20622 fi
20623
20624 if test $ol_enable_bdb = yes -o \
20625         $ol_enable_hdb = yes -o \
20626         $ol_enable_ldbm = yes ; then
20627         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20628 fi
20629
20630
20631 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20632         BUILD_LIBS_DYNAMIC=shared
20633         cat >> confdefs.h <<\EOF
20634 #define LDAP_LIBS_DYNAMIC 1
20635 EOF
20636
20637         LTSTATIC=""
20638 else
20639         BUILD_LIBS_DYNAMIC=static
20640         LTSTATIC="-static"
20641 fi
20642
20643 if test $ol_enable_wrappers != no ; then
20644         for ac_hdr in tcpd.h
20645 do
20646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20648 echo "configure:20649: checking for $ac_hdr" >&5
20649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20650   echo $ac_n "(cached) $ac_c" 1>&6
20651 else
20652   cat > conftest.$ac_ext <<EOF
20653 #line 20654 "configure"
20654 #include "confdefs.h"
20655 #include <$ac_hdr>
20656 EOF
20657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20658 { (eval echo configure:20659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20660 if test -z "$ac_err"; then
20661   rm -rf conftest*
20662   eval "ac_cv_header_$ac_safe=yes"
20663 else
20664   echo "$ac_err" >&5
20665   echo "configure: failed program was:" >&5
20666   cat conftest.$ac_ext >&5
20667   rm -rf conftest*
20668   eval "ac_cv_header_$ac_safe=no"
20669 fi
20670 rm -f conftest*
20671 fi
20672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20673   echo "$ac_t""yes" 1>&6
20674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20675   cat >> confdefs.h <<EOF
20676 #define $ac_tr_hdr 1
20677 EOF
20678  
20679                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20680 echo "configure:20681: checking for TCP wrappers library" >&5
20681                 save_LIBS="$LIBS"
20682                 LIBS="$LIBS -lwrap"
20683                 cat > conftest.$ac_ext <<EOF
20684 #line 20685 "configure"
20685 #include "confdefs.h"
20686
20687 #include <tcpd.h>
20688 int allow_severity = 0;
20689 int deny_severity  = 0;
20690
20691 struct request_info *req;
20692                 
20693 int main() {
20694
20695 hosts_access(req)
20696                 
20697 ; return 0; }
20698 EOF
20699 if { (eval echo configure:20700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20700   rm -rf conftest*
20701   echo "$ac_t""-lwrap" 1>&6
20702                 have_wrappers=yes
20703                 LIBS="$save_LIBS"
20704 else
20705   echo "configure: failed program was:" >&5
20706   cat conftest.$ac_ext >&5
20707   rm -rf conftest*
20708   
20709                                 LIBS="$LIBS -lnsl"
20710                 cat > conftest.$ac_ext <<EOF
20711 #line 20712 "configure"
20712 #include "confdefs.h"
20713
20714 #include <tcpd.h>
20715 int allow_severity = 0;
20716 int deny_severity  = 0;
20717
20718 struct request_info *req;
20719                 
20720 int main() {
20721
20722 hosts_access(req)
20723                 
20724 ; return 0; }
20725 EOF
20726 if { (eval echo configure:20727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20727   rm -rf conftest*
20728   echo "$ac_t""-lwrap -lnsl" 1>&6
20729                 have_wrappers=yes
20730                 LIBS="$save_LIBS -lnsl"
20731 else
20732   echo "configure: failed program was:" >&5
20733   cat conftest.$ac_ext >&5
20734   rm -rf conftest*
20735   
20736                 echo "$ac_t""no" 1>&6
20737                 have_wrappers=no
20738                 LIBS=$save_LIBS
20739 fi
20740 rm -f conftest*
20741 fi
20742 rm -f conftest*
20743 else
20744   echo "$ac_t""no" 1>&6
20745 have_wrappers=no
20746 fi
20747 done
20748
20749
20750         if test $have_wrappers = yes ; then
20751                 cat >> confdefs.h <<\EOF
20752 #define HAVE_TCPD 1
20753 EOF
20754
20755                 WRAP_LIBS="-lwrap"
20756         elif test $ol_enable_wrappers = yes ; then
20757                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20758         else
20759                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20760                 WRAP_LIBS=""
20761         fi
20762 fi
20763
20764 if test $ol_enable_syslog != no ; then
20765         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20766 echo "configure:20767: checking for openlog" >&5
20767 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20768   echo $ac_n "(cached) $ac_c" 1>&6
20769 else
20770   cat > conftest.$ac_ext <<EOF
20771 #line 20772 "configure"
20772 #include "confdefs.h"
20773 /* System header to define __stub macros and hopefully few prototypes,
20774     which can conflict with char openlog(); below.  */
20775 #include <assert.h>
20776 /* Override any gcc2 internal prototype to avoid an error.  */
20777 /* We use char because int might match the return type of a gcc2
20778     builtin and then its argument prototype would still apply.  */
20779 char openlog();
20780 char (*f)();
20781
20782 int main() {
20783
20784 /* The GNU C library defines this for functions which it implements
20785     to always fail with ENOSYS.  Some functions are actually named
20786     something starting with __ and the normal name is an alias.  */
20787 #if defined (__stub_openlog) || defined (__stub___openlog)
20788 choke me
20789 #else
20790 f = openlog;
20791 #endif
20792
20793 ; return 0; }
20794 EOF
20795 if { (eval echo configure:20796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20796   rm -rf conftest*
20797   eval "ac_cv_func_openlog=yes"
20798 else
20799   echo "configure: failed program was:" >&5
20800   cat conftest.$ac_ext >&5
20801   rm -rf conftest*
20802   eval "ac_cv_func_openlog=no"
20803 fi
20804 rm -f conftest*
20805 fi
20806
20807 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20808   echo "$ac_t""yes" 1>&6
20809   :
20810 else
20811   echo "$ac_t""no" 1>&6
20812 fi
20813
20814         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20815                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20816         fi
20817         ol_enable_syslog=$ac_cv_func_openlog
20818 fi
20819
20820
20821 ol_link_sql=no
20822 if test $ol_enable_sql != no ; then
20823         for ac_hdr in sql.h sqlext.h
20824 do
20825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20827 echo "configure:20828: checking for $ac_hdr" >&5
20828 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20829   echo $ac_n "(cached) $ac_c" 1>&6
20830 else
20831   cat > conftest.$ac_ext <<EOF
20832 #line 20833 "configure"
20833 #include "confdefs.h"
20834 #include <$ac_hdr>
20835 EOF
20836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20837 { (eval echo configure:20838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20839 if test -z "$ac_err"; then
20840   rm -rf conftest*
20841   eval "ac_cv_header_$ac_safe=yes"
20842 else
20843   echo "$ac_err" >&5
20844   echo "configure: failed program was:" >&5
20845   cat conftest.$ac_ext >&5
20846   rm -rf conftest*
20847   eval "ac_cv_header_$ac_safe=no"
20848 fi
20849 rm -f conftest*
20850 fi
20851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20852   echo "$ac_t""yes" 1>&6
20853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20854   cat >> confdefs.h <<EOF
20855 #define $ac_tr_hdr 1
20856 EOF
20857  
20858 else
20859   echo "$ac_t""no" 1>&6
20860 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20861         
20862 fi
20863 done
20864
20865
20866         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20867 echo "configure:20868: checking for SQLDriverConnect in -liodbc" >&5
20868 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20870   echo $ac_n "(cached) $ac_c" 1>&6
20871 else
20872   ac_save_LIBS="$LIBS"
20873 LIBS="-liodbc  $LIBS"
20874 cat > conftest.$ac_ext <<EOF
20875 #line 20876 "configure"
20876 #include "confdefs.h"
20877 /* Override any gcc2 internal prototype to avoid an error.  */
20878 /* We use char because int might match the return type of a gcc2
20879     builtin and then its argument prototype would still apply.  */
20880 char SQLDriverConnect();
20881
20882 int main() {
20883 SQLDriverConnect()
20884 ; return 0; }
20885 EOF
20886 if { (eval echo configure:20887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20887   rm -rf conftest*
20888   eval "ac_cv_lib_$ac_lib_var=yes"
20889 else
20890   echo "configure: failed program was:" >&5
20891   cat conftest.$ac_ext >&5
20892   rm -rf conftest*
20893   eval "ac_cv_lib_$ac_lib_var=no"
20894 fi
20895 rm -f conftest*
20896 LIBS="$ac_save_LIBS"
20897
20898 fi
20899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20900   echo "$ac_t""yes" 1>&6
20901   have_iodbc=yes
20902 else
20903   echo "$ac_t""no" 1>&6
20904 have_iodbc=no
20905 fi
20906
20907         if test $have_iodbc = yes ; then
20908                 ol_link_sql="-liodbc"
20909         else
20910                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20911 echo "configure:20912: checking for SQLDriverConnect in -lodbc" >&5
20912 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20914   echo $ac_n "(cached) $ac_c" 1>&6
20915 else
20916   ac_save_LIBS="$LIBS"
20917 LIBS="-lodbc  $LIBS"
20918 cat > conftest.$ac_ext <<EOF
20919 #line 20920 "configure"
20920 #include "confdefs.h"
20921 /* Override any gcc2 internal prototype to avoid an error.  */
20922 /* We use char because int might match the return type of a gcc2
20923     builtin and then its argument prototype would still apply.  */
20924 char SQLDriverConnect();
20925
20926 int main() {
20927 SQLDriverConnect()
20928 ; return 0; }
20929 EOF
20930 if { (eval echo configure:20931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20931   rm -rf conftest*
20932   eval "ac_cv_lib_$ac_lib_var=yes"
20933 else
20934   echo "configure: failed program was:" >&5
20935   cat conftest.$ac_ext >&5
20936   rm -rf conftest*
20937   eval "ac_cv_lib_$ac_lib_var=no"
20938 fi
20939 rm -f conftest*
20940 LIBS="$ac_save_LIBS"
20941
20942 fi
20943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20944   echo "$ac_t""yes" 1>&6
20945   have_odbc=yes
20946 else
20947   echo "$ac_t""no" 1>&6
20948 have_odbc=no
20949 fi
20950
20951                 if test $have_odbc = yes ; then
20952                         ol_link_sql="-lodbc"
20953                 fi
20954         fi
20955
20956         if test $ol_link_sql != no ; then
20957                 SLAPD_SQL_LIBS="$ol_link_sql"
20958
20959         elif test $ol_enable_sql != auto ; then
20960                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20961         fi
20962 fi
20963
20964 WITH_SASL=no
20965 ol_link_sasl=no
20966 ol_link_spasswd=no
20967 if test $ol_with_cyrus_sasl != no ; then
20968         for ac_hdr in sasl/sasl.h sasl.h
20969 do
20970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20972 echo "configure:20973: checking for $ac_hdr" >&5
20973 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20974   echo $ac_n "(cached) $ac_c" 1>&6
20975 else
20976   cat > conftest.$ac_ext <<EOF
20977 #line 20978 "configure"
20978 #include "confdefs.h"
20979 #include <$ac_hdr>
20980 EOF
20981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20982 { (eval echo configure:20983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20984 if test -z "$ac_err"; then
20985   rm -rf conftest*
20986   eval "ac_cv_header_$ac_safe=yes"
20987 else
20988   echo "$ac_err" >&5
20989   echo "configure: failed program was:" >&5
20990   cat conftest.$ac_ext >&5
20991   rm -rf conftest*
20992   eval "ac_cv_header_$ac_safe=no"
20993 fi
20994 rm -f conftest*
20995 fi
20996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20997   echo "$ac_t""yes" 1>&6
20998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20999   cat >> confdefs.h <<EOF
21000 #define $ac_tr_hdr 1
21001 EOF
21002  
21003 else
21004   echo "$ac_t""no" 1>&6
21005 fi
21006 done
21007
21008
21009         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21010                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21011 echo "configure:21012: checking for sasl_client_init in -lsasl2" >&5
21012 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21014   echo $ac_n "(cached) $ac_c" 1>&6
21015 else
21016   ac_save_LIBS="$LIBS"
21017 LIBS="-lsasl2  $LIBS"
21018 cat > conftest.$ac_ext <<EOF
21019 #line 21020 "configure"
21020 #include "confdefs.h"
21021 /* Override any gcc2 internal prototype to avoid an error.  */
21022 /* We use char because int might match the return type of a gcc2
21023     builtin and then its argument prototype would still apply.  */
21024 char sasl_client_init();
21025
21026 int main() {
21027 sasl_client_init()
21028 ; return 0; }
21029 EOF
21030 if { (eval echo configure:21031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21031   rm -rf conftest*
21032   eval "ac_cv_lib_$ac_lib_var=yes"
21033 else
21034   echo "configure: failed program was:" >&5
21035   cat conftest.$ac_ext >&5
21036   rm -rf conftest*
21037   eval "ac_cv_lib_$ac_lib_var=no"
21038 fi
21039 rm -f conftest*
21040 LIBS="$ac_save_LIBS"
21041
21042 fi
21043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21044   echo "$ac_t""yes" 1>&6
21045   ol_link_sasl="-lsasl2"
21046 else
21047   echo "$ac_t""no" 1>&6
21048 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21049 echo "configure:21050: checking for sasl_client_init in -lsasl" >&5
21050 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21052   echo $ac_n "(cached) $ac_c" 1>&6
21053 else
21054   ac_save_LIBS="$LIBS"
21055 LIBS="-lsasl  $LIBS"
21056 cat > conftest.$ac_ext <<EOF
21057 #line 21058 "configure"
21058 #include "confdefs.h"
21059 /* Override any gcc2 internal prototype to avoid an error.  */
21060 /* We use char because int might match the return type of a gcc2
21061     builtin and then its argument prototype would still apply.  */
21062 char sasl_client_init();
21063
21064 int main() {
21065 sasl_client_init()
21066 ; return 0; }
21067 EOF
21068 if { (eval echo configure:21069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21069   rm -rf conftest*
21070   eval "ac_cv_lib_$ac_lib_var=yes"
21071 else
21072   echo "configure: failed program was:" >&5
21073   cat conftest.$ac_ext >&5
21074   rm -rf conftest*
21075   eval "ac_cv_lib_$ac_lib_var=no"
21076 fi
21077 rm -f conftest*
21078 LIBS="$ac_save_LIBS"
21079
21080 fi
21081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21082   echo "$ac_t""yes" 1>&6
21083   ol_link_sasl="-lsasl"
21084 else
21085   echo "$ac_t""no" 1>&6
21086 fi
21087
21088 fi
21089
21090         fi
21091
21092         if test $ol_link_sasl = no ; then
21093                 if test $ol_with_cyrus_sasl != auto ; then
21094                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21095                 else
21096                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21097                         echo "configure: warning: SASL authentication not supported!" 1>&2
21098                         if test $ol_link_tls = no ; then
21099                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21100                         fi
21101                 fi
21102         else
21103                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21104 echo "configure:21105: checking Cyrus SASL library version" >&5
21105 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21106   echo $ac_n "(cached) $ac_c" 1>&6
21107 else
21108   
21109         cat > conftest.$ac_ext <<EOF
21110 #line 21111 "configure"
21111 #include "confdefs.h"
21112
21113 #ifdef HAVE_SASL_SASL_H
21114 #include <sasl/sasl.h>
21115 #else
21116 #include <sasl.h>
21117 #endif
21118
21119 /* Require 2.1.15+ */
21120 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21121         char *__sasl_compat = "2.2+ or better okay (we guess)";
21122 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21123         && SASL_VERSION_STEP >=15
21124         char *__sasl_compat = "2.1.15+ or better okay";
21125 #endif
21126         
21127 EOF
21128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21129   egrep "__sasl_compat" >/dev/null 2>&1; then
21130   rm -rf conftest*
21131   ol_cv_sasl_compat=yes
21132 else
21133   rm -rf conftest*
21134   ol_cv_sasl_compat=no
21135 fi
21136 rm -f conftest*
21137
21138 fi
21139
21140 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21141
21142                 if test $ol_cv_sasl_compat = no ; then
21143                         ol_link_sasl=no
21144                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21145                 fi
21146
21147                 cat >> confdefs.h <<\EOF
21148 #define HAVE_CYRUS_SASL 1
21149 EOF
21150
21151                 SASL_LIBS="$ol_link_sasl"
21152                 if test $ol_enable_spasswd != no ; then
21153                         ol_link_spasswd=yes
21154                 fi
21155
21156                 ac_save_LIBS="$LIBS"
21157                 LIBS="$LIBS $ol_link_sasl"
21158                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21159 echo "configure:21160: checking for sasl_version" >&5
21160 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21161   echo $ac_n "(cached) $ac_c" 1>&6
21162 else
21163   cat > conftest.$ac_ext <<EOF
21164 #line 21165 "configure"
21165 #include "confdefs.h"
21166 /* System header to define __stub macros and hopefully few prototypes,
21167     which can conflict with char sasl_version(); below.  */
21168 #include <assert.h>
21169 /* Override any gcc2 internal prototype to avoid an error.  */
21170 /* We use char because int might match the return type of a gcc2
21171     builtin and then its argument prototype would still apply.  */
21172 char sasl_version();
21173 char (*f)();
21174
21175 int main() {
21176
21177 /* The GNU C library defines this for functions which it implements
21178     to always fail with ENOSYS.  Some functions are actually named
21179     something starting with __ and the normal name is an alias.  */
21180 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21181 choke me
21182 #else
21183 f = sasl_version;
21184 #endif
21185
21186 ; return 0; }
21187 EOF
21188 if { (eval echo configure:21189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21189   rm -rf conftest*
21190   eval "ac_cv_func_sasl_version=yes"
21191 else
21192   echo "configure: failed program was:" >&5
21193   cat conftest.$ac_ext >&5
21194   rm -rf conftest*
21195   eval "ac_cv_func_sasl_version=no"
21196 fi
21197 rm -f conftest*
21198 fi
21199
21200 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21201   echo "$ac_t""yes" 1>&6
21202   cat >> confdefs.h <<\EOF
21203 #define HAVE_SASL_VERSION 1
21204 EOF
21205
21206 else
21207   echo "$ac_t""no" 1>&6
21208 fi
21209
21210                 LIBS="$ac_save_LIBS"
21211
21212                 WITH_SASL=yes
21213         fi
21214
21215 else
21216         echo "configure: warning: SASL authentication not supported!" 1>&2
21217         if test $ol_link_tls = no ; then
21218                 echo "configure: warning: Strong authentication not supported!" 1>&2
21219         fi
21220 fi
21221
21222 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21223         dev=no
21224         if test -r /dev/urandom ; then
21225                 dev="/dev/urandom";
21226         elif test -r /idev/urandom ; then
21227                 dev="/idev/urandom";
21228         elif test -r /dev/srandom ; then
21229                 dev="/dev/srandom";
21230         elif test -r /dev/random ; then
21231                 dev="/dev/random";
21232         elif test -r /idev/random ; then
21233                 dev="/idev/random";
21234         fi
21235
21236         if test $dev != no ; then
21237                 cat >> confdefs.h <<EOF
21238 #define URANDOM_DEVICE "$dev"
21239 EOF
21240
21241         fi
21242 fi
21243
21244 ol_link_fetch=no
21245 if test $ol_with_fetch != no ; then
21246         ol_LIBS=$LIBS
21247 LIBS="-lfetch -lcom_err $LIBS"
21248 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21249 echo "configure:21250: checking fetch(3) library" >&5
21250 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21251   echo $ac_n "(cached) $ac_c" 1>&6
21252 else
21253   
21254         cat > conftest.$ac_ext <<EOF
21255 #line 21256 "configure"
21256 #include "confdefs.h"
21257
21258 #include <sys/param.h>
21259 #include <stdio.h>
21260 #include <fetch.h>
21261 int main() {
21262 struct url *u = fetchParseURL("file:///"); 
21263 ; return 0; }
21264 EOF
21265 if { (eval echo configure:21266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21266   rm -rf conftest*
21267   ol_cv_lib_fetch=yes
21268 else
21269   echo "configure: failed program was:" >&5
21270   cat conftest.$ac_ext >&5
21271   rm -rf conftest*
21272   ol_cv_lib_fetch=no
21273 fi
21274 rm -f conftest*
21275 fi
21276
21277 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21278 LIBS=$ol_LIBS
21279 if test $ol_cv_lib_fetch != no ; then
21280         ol_link_fetch="-lfetch -lcom_err"
21281         cat >> confdefs.h <<\EOF
21282 #define HAVE_FETCH 1
21283 EOF
21284
21285 fi
21286
21287
21288         if test $ol_cv_lib_fetch != no ; then
21289                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21290                 ol_link_fetch=freebsd
21291
21292         elif test $ol_with_fetch != auto ; then
21293                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21294         fi 
21295 fi
21296
21297 if test $ol_enable_crypt != no ; then
21298         save_LIBS="$LIBS"
21299         LIBS="$TLS_LIBS $LIBS"
21300
21301         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21302 echo "configure:21303: checking for crypt" >&5
21303 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21304   echo $ac_n "(cached) $ac_c" 1>&6
21305 else
21306   cat > conftest.$ac_ext <<EOF
21307 #line 21308 "configure"
21308 #include "confdefs.h"
21309 /* System header to define __stub macros and hopefully few prototypes,
21310     which can conflict with char crypt(); below.  */
21311 #include <assert.h>
21312 /* Override any gcc2 internal prototype to avoid an error.  */
21313 /* We use char because int might match the return type of a gcc2
21314     builtin and then its argument prototype would still apply.  */
21315 char crypt();
21316 char (*f)();
21317
21318 int main() {
21319
21320 /* The GNU C library defines this for functions which it implements
21321     to always fail with ENOSYS.  Some functions are actually named
21322     something starting with __ and the normal name is an alias.  */
21323 #if defined (__stub_crypt) || defined (__stub___crypt)
21324 choke me
21325 #else
21326 f = crypt;
21327 #endif
21328
21329 ; return 0; }
21330 EOF
21331 if { (eval echo configure:21332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21332   rm -rf conftest*
21333   eval "ac_cv_func_crypt=yes"
21334 else
21335   echo "configure: failed program was:" >&5
21336   cat conftest.$ac_ext >&5
21337   rm -rf conftest*
21338   eval "ac_cv_func_crypt=no"
21339 fi
21340 rm -f conftest*
21341 fi
21342
21343 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21344   echo "$ac_t""yes" 1>&6
21345   have_crypt=yes
21346 else
21347   echo "$ac_t""no" 1>&6
21348
21349                 LIBS="$save_LIBS"
21350                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21351 echo "configure:21352: checking for crypt in -lcrypt" >&5
21352 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21354   echo $ac_n "(cached) $ac_c" 1>&6
21355 else
21356   ac_save_LIBS="$LIBS"
21357 LIBS="-lcrypt  $LIBS"
21358 cat > conftest.$ac_ext <<EOF
21359 #line 21360 "configure"
21360 #include "confdefs.h"
21361 /* Override any gcc2 internal prototype to avoid an error.  */
21362 /* We use char because int might match the return type of a gcc2
21363     builtin and then its argument prototype would still apply.  */
21364 char crypt();
21365
21366 int main() {
21367 crypt()
21368 ; return 0; }
21369 EOF
21370 if { (eval echo configure:21371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21371   rm -rf conftest*
21372   eval "ac_cv_lib_$ac_lib_var=yes"
21373 else
21374   echo "configure: failed program was:" >&5
21375   cat conftest.$ac_ext >&5
21376   rm -rf conftest*
21377   eval "ac_cv_lib_$ac_lib_var=no"
21378 fi
21379 rm -f conftest*
21380 LIBS="$ac_save_LIBS"
21381
21382 fi
21383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21384   echo "$ac_t""yes" 1>&6
21385   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21386                         have_crypt=yes
21387 else
21388   echo "$ac_t""no" 1>&6
21389 have_crypt=no
21390 fi
21391
21392 fi
21393
21394
21395         LIBS="$save_LIBS"
21396
21397         if test $have_crypt = yes ; then
21398                 cat >> confdefs.h <<\EOF
21399 #define HAVE_CRYPT 1
21400 EOF
21401
21402         else
21403                 echo "configure: warning: could not find crypt" 1>&2
21404                 if test $ol_enable_crypt = yes ; then
21405                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21406                 fi
21407
21408                 echo "configure: warning: disabling crypt support" 1>&2
21409                 ol_enable_crypt=no
21410         fi
21411 fi
21412
21413 if test $ol_enable_proctitle != no ; then
21414         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21415 echo "configure:21416: checking for setproctitle" >&5
21416 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21417   echo $ac_n "(cached) $ac_c" 1>&6
21418 else
21419   cat > conftest.$ac_ext <<EOF
21420 #line 21421 "configure"
21421 #include "confdefs.h"
21422 /* System header to define __stub macros and hopefully few prototypes,
21423     which can conflict with char setproctitle(); below.  */
21424 #include <assert.h>
21425 /* Override any gcc2 internal prototype to avoid an error.  */
21426 /* We use char because int might match the return type of a gcc2
21427     builtin and then its argument prototype would still apply.  */
21428 char setproctitle();
21429 char (*f)();
21430
21431 int main() {
21432
21433 /* The GNU C library defines this for functions which it implements
21434     to always fail with ENOSYS.  Some functions are actually named
21435     something starting with __ and the normal name is an alias.  */
21436 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21437 choke me
21438 #else
21439 f = setproctitle;
21440 #endif
21441
21442 ; return 0; }
21443 EOF
21444 if { (eval echo configure:21445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21445   rm -rf conftest*
21446   eval "ac_cv_func_setproctitle=yes"
21447 else
21448   echo "configure: failed program was:" >&5
21449   cat conftest.$ac_ext >&5
21450   rm -rf conftest*
21451   eval "ac_cv_func_setproctitle=no"
21452 fi
21453 rm -f conftest*
21454 fi
21455
21456 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21457   echo "$ac_t""yes" 1>&6
21458   have_setproctitle=yes
21459 else
21460   echo "$ac_t""no" 1>&6
21461
21462                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21463 echo "configure:21464: checking for setproctitle in -lutil" >&5
21464 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21466   echo $ac_n "(cached) $ac_c" 1>&6
21467 else
21468   ac_save_LIBS="$LIBS"
21469 LIBS="-lutil  $LIBS"
21470 cat > conftest.$ac_ext <<EOF
21471 #line 21472 "configure"
21472 #include "confdefs.h"
21473 /* Override any gcc2 internal prototype to avoid an error.  */
21474 /* We use char because int might match the return type of a gcc2
21475     builtin and then its argument prototype would still apply.  */
21476 char setproctitle();
21477
21478 int main() {
21479 setproctitle()
21480 ; return 0; }
21481 EOF
21482 if { (eval echo configure:21483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21483   rm -rf conftest*
21484   eval "ac_cv_lib_$ac_lib_var=yes"
21485 else
21486   echo "configure: failed program was:" >&5
21487   cat conftest.$ac_ext >&5
21488   rm -rf conftest*
21489   eval "ac_cv_lib_$ac_lib_var=no"
21490 fi
21491 rm -f conftest*
21492 LIBS="$ac_save_LIBS"
21493
21494 fi
21495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21496   echo "$ac_t""yes" 1>&6
21497   have_setproctitle=yes
21498                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21499 else
21500   echo "$ac_t""no" 1>&6
21501 have_setproctitle=no
21502                         LIBOBJS="$LIBOBJS setproctitle.o"
21503                         LIBSRCS="$LIBSRCS setproctitle.c"
21504 fi
21505
21506 fi
21507
21508
21509         if test $have_setproctitle = yes ; then
21510                 cat >> confdefs.h <<\EOF
21511 #define HAVE_SETPROCTITLE 1
21512 EOF
21513
21514         fi
21515 fi
21516
21517 if test $ol_enable_slp != no ; then
21518         for ac_hdr in slp.h 
21519 do
21520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21522 echo "configure:21523: checking for $ac_hdr" >&5
21523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21524   echo $ac_n "(cached) $ac_c" 1>&6
21525 else
21526   cat > conftest.$ac_ext <<EOF
21527 #line 21528 "configure"
21528 #include "confdefs.h"
21529 #include <$ac_hdr>
21530 EOF
21531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21532 { (eval echo configure:21533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21534 if test -z "$ac_err"; then
21535   rm -rf conftest*
21536   eval "ac_cv_header_$ac_safe=yes"
21537 else
21538   echo "$ac_err" >&5
21539   echo "configure: failed program was:" >&5
21540   cat conftest.$ac_ext >&5
21541   rm -rf conftest*
21542   eval "ac_cv_header_$ac_safe=no"
21543 fi
21544 rm -f conftest*
21545 fi
21546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21547   echo "$ac_t""yes" 1>&6
21548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21549   cat >> confdefs.h <<EOF
21550 #define $ac_tr_hdr 1
21551 EOF
21552  
21553 else
21554   echo "$ac_t""no" 1>&6
21555 fi
21556 done
21557
21558
21559         if test $ac_cv_header_slp_h = yes ; then
21560                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21561 echo "configure:21562: checking for SLPOpen in -lslp" >&5
21562 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21564   echo $ac_n "(cached) $ac_c" 1>&6
21565 else
21566   ac_save_LIBS="$LIBS"
21567 LIBS="-lslp  $LIBS"
21568 cat > conftest.$ac_ext <<EOF
21569 #line 21570 "configure"
21570 #include "confdefs.h"
21571 /* Override any gcc2 internal prototype to avoid an error.  */
21572 /* We use char because int might match the return type of a gcc2
21573     builtin and then its argument prototype would still apply.  */
21574 char SLPOpen();
21575
21576 int main() {
21577 SLPOpen()
21578 ; return 0; }
21579 EOF
21580 if { (eval echo configure:21581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21581   rm -rf conftest*
21582   eval "ac_cv_lib_$ac_lib_var=yes"
21583 else
21584   echo "configure: failed program was:" >&5
21585   cat conftest.$ac_ext >&5
21586   rm -rf conftest*
21587   eval "ac_cv_lib_$ac_lib_var=no"
21588 fi
21589 rm -f conftest*
21590 LIBS="$ac_save_LIBS"
21591
21592 fi
21593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21594   echo "$ac_t""yes" 1>&6
21595   have_slp=yes
21596 else
21597   echo "$ac_t""no" 1>&6
21598 have_slp=no
21599 fi
21600
21601                 if test $have_slp = yes ; then
21602                         cat >> confdefs.h <<\EOF
21603 #define HAVE_SLP 1
21604 EOF
21605
21606                         SLAPD_SLP_LIBS=-lslp
21607                 fi
21608
21609         elif test $ol_enable_slp = yes ; then
21610                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21611         fi
21612 fi
21613
21614 if test "$ol_with_multiple_precision" != "no" ; then
21615         ol_have_bignum=no
21616         ol_have_gmp=no
21617
21618         for ac_hdr in openssl/bn.h bn.h
21619 do
21620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21622 echo "configure:21623: checking for $ac_hdr" >&5
21623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21624   echo $ac_n "(cached) $ac_c" 1>&6
21625 else
21626   cat > conftest.$ac_ext <<EOF
21627 #line 21628 "configure"
21628 #include "confdefs.h"
21629 #include <$ac_hdr>
21630 EOF
21631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21632 { (eval echo configure:21633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21634 if test -z "$ac_err"; then
21635   rm -rf conftest*
21636   eval "ac_cv_header_$ac_safe=yes"
21637 else
21638   echo "$ac_err" >&5
21639   echo "configure: failed program was:" >&5
21640   cat conftest.$ac_ext >&5
21641   rm -rf conftest*
21642   eval "ac_cv_header_$ac_safe=no"
21643 fi
21644 rm -f conftest*
21645 fi
21646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21647   echo "$ac_t""yes" 1>&6
21648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21649   cat >> confdefs.h <<EOF
21650 #define $ac_tr_hdr 1
21651 EOF
21652  
21653 else
21654   echo "$ac_t""no" 1>&6
21655 fi
21656 done
21657
21658         for ac_hdr in openssl/crypto.h crypto.h
21659 do
21660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21662 echo "configure:21663: checking for $ac_hdr" >&5
21663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   cat > conftest.$ac_ext <<EOF
21667 #line 21668 "configure"
21668 #include "confdefs.h"
21669 #include <$ac_hdr>
21670 EOF
21671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21672 { (eval echo configure:21673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21674 if test -z "$ac_err"; then
21675   rm -rf conftest*
21676   eval "ac_cv_header_$ac_safe=yes"
21677 else
21678   echo "$ac_err" >&5
21679   echo "configure: failed program was:" >&5
21680   cat conftest.$ac_ext >&5
21681   rm -rf conftest*
21682   eval "ac_cv_header_$ac_safe=no"
21683 fi
21684 rm -f conftest*
21685 fi
21686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21687   echo "$ac_t""yes" 1>&6
21688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21689   cat >> confdefs.h <<EOF
21690 #define $ac_tr_hdr 1
21691 EOF
21692  
21693 else
21694   echo "$ac_t""no" 1>&6
21695 fi
21696 done
21697
21698         for ac_hdr in gmp.h 
21699 do
21700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21702 echo "configure:21703: checking for $ac_hdr" >&5
21703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21704   echo $ac_n "(cached) $ac_c" 1>&6
21705 else
21706   cat > conftest.$ac_ext <<EOF
21707 #line 21708 "configure"
21708 #include "confdefs.h"
21709 #include <$ac_hdr>
21710 EOF
21711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21712 { (eval echo configure:21713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21714 if test -z "$ac_err"; then
21715   rm -rf conftest*
21716   eval "ac_cv_header_$ac_safe=yes"
21717 else
21718   echo "$ac_err" >&5
21719   echo "configure: failed program was:" >&5
21720   cat conftest.$ac_ext >&5
21721   rm -rf conftest*
21722   eval "ac_cv_header_$ac_safe=no"
21723 fi
21724 rm -f conftest*
21725 fi
21726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21727   echo "$ac_t""yes" 1>&6
21728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21729   cat >> confdefs.h <<EOF
21730 #define $ac_tr_hdr 1
21731 EOF
21732  
21733 else
21734   echo "$ac_t""no" 1>&6
21735 fi
21736 done
21737
21738
21739         if test "$ol_with_tls" = "found" ; then
21740                 ol_have_bn_h=no
21741                 ol_have_crypto_h=no
21742
21743                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
21744                                 -o "$ac_cv_header_bn_h" = "yes" ; then
21745                         ol_have_bn_h=yes
21746                 fi
21747
21748                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
21749                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
21750                         ol_have_crypto_h=yes
21751                 fi
21752
21753                 if test "$ol_have_bn_h" = "yes" \
21754                                 -a "$ol_have_crypto_h" = "yes" ; then
21755                         ol_have_bignum=yes
21756                 fi
21757         fi
21758
21759         if test $ac_cv_header_gmp_h = yes ; then
21760                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
21761 echo "configure:21762: checking for __gmpz_add_ui in -lgmp" >&5
21762 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
21763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21764   echo $ac_n "(cached) $ac_c" 1>&6
21765 else
21766   ac_save_LIBS="$LIBS"
21767 LIBS="-lgmp  $LIBS"
21768 cat > conftest.$ac_ext <<EOF
21769 #line 21770 "configure"
21770 #include "confdefs.h"
21771 /* Override any gcc2 internal prototype to avoid an error.  */
21772 /* We use char because int might match the return type of a gcc2
21773     builtin and then its argument prototype would still apply.  */
21774 char __gmpz_add_ui();
21775
21776 int main() {
21777 __gmpz_add_ui()
21778 ; return 0; }
21779 EOF
21780 if { (eval echo configure:21781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21781   rm -rf conftest*
21782   eval "ac_cv_lib_$ac_lib_var=yes"
21783 else
21784   echo "configure: failed program was:" >&5
21785   cat conftest.$ac_ext >&5
21786   rm -rf conftest*
21787   eval "ac_cv_lib_$ac_lib_var=no"
21788 fi
21789 rm -f conftest*
21790 LIBS="$ac_save_LIBS"
21791
21792 fi
21793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21794   echo "$ac_t""yes" 1>&6
21795   have_gmp=yes
21796 else
21797   echo "$ac_t""no" 1>&6
21798 have_gmp=no
21799 fi
21800
21801                 if test $have_gmp = yes ; then
21802                         ol_have_gmp=yes
21803                 fi
21804         fi
21805
21806         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
21807 echo "configure:21808: checking for multiple precision support" >&5
21808
21809         ol_mp_support="none"
21810         case "$ol_with_multiple_precision" in
21811         auto)
21812                                                                                 if test "$ol_have_bignum" = "yes" ; then
21813                         ol_mp_support="bignum"
21814                 else
21815                         if test "$ol_have_gmp" = "yes" ; then
21816                                 ol_mp_support="gmp"
21817                         fi
21818                 fi
21819                 ;;
21820         bignum)
21821                 if test "$ol_have_bignum" != "yes" ; then
21822                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
21823                 fi
21824                 ol_mp_support="bignum"
21825                 ;;
21826         gmp)
21827                 if test "$ol_have_gmp" != "yes" ; then
21828                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
21829                 fi
21830                 ol_mp_support="gmp"
21831                 ;;
21832         yes)
21833                 if test "$ol_have_bignum" = "yes" ; then
21834                         ol_mp_support="bignum"
21835                 elif test "$ol_have_gmp" = "yes" ; then
21836                         ol_mp_support="gmp"
21837                 else
21838                         { echo "configure: error: not available" 1>&2; exit 1; }
21839                 fi
21840                 ;;
21841         esac
21842
21843         case "$ol_mp_support" in
21844         bignum)
21845                 cat >> confdefs.h <<\EOF
21846 #define HAVE_BIGNUM 1
21847 EOF
21848
21849                 ;;
21850         gmp)
21851                 cat >> confdefs.h <<\EOF
21852 #define HAVE_GMP 1
21853 EOF
21854
21855                 SLAPD_GMP_LIBS=-lgmp
21856                 ;;
21857         none)
21858                 ;;
21859         esac
21860
21861         echo "$ac_t""$ol_mp_support" 1>&6
21862 fi
21863
21864
21865 echo $ac_n "checking long long""... $ac_c" 1>&6
21866 echo "configure:21867: checking long long" >&5
21867 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21868   echo $ac_n "(cached) $ac_c" 1>&6
21869 else
21870   
21871         cat > conftest.$ac_ext <<EOF
21872 #line 21873 "configure"
21873 #include "confdefs.h"
21874
21875 int main() {
21876 long long x;
21877 ; return 0; }
21878 EOF
21879 if { (eval echo configure:21880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21880   rm -rf conftest*
21881   ol_cv_type_long_long=yes
21882 else
21883   echo "configure: failed program was:" >&5
21884   cat conftest.$ac_ext >&5
21885   rm -rf conftest*
21886   ol_cv_type_long_long=no
21887 fi
21888 rm -f conftest*
21889 fi
21890
21891 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21892 if test $ol_cv_type_long_long = yes; then
21893         cat >> confdefs.h <<\EOF
21894 #define HAVE_LONG_LONG 1
21895 EOF
21896
21897 fi
21898
21899 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21900 echo "configure:21901: checking for ANSI C header files" >&5
21901 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21902   echo $ac_n "(cached) $ac_c" 1>&6
21903 else
21904   cat > conftest.$ac_ext <<EOF
21905 #line 21906 "configure"
21906 #include "confdefs.h"
21907 #include <stdlib.h>
21908 #include <stdarg.h>
21909 #include <string.h>
21910 #include <float.h>
21911 EOF
21912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21913 { (eval echo configure:21914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21915 if test -z "$ac_err"; then
21916   rm -rf conftest*
21917   ac_cv_header_stdc=yes
21918 else
21919   echo "$ac_err" >&5
21920   echo "configure: failed program was:" >&5
21921   cat conftest.$ac_ext >&5
21922   rm -rf conftest*
21923   ac_cv_header_stdc=no
21924 fi
21925 rm -f conftest*
21926
21927 if test $ac_cv_header_stdc = yes; then
21928   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21929 cat > conftest.$ac_ext <<EOF
21930 #line 21931 "configure"
21931 #include "confdefs.h"
21932 #include <string.h>
21933 EOF
21934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21935   egrep "memchr" >/dev/null 2>&1; then
21936   :
21937 else
21938   rm -rf conftest*
21939   ac_cv_header_stdc=no
21940 fi
21941 rm -f conftest*
21942
21943 fi
21944
21945 if test $ac_cv_header_stdc = yes; then
21946   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21947 cat > conftest.$ac_ext <<EOF
21948 #line 21949 "configure"
21949 #include "confdefs.h"
21950 #include <stdlib.h>
21951 EOF
21952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21953   egrep "free" >/dev/null 2>&1; then
21954   :
21955 else
21956   rm -rf conftest*
21957   ac_cv_header_stdc=no
21958 fi
21959 rm -f conftest*
21960
21961 fi
21962
21963 if test $ac_cv_header_stdc = yes; then
21964   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21965 if test "$cross_compiling" = yes; then
21966   :
21967 else
21968   cat > conftest.$ac_ext <<EOF
21969 #line 21970 "configure"
21970 #include "confdefs.h"
21971 #include <ctype.h>
21972 #if ((' ' & 0x0FF) == 0x020)
21973 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21974 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21975 #else
21976 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21977  || ('j' <= (c) && (c) <= 'r') \
21978  || ('s' <= (c) && (c) <= 'z'))
21979 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21980 #endif
21981 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21982 int main () { int i; for (i = 0; i < 256; i++)
21983 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21984 exit (0); }
21985
21986 EOF
21987 if { (eval echo configure:21988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21988 then
21989   :
21990 else
21991   echo "configure: failed program was:" >&5
21992   cat conftest.$ac_ext >&5
21993   rm -fr conftest*
21994   ac_cv_header_stdc=no
21995 fi
21996 rm -fr conftest*
21997 fi
21998
21999 fi
22000 fi
22001
22002 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22003 if test $ac_cv_header_stdc = yes; then
22004   cat >> confdefs.h <<\EOF
22005 #define STDC_HEADERS 1
22006 EOF
22007
22008 fi
22009
22010 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22011 echo "configure:22012: checking for mode_t" >&5
22012 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22013   echo $ac_n "(cached) $ac_c" 1>&6
22014 else
22015   cat > conftest.$ac_ext <<EOF
22016 #line 22017 "configure"
22017 #include "confdefs.h"
22018 #include <sys/types.h>
22019 #if STDC_HEADERS
22020 #include <stdlib.h>
22021 #include <stddef.h>
22022 #endif
22023
22024 EOF
22025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22026   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22027   rm -rf conftest*
22028   eval "ac_cv_type_mode_t=yes"
22029 else
22030   rm -rf conftest*
22031   eval "ac_cv_type_mode_t=no"
22032 fi
22033 rm -f conftest*
22034
22035 fi
22036 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22037   echo "$ac_t""yes" 1>&6
22038 else
22039   echo "$ac_t""no" 1>&6
22040   cat >> confdefs.h <<EOF
22041 #define mode_t int
22042 EOF
22043
22044 fi
22045
22046 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22047 echo "configure:22048: checking for off_t" >&5
22048 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22049   echo $ac_n "(cached) $ac_c" 1>&6
22050 else
22051   cat > conftest.$ac_ext <<EOF
22052 #line 22053 "configure"
22053 #include "confdefs.h"
22054 #include <sys/types.h>
22055 #if STDC_HEADERS
22056 #include <stdlib.h>
22057 #include <stddef.h>
22058 #endif
22059
22060 EOF
22061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22062   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22063   rm -rf conftest*
22064   eval "ac_cv_type_off_t=yes"
22065 else
22066   rm -rf conftest*
22067   eval "ac_cv_type_off_t=no"
22068 fi
22069 rm -f conftest*
22070
22071 fi
22072 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22073   echo "$ac_t""yes" 1>&6
22074 else
22075   echo "$ac_t""no" 1>&6
22076   cat >> confdefs.h <<EOF
22077 #define off_t long
22078 EOF
22079
22080 fi
22081
22082 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22083 echo "configure:22084: checking for pid_t" >&5
22084 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22085   echo $ac_n "(cached) $ac_c" 1>&6
22086 else
22087   cat > conftest.$ac_ext <<EOF
22088 #line 22089 "configure"
22089 #include "confdefs.h"
22090 #include <sys/types.h>
22091 #if STDC_HEADERS
22092 #include <stdlib.h>
22093 #include <stddef.h>
22094 #endif
22095
22096 EOF
22097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22098   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22099   rm -rf conftest*
22100   eval "ac_cv_type_pid_t=yes"
22101 else
22102   rm -rf conftest*
22103   eval "ac_cv_type_pid_t=no"
22104 fi
22105 rm -f conftest*
22106
22107 fi
22108 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22109   echo "$ac_t""yes" 1>&6
22110 else
22111   echo "$ac_t""no" 1>&6
22112   cat >> confdefs.h <<EOF
22113 #define pid_t int
22114 EOF
22115
22116 fi
22117
22118 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22119 echo "configure:22120: checking for ptrdiff_t" >&5
22120 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22121   echo $ac_n "(cached) $ac_c" 1>&6
22122 else
22123   cat > conftest.$ac_ext <<EOF
22124 #line 22125 "configure"
22125 #include "confdefs.h"
22126 #include <stddef.h>
22127 int main() {
22128 ptrdiff_t p
22129 ; return 0; }
22130 EOF
22131 if { (eval echo configure:22132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22132   rm -rf conftest*
22133   am_cv_type_ptrdiff_t=yes
22134 else
22135   echo "configure: failed program was:" >&5
22136   cat conftest.$ac_ext >&5
22137   rm -rf conftest*
22138   am_cv_type_ptrdiff_t=no
22139 fi
22140 rm -f conftest*
22141 fi
22142
22143 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22144    if test $am_cv_type_ptrdiff_t = yes; then
22145      cat >> confdefs.h <<\EOF
22146 #define HAVE_PTRDIFF_T 1
22147 EOF
22148
22149    fi
22150
22151 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22152 echo "configure:22153: checking return type of signal handlers" >&5
22153 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22154   echo $ac_n "(cached) $ac_c" 1>&6
22155 else
22156   cat > conftest.$ac_ext <<EOF
22157 #line 22158 "configure"
22158 #include "confdefs.h"
22159 #include <sys/types.h>
22160 #include <signal.h>
22161 #ifdef signal
22162 #undef signal
22163 #endif
22164 #ifdef __cplusplus
22165 extern "C" void (*signal (int, void (*)(int)))(int);
22166 #else
22167 void (*signal ()) ();
22168 #endif
22169
22170 int main() {
22171 int i;
22172 ; return 0; }
22173 EOF
22174 if { (eval echo configure:22175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22175   rm -rf conftest*
22176   ac_cv_type_signal=void
22177 else
22178   echo "configure: failed program was:" >&5
22179   cat conftest.$ac_ext >&5
22180   rm -rf conftest*
22181   ac_cv_type_signal=int
22182 fi
22183 rm -f conftest*
22184 fi
22185
22186 echo "$ac_t""$ac_cv_type_signal" 1>&6
22187 cat >> confdefs.h <<EOF
22188 #define RETSIGTYPE $ac_cv_type_signal
22189 EOF
22190
22191
22192 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22193 echo "configure:22194: checking for size_t" >&5
22194 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22195   echo $ac_n "(cached) $ac_c" 1>&6
22196 else
22197   cat > conftest.$ac_ext <<EOF
22198 #line 22199 "configure"
22199 #include "confdefs.h"
22200 #include <sys/types.h>
22201 #if STDC_HEADERS
22202 #include <stdlib.h>
22203 #include <stddef.h>
22204 #endif
22205
22206 EOF
22207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22208   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22209   rm -rf conftest*
22210   eval "ac_cv_type_size_t=yes"
22211 else
22212   rm -rf conftest*
22213   eval "ac_cv_type_size_t=no"
22214 fi
22215 rm -f conftest*
22216
22217 fi
22218 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22219   echo "$ac_t""yes" 1>&6
22220 else
22221   echo "$ac_t""no" 1>&6
22222   cat >> confdefs.h <<EOF
22223 #define size_t unsigned
22224 EOF
22225
22226 fi
22227
22228
22229 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22230 echo "configure:22231: checking for ssize_t" >&5
22231 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22232   echo $ac_n "(cached) $ac_c" 1>&6
22233 else
22234   cat > conftest.$ac_ext <<EOF
22235 #line 22236 "configure"
22236 #include "confdefs.h"
22237 #include <sys/types.h>
22238 #if STDC_HEADERS
22239 #include <stdlib.h>
22240 #include <stddef.h>
22241 #endif
22242
22243 EOF
22244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22245   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22246   rm -rf conftest*
22247   eval "ac_cv_type_ssize_t=yes"
22248 else
22249   rm -rf conftest*
22250   eval "ac_cv_type_ssize_t=no"
22251 fi
22252 rm -f conftest*
22253
22254 fi
22255 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22256   echo "$ac_t""yes" 1>&6
22257 else
22258   echo "$ac_t""no" 1>&6
22259   cat >> confdefs.h <<EOF
22260 #define ssize_t signed int
22261 EOF
22262
22263 fi
22264
22265 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22266 echo "configure:22267: checking for caddr_t" >&5
22267 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22268   echo $ac_n "(cached) $ac_c" 1>&6
22269 else
22270   cat > conftest.$ac_ext <<EOF
22271 #line 22272 "configure"
22272 #include "confdefs.h"
22273 #include <sys/types.h>
22274 #if STDC_HEADERS
22275 #include <stdlib.h>
22276 #include <stddef.h>
22277 #endif
22278
22279 EOF
22280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22281   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22282   rm -rf conftest*
22283   eval "ac_cv_type_caddr_t=yes"
22284 else
22285   rm -rf conftest*
22286   eval "ac_cv_type_caddr_t=no"
22287 fi
22288 rm -f conftest*
22289
22290 fi
22291 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22292   echo "$ac_t""yes" 1>&6
22293 else
22294   echo "$ac_t""no" 1>&6
22295   cat >> confdefs.h <<EOF
22296 #define caddr_t char *
22297 EOF
22298
22299 fi
22300
22301
22302 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22303 echo "configure:22304: checking for socklen_t" >&5
22304 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22305   echo $ac_n "(cached) $ac_c" 1>&6
22306 else
22307   cat > conftest.$ac_ext <<EOF
22308 #line 22309 "configure"
22309 #include "confdefs.h"
22310
22311 #ifdef HAVE_SYS_TYPES_H
22312 #include <sys/types.h>
22313 #endif
22314 #ifdef HAVE_SYS_SOCKET_H
22315 #include <sys/socket.h>
22316 #endif
22317
22318 int main() {
22319 socklen_t len;
22320 ; return 0; }
22321 EOF
22322 if { (eval echo configure:22323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22323   rm -rf conftest*
22324   ol_cv_type_socklen_t=yes
22325 else
22326   echo "configure: failed program was:" >&5
22327   cat conftest.$ac_ext >&5
22328   rm -rf conftest*
22329   ol_cv_type_socklen_t=no
22330 fi
22331 rm -f conftest*
22332 fi
22333
22334 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22335   if test $ol_cv_type_socklen_t = no; then
22336     cat >> confdefs.h <<\EOF
22337 #define socklen_t int
22338 EOF
22339
22340   fi
22341  
22342 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22343 echo "configure:22344: checking for member st_blksize in aggregate type struct stat" >&5
22344 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22345   echo $ac_n "(cached) $ac_c" 1>&6
22346 else
22347   cat > conftest.$ac_ext <<EOF
22348 #line 22349 "configure"
22349 #include "confdefs.h"
22350 #include <sys/types.h>
22351 #include <sys/stat.h>
22352 int main() {
22353 struct stat foo; foo.st_blksize;
22354 ; return 0; }
22355 EOF
22356 if { (eval echo configure:22357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22357   rm -rf conftest*
22358   ac_cv_c_struct_member_st_blksize=yes
22359 else
22360   echo "configure: failed program was:" >&5
22361   cat conftest.$ac_ext >&5
22362   rm -rf conftest*
22363   ac_cv_c_struct_member_st_blksize=no
22364 fi
22365 rm -f conftest*
22366 fi
22367
22368 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22369 st_blksize="$ac_cv_c_struct_member_st_blksize"
22370 if test $ac_cv_c_struct_member_st_blksize = yes; then
22371   cat >> confdefs.h <<\EOF
22372 #define HAVE_ST_BLKSIZE 1
22373 EOF
22374
22375 fi
22376
22377 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22378 echo "configure:22379: checking whether time.h and sys/time.h may both be included" >&5
22379 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22380   echo $ac_n "(cached) $ac_c" 1>&6
22381 else
22382   cat > conftest.$ac_ext <<EOF
22383 #line 22384 "configure"
22384 #include "confdefs.h"
22385 #include <sys/types.h>
22386 #include <sys/time.h>
22387 #include <time.h>
22388 int main() {
22389 struct tm *tp;
22390 ; return 0; }
22391 EOF
22392 if { (eval echo configure:22393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22393   rm -rf conftest*
22394   ac_cv_header_time=yes
22395 else
22396   echo "configure: failed program was:" >&5
22397   cat conftest.$ac_ext >&5
22398   rm -rf conftest*
22399   ac_cv_header_time=no
22400 fi
22401 rm -f conftest*
22402 fi
22403
22404 echo "$ac_t""$ac_cv_header_time" 1>&6
22405 if test $ac_cv_header_time = yes; then
22406   cat >> confdefs.h <<\EOF
22407 #define TIME_WITH_SYS_TIME 1
22408 EOF
22409
22410 fi
22411
22412 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22413 echo "configure:22414: checking whether struct tm is in sys/time.h or time.h" >&5
22414 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22415   echo $ac_n "(cached) $ac_c" 1>&6
22416 else
22417   cat > conftest.$ac_ext <<EOF
22418 #line 22419 "configure"
22419 #include "confdefs.h"
22420 #include <sys/types.h>
22421 #include <time.h>
22422 int main() {
22423 struct tm *tp; tp->tm_sec;
22424 ; return 0; }
22425 EOF
22426 if { (eval echo configure:22427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22427   rm -rf conftest*
22428   ac_cv_struct_tm=time.h
22429 else
22430   echo "configure: failed program was:" >&5
22431   cat conftest.$ac_ext >&5
22432   rm -rf conftest*
22433   ac_cv_struct_tm=sys/time.h
22434 fi
22435 rm -f conftest*
22436 fi
22437
22438 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22439 if test $ac_cv_struct_tm = sys/time.h; then
22440   cat >> confdefs.h <<\EOF
22441 #define TM_IN_SYS_TIME 1
22442 EOF
22443
22444 fi
22445
22446 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22447 echo "configure:22448: checking for uid_t in sys/types.h" >&5
22448 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22449   echo $ac_n "(cached) $ac_c" 1>&6
22450 else
22451   cat > conftest.$ac_ext <<EOF
22452 #line 22453 "configure"
22453 #include "confdefs.h"
22454 #include <sys/types.h>
22455 EOF
22456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22457   egrep "uid_t" >/dev/null 2>&1; then
22458   rm -rf conftest*
22459   ac_cv_type_uid_t=yes
22460 else
22461   rm -rf conftest*
22462   ac_cv_type_uid_t=no
22463 fi
22464 rm -f conftest*
22465
22466 fi
22467
22468 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22469 if test $ac_cv_type_uid_t = no; then
22470   cat >> confdefs.h <<\EOF
22471 #define uid_t int
22472 EOF
22473
22474   cat >> confdefs.h <<\EOF
22475 #define gid_t int
22476 EOF
22477
22478 fi
22479
22480 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22481 echo "configure:22482: checking for sig_atomic_t" >&5
22482 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22483   echo $ac_n "(cached) $ac_c" 1>&6
22484 else
22485   cat > conftest.$ac_ext <<EOF
22486 #line 22487 "configure"
22487 #include "confdefs.h"
22488 #include <signal.h>
22489 int main() {
22490 sig_atomic_t atomic;
22491 ; return 0; }
22492 EOF
22493 if { (eval echo configure:22494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22494   rm -rf conftest*
22495   ol_cv_type_sig_atomic_t=yes
22496 else
22497   echo "configure: failed program was:" >&5
22498   cat conftest.$ac_ext >&5
22499   rm -rf conftest*
22500   ol_cv_type_sig_atomic_t=no
22501 fi
22502 rm -f conftest*
22503 fi
22504
22505 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22506   if test $ol_cv_type_sig_atomic_t = no; then
22507     cat >> confdefs.h <<\EOF
22508 #define sig_atomic_t int
22509 EOF
22510
22511   fi
22512  
22513
22514
22515 # test for pw_gecos in struct passwd
22516 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22517 echo "configure:22518: checking struct passwd for pw_gecos" >&5
22518 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22519   echo $ac_n "(cached) $ac_c" 1>&6
22520 else
22521   
22522         cat > conftest.$ac_ext <<EOF
22523 #line 22524 "configure"
22524 #include "confdefs.h"
22525 #include <pwd.h>
22526 int main() {
22527
22528         struct passwd pwd;
22529         pwd.pw_gecos = pwd.pw_name;
22530
22531 ; return 0; }
22532 EOF
22533 if { (eval echo configure:22534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22534   rm -rf conftest*
22535   ol_cv_struct_passwd_pw_gecos=yes
22536 else
22537   echo "configure: failed program was:" >&5
22538   cat conftest.$ac_ext >&5
22539   rm -rf conftest*
22540   ol_cv_struct_passwd_pw_gecos=no
22541 fi
22542 rm -f conftest*
22543 fi
22544
22545 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22546 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22547         cat >> confdefs.h <<\EOF
22548 #define HAVE_PW_GECOS 1
22549 EOF
22550
22551 fi
22552
22553 # test for pw_passwd in struct passwd
22554 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22555 echo "configure:22556: checking struct passwd for pw_passwd" >&5
22556 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22557   echo $ac_n "(cached) $ac_c" 1>&6
22558 else
22559   
22560         cat > conftest.$ac_ext <<EOF
22561 #line 22562 "configure"
22562 #include "confdefs.h"
22563 #include <pwd.h>
22564 int main() {
22565
22566         struct passwd pwd;
22567         pwd.pw_passwd = pwd.pw_name;
22568
22569 ; return 0; }
22570 EOF
22571 if { (eval echo configure:22572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22572   rm -rf conftest*
22573   ol_cv_struct_passwd_pw_passwd=yes
22574 else
22575   echo "configure: failed program was:" >&5
22576   cat conftest.$ac_ext >&5
22577   rm -rf conftest*
22578   ol_cv_struct_passwd_pw_passwd=no
22579 fi
22580 rm -f conftest*
22581 fi
22582
22583 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22584 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22585         cat >> confdefs.h <<\EOF
22586 #define HAVE_PW_PASSWD 1
22587 EOF
22588
22589 fi
22590
22591
22592 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22593 echo "configure:22594: checking if toupper() requires islower()" >&5
22594 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22595   echo $ac_n "(cached) $ac_c" 1>&6
22596 else
22597   
22598         if test "$cross_compiling" = yes; then
22599   ol_cv_c_upper_lower=safe
22600 else
22601   cat > conftest.$ac_ext <<EOF
22602 #line 22603 "configure"
22603 #include "confdefs.h"
22604
22605 #include <ctype.h>
22606 main()
22607 {
22608         if ('C' == toupper('C'))
22609                 exit(0);
22610         else
22611                 exit(1);
22612 }
22613 EOF
22614 if { (eval echo configure:22615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22615 then
22616   ol_cv_c_upper_lower=no
22617 else
22618   echo "configure: failed program was:" >&5
22619   cat conftest.$ac_ext >&5
22620   rm -fr conftest*
22621   ol_cv_c_upper_lower=yes
22622 fi
22623 rm -fr conftest*
22624 fi
22625
22626 fi
22627
22628 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22629 if test $ol_cv_c_upper_lower != no ; then
22630         cat >> confdefs.h <<\EOF
22631 #define C_UPPER_LOWER 1
22632 EOF
22633
22634 fi
22635
22636 echo $ac_n "checking for working const""... $ac_c" 1>&6
22637 echo "configure:22638: checking for working const" >&5
22638 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22639   echo $ac_n "(cached) $ac_c" 1>&6
22640 else
22641   cat > conftest.$ac_ext <<EOF
22642 #line 22643 "configure"
22643 #include "confdefs.h"
22644
22645 int main() {
22646
22647 /* Ultrix mips cc rejects this.  */
22648 typedef int charset[2]; const charset x;
22649 /* SunOS 4.1.1 cc rejects this.  */
22650 char const *const *ccp;
22651 char **p;
22652 /* NEC SVR4.0.2 mips cc rejects this.  */
22653 struct point {int x, y;};
22654 static struct point const zero = {0,0};
22655 /* AIX XL C 1.02.0.0 rejects this.
22656    It does not let you subtract one const X* pointer from another in an arm
22657    of an if-expression whose if-part is not a constant expression */
22658 const char *g = "string";
22659 ccp = &g + (g ? g-g : 0);
22660 /* HPUX 7.0 cc rejects these. */
22661 ++ccp;
22662 p = (char**) ccp;
22663 ccp = (char const *const *) p;
22664 { /* SCO 3.2v4 cc rejects this.  */
22665   char *t;
22666   char const *s = 0 ? (char *) 0 : (char const *) 0;
22667
22668   *t++ = 0;
22669 }
22670 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22671   int x[] = {25, 17};
22672   const int *foo = &x[0];
22673   ++foo;
22674 }
22675 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22676   typedef const int *iptr;
22677   iptr p = 0;
22678   ++p;
22679 }
22680 { /* AIX XL C 1.02.0.0 rejects this saying
22681      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22682   struct s { int j; const int *ap[3]; };
22683   struct s *b; b->j = 5;
22684 }
22685 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22686   const int foo = 10;
22687 }
22688
22689 ; return 0; }
22690 EOF
22691 if { (eval echo configure:22692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22692   rm -rf conftest*
22693   ac_cv_c_const=yes
22694 else
22695   echo "configure: failed program was:" >&5
22696   cat conftest.$ac_ext >&5
22697   rm -rf conftest*
22698   ac_cv_c_const=no
22699 fi
22700 rm -f conftest*
22701 fi
22702
22703 echo "$ac_t""$ac_cv_c_const" 1>&6
22704 if test $ac_cv_c_const = no; then
22705   cat >> confdefs.h <<\EOF
22706 #define const 
22707 EOF
22708
22709 fi
22710
22711 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22712 echo "configure:22713: checking if compiler understands volatile" >&5
22713 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22714   echo $ac_n "(cached) $ac_c" 1>&6
22715 else
22716   cat > conftest.$ac_ext <<EOF
22717 #line 22718 "configure"
22718 #include "confdefs.h"
22719 int x, y, z;
22720 int main() {
22721 volatile int a; int * volatile b = x ? &y : &z;
22722       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22723       *b = 0;
22724 ; return 0; }
22725 EOF
22726 if { (eval echo configure:22727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22727   rm -rf conftest*
22728   ol_cv_c_volatile=yes
22729 else
22730   echo "configure: failed program was:" >&5
22731   cat conftest.$ac_ext >&5
22732   rm -rf conftest*
22733   ol_cv_c_volatile=no
22734 fi
22735 rm -f conftest*
22736 fi
22737
22738 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22739   if test $ol_cv_c_volatile = yes; then
22740     : 
22741   else
22742     cat >> confdefs.h <<\EOF
22743 #define volatile 
22744 EOF
22745
22746   fi
22747  
22748
22749 if test $cross_compiling = yes ; then
22750         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22751         cat >> confdefs.h <<\EOF
22752 #define CROSS_COMPILING 1
22753 EOF
22754
22755 else
22756         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22757 echo "configure:22758: checking whether byte ordering is bigendian" >&5
22758 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22759   echo $ac_n "(cached) $ac_c" 1>&6
22760 else
22761   ac_cv_c_bigendian=unknown
22762 # See if sys/param.h defines the BYTE_ORDER macro.
22763 cat > conftest.$ac_ext <<EOF
22764 #line 22765 "configure"
22765 #include "confdefs.h"
22766 #include <sys/types.h>
22767 #include <sys/param.h>
22768 int main() {
22769
22770 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22771  bogus endian macros
22772 #endif
22773 ; return 0; }
22774 EOF
22775 if { (eval echo configure:22776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22776   rm -rf conftest*
22777   # It does; now see whether it defined to BIG_ENDIAN or not.
22778 cat > conftest.$ac_ext <<EOF
22779 #line 22780 "configure"
22780 #include "confdefs.h"
22781 #include <sys/types.h>
22782 #include <sys/param.h>
22783 int main() {
22784
22785 #if BYTE_ORDER != BIG_ENDIAN
22786  not big endian
22787 #endif
22788 ; return 0; }
22789 EOF
22790 if { (eval echo configure:22791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22791   rm -rf conftest*
22792   ac_cv_c_bigendian=yes
22793 else
22794   echo "configure: failed program was:" >&5
22795   cat conftest.$ac_ext >&5
22796   rm -rf conftest*
22797   ac_cv_c_bigendian=no
22798 fi
22799 rm -f conftest*
22800 else
22801   echo "configure: failed program was:" >&5
22802   cat conftest.$ac_ext >&5
22803 fi
22804 rm -f conftest*
22805 if test $ac_cv_c_bigendian = unknown; then
22806 if test "$cross_compiling" = yes; then
22807     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22808 else
22809   cat > conftest.$ac_ext <<EOF
22810 #line 22811 "configure"
22811 #include "confdefs.h"
22812 main () {
22813   /* Are we little or big endian?  From Harbison&Steele.  */
22814   union
22815   {
22816     long l;
22817     char c[sizeof (long)];
22818   } u;
22819   u.l = 1;
22820   exit (u.c[sizeof (long) - 1] == 1);
22821 }
22822 EOF
22823 if { (eval echo configure:22824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22824 then
22825   ac_cv_c_bigendian=no
22826 else
22827   echo "configure: failed program was:" >&5
22828   cat conftest.$ac_ext >&5
22829   rm -fr conftest*
22830   ac_cv_c_bigendian=yes
22831 fi
22832 rm -fr conftest*
22833 fi
22834
22835 fi
22836 fi
22837
22838 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22839 if test $ac_cv_c_bigendian = yes; then
22840   cat >> confdefs.h <<\EOF
22841 #define WORDS_BIGENDIAN 1
22842 EOF
22843
22844 fi
22845
22846 fi
22847
22848 echo $ac_n "checking size of short""... $ac_c" 1>&6
22849 echo "configure:22850: checking size of short" >&5 
22850 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22851   echo $ac_n "(cached) $ac_c" 1>&6
22852 else
22853   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22854   cat > conftest.$ac_ext <<EOF
22855 #line 22856 "configure"
22856 #include "confdefs.h"
22857 #include "confdefs.h" 
22858 #include <stdlib.h>
22859 #include <sys/types.h> 
22860  
22861
22862 int main() {
22863 switch (0) case 0: case (sizeof (short) == $ac_size):;
22864 ; return 0; }
22865 EOF
22866 if { (eval echo configure:22867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22867   rm -rf conftest*
22868   ac_cv_sizeof_short=$ac_size
22869 else
22870   echo "configure: failed program was:" >&5
22871   cat conftest.$ac_ext >&5
22872 fi
22873 rm -f conftest* 
22874   if test x$ac_cv_sizeof_short != x ; then break; fi 
22875 done 
22876
22877 fi
22878  
22879 if test x$ac_cv_sizeof_short = x ; then 
22880   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22881 fi 
22882 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22883 cat >> confdefs.h <<EOF
22884 #define SIZEOF_SHORT $ac_cv_sizeof_short
22885 EOF
22886  
22887  
22888 echo $ac_n "checking size of int""... $ac_c" 1>&6
22889 echo "configure:22890: checking size of int" >&5 
22890 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22891   echo $ac_n "(cached) $ac_c" 1>&6
22892 else
22893   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22894   cat > conftest.$ac_ext <<EOF
22895 #line 22896 "configure"
22896 #include "confdefs.h"
22897 #include "confdefs.h" 
22898 #include <stdlib.h>
22899 #include <sys/types.h> 
22900  
22901
22902 int main() {
22903 switch (0) case 0: case (sizeof (int) == $ac_size):;
22904 ; return 0; }
22905 EOF
22906 if { (eval echo configure:22907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22907   rm -rf conftest*
22908   ac_cv_sizeof_int=$ac_size
22909 else
22910   echo "configure: failed program was:" >&5
22911   cat conftest.$ac_ext >&5
22912 fi
22913 rm -f conftest* 
22914   if test x$ac_cv_sizeof_int != x ; then break; fi 
22915 done 
22916
22917 fi
22918  
22919 if test x$ac_cv_sizeof_int = x ; then 
22920   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22921 fi 
22922 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22923 cat >> confdefs.h <<EOF
22924 #define SIZEOF_INT $ac_cv_sizeof_int
22925 EOF
22926  
22927  
22928 echo $ac_n "checking size of long""... $ac_c" 1>&6
22929 echo "configure:22930: checking size of long" >&5 
22930 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22931   echo $ac_n "(cached) $ac_c" 1>&6
22932 else
22933   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22934   cat > conftest.$ac_ext <<EOF
22935 #line 22936 "configure"
22936 #include "confdefs.h"
22937 #include "confdefs.h" 
22938 #include <stdlib.h>
22939 #include <sys/types.h> 
22940  
22941
22942 int main() {
22943 switch (0) case 0: case (sizeof (long) == $ac_size):;
22944 ; return 0; }
22945 EOF
22946 if { (eval echo configure:22947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22947   rm -rf conftest*
22948   ac_cv_sizeof_long=$ac_size
22949 else
22950   echo "configure: failed program was:" >&5
22951   cat conftest.$ac_ext >&5
22952 fi
22953 rm -f conftest* 
22954   if test x$ac_cv_sizeof_long != x ; then break; fi 
22955 done 
22956
22957 fi
22958  
22959 if test x$ac_cv_sizeof_long = x ; then 
22960   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22961 fi 
22962 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22963 cat >> confdefs.h <<EOF
22964 #define SIZEOF_LONG $ac_cv_sizeof_long
22965 EOF
22966  
22967
22968 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22969 echo "configure:22970: checking size of wchar_t" >&5 
22970 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22971   echo $ac_n "(cached) $ac_c" 1>&6
22972 else
22973   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22974   cat > conftest.$ac_ext <<EOF
22975 #line 22976 "configure"
22976 #include "confdefs.h"
22977 #include "confdefs.h" 
22978 #include <stdlib.h>
22979 #include <sys/types.h> 
22980  
22981
22982 int main() {
22983 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22984 ; return 0; }
22985 EOF
22986 if { (eval echo configure:22987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22987   rm -rf conftest*
22988   ac_cv_sizeof_wchar_t=$ac_size
22989 else
22990   echo "configure: failed program was:" >&5
22991   cat conftest.$ac_ext >&5
22992 fi
22993 rm -f conftest* 
22994   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22995 done 
22996
22997 fi
22998  
22999 if test x$ac_cv_sizeof_wchar_t = x ; then 
23000   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23001 fi 
23002 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23003 cat >> confdefs.h <<EOF
23004 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23005 EOF
23006  
23007
23008
23009 if test "$ac_cv_sizeof_int" -lt 4 ; then
23010         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23011
23012         cat >> confdefs.h <<\EOF
23013 #define LBER_INT_T long
23014 EOF
23015
23016 else
23017         cat >> confdefs.h <<\EOF
23018 #define LBER_INT_T int
23019 EOF
23020
23021 fi
23022
23023 cat >> confdefs.h <<\EOF
23024 #define LBER_LEN_T long
23025 EOF
23026
23027 cat >> confdefs.h <<\EOF
23028 #define LBER_SOCKET_T int
23029 EOF
23030
23031 cat >> confdefs.h <<\EOF
23032 #define LBER_TAG_T long
23033 EOF
23034
23035
23036 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23037 echo "configure:23038: checking for 8-bit clean memcmp" >&5
23038 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23039   echo $ac_n "(cached) $ac_c" 1>&6
23040 else
23041   if test "$cross_compiling" = yes; then
23042   ac_cv_func_memcmp_clean=no
23043 else
23044   cat > conftest.$ac_ext <<EOF
23045 #line 23046 "configure"
23046 #include "confdefs.h"
23047
23048 main()
23049 {
23050   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23051   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23052 }
23053
23054 EOF
23055 if { (eval echo configure:23056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23056 then
23057   ac_cv_func_memcmp_clean=yes
23058 else
23059   echo "configure: failed program was:" >&5
23060   cat conftest.$ac_ext >&5
23061   rm -fr conftest*
23062   ac_cv_func_memcmp_clean=no
23063 fi
23064 rm -fr conftest*
23065 fi
23066
23067 fi
23068
23069 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23070 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23071
23072 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23073 echo "configure:23074: checking for strftime" >&5
23074 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23075   echo $ac_n "(cached) $ac_c" 1>&6
23076 else
23077   cat > conftest.$ac_ext <<EOF
23078 #line 23079 "configure"
23079 #include "confdefs.h"
23080 /* System header to define __stub macros and hopefully few prototypes,
23081     which can conflict with char strftime(); below.  */
23082 #include <assert.h>
23083 /* Override any gcc2 internal prototype to avoid an error.  */
23084 /* We use char because int might match the return type of a gcc2
23085     builtin and then its argument prototype would still apply.  */
23086 char strftime();
23087 char (*f)();
23088
23089 int main() {
23090
23091 /* The GNU C library defines this for functions which it implements
23092     to always fail with ENOSYS.  Some functions are actually named
23093     something starting with __ and the normal name is an alias.  */
23094 #if defined (__stub_strftime) || defined (__stub___strftime)
23095 choke me
23096 #else
23097 f = strftime;
23098 #endif
23099
23100 ; return 0; }
23101 EOF
23102 if { (eval echo configure:23103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23103   rm -rf conftest*
23104   eval "ac_cv_func_strftime=yes"
23105 else
23106   echo "configure: failed program was:" >&5
23107   cat conftest.$ac_ext >&5
23108   rm -rf conftest*
23109   eval "ac_cv_func_strftime=no"
23110 fi
23111 rm -f conftest*
23112 fi
23113
23114 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23115   echo "$ac_t""yes" 1>&6
23116   cat >> confdefs.h <<\EOF
23117 #define HAVE_STRFTIME 1
23118 EOF
23119
23120 else
23121   echo "$ac_t""no" 1>&6
23122 # strftime is in -lintl on SCO UNIX.
23123 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23124 echo "configure:23125: checking for strftime in -lintl" >&5
23125 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23127   echo $ac_n "(cached) $ac_c" 1>&6
23128 else
23129   ac_save_LIBS="$LIBS"
23130 LIBS="-lintl  $LIBS"
23131 cat > conftest.$ac_ext <<EOF
23132 #line 23133 "configure"
23133 #include "confdefs.h"
23134 /* Override any gcc2 internal prototype to avoid an error.  */
23135 /* We use char because int might match the return type of a gcc2
23136     builtin and then its argument prototype would still apply.  */
23137 char strftime();
23138
23139 int main() {
23140 strftime()
23141 ; return 0; }
23142 EOF
23143 if { (eval echo configure:23144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23144   rm -rf conftest*
23145   eval "ac_cv_lib_$ac_lib_var=yes"
23146 else
23147   echo "configure: failed program was:" >&5
23148   cat conftest.$ac_ext >&5
23149   rm -rf conftest*
23150   eval "ac_cv_lib_$ac_lib_var=no"
23151 fi
23152 rm -f conftest*
23153 LIBS="$ac_save_LIBS"
23154
23155 fi
23156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23157   echo "$ac_t""yes" 1>&6
23158   cat >> confdefs.h <<\EOF
23159 #define HAVE_STRFTIME 1
23160 EOF
23161
23162 LIBS="-lintl $LIBS"
23163 else
23164   echo "$ac_t""no" 1>&6
23165 fi
23166
23167 fi
23168
23169
23170 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23171 echo "configure:23172: checking for inet_aton()" >&5
23172 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23173   echo $ac_n "(cached) $ac_c" 1>&6
23174 else
23175   cat > conftest.$ac_ext <<EOF
23176 #line 23177 "configure"
23177 #include "confdefs.h"
23178
23179 #ifdef HAVE_SYS_TYPES_H
23180 #       include <sys/types.h>
23181 #endif
23182 #ifdef HAVE_SYS_SOCKET_H
23183 #       include <sys/socket.h>
23184 #       ifdef HAVE_SYS_SELECT_H
23185 #               include <sys/select.h>
23186 #       endif
23187 #       include <netinet/in.h>
23188 #       ifdef HAVE_ARPA_INET_H
23189 #               include <arpa/inet.h>
23190 #       endif
23191 #endif
23192
23193 int main() {
23194 struct in_addr in;
23195 int rc = inet_aton( "255.255.255.255", &in );
23196 ; return 0; }
23197 EOF
23198 if { (eval echo configure:23199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23199   rm -rf conftest*
23200   ol_cv_func_inet_aton=yes
23201 else
23202   echo "configure: failed program was:" >&5
23203   cat conftest.$ac_ext >&5
23204   rm -rf conftest*
23205   ol_cv_func_inet_aton=no
23206 fi
23207 rm -f conftest*
23208 fi
23209
23210 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23211   if test $ol_cv_func_inet_aton != no; then
23212     cat >> confdefs.h <<\EOF
23213 #define HAVE_INET_ATON 1
23214 EOF
23215
23216   fi
23217  
23218
23219 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23220 echo "configure:23221: checking for _spawnlp" >&5
23221 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23222   echo $ac_n "(cached) $ac_c" 1>&6
23223 else
23224   cat > conftest.$ac_ext <<EOF
23225 #line 23226 "configure"
23226 #include "confdefs.h"
23227 /* System header to define __stub macros and hopefully few prototypes,
23228     which can conflict with char _spawnlp(); below.  */
23229 #include <assert.h>
23230 /* Override any gcc2 internal prototype to avoid an error.  */
23231 /* We use char because int might match the return type of a gcc2
23232     builtin and then its argument prototype would still apply.  */
23233 char _spawnlp();
23234 char (*f)();
23235
23236 int main() {
23237
23238 /* The GNU C library defines this for functions which it implements
23239     to always fail with ENOSYS.  Some functions are actually named
23240     something starting with __ and the normal name is an alias.  */
23241 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23242 choke me
23243 #else
23244 f = _spawnlp;
23245 #endif
23246
23247 ; return 0; }
23248 EOF
23249 if { (eval echo configure:23250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23250   rm -rf conftest*
23251   eval "ac_cv_func__spawnlp=yes"
23252 else
23253   echo "configure: failed program was:" >&5
23254   cat conftest.$ac_ext >&5
23255   rm -rf conftest*
23256   eval "ac_cv_func__spawnlp=no"
23257 fi
23258 rm -f conftest*
23259 fi
23260
23261 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23262   echo "$ac_t""yes" 1>&6
23263   cat >> confdefs.h <<\EOF
23264 #define HAVE_SPAWNLP 1
23265 EOF
23266
23267 else
23268   echo "$ac_t""no" 1>&6
23269 fi
23270
23271
23272 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23273 echo "configure:23274: checking for _snprintf" >&5
23274 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23275   echo $ac_n "(cached) $ac_c" 1>&6
23276 else
23277   cat > conftest.$ac_ext <<EOF
23278 #line 23279 "configure"
23279 #include "confdefs.h"
23280 /* System header to define __stub macros and hopefully few prototypes,
23281     which can conflict with char _snprintf(); below.  */
23282 #include <assert.h>
23283 /* Override any gcc2 internal prototype to avoid an error.  */
23284 /* We use char because int might match the return type of a gcc2
23285     builtin and then its argument prototype would still apply.  */
23286 char _snprintf();
23287 char (*f)();
23288
23289 int main() {
23290
23291 /* The GNU C library defines this for functions which it implements
23292     to always fail with ENOSYS.  Some functions are actually named
23293     something starting with __ and the normal name is an alias.  */
23294 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23295 choke me
23296 #else
23297 f = _snprintf;
23298 #endif
23299
23300 ; return 0; }
23301 EOF
23302 if { (eval echo configure:23303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23303   rm -rf conftest*
23304   eval "ac_cv_func__snprintf=yes"
23305 else
23306   echo "configure: failed program was:" >&5
23307   cat conftest.$ac_ext >&5
23308   rm -rf conftest*
23309   eval "ac_cv_func__snprintf=no"
23310 fi
23311 rm -f conftest*
23312 fi
23313
23314 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23315   echo "$ac_t""yes" 1>&6
23316   ac_cv_func_snprintf=yes
23317         cat >> confdefs.h <<\EOF
23318 #define snprintf _snprintf
23319 EOF
23320
23321
23322 else
23323   echo "$ac_t""no" 1>&6
23324 fi
23325
23326
23327 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23328 echo "configure:23329: checking for _vsnprintf" >&5
23329 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23330   echo $ac_n "(cached) $ac_c" 1>&6
23331 else
23332   cat > conftest.$ac_ext <<EOF
23333 #line 23334 "configure"
23334 #include "confdefs.h"
23335 /* System header to define __stub macros and hopefully few prototypes,
23336     which can conflict with char _vsnprintf(); below.  */
23337 #include <assert.h>
23338 /* Override any gcc2 internal prototype to avoid an error.  */
23339 /* We use char because int might match the return type of a gcc2
23340     builtin and then its argument prototype would still apply.  */
23341 char _vsnprintf();
23342 char (*f)();
23343
23344 int main() {
23345
23346 /* The GNU C library defines this for functions which it implements
23347     to always fail with ENOSYS.  Some functions are actually named
23348     something starting with __ and the normal name is an alias.  */
23349 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23350 choke me
23351 #else
23352 f = _vsnprintf;
23353 #endif
23354
23355 ; return 0; }
23356 EOF
23357 if { (eval echo configure:23358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23358   rm -rf conftest*
23359   eval "ac_cv_func__vsnprintf=yes"
23360 else
23361   echo "configure: failed program was:" >&5
23362   cat conftest.$ac_ext >&5
23363   rm -rf conftest*
23364   eval "ac_cv_func__vsnprintf=no"
23365 fi
23366 rm -f conftest*
23367 fi
23368
23369 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23370   echo "$ac_t""yes" 1>&6
23371   ac_cv_func_vsnprintf=yes
23372         cat >> confdefs.h <<\EOF
23373 #define vsnprintf _vsnprintf
23374 EOF
23375
23376
23377 else
23378   echo "$ac_t""no" 1>&6
23379 fi
23380
23381
23382 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23383 echo "configure:23384: checking for vprintf" >&5
23384 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23385   echo $ac_n "(cached) $ac_c" 1>&6
23386 else
23387   cat > conftest.$ac_ext <<EOF
23388 #line 23389 "configure"
23389 #include "confdefs.h"
23390 /* System header to define __stub macros and hopefully few prototypes,
23391     which can conflict with char vprintf(); below.  */
23392 #include <assert.h>
23393 /* Override any gcc2 internal prototype to avoid an error.  */
23394 /* We use char because int might match the return type of a gcc2
23395     builtin and then its argument prototype would still apply.  */
23396 char vprintf();
23397 char (*f)();
23398
23399 int main() {
23400
23401 /* The GNU C library defines this for functions which it implements
23402     to always fail with ENOSYS.  Some functions are actually named
23403     something starting with __ and the normal name is an alias.  */
23404 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23405 choke me
23406 #else
23407 f = vprintf;
23408 #endif
23409
23410 ; return 0; }
23411 EOF
23412 if { (eval echo configure:23413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23413   rm -rf conftest*
23414   eval "ac_cv_func_vprintf=yes"
23415 else
23416   echo "configure: failed program was:" >&5
23417   cat conftest.$ac_ext >&5
23418   rm -rf conftest*
23419   eval "ac_cv_func_vprintf=no"
23420 fi
23421 rm -f conftest*
23422 fi
23423
23424 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23425   echo "$ac_t""yes" 1>&6
23426   cat >> confdefs.h <<\EOF
23427 #define HAVE_VPRINTF 1
23428 EOF
23429
23430 else
23431   echo "$ac_t""no" 1>&6
23432 fi
23433
23434 if test "$ac_cv_func_vprintf" != yes; then
23435 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23436 echo "configure:23437: checking for _doprnt" >&5
23437 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23438   echo $ac_n "(cached) $ac_c" 1>&6
23439 else
23440   cat > conftest.$ac_ext <<EOF
23441 #line 23442 "configure"
23442 #include "confdefs.h"
23443 /* System header to define __stub macros and hopefully few prototypes,
23444     which can conflict with char _doprnt(); below.  */
23445 #include <assert.h>
23446 /* Override any gcc2 internal prototype to avoid an error.  */
23447 /* We use char because int might match the return type of a gcc2
23448     builtin and then its argument prototype would still apply.  */
23449 char _doprnt();
23450 char (*f)();
23451
23452 int main() {
23453
23454 /* The GNU C library defines this for functions which it implements
23455     to always fail with ENOSYS.  Some functions are actually named
23456     something starting with __ and the normal name is an alias.  */
23457 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23458 choke me
23459 #else
23460 f = _doprnt;
23461 #endif
23462
23463 ; return 0; }
23464 EOF
23465 if { (eval echo configure:23466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23466   rm -rf conftest*
23467   eval "ac_cv_func__doprnt=yes"
23468 else
23469   echo "configure: failed program was:" >&5
23470   cat conftest.$ac_ext >&5
23471   rm -rf conftest*
23472   eval "ac_cv_func__doprnt=no"
23473 fi
23474 rm -f conftest*
23475 fi
23476
23477 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23478   echo "$ac_t""yes" 1>&6
23479   cat >> confdefs.h <<\EOF
23480 #define HAVE_DOPRNT 1
23481 EOF
23482
23483 else
23484   echo "$ac_t""no" 1>&6
23485 fi
23486
23487 fi
23488
23489
23490 if test $ac_cv_func_vprintf = yes ; then
23491                 for ac_func in snprintf vsnprintf
23492 do
23493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23494 echo "configure:23495: checking for $ac_func" >&5
23495 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23496   echo $ac_n "(cached) $ac_c" 1>&6
23497 else
23498   cat > conftest.$ac_ext <<EOF
23499 #line 23500 "configure"
23500 #include "confdefs.h"
23501 /* System header to define __stub macros and hopefully few prototypes,
23502     which can conflict with char $ac_func(); below.  */
23503 #include <assert.h>
23504 /* Override any gcc2 internal prototype to avoid an error.  */
23505 /* We use char because int might match the return type of a gcc2
23506     builtin and then its argument prototype would still apply.  */
23507 char $ac_func();
23508 char (*f)();
23509
23510 int main() {
23511
23512 /* The GNU C library defines this for functions which it implements
23513     to always fail with ENOSYS.  Some functions are actually named
23514     something starting with __ and the normal name is an alias.  */
23515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23516 choke me
23517 #else
23518 f = $ac_func;
23519 #endif
23520
23521 ; return 0; }
23522 EOF
23523 if { (eval echo configure:23524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23524   rm -rf conftest*
23525   eval "ac_cv_func_$ac_func=yes"
23526 else
23527   echo "configure: failed program was:" >&5
23528   cat conftest.$ac_ext >&5
23529   rm -rf conftest*
23530   eval "ac_cv_func_$ac_func=no"
23531 fi
23532 rm -f conftest*
23533 fi
23534
23535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23536   echo "$ac_t""yes" 1>&6
23537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23538   cat >> confdefs.h <<EOF
23539 #define $ac_tr_func 1
23540 EOF
23541  
23542 else
23543   echo "$ac_t""no" 1>&6
23544 fi
23545 done
23546
23547 fi
23548
23549 for ac_func in \
23550         bcopy                   \
23551         closesocket             \
23552         chroot                  \
23553         endgrent                \
23554         endpwent                \
23555         fcntl                   \
23556         flock                   \
23557         fstat                   \
23558         getdtablesize   \
23559         getgrgid                \
23560         gethostname             \
23561         getpass                 \
23562         getpassphrase   \
23563         getpwuid                \
23564         getpwnam                \
23565         getspnam                \
23566         gettimeofday    \
23567         initgroups              \
23568         lockf                   \
23569         memcpy                  \
23570         memmove                 \
23571         mkstemp                 \
23572         mktemp                  \
23573         pipe                    \
23574         read                    \
23575         recv                    \
23576         recvfrom                \
23577         setpwfile               \
23578         setgid                  \
23579         setegid                 \
23580         setsid                  \
23581         setuid                  \
23582         seteuid                 \
23583         sigaction               \
23584         signal                  \
23585         sigset                  \
23586         strdup                  \
23587         strpbrk                 \
23588         strrchr                 \
23589         strsep                  \
23590         strstr                  \
23591         strtol                  \
23592         strtoul                 \
23593         strtoq                  \
23594         strtouq                 \
23595         strtoll                 \
23596         strspn                  \
23597         sysconf                 \
23598         usleep                  \
23599         waitpid                 \
23600         wait4                   \
23601         write                   \
23602         send                    \
23603         sendmsg                 \
23604         sendto                  \
23605
23606 do
23607 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23608 echo "configure:23609: checking for $ac_func" >&5
23609 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23610   echo $ac_n "(cached) $ac_c" 1>&6
23611 else
23612   cat > conftest.$ac_ext <<EOF
23613 #line 23614 "configure"
23614 #include "confdefs.h"
23615 /* System header to define __stub macros and hopefully few prototypes,
23616     which can conflict with char $ac_func(); below.  */
23617 #include <assert.h>
23618 /* Override any gcc2 internal prototype to avoid an error.  */
23619 /* We use char because int might match the return type of a gcc2
23620     builtin and then its argument prototype would still apply.  */
23621 char $ac_func();
23622 char (*f)();
23623
23624 int main() {
23625
23626 /* The GNU C library defines this for functions which it implements
23627     to always fail with ENOSYS.  Some functions are actually named
23628     something starting with __ and the normal name is an alias.  */
23629 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23630 choke me
23631 #else
23632 f = $ac_func;
23633 #endif
23634
23635 ; return 0; }
23636 EOF
23637 if { (eval echo configure:23638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23638   rm -rf conftest*
23639   eval "ac_cv_func_$ac_func=yes"
23640 else
23641   echo "configure: failed program was:" >&5
23642   cat conftest.$ac_ext >&5
23643   rm -rf conftest*
23644   eval "ac_cv_func_$ac_func=no"
23645 fi
23646 rm -f conftest*
23647 fi
23648
23649 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23650   echo "$ac_t""yes" 1>&6
23651     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23652   cat >> confdefs.h <<EOF
23653 #define $ac_tr_func 1
23654 EOF
23655  
23656 else
23657   echo "$ac_t""no" 1>&6
23658 fi
23659 done
23660
23661
23662 for ac_func in getopt getpeereid
23663 do
23664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23665 echo "configure:23666: checking for $ac_func" >&5
23666 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23667   echo $ac_n "(cached) $ac_c" 1>&6
23668 else
23669   cat > conftest.$ac_ext <<EOF
23670 #line 23671 "configure"
23671 #include "confdefs.h"
23672 /* System header to define __stub macros and hopefully few prototypes,
23673     which can conflict with char $ac_func(); below.  */
23674 #include <assert.h>
23675 /* Override any gcc2 internal prototype to avoid an error.  */
23676 /* We use char because int might match the return type of a gcc2
23677     builtin and then its argument prototype would still apply.  */
23678 char $ac_func();
23679 char (*f)();
23680
23681 int main() {
23682
23683 /* The GNU C library defines this for functions which it implements
23684     to always fail with ENOSYS.  Some functions are actually named
23685     something starting with __ and the normal name is an alias.  */
23686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23687 choke me
23688 #else
23689 f = $ac_func;
23690 #endif
23691
23692 ; return 0; }
23693 EOF
23694 if { (eval echo configure:23695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23695   rm -rf conftest*
23696   eval "ac_cv_func_$ac_func=yes"
23697 else
23698   echo "configure: failed program was:" >&5
23699   cat conftest.$ac_ext >&5
23700   rm -rf conftest*
23701   eval "ac_cv_func_$ac_func=no"
23702 fi
23703 rm -f conftest*
23704 fi
23705
23706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23707   echo "$ac_t""yes" 1>&6
23708     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23709   cat >> confdefs.h <<EOF
23710 #define $ac_tr_func 1
23711 EOF
23712  
23713 else
23714   echo "$ac_t""no" 1>&6
23715 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23716 fi
23717 done
23718
23719
23720
23721 if test "$ac_cv_func_getopt" != yes; then
23722         LIBSRCS="$LIBSRCS getopt.c"
23723 fi
23724 if test "$ac_cv_func_getpeereid" != yes; then
23725         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23726 echo "configure:23727: checking for msg_accrights in msghdr" >&5
23727 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23728   echo $ac_n "(cached) $ac_c" 1>&6
23729 else
23730   cat > conftest.$ac_ext <<EOF
23731 #line 23732 "configure"
23732 #include "confdefs.h"
23733 #include <sys/socket.h>
23734 int main() {
23735 struct msghdr m; m.msg_accrightslen=0
23736 ; return 0; }
23737 EOF
23738 if { (eval echo configure:23739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23739   rm -rf conftest*
23740   ol_cv_msghdr_msg_accrights=yes
23741 else
23742   echo "configure: failed program was:" >&5
23743   cat conftest.$ac_ext >&5
23744   rm -rf conftest*
23745   ol_cv_msghdr_msg_accrights=no
23746 fi
23747 rm -f conftest*
23748         
23749 fi
23750
23751 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23752   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23753         cat >> confdefs.h <<\EOF
23754 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23755 EOF
23756
23757   fi
23758
23759         LIBSRCS="$LIBSRCS getpeereid.c"
23760 fi
23761 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23762         if test "$ac_cv_func_snprintf" != yes; then
23763                 cat >> confdefs.h <<\EOF
23764 #define snprintf ber_pvt_snprintf
23765 EOF
23766
23767         fi
23768         if test "$ac_cv_func_vsnprintf" != yes; then
23769                 cat >> confdefs.h <<\EOF
23770 #define vsnprintf ber_pvt_vsnprintf
23771 EOF
23772
23773         fi
23774 fi
23775
23776
23777 if test "$ol_enable_slapi" != no ; then
23778                         for ac_hdr in ltdl.h
23779 do
23780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23782 echo "configure:23783: checking for $ac_hdr" >&5
23783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23784   echo $ac_n "(cached) $ac_c" 1>&6
23785 else
23786   cat > conftest.$ac_ext <<EOF
23787 #line 23788 "configure"
23788 #include "confdefs.h"
23789 #include <$ac_hdr>
23790 EOF
23791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23792 { (eval echo configure:23793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23794 if test -z "$ac_err"; then
23795   rm -rf conftest*
23796   eval "ac_cv_header_$ac_safe=yes"
23797 else
23798   echo "$ac_err" >&5
23799   echo "configure: failed program was:" >&5
23800   cat conftest.$ac_ext >&5
23801   rm -rf conftest*
23802   eval "ac_cv_header_$ac_safe=no"
23803 fi
23804 rm -f conftest*
23805 fi
23806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23807   echo "$ac_t""yes" 1>&6
23808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23809   cat >> confdefs.h <<EOF
23810 #define $ac_tr_hdr 1
23811 EOF
23812  
23813 else
23814   echo "$ac_t""no" 1>&6
23815 fi
23816 done
23817
23818
23819         if test $ac_cv_header_ltdl_h != yes ; then
23820                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23821         fi
23822         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23823 echo "configure:23824: checking for lt_dlinit in -lltdl" >&5
23824 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23826   echo $ac_n "(cached) $ac_c" 1>&6
23827 else
23828   ac_save_LIBS="$LIBS"
23829 LIBS="-lltdl  $LIBS"
23830 cat > conftest.$ac_ext <<EOF
23831 #line 23832 "configure"
23832 #include "confdefs.h"
23833 /* Override any gcc2 internal prototype to avoid an error.  */
23834 /* We use char because int might match the return type of a gcc2
23835     builtin and then its argument prototype would still apply.  */
23836 char lt_dlinit();
23837
23838 int main() {
23839 lt_dlinit()
23840 ; return 0; }
23841 EOF
23842 if { (eval echo configure:23843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23843   rm -rf conftest*
23844   eval "ac_cv_lib_$ac_lib_var=yes"
23845 else
23846   echo "configure: failed program was:" >&5
23847   cat conftest.$ac_ext >&5
23848   rm -rf conftest*
23849   eval "ac_cv_lib_$ac_lib_var=no"
23850 fi
23851 rm -f conftest*
23852 LIBS="$ac_save_LIBS"
23853
23854 fi
23855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23856   echo "$ac_t""yes" 1>&6
23857   
23858                 SLAPI_LIBS=-lltdl
23859                 LIBSLAPI=libslapi.a
23860                 LIBSLAPITOOLS=../libslapi.a
23861                 cat >> confdefs.h <<\EOF
23862 #define HAVE_LIBLTDL 1
23863 EOF
23864
23865         
23866 else
23867   echo "$ac_t""no" 1>&6
23868 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23869 fi
23870
23871
23872         cat >> confdefs.h <<\EOF
23873 #define LDAP_SLAPI 1
23874 EOF
23875
23876 fi
23877
23878 if test "$ol_enable_debug" != no ; then
23879         cat >> confdefs.h <<\EOF
23880 #define LDAP_DEBUG 1
23881 EOF
23882
23883 fi
23884 if test "$ol_enable_syslog" = yes ; then
23885         cat >> confdefs.h <<\EOF
23886 #define LDAP_SYSLOG 1
23887 EOF
23888
23889 fi
23890 if test "$ol_link_kbind" != no ; then
23891         cat >> confdefs.h <<\EOF
23892 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23893 EOF
23894
23895 fi
23896 if test "$ol_enable_proctitle" != no ; then
23897         cat >> confdefs.h <<\EOF
23898 #define LDAP_PROCTITLE 1
23899 EOF
23900
23901 fi
23902 if test "$ol_enable_referrals" != no ; then
23903         cat >> confdefs.h <<\EOF
23904 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23905 EOF
23906
23907 fi
23908 if test "$ol_enable_local" != no; then
23909         cat >> confdefs.h <<\EOF
23910 #define LDAP_PF_LOCAL 1
23911 EOF
23912
23913 fi
23914 if test "$ol_link_ipv6" != no; then
23915         cat >> confdefs.h <<\EOF
23916 #define LDAP_PF_INET6 1
23917 EOF
23918
23919 fi
23920 if test "$ol_enable_cleartext" != no ; then
23921         cat >> confdefs.h <<\EOF
23922 #define SLAPD_CLEARTEXT 1
23923 EOF
23924
23925 fi
23926 if test "$ol_enable_crypt" != no ; then
23927         cat >> confdefs.h <<\EOF
23928 #define SLAPD_CRYPT 1
23929 EOF
23930
23931 fi
23932 if test "$ol_link_spasswd" != no ; then
23933         cat >> confdefs.h <<\EOF
23934 #define SLAPD_SPASSWD 1
23935 EOF
23936
23937 fi
23938 if test "$ol_enable_multimaster" != no ; then
23939         cat >> confdefs.h <<\EOF
23940 #define SLAPD_MULTIMASTER 1
23941 EOF
23942
23943 fi
23944 if test "$ol_enable_rlookups" != no ; then
23945         cat >> confdefs.h <<\EOF
23946 #define SLAPD_RLOOKUPS 1
23947 EOF
23948
23949 fi
23950 if test "$ol_enable_aci" != no ; then
23951         cat >> confdefs.h <<\EOF
23952 #define SLAPD_ACI_ENABLED 1
23953 EOF
23954
23955 fi
23956
23957 if test "$ol_link_modules" != no ; then
23958         cat >> confdefs.h <<\EOF
23959 #define SLAPD_MODULES 1
23960 EOF
23961
23962         BUILD_SLAPD=yes
23963         SLAPD_MODULES_LDFLAGS="-dlopen self"
23964 fi
23965
23966 cat >> confdefs.h <<\EOF
23967 #define SLAPD_MOD_STATIC 1
23968 EOF
23969
23970 cat >> confdefs.h <<\EOF
23971 #define SLAPD_MOD_DYNAMIC 2
23972 EOF
23973
23974
23975 if test "$ol_enable_bdb" != no ; then
23976         BUILD_SLAPD=yes
23977         BUILD_BDB=$ol_enable_bdb
23978         if test "$ol_enable_bdb" = mod ; then
23979                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23980                 MFLAG=SLAPD_MOD_DYNAMIC
23981         else
23982                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23983                 MFLAG=SLAPD_MOD_STATIC
23984         fi
23985         cat >> confdefs.h <<EOF
23986 #define SLAPD_BDB $MFLAG
23987 EOF
23988
23989 fi
23990
23991 if test "$ol_enable_dnssrv" != no ; then
23992         BUILD_SLAPD=yes
23993         BUILD_DNSSRV=$ol_enable_dnssrv
23994         if test "$ol_enable_dnssrv" = mod ; then
23995                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23996                 MFLAG=SLAPD_MOD_DYNAMIC
23997         else
23998                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23999                 MFLAG=SLAPD_MOD_STATIC
24000         fi
24001         cat >> confdefs.h <<EOF
24002 #define SLAPD_DNSSRV $MFLAG
24003 EOF
24004
24005 fi
24006
24007 if test "$ol_enable_hdb" != no ; then
24008         BUILD_SLAPD=yes
24009         BUILD_HDB=$ol_enable_hdb
24010         if test "$ol_enable_hdb" = mod ; then
24011                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24012                 MFLAG=SLAPD_MOD_DYNAMIC
24013         else
24014                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24015                 MFLAG=SLAPD_MOD_STATIC
24016         fi
24017         cat >> confdefs.h <<EOF
24018 #define SLAPD_HDB $MFLAG
24019 EOF
24020
24021 fi
24022
24023 if test "$ol_enable_ldap" != no ; then
24024         BUILD_SLAPD=yes
24025         BUILD_LDAP=$ol_enable_ldap
24026         if test "$ol_enable_ldap" = mod ; then
24027                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24028                 MFLAG=SLAPD_MOD_DYNAMIC
24029         else
24030                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24031                 MFLAG=SLAPD_MOD_STATIC
24032         fi
24033         cat >> confdefs.h <<EOF
24034 #define SLAPD_LDAP $MFLAG
24035 EOF
24036
24037 fi
24038
24039 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24040         BUILD_SLAPD=yes
24041         BUILD_LDBM=$ol_enable_ldbm
24042         if test "$ol_enable_ldbm" = mod ; then
24043                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24044                 MFLAG=SLAPD_MOD_DYNAMIC
24045         else
24046                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24047                 MFLAG=SLAPD_MOD_STATIC
24048         fi
24049         cat >> confdefs.h <<EOF
24050 #define SLAPD_LDBM $MFLAG
24051 EOF
24052
24053 fi
24054
24055 if test "$ol_enable_meta" != no ; then
24056         BUILD_SLAPD=yes
24057         BUILD_META=$ol_enable_meta
24058         BUILD_REWRITE=yes
24059         if test "$ol_enable_meta" = mod ; then
24060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24061                 MFLAG=SLAPD_MOD_DYNAMIC
24062         else
24063                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24064                 MFLAG=SLAPD_MOD_STATIC
24065         fi
24066         cat >> confdefs.h <<EOF
24067 #define SLAPD_META $MFLAG
24068 EOF
24069
24070 fi
24071
24072 if test "$ol_enable_monitor" != no ; then
24073         BUILD_SLAPD=yes
24074         BUILD_MONITOR=$ol_enable_monitor
24075         if test "$ol_enable_monitor" = mod ; then
24076                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24077                 MFLAG=SLAPD_MOD_DYNAMIC
24078         else
24079                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24080                 MFLAG=SLAPD_MOD_STATIC
24081         fi
24082         cat >> confdefs.h <<EOF
24083 #define SLAPD_MONITOR $MFLAG
24084 EOF
24085
24086 fi
24087
24088 if test "$ol_enable_null" != no ; then
24089         BUILD_SLAPD=yes
24090         BUILD_NULL=$ol_enable_null
24091         if test "$ol_enable_null" = mod ; then
24092                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24093                 MFLAG=SLAPD_MOD_DYNAMIC
24094         else
24095                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24096                 MFLAG=SLAPD_MOD_STATIC
24097         fi
24098         cat >> confdefs.h <<EOF
24099 #define SLAPD_NULL $MFLAG
24100 EOF
24101
24102 fi
24103
24104 if test "$ol_enable_passwd" != no ; then
24105         BUILD_SLAPD=yes
24106         BUILD_PASSWD=$ol_enable_passwd
24107         if test "$ol_enable_passwd" = mod ; then
24108                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24109                 MFLAG=SLAPD_MOD_DYNAMIC
24110         else
24111                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24112                 MFLAG=SLAPD_MOD_STATIC
24113         fi
24114         cat >> confdefs.h <<EOF
24115 #define SLAPD_PASSWD $MFLAG
24116 EOF
24117
24118 fi
24119
24120 if test "$ol_link_perl" != no ; then
24121         BUILD_SLAPD=yes
24122         BUILD_PERL=$ol_enable_perl
24123         if test "$ol_enable_perl" = mod ; then
24124                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24125                 MFLAG=SLAPD_MOD_DYNAMIC
24126         else
24127                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24128                 MFLAG=SLAPD_MOD_STATIC
24129         fi
24130         cat >> confdefs.h <<EOF
24131 #define SLAPD_PERL $MFLAG
24132 EOF
24133
24134 fi
24135
24136 if test "$ol_enable_relay" != no ; then
24137         BUILD_SLAPD=yes
24138         BUILD_RELAY=$ol_enable_relay
24139         if test "$ol_enable_relay" = mod ; then
24140                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24141                 MFLAG=SLAPD_MOD_DYNAMIC
24142         else
24143                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24144                 MFLAG=SLAPD_MOD_STATIC
24145         fi
24146         cat >> confdefs.h <<EOF
24147 #define SLAPD_RELAY $MFLAG
24148 EOF
24149
24150 fi
24151
24152 if test "$ol_enable_shell" != no ; then
24153         if test "$ol_link_thread" != no ; then
24154                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24155         fi
24156         BUILD_SLAPD=yes
24157         BUILD_SHELL=$ol_enable_shell
24158         if test "$ol_enable_shell" = mod ; then
24159                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24160                 MFLAG=SLAPD_MOD_DYNAMIC
24161         else
24162                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24163                 MFLAG=SLAPD_MOD_STATIC
24164         fi
24165         cat >> confdefs.h <<EOF
24166 #define SLAPD_SHELL $MFLAG
24167 EOF
24168
24169 fi
24170
24171 if test "$ol_link_sql" != no ; then
24172         BUILD_SLAPD=yes
24173         BUILD_SQL=$ol_enable_sql
24174         if test "$ol_enable_sql" = mod; then
24175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24176                 MFLAG=SLAPD_MOD_DYNAMIC
24177         else
24178                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24179                 MFLAG=SLAPD_MOD_STATIC
24180         fi
24181         cat >> confdefs.h <<EOF
24182 #define SLAPD_SQL $MFLAG
24183 EOF
24184
24185 fi
24186
24187 if test "$ol_enable_chain" != no ; then
24188         BUILD_CHAIN=$ol_enable_chain
24189         if test "$ol_enable_chain" = mod ; then
24190                 MFLAG=SLAPD_MOD_DYNAMIC
24191                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
24192         else
24193                 MFLAG=SLAPD_MOD_STATIC
24194         fi
24195         cat >> confdefs.h <<EOF
24196 #define SLAPD_OVER_CHAIN $MFLAG
24197 EOF
24198
24199 fi
24200
24201 if test "$ol_enable_denyop" != no ; then
24202         BUILD_DENYOP=$ol_enable_denyop
24203         if test "$ol_enable_denyop" = mod ; then
24204                 MFLAG=SLAPD_MOD_DYNAMIC
24205                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
24206         else
24207                 MFLAG=SLAPD_MOD_STATIC
24208         fi
24209         cat >> confdefs.h <<EOF
24210 #define SLAPD_OVER_DENYOP $MFLAG
24211 EOF
24212
24213 fi
24214
24215 if test "$ol_enable_dyngroup" != no ; then
24216         BUILD_DYNGROUP=$ol_enable_dyngroup
24217         if test "$ol_enable_dyngroup" = mod ; then
24218                 MFLAG=SLAPD_MOD_DYNAMIC
24219                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24220         else
24221                 MFLAG=SLAPD_MOD_STATIC
24222         fi
24223         cat >> confdefs.h <<EOF
24224 #define SLAPD_OVER_DYNGROUP $MFLAG
24225 EOF
24226
24227 fi
24228
24229 if test "$ol_enable_lastmod" != no ; then
24230         BUILD_LASTMOD=$ol_enable_lastmod
24231         if test "$ol_enable_lastmod" = mod ; then
24232                 MFLAG=SLAPD_MOD_DYNAMIC
24233                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
24234         else
24235                 MFLAG=SLAPD_MOD_STATIC
24236         fi
24237         cat >> confdefs.h <<EOF
24238 #define SLAPD_OVER_LASTMOD $MFLAG
24239 EOF
24240
24241 fi
24242
24243 if test "$ol_enable_ppolicy" != no ; then
24244         BUILD_PPOLICY=$ol_enable_ppolicy
24245         if test "$ol_enable_ppolicy" = mod ; then
24246                 MFLAG=SLAPD_MOD_DYNAMIC
24247                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24248         else
24249                 MFLAG=SLAPD_MOD_STATIC
24250         fi
24251         cat >> confdefs.h <<EOF
24252 #define SLAPD_OVER_PPOLICY $MFLAG
24253 EOF
24254
24255 fi
24256
24257 if test "$ol_enable_proxycache" != no ; then
24258         BUILD_PROXYCACHE=$ol_enable_proxycache
24259         if test "$ol_enable_proxycache" = mod ; then
24260                 MFLAG=SLAPD_MOD_DYNAMIC
24261                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24262         else
24263                 MFLAG=SLAPD_MOD_STATIC
24264         fi
24265         cat >> confdefs.h <<EOF
24266 #define SLAPD_OVER_PROXYCACHE $MFLAG
24267 EOF
24268
24269 fi
24270
24271 if test "$ol_enable_refint" != no ; then
24272         BUILD_REFINT=$ol_enable_refint
24273         if test "$ol_enable_refint" = mod ; then
24274                 MFLAG=SLAPD_MOD_DYNAMIC
24275                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24276         else
24277                 MFLAG=SLAPD_MOD_STATIC
24278         fi
24279         cat >> confdefs.h <<EOF
24280 #define SLAPD_OVER_REFINT $MFLAG
24281 EOF
24282
24283 fi
24284
24285 if test "$ol_enable_rwm" != no ; then
24286         BUILD_REWRITE=yes
24287         BUILD_RWM=$ol_enable_rwm
24288         if test "$ol_enable_rwm" = mod ; then
24289                 MFLAG=SLAPD_MOD_DYNAMIC
24290                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24291         else
24292                 MFLAG=SLAPD_MOD_STATIC
24293         fi
24294         cat >> confdefs.h <<EOF
24295 #define SLAPD_OVER_RWM $MFLAG
24296 EOF
24297
24298 fi
24299
24300 if test "$ol_enable_unique" != no ; then
24301         BUILD_UNIQUE=$ol_enable_unique
24302         if test "$ol_enable_unique" = mod ; then
24303                 MFLAG=SLAPD_MOD_DYNAMIC
24304                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24305         else
24306                 MFLAG=SLAPD_MOD_STATIC
24307         fi
24308         cat >> confdefs.h <<EOF
24309 #define SLAPD_OVER_UNIQUE $MFLAG
24310 EOF
24311
24312 fi
24313
24314 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24315         $BUILD_SLAPD = yes ; then
24316         BUILD_SLURPD=yes
24317 fi
24318
24319 if test "$ol_enable_rewrite" != no ; then
24320         cat >> confdefs.h <<\EOF
24321 #define ENABLE_REWRITE 1
24322 EOF
24323
24324         BUILD_REWRITE=yes
24325 fi
24326
24327 if test "$ol_enable_slapi" != no ; then
24328         cat >> confdefs.h <<\EOF
24329 #define ENABLE_SLAPI 1
24330 EOF
24331
24332         BUILD_SLAPI=yes
24333         SLAPD_SLAPI_DEPEND=libslapi.a
24334 fi
24335
24336
24337
24338 if test "$ac_cv_mingw32" = yes ; then
24339         PLAT=NT
24340         SLAPD_MODULES_LDFLAGS=
24341 else
24342         PLAT=UNIX
24343 fi
24344
24345 if test -z "$SLAPD_STATIC_BACKENDS"; then
24346         SLAPD_NO_STATIC='#'
24347 else
24348         SLAPD_NO_STATIC=
24349 fi
24350
24351
24352
24353
24354
24355
24356
24357
24358   
24359   
24360   
24361   
24362   
24363   
24364   
24365   
24366   
24367   
24368   
24369   
24370   
24371   
24372   
24373   
24374   
24375   
24376   
24377   
24378   
24379   
24380   
24381   
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421 # Check whether --with-xxinstall or --without-xxinstall was given.
24422 if test "${with_xxinstall+set}" = set; then
24423   withval="$with_xxinstall"
24424   :
24425 fi
24426
24427
24428
24429 trap '' 1 2 15
24430
24431 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24432
24433 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24434 # Let make expand exec_prefix.
24435 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24436
24437 # Any assignment to VPATH causes Sun make to only execute
24438 # the first set of double-colon rules, so remove it if not needed.
24439 # If there is a colon in the path, we need to keep it.
24440 if test "x$srcdir" = x.; then
24441   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24442 fi
24443
24444 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24445
24446 DEFS=-DHAVE_CONFIG_H
24447
24448 # Without the "./", some shells look in PATH for config.status.
24449 : ${CONFIG_STATUS=./config.status}
24450
24451 echo creating $CONFIG_STATUS
24452 rm -f $CONFIG_STATUS
24453 cat > $CONFIG_STATUS <<EOF
24454 #! /bin/sh
24455 # Generated automatically by configure.
24456 # Run this file to recreate the current configuration.
24457 # This directory was configured as follows,
24458 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24459 #
24460 # $0 $ac_configure_args
24461 #
24462 # Compiler output produced by configure, useful for debugging
24463 # configure, is in ./config.log if it exists.
24464
24465 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24466 for ac_option
24467 do
24468   case "\$ac_option" in
24469   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24470     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24471     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24472   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24473     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24474     exit 0 ;;
24475   -help | --help | --hel | --he | --h)
24476     echo "\$ac_cs_usage"; exit 0 ;;
24477   *) echo "\$ac_cs_usage"; exit 1 ;;
24478   esac
24479 done
24480
24481 ac_given_srcdir=$srcdir
24482 ac_given_INSTALL="$INSTALL"
24483
24484 trap 'rm -fr `echo "\
24485 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24486 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24487 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24488 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24489 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24490 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24491 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24492 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24493 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24494 include/Makefile:build/top.mk:include/Makefile.in \
24495 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24496 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24497 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24498 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24499 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24500 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24501 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24502 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24503 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24504 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24505 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24506 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24507 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24508 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24509 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24510 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24511 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24512 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24513 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24514 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24515 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24516 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24517 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24518 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24519 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24520 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24521 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24522 tests/run \
24523 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24524  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24525 EOF
24526 cat >> $CONFIG_STATUS <<EOF
24527
24528 # Protect against being on the right side of a sed subst in config.status.
24529 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24530  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24531 $ac_vpsub
24532 $extrasub
24533 s%@SHELL@%$SHELL%g
24534 s%@CFLAGS@%$CFLAGS%g
24535 s%@CPPFLAGS@%$CPPFLAGS%g
24536 s%@CXXFLAGS@%$CXXFLAGS%g
24537 s%@FFLAGS@%$FFLAGS%g
24538 s%@DEFS@%$DEFS%g
24539 s%@LDFLAGS@%$LDFLAGS%g
24540 s%@LIBS@%$LIBS%g
24541 s%@exec_prefix@%$exec_prefix%g
24542 s%@prefix@%$prefix%g
24543 s%@program_transform_name@%$program_transform_name%g
24544 s%@bindir@%$bindir%g
24545 s%@sbindir@%$sbindir%g
24546 s%@libexecdir@%$libexecdir%g
24547 s%@datadir@%$datadir%g
24548 s%@sysconfdir@%$sysconfdir%g
24549 s%@sharedstatedir@%$sharedstatedir%g
24550 s%@localstatedir@%$localstatedir%g
24551 s%@libdir@%$libdir%g
24552 s%@includedir@%$includedir%g
24553 s%@oldincludedir@%$oldincludedir%g
24554 s%@infodir@%$infodir%g
24555 s%@mandir@%$mandir%g
24556 s%@host@%$host%g
24557 s%@host_alias@%$host_alias%g
24558 s%@host_cpu@%$host_cpu%g
24559 s%@host_vendor@%$host_vendor%g
24560 s%@host_os@%$host_os%g
24561 s%@target@%$target%g
24562 s%@target_alias@%$target_alias%g
24563 s%@target_cpu@%$target_cpu%g
24564 s%@target_vendor@%$target_vendor%g
24565 s%@target_os@%$target_os%g
24566 s%@build@%$build%g
24567 s%@build_alias@%$build_alias%g
24568 s%@build_cpu@%$build_cpu%g
24569 s%@build_vendor@%$build_vendor%g
24570 s%@build_os@%$build_os%g
24571 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24572 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24573 s%@INSTALL_DATA@%$INSTALL_DATA%g
24574 s%@PACKAGE@%$PACKAGE%g
24575 s%@VERSION@%$VERSION%g
24576 s%@ACLOCAL@%$ACLOCAL%g
24577 s%@AUTOCONF@%$AUTOCONF%g
24578 s%@AUTOMAKE@%$AUTOMAKE%g
24579 s%@AUTOHEADER@%$AUTOHEADER%g
24580 s%@MAKEINFO@%$MAKEINFO%g
24581 s%@install_sh@%$install_sh%g
24582 s%@AMTAR@%$AMTAR%g
24583 s%@AWK@%$AWK%g
24584 s%@AMTARFLAGS@%$AMTARFLAGS%g
24585 s%@SET_MAKE@%$SET_MAKE%g
24586 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24587 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24588 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24589 s%@top_builddir@%$top_builddir%g
24590 s%@ldap_subdir@%$ldap_subdir%g
24591 s%@CC@%$CC%g
24592 s%@AR@%$AR%g
24593 s%@LN_S@%$LN_S%g
24594 s%@OBJEXT@%$OBJEXT%g
24595 s%@EXEEXT@%$EXEEXT%g
24596 s%@ECHO@%$ECHO%g
24597 s%@RANLIB@%$RANLIB%g
24598 s%@STRIP@%$STRIP%g
24599 s%@DLLTOOL@%$DLLTOOL%g
24600 s%@AS@%$AS%g
24601 s%@OBJDUMP@%$OBJDUMP%g
24602 s%@CPP@%$CPP%g
24603 s%@LIBTOOL@%$LIBTOOL%g
24604 s%@PERLBIN@%$PERLBIN%g
24605 s%@OL_MKDEP@%$OL_MKDEP%g
24606 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24607 s%@LTSTATIC@%$LTSTATIC%g
24608 s%@LIBOBJS@%$LIBOBJS%g
24609 s%@LIBSRCS@%$LIBSRCS%g
24610 s%@PLAT@%$PLAT%g
24611 s%@WITH_SASL@%$WITH_SASL%g
24612 s%@WITH_TLS@%$WITH_TLS%g
24613 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24614 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24615 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24616 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24617 s%@BUILD_BDB@%$BUILD_BDB%g
24618 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24619 s%@BUILD_HDB@%$BUILD_HDB%g
24620 s%@BUILD_LDAP@%$BUILD_LDAP%g
24621 s%@BUILD_LDBM@%$BUILD_LDBM%g
24622 s%@BUILD_META@%$BUILD_META%g
24623 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24624 s%@BUILD_NULL@%$BUILD_NULL%g
24625 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24626 s%@BUILD_RELAY@%$BUILD_RELAY%g
24627 s%@BUILD_PERL@%$BUILD_PERL%g
24628 s%@BUILD_SHELL@%$BUILD_SHELL%g
24629 s%@BUILD_SQL@%$BUILD_SQL%g
24630 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24631 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24632 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24633 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24634 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24635 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24636 s%@BUILD_REFINT@%$BUILD_REFINT%g
24637 s%@BUILD_RWM@%$BUILD_RWM%g
24638 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24639 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24640 s%@LDAP_LIBS@%$LDAP_LIBS%g
24641 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24642 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24643 s%@LDBM_LIBS@%$LDBM_LIBS%g
24644 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24645 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24646 s%@WRAP_LIBS@%$WRAP_LIBS%g
24647 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24648 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24649 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24650 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24651 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24652 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24653 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24654 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24655 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24656 s%@KRB4_LIBS@%$KRB4_LIBS%g
24657 s%@KRB5_LIBS@%$KRB5_LIBS%g
24658 s%@SASL_LIBS@%$SASL_LIBS%g
24659 s%@TLS_LIBS@%$TLS_LIBS%g
24660 s%@MODULES_LIBS@%$MODULES_LIBS%g
24661 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24662 s%@LIBSLAPI@%$LIBSLAPI%g
24663 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24664 s%@AUTH_LIBS@%$AUTH_LIBS%g
24665 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24666 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
24667 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24668 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24669 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24670
24671 CEOF
24672 EOF
24673
24674 cat >> $CONFIG_STATUS <<\EOF
24675
24676 # Split the substitutions into bite-sized pieces for seds with
24677 # small command number limits, like on Digital OSF/1 and HP-UX.
24678 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24679 ac_file=1 # Number of current file.
24680 ac_beg=1 # First line for current file.
24681 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24682 ac_more_lines=:
24683 ac_sed_cmds=""
24684 while $ac_more_lines; do
24685   if test $ac_beg -gt 1; then
24686     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24687   else
24688     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24689   fi
24690   if test ! -s conftest.s$ac_file; then
24691     ac_more_lines=false
24692     rm -f conftest.s$ac_file
24693   else
24694     if test -z "$ac_sed_cmds"; then
24695       ac_sed_cmds="sed -f conftest.s$ac_file"
24696     else
24697       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24698     fi
24699     ac_file=`expr $ac_file + 1`
24700     ac_beg=$ac_end
24701     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24702   fi
24703 done
24704 if test -z "$ac_sed_cmds"; then
24705   ac_sed_cmds=cat
24706 fi
24707 EOF
24708
24709 cat >> $CONFIG_STATUS <<EOF
24710
24711 CONFIG_FILES=\${CONFIG_FILES-"\
24712 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24713 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24714 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24715 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24716 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24717 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24718 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24719 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24720 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24721 include/Makefile:build/top.mk:include/Makefile.in \
24722 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24723 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24724 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24725 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24726 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24727 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24728 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24729 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24730 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24731 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24732 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24733 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24734 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24735 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24736 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24737 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24738 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24739 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24740 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24741 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24742 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24743 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24744 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24745 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24746 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24747 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24748 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24749 tests/run \
24750 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24751 "}
24752 EOF
24753 cat >> $CONFIG_STATUS <<\EOF
24754 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24755   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24756   case "$ac_file" in
24757   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24758        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24759   *) ac_file_in="${ac_file}.in" ;;
24760   esac
24761
24762   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24763
24764   # Remove last slash and all that follows it.  Not all systems have dirname.
24765   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24766   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24767     # The file is in a subdirectory.
24768     test ! -d "$ac_dir" && mkdir "$ac_dir"
24769     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24770     # A "../" for each directory in $ac_dir_suffix.
24771     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24772   else
24773     ac_dir_suffix= ac_dots=
24774   fi
24775
24776   case "$ac_given_srcdir" in
24777   .)  srcdir=.
24778       if test -z "$ac_dots"; then top_srcdir=.
24779       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24780   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24781   *) # Relative path.
24782     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24783     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24784   esac
24785
24786   case "$ac_given_INSTALL" in
24787   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24788   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24789   esac
24790
24791   echo creating "$ac_file"
24792   rm -f "$ac_file"
24793   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24794   case "$ac_file" in
24795   *[Mm]akefile*) ac_comsub="1i\\
24796 # $configure_input" ;;
24797   *) ac_comsub= ;;
24798   esac
24799
24800   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24801   sed -e "$ac_comsub
24802 s%@configure_input@%$configure_input%g
24803 s%@srcdir@%$srcdir%g
24804 s%@top_srcdir@%$top_srcdir%g
24805 s%@INSTALL@%$INSTALL%g
24806 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24807 fi; done
24808 rm -f conftest.s*
24809
24810 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24811 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24812 #
24813 # ac_d sets the value in "#define NAME VALUE" lines.
24814 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24815 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24816 ac_dC='\3'
24817 ac_dD='%g'
24818 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24819 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24820 ac_uB='\([      ]\)%\1#\2define\3'
24821 ac_uC=' '
24822 ac_uD='\4%g'
24823 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24824 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24825 ac_eB='$%\1#\2define\3'
24826 ac_eC=' '
24827 ac_eD='%g'
24828
24829 if test "${CONFIG_HEADERS+set}" != set; then
24830 EOF
24831 cat >> $CONFIG_STATUS <<EOF
24832   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24833 EOF
24834 cat >> $CONFIG_STATUS <<\EOF
24835 fi
24836 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24837   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24838   case "$ac_file" in
24839   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24840        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24841   *) ac_file_in="${ac_file}.in" ;;
24842   esac
24843
24844   echo creating $ac_file
24845
24846   rm -f conftest.frag conftest.in conftest.out
24847   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24848   cat $ac_file_inputs > conftest.in
24849
24850 EOF
24851
24852 # Transform confdefs.h into a sed script conftest.vals that substitutes
24853 # the proper values into config.h.in to produce config.h.  And first:
24854 # Protect against being on the right side of a sed subst in config.status.
24855 # Protect against being in an unquoted here document in config.status.
24856 rm -f conftest.vals
24857 cat > conftest.hdr <<\EOF
24858 s/[\\&%]/\\&/g
24859 s%[\\$`]%\\&%g
24860 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24861 s%ac_d%ac_u%gp
24862 s%ac_u%ac_e%gp
24863 EOF
24864 sed -n -f conftest.hdr confdefs.h > conftest.vals
24865 rm -f conftest.hdr
24866
24867 # This sed command replaces #undef with comments.  This is necessary, for
24868 # example, in the case of _POSIX_SOURCE, which is predefined and required
24869 # on some systems where configure will not decide to define it.
24870 cat >> conftest.vals <<\EOF
24871 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24872 EOF
24873
24874 # Break up conftest.vals because some shells have a limit on
24875 # the size of here documents, and old seds have small limits too.
24876
24877 rm -f conftest.tail
24878 while :
24879 do
24880   ac_lines=`grep -c . conftest.vals`
24881   # grep -c gives empty output for an empty file on some AIX systems.
24882   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24883   # Write a limited-size here document to conftest.frag.
24884   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24885   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24886   echo 'CEOF
24887   sed -f conftest.frag conftest.in > conftest.out
24888   rm -f conftest.in
24889   mv conftest.out conftest.in
24890 ' >> $CONFIG_STATUS
24891   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24892   rm -f conftest.vals
24893   mv conftest.tail conftest.vals
24894 done
24895 rm -f conftest.vals
24896
24897 cat >> $CONFIG_STATUS <<\EOF
24898   rm -f conftest.frag conftest.h
24899   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24900   cat conftest.in >> conftest.h
24901   rm -f conftest.in
24902   if cmp -s $ac_file conftest.h 2>/dev/null; then
24903     echo "$ac_file is unchanged"
24904     rm -f conftest.h
24905   else
24906     # Remove last slash and all that follows it.  Not all systems have dirname.
24907       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24908       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24909       # The file is in a subdirectory.
24910       test ! -d "$ac_dir" && mkdir "$ac_dir"
24911     fi
24912     rm -f $ac_file
24913     mv conftest.h $ac_file
24914   fi
24915 fi; done
24916
24917 EOF
24918 cat >> $CONFIG_STATUS <<EOF
24919
24920 EOF
24921 cat >> $CONFIG_STATUS <<\EOF
24922
24923 chmod +x tests/run
24924 date > stamp-h
24925 echo Please run \"make depend\" to build dependencies
24926
24927 exit 0
24928 EOF
24929 chmod +x $CONFIG_STATUS
24930 rm -fr confdefs* $ac_clean_files
24931 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24932