]> git.sur5r.net Git - openldap/blob - configure
Better test for epoll, make sure the syscall actually works
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.555 2004/11/18 21:06:16 hyc 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>&5
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 for ac_func in poll 
9351 do
9352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9353 echo "configure:9354: checking for $ac_func" >&5
9354 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 /* System header to define __stub macros and hopefully few prototypes,
9361     which can conflict with char $ac_func(); below.  */
9362 #include <assert.h>
9363 /* Override any gcc2 internal prototype to avoid an error.  */
9364 /* We use char because int might match the return type of a gcc2
9365     builtin and then its argument prototype would still apply.  */
9366 char $ac_func();
9367 char (*f)();
9368
9369 int main() {
9370
9371 /* The GNU C library defines this for functions which it implements
9372     to always fail with ENOSYS.  Some functions are actually named
9373     something starting with __ and the normal name is an alias.  */
9374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9375 choke me
9376 #else
9377 f = $ac_func;
9378 #endif
9379
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_func_$ac_func=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_func_$ac_func=no"
9390 fi
9391 rm -f conftest*
9392 fi
9393
9394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9397   cat >> confdefs.h <<EOF
9398 #define $ac_tr_func 1
9399 EOF
9400  
9401 else
9402   echo "$ac_t""no" 1>&6
9403 fi
9404 done
9405
9406 for ac_hdr in poll.h 
9407 do
9408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9410 echo "configure:9411: checking for $ac_hdr" >&5
9411 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414   cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417 #include <$ac_hdr>
9418 EOF
9419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9420 { (eval echo configure:9421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9422 if test -z "$ac_err"; then
9423   rm -rf conftest*
9424   eval "ac_cv_header_$ac_safe=yes"
9425 else
9426   echo "$ac_err" >&5
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -rf conftest*
9430   eval "ac_cv_header_$ac_safe=no"
9431 fi
9432 rm -f conftest*
9433 fi
9434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9435   echo "$ac_t""yes" 1>&6
9436     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_hdr 1
9439 EOF
9440  
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444 done
9445
9446
9447 for ac_hdr in sys/epoll.h 
9448 do
9449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9451 echo "configure:9452: checking for $ac_hdr" >&5
9452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9453   echo $ac_n "(cached) $ac_c" 1>&6
9454 else
9455   cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 #include <$ac_hdr>
9459 EOF
9460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9461 { (eval echo configure:9462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9463 if test -z "$ac_err"; then
9464   rm -rf conftest*
9465   eval "ac_cv_header_$ac_safe=yes"
9466 else
9467   echo "$ac_err" >&5
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_header_$ac_safe=no"
9472 fi
9473 rm -f conftest*
9474 fi
9475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9476   echo "$ac_t""yes" 1>&6
9477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9478   cat >> confdefs.h <<EOF
9479 #define $ac_tr_hdr 1
9480 EOF
9481  
9482 else
9483   echo "$ac_t""no" 1>&6
9484 fi
9485 done
9486
9487 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9488 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9489 echo "configure:9490: checking for epoll system call" >&5
9490 if test "$cross_compiling" = yes; then
9491   echo "$ac_t""no" 1>&6
9492 else
9493   cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496 int main(int argc, char *argv)
9497 {
9498         int epfd = epoll_create(256);
9499         exit (epfd == -1 ? 1 : 0);
9500 }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9503 then
9504   echo "$ac_t""yes" 1>&6
9505 cat >> confdefs.h <<\EOF
9506 #define HAVE_EPOLL 1
9507 EOF
9508
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -fr conftest*
9513   echo "$ac_t""no" 1>&6
9514 fi
9515 rm -fr conftest*
9516 fi
9517
9518 fi
9519
9520 # strerror checks
9521 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9522 echo "configure:9523: checking declaration of sys_errlist" >&5
9523 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   
9527         cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530
9531 #include <stdio.h>
9532 #include <sys/types.h>
9533 #include <errno.h>
9534 #ifdef WINNT
9535 #include <stdlib.h>
9536 #endif 
9537 int main() {
9538 char *c = (char *) *sys_errlist
9539 ; return 0; }
9540 EOF
9541 if { (eval echo configure:9542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9542   rm -rf conftest*
9543   ol_cv_dcl_sys_errlist=yes
9544         ol_cv_have_sys_errlist=yes
9545 else
9546   echo "configure: failed program was:" >&5
9547   cat conftest.$ac_ext >&5
9548   rm -rf conftest*
9549   ol_cv_dcl_sys_errlist=no
9550 fi
9551 rm -f conftest*
9552 fi
9553
9554 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9555 #
9556 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9557 if test $ol_cv_dcl_sys_errlist = no ; then
9558         cat >> confdefs.h <<\EOF
9559 #define DECL_SYS_ERRLIST 1
9560 EOF
9561
9562
9563         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9564 echo "configure:9565: checking existence of sys_errlist" >&5
9565 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   
9569                 cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572 #include <errno.h>
9573 int main() {
9574 char *c = (char *) *sys_errlist
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   ol_cv_have_sys_errlist=yes
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   ol_cv_have_sys_errlist=no
9585 fi
9586 rm -f conftest*
9587 fi
9588
9589 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9590 fi
9591 if test $ol_cv_have_sys_errlist = yes ; then
9592         cat >> confdefs.h <<\EOF
9593 #define HAVE_SYS_ERRLIST 1
9594 EOF
9595
9596 fi
9597  for ac_func in strerror strerror_r
9598 do
9599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9600 echo "configure:9601: checking for $ac_func" >&5
9601 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 /* System header to define __stub macros and hopefully few prototypes,
9608     which can conflict with char $ac_func(); below.  */
9609 #include <assert.h>
9610 /* Override any gcc2 internal prototype to avoid an error.  */
9611 /* We use char because int might match the return type of a gcc2
9612     builtin and then its argument prototype would still apply.  */
9613 char $ac_func();
9614 char (*f)();
9615
9616 int main() {
9617
9618 /* The GNU C library defines this for functions which it implements
9619     to always fail with ENOSYS.  Some functions are actually named
9620     something starting with __ and the normal name is an alias.  */
9621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9622 choke me
9623 #else
9624 f = $ac_func;
9625 #endif
9626
9627 ; return 0; }
9628 EOF
9629 if { (eval echo configure:9630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9630   rm -rf conftest*
9631   eval "ac_cv_func_$ac_func=yes"
9632 else
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   rm -rf conftest*
9636   eval "ac_cv_func_$ac_func=no"
9637 fi
9638 rm -f conftest*
9639 fi
9640
9641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9642   echo "$ac_t""yes" 1>&6
9643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9644   cat >> confdefs.h <<EOF
9645 #define $ac_tr_func 1
9646 EOF
9647  
9648 else
9649   echo "$ac_t""no" 1>&6
9650 fi
9651 done
9652
9653 ol_cv_func_strerror_r=no
9654 if test "${ac_cv_func_strerror_r}" = yes ; then
9655         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9656 echo "configure:9657: checking non-posix strerror_r" >&5
9657 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9658   echo $ac_n "(cached) $ac_c" 1>&6
9659 else
9660   
9661         cat > conftest.$ac_ext <<EOF
9662 #line 9663 "configure"
9663 #include "confdefs.h"
9664 #include <string.h>
9665 EOF
9666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9667   egrep "strerror_r" >/dev/null 2>&1; then
9668   rm -rf conftest*
9669   ol_decl_strerror_r=yes
9670 else
9671   rm -rf conftest*
9672   ol_decl_strerror_r=no
9673 fi
9674 rm -f conftest*
9675
9676         if test $ol_decl_strerror_r = yes ; then
9677                 cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #include <string.h>
9681 int main() {
9682    /* from autoconf 2.59 */
9683                                 char buf[100];
9684                                 char x = *strerror_r (0, buf, sizeof buf);
9685                                 char *p = strerror_r (0, buf, sizeof buf);
9686                         
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9690   rm -rf conftest*
9691   ol_cv_nonposix_strerror_r=yes
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695   rm -rf conftest*
9696   ol_cv_nonposix_strerror_r=no
9697 fi
9698 rm -f conftest*
9699         else
9700                 if test "$cross_compiling" = yes; then
9701   ol_cv_nonposix_strerror=no
9702 else
9703   cat > conftest.$ac_ext <<EOF
9704 #line 9705 "configure"
9705 #include "confdefs.h"
9706
9707                         main() {
9708                                 char buf[100];
9709                                 buf[0] = 0;
9710                                 strerror_r( 1, buf, sizeof buf );
9711                                 exit( buf[0] == 0 );
9712                         }
9713                         
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9716 then
9717   ol_cv_nonposix_strerror_r=yes
9718 else
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -fr conftest*
9722   ol_cv_nonposix_strerror=no
9723 fi
9724 rm -fr conftest*
9725 fi
9726
9727         fi
9728         
9729 fi
9730
9731 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9732 if test $ol_cv_nonposix_strerror_r = yes ; then
9733         cat >> confdefs.h <<\EOF
9734 #define HAVE_NONPOSIX_STRERROR_R 1
9735 EOF
9736
9737 fi
9738
9739 elif test "${ac_cv_func_strerror}" = no ; then
9740         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9741 echo "configure:9742: checking declaration of sys_errlist" >&5
9742 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9743   echo $ac_n "(cached) $ac_c" 1>&6
9744 else
9745   
9746         cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749
9750 #include <stdio.h>
9751 #include <sys/types.h>
9752 #include <errno.h>
9753 #ifdef WINNT
9754 #include <stdlib.h>
9755 #endif 
9756 int main() {
9757 char *c = (char *) *sys_errlist
9758 ; return 0; }
9759 EOF
9760 if { (eval echo configure:9761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9761   rm -rf conftest*
9762   ol_cv_dcl_sys_errlist=yes
9763         ol_cv_have_sys_errlist=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   ol_cv_dcl_sys_errlist=no
9769 fi
9770 rm -f conftest*
9771 fi
9772
9773 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9774 #
9775 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9776 if test $ol_cv_dcl_sys_errlist = no ; then
9777         cat >> confdefs.h <<\EOF
9778 #define DECL_SYS_ERRLIST 1
9779 EOF
9780
9781
9782         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9783 echo "configure:9784: checking existence of sys_errlist" >&5
9784 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9785   echo $ac_n "(cached) $ac_c" 1>&6
9786 else
9787   
9788                 cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791 #include <errno.h>
9792 int main() {
9793 char *c = (char *) *sys_errlist
9794 ; return 0; }
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9797   rm -rf conftest*
9798   ol_cv_have_sys_errlist=yes
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802   rm -rf conftest*
9803   ol_cv_have_sys_errlist=no
9804 fi
9805 rm -f conftest*
9806 fi
9807
9808 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9809 fi
9810 if test $ol_cv_have_sys_errlist = yes ; then
9811         cat >> confdefs.h <<\EOF
9812 #define HAVE_SYS_ERRLIST 1
9813 EOF
9814
9815 fi
9816
9817 fi
9818
9819
9820 for ac_hdr in regex.h 
9821 do
9822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9824 echo "configure:9825: checking for $ac_hdr" >&5
9825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 #include <$ac_hdr>
9832 EOF
9833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9834 { (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9836 if test -z "$ac_err"; then
9837   rm -rf conftest*
9838   eval "ac_cv_header_$ac_safe=yes"
9839 else
9840   echo "$ac_err" >&5
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=no"
9845 fi
9846 rm -f conftest*
9847 fi
9848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9849   echo "$ac_t""yes" 1>&6
9850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9851   cat >> confdefs.h <<EOF
9852 #define $ac_tr_hdr 1
9853 EOF
9854  
9855 else
9856   echo "$ac_t""no" 1>&6
9857 fi
9858 done
9859
9860 if test "$ac_cv_header_regex_h" != yes ; then
9861         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9862 fi
9863
9864 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9865 echo "configure:9866: checking for library containing regfree" >&5
9866 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9867   echo $ac_n "(cached) $ac_c" 1>&6
9868 else
9869   ac_func_search_save_LIBS="$LIBS"
9870 ac_cv_search_regfree="no"
9871 cat > conftest.$ac_ext <<EOF
9872 #line 9873 "configure"
9873 #include "confdefs.h"
9874 /* Override any gcc2 internal prototype to avoid an error.  */
9875 /* We use char because int might match the return type of a gcc2
9876     builtin and then its argument prototype would still apply.  */
9877 char regfree();
9878
9879 int main() {
9880 regfree()
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   ac_cv_search_regfree="none required"
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889 fi
9890 rm -f conftest*
9891 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9892 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9893 cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896 /* Override any gcc2 internal prototype to avoid an error.  */
9897 /* We use char because int might match the return type of a gcc2
9898     builtin and then its argument prototype would still apply.  */
9899 char regfree();
9900
9901 int main() {
9902 regfree()
9903 ; return 0; }
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9906   rm -rf conftest*
9907   ac_cv_search_regfree="-l$ac_lib"
9908 break
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912 fi
9913 rm -f conftest*
9914 done
9915 LIBS="$ac_func_search_save_LIBS"
9916 fi
9917
9918 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9919 if test "$ac_cv_search_regfree" != "no"; then
9920   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9921   :
9922 else :
9923   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9924 fi
9925
9926
9927 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9928 echo "configure:9929: checking for compatible POSIX regex" >&5
9929 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9930   echo $ac_n "(cached) $ac_c" 1>&6
9931 else
9932   
9933         if test "$cross_compiling" = yes; then
9934   ol_cv_c_posix_regex=cross
9935 else
9936   cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939
9940 #include <sys/types.h>
9941 #include <regex.h>
9942 static char *pattern, *string;
9943 main()
9944 {
9945         int rc;
9946         regex_t re;
9947
9948         pattern = "^A";
9949
9950         if(regcomp(&re, pattern, 0)) {
9951                 return -1;
9952         }
9953         
9954         string = "ALL MATCH";
9955         
9956         rc = regexec(&re, string, 0, (void*)0, 0);
9957
9958         regfree(&re);
9959
9960         return rc;
9961 }
9962 EOF
9963 if { (eval echo configure:9964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9964 then
9965   ol_cv_c_posix_regex=yes
9966 else
9967   echo "configure: failed program was:" >&5
9968   cat conftest.$ac_ext >&5
9969   rm -fr conftest*
9970   ol_cv_c_posix_regex=no
9971 fi
9972 rm -fr conftest*
9973 fi
9974
9975 fi
9976
9977 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9978
9979 if test "$ol_cv_c_posix_regex" = no ; then
9980         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9981 fi
9982
9983
9984 have_uuid=no
9985 for ac_hdr in sys/uuid.h
9986 do
9987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9989 echo "configure:9990: checking for $ac_hdr" >&5
9990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996 #include <$ac_hdr>
9997 EOF
9998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9999 { (eval echo configure:10000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10001 if test -z "$ac_err"; then
10002   rm -rf conftest*
10003   eval "ac_cv_header_$ac_safe=yes"
10004 else
10005   echo "$ac_err" >&5
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   eval "ac_cv_header_$ac_safe=no"
10010 fi
10011 rm -f conftest*
10012 fi
10013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10014   echo "$ac_t""yes" 1>&6
10015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10016   cat >> confdefs.h <<EOF
10017 #define $ac_tr_hdr 1
10018 EOF
10019  
10020 else
10021   echo "$ac_t""no" 1>&6
10022 fi
10023 done
10024
10025 if test $ac_cv_header_sys_uuid_h = yes ; then
10026         save_LIBS="$LIBS"
10027         
10028 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10029 echo "configure:10030: checking for library containing uuid_to_str" >&5
10030 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10031   echo $ac_n "(cached) $ac_c" 1>&6
10032 else
10033   ac_func_search_save_LIBS="$LIBS"
10034 ac_cv_search_uuid_to_str="no"
10035 cat > conftest.$ac_ext <<EOF
10036 #line 10037 "configure"
10037 #include "confdefs.h"
10038 /* Override any gcc2 internal prototype to avoid an error.  */
10039 /* We use char because int might match the return type of a gcc2
10040     builtin and then its argument prototype would still apply.  */
10041 char uuid_to_str();
10042
10043 int main() {
10044 uuid_to_str()
10045 ; return 0; }
10046 EOF
10047 if { (eval echo configure:10048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10048   rm -rf conftest*
10049   ac_cv_search_uuid_to_str="none required"
10050 else
10051   echo "configure: failed program was:" >&5
10052   cat conftest.$ac_ext >&5
10053 fi
10054 rm -f conftest*
10055 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10056 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10057 cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 /* We use char because int might match the return type of a gcc2
10062     builtin and then its argument prototype would still apply.  */
10063 char uuid_to_str();
10064
10065 int main() {
10066 uuid_to_str()
10067 ; return 0; }
10068 EOF
10069 if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10070   rm -rf conftest*
10071   ac_cv_search_uuid_to_str="-l$ac_lib"
10072 break
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076 fi
10077 rm -f conftest*
10078 done
10079 LIBS="$ac_func_search_save_LIBS"
10080 fi
10081
10082 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10083 if test "$ac_cv_search_uuid_to_str" != "no"; then
10084   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10085   have_uuid=yes
10086 else :
10087   :
10088 fi
10089         LIBS="$save_LIBS"
10090
10091         if test have_uuid = yes ; then
10092                 cat >> confdefs.h <<\EOF
10093 #define HAVE_UUID_TO_STR 1
10094 EOF
10095
10096
10097                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10098                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10099         fi
10100 fi
10101
10102 if test $have_uuid = no ; then
10103         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10104 echo "configure:10105: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10105         save_LIBS="$LIBS"
10106         LIBS="$LIBS -lrpcrt4"
10107         cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110
10111                 int __stdcall UuidCreate(void *);
10112                 int __stdcall UuidToStringA(void *,void **);
10113                 
10114 int main() {
10115
10116                 UuidCreate(0);
10117                 UuidToStringA(0,0);
10118                 
10119 ; return 0; }
10120 EOF
10121 if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10122   rm -rf conftest*
10123   need_rpcrt=yes
10124 else
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   need_rpcrt=no
10129 fi
10130 rm -f conftest*
10131         if test $need_rpcrt = yes; then
10132                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10133         fi
10134         LIBS="$save_LIBS"
10135         echo "$ac_t""$need_rpcrt" 1>&6
10136 fi
10137
10138 ol_link_dnssrv=no
10139 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10140 echo "configure:10141: checking for res_query" >&5
10141 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10142   echo $ac_n "(cached) $ac_c" 1>&6
10143 else
10144   cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* System header to define __stub macros and hopefully few prototypes,
10148     which can conflict with char res_query(); below.  */
10149 #include <assert.h>
10150 /* Override any gcc2 internal prototype to avoid an error.  */
10151 /* We use char because int might match the return type of a gcc2
10152     builtin and then its argument prototype would still apply.  */
10153 char res_query();
10154 char (*f)();
10155
10156 int main() {
10157
10158 /* The GNU C library defines this for functions which it implements
10159     to always fail with ENOSYS.  Some functions are actually named
10160     something starting with __ and the normal name is an alias.  */
10161 #if defined (__stub_res_query) || defined (__stub___res_query)
10162 choke me
10163 #else
10164 f = res_query;
10165 #endif
10166
10167 ; return 0; }
10168 EOF
10169 if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10170   rm -rf conftest*
10171   eval "ac_cv_func_res_query=yes"
10172 else
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -rf conftest*
10176   eval "ac_cv_func_res_query=no"
10177 fi
10178 rm -f conftest*
10179 fi
10180
10181 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10182   echo "$ac_t""yes" 1>&6
10183   :
10184 else
10185   echo "$ac_t""no" 1>&6
10186 fi
10187
10188 if test $ac_cv_func_res_query = no ; then 
10189         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10190 echo "configure:10191: checking for __res_query" >&5
10191 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10192   echo $ac_n "(cached) $ac_c" 1>&6
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 /* System header to define __stub macros and hopefully few prototypes,
10198     which can conflict with char __res_query(); below.  */
10199 #include <assert.h>
10200 /* Override any gcc2 internal prototype to avoid an error.  */
10201 /* We use char because int might match the return type of a gcc2
10202     builtin and then its argument prototype would still apply.  */
10203 char __res_query();
10204 char (*f)();
10205
10206 int main() {
10207
10208 /* The GNU C library defines this for functions which it implements
10209     to always fail with ENOSYS.  Some functions are actually named
10210     something starting with __ and the normal name is an alias.  */
10211 #if defined (__stub___res_query) || defined (__stub_____res_query)
10212 choke me
10213 #else
10214 f = __res_query;
10215 #endif
10216
10217 ; return 0; }
10218 EOF
10219 if { (eval echo configure:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10220   rm -rf conftest*
10221   eval "ac_cv_func___res_query=yes"
10222 else
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_func___res_query=no"
10227 fi
10228 rm -f conftest*
10229 fi
10230
10231 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233   :
10234 else
10235   echo "$ac_t""no" 1>&6
10236 fi
10237
10238         ac_cv_func_res_query=$ac_cv_func___res_query
10239 fi
10240
10241 if test $ac_cv_func_res_query = no ; then 
10242         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10243 echo "configure:10244: checking for res_query in -lbind" >&5
10244 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   ac_save_LIBS="$LIBS"
10249 LIBS="-lbind  $LIBS"
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 /* Override any gcc2 internal prototype to avoid an error.  */
10254 /* We use char because int might match the return type of a gcc2
10255     builtin and then its argument prototype would still apply.  */
10256 char res_query();
10257
10258 int main() {
10259 res_query()
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10263   rm -rf conftest*
10264   eval "ac_cv_lib_$ac_lib_var=yes"
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   eval "ac_cv_lib_$ac_lib_var=no"
10270 fi
10271 rm -f conftest*
10272 LIBS="$ac_save_LIBS"
10273
10274 fi
10275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10276   echo "$ac_t""yes" 1>&6
10277     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10278     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10279   cat >> confdefs.h <<EOF
10280 #define $ac_tr_lib 1
10281 EOF
10282
10283   LIBS="-lbind $LIBS"
10284
10285 else
10286   echo "$ac_t""no" 1>&6
10287 fi
10288
10289         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10290 fi
10291
10292 if test $ac_cv_func_res_query = no ; then 
10293         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10294 echo "configure:10295: checking for __res_query in -lbind" >&5
10295 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   ac_save_LIBS="$LIBS"
10300 LIBS="-lbind  $LIBS"
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char __res_query();
10308
10309 int main() {
10310 __res_query()
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10314   rm -rf conftest*
10315   eval "ac_cv_lib_$ac_lib_var=yes"
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   eval "ac_cv_lib_$ac_lib_var=no"
10321 fi
10322 rm -f conftest*
10323 LIBS="$ac_save_LIBS"
10324
10325 fi
10326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10327   echo "$ac_t""yes" 1>&6
10328     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10330   cat >> confdefs.h <<EOF
10331 #define $ac_tr_lib 1
10332 EOF
10333
10334   LIBS="-lbind $LIBS"
10335
10336 else
10337   echo "$ac_t""no" 1>&6
10338 fi
10339
10340         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10341 fi
10342
10343 if test $ac_cv_func_res_query = no ; then 
10344         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10345 echo "configure:10346: checking for res_query in -lresolv" >&5
10346 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10347 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   ac_save_LIBS="$LIBS"
10351 LIBS="-lresolv  $LIBS"
10352 cat > conftest.$ac_ext <<EOF
10353 #line 10354 "configure"
10354 #include "confdefs.h"
10355 /* Override any gcc2 internal prototype to avoid an error.  */
10356 /* We use char because int might match the return type of a gcc2
10357     builtin and then its argument prototype would still apply.  */
10358 char res_query();
10359
10360 int main() {
10361 res_query()
10362 ; return 0; }
10363 EOF
10364 if { (eval echo configure:10365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10365   rm -rf conftest*
10366   eval "ac_cv_lib_$ac_lib_var=yes"
10367 else
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -rf conftest*
10371   eval "ac_cv_lib_$ac_lib_var=no"
10372 fi
10373 rm -f conftest*
10374 LIBS="$ac_save_LIBS"
10375
10376 fi
10377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10378   echo "$ac_t""yes" 1>&6
10379     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10380     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10381   cat >> confdefs.h <<EOF
10382 #define $ac_tr_lib 1
10383 EOF
10384
10385   LIBS="-lresolv $LIBS"
10386
10387 else
10388   echo "$ac_t""no" 1>&6
10389 fi
10390
10391         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10392 fi
10393
10394 if test $ac_cv_func_res_query = no ; then 
10395         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10396 echo "configure:10397: checking for __res_query in -lresolv" >&5
10397 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10399   echo $ac_n "(cached) $ac_c" 1>&6
10400 else
10401   ac_save_LIBS="$LIBS"
10402 LIBS="-lresolv  $LIBS"
10403 cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 /* Override any gcc2 internal prototype to avoid an error.  */
10407 /* We use char because int might match the return type of a gcc2
10408     builtin and then its argument prototype would still apply.  */
10409 char __res_query();
10410
10411 int main() {
10412 __res_query()
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416   rm -rf conftest*
10417   eval "ac_cv_lib_$ac_lib_var=yes"
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_lib_$ac_lib_var=no"
10423 fi
10424 rm -f conftest*
10425 LIBS="$ac_save_LIBS"
10426
10427 fi
10428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10429   echo "$ac_t""yes" 1>&6
10430     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10431     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10432   cat >> confdefs.h <<EOF
10433 #define $ac_tr_lib 1
10434 EOF
10435
10436   LIBS="-lresolv $LIBS"
10437
10438 else
10439   echo "$ac_t""no" 1>&6
10440 fi
10441
10442         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10443 fi
10444
10445 if test $ac_cv_func_res_query = no ; then 
10446         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10447 echo "configure:10448: checking for _res_9_query in -lresolv" >&5
10448 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   ac_save_LIBS="$LIBS"
10453 LIBS="-lresolv  $LIBS"
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 /* Override any gcc2 internal prototype to avoid an error.  */
10458 /* We use char because int might match the return type of a gcc2
10459     builtin and then its argument prototype would still apply.  */
10460 char _res_9_query();
10461
10462 int main() {
10463 _res_9_query()
10464 ; return 0; }
10465 EOF
10466 if { (eval echo configure:10467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=yes"
10469 else
10470   echo "configure: failed program was:" >&5
10471   cat conftest.$ac_ext >&5
10472   rm -rf conftest*
10473   eval "ac_cv_lib_$ac_lib_var=no"
10474 fi
10475 rm -f conftest*
10476 LIBS="$ac_save_LIBS"
10477
10478 fi
10479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10482     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10483   cat >> confdefs.h <<EOF
10484 #define $ac_tr_lib 1
10485 EOF
10486
10487   LIBS="-lresolv $LIBS"
10488
10489 else
10490   echo "$ac_t""no" 1>&6
10491 fi
10492
10493         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10494 fi
10495
10496 if test "$ac_cv_func_res_query" = yes ; then
10497         cat >> confdefs.h <<\EOF
10498 #define HAVE_RES_QUERY 1
10499 EOF
10500
10501
10502         if test $ol_enable_dnssrv != no ; then
10503                 ol_link_dnssrv=yes
10504         fi
10505 fi
10506
10507 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10508         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10509 fi
10510
10511 for ac_func in hstrerror 
10512 do
10513 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10514 echo "configure:10515: checking for $ac_func" >&5
10515 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10516   echo $ac_n "(cached) $ac_c" 1>&6
10517 else
10518   cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521 /* System header to define __stub macros and hopefully few prototypes,
10522     which can conflict with char $ac_func(); below.  */
10523 #include <assert.h>
10524 /* Override any gcc2 internal prototype to avoid an error.  */
10525 /* We use char because int might match the return type of a gcc2
10526     builtin and then its argument prototype would still apply.  */
10527 char $ac_func();
10528 char (*f)();
10529
10530 int main() {
10531
10532 /* The GNU C library defines this for functions which it implements
10533     to always fail with ENOSYS.  Some functions are actually named
10534     something starting with __ and the normal name is an alias.  */
10535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10536 choke me
10537 #else
10538 f = $ac_func;
10539 #endif
10540
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_func_$ac_func=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_func_$ac_func=no"
10551 fi
10552 rm -f conftest*
10553 fi
10554
10555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10556   echo "$ac_t""yes" 1>&6
10557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10558   cat >> confdefs.h <<EOF
10559 #define $ac_tr_func 1
10560 EOF
10561  
10562 else
10563   echo "$ac_t""no" 1>&6
10564 fi
10565 done
10566
10567
10568 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10569 do
10570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10571 echo "configure:10572: checking for $ac_func" >&5
10572 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 /* System header to define __stub macros and hopefully few prototypes,
10579     which can conflict with char $ac_func(); below.  */
10580 #include <assert.h>
10581 /* Override any gcc2 internal prototype to avoid an error.  */
10582 /* We use char because int might match the return type of a gcc2
10583     builtin and then its argument prototype would still apply.  */
10584 char $ac_func();
10585 char (*f)();
10586
10587 int main() {
10588
10589 /* The GNU C library defines this for functions which it implements
10590     to always fail with ENOSYS.  Some functions are actually named
10591     something starting with __ and the normal name is an alias.  */
10592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10593 choke me
10594 #else
10595 f = $ac_func;
10596 #endif
10597
10598 ; return 0; }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10601   rm -rf conftest*
10602   eval "ac_cv_func_$ac_func=yes"
10603 else
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_func_$ac_func=no"
10608 fi
10609 rm -f conftest*
10610 fi
10611
10612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10613   echo "$ac_t""yes" 1>&6
10614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10615   cat >> confdefs.h <<EOF
10616 #define $ac_tr_func 1
10617 EOF
10618  
10619 else
10620   echo "$ac_t""no" 1>&6
10621 fi
10622 done
10623
10624
10625 ol_link_ipv6=no
10626 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10627         if test $ol_enable_ipv6 = yes ; then
10628                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10629         fi
10630 elif test $ol_enable_ipv6 != no ; then
10631         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10632 echo "configure:10633: checking INET6_ADDRSTRLEN" >&5
10633 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10634   echo $ac_n "(cached) $ac_c" 1>&6
10635 else
10636   
10637                 cat > conftest.$ac_ext <<EOF
10638 #line 10639 "configure"
10639 #include "confdefs.h"
10640
10641 #                       include <netinet/in.h>
10642 #                       ifdef INET6_ADDRSTRLEN
10643                                 __has_inet6_addrstrlen__;
10644 #                       endif
10645                 
10646 EOF
10647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10648   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10649   rm -rf conftest*
10650   ol_cv_inet6_addrstrlen=yes
10651 else
10652   rm -rf conftest*
10653   ol_cv_inet6_addrstrlen=no
10654 fi
10655 rm -f conftest*
10656
10657 fi
10658
10659 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10660
10661
10662         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10663 echo "configure:10664: checking struct sockaddr_storage" >&5
10664 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   
10668                 cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671
10672 #include <sys/types.h>
10673 #include <sys/socket.h>
10674
10675 int main() {
10676
10677                         struct sockaddr_storage ss;
10678
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10682   rm -rf conftest*
10683   ol_cv_struct_sockaddr_storage=yes
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   ol_cv_struct_sockaddr_storage=no
10689 fi
10690 rm -f conftest*
10691 fi
10692
10693 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10694
10695         if test $ol_cv_inet6_addrstrlen = yes \
10696                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10697                 ol_link_ipv6=yes
10698         elif test $ol_enable_ipv6 = yes \
10699                         -a $ol_cv_inet6_addrstrlen = no ; then
10700                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10701         elif test $ol_enable_ipv6 = yes \
10702                         -a $ol_cv_struct_sockaddr_storage = no ; then
10703                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10704         fi
10705 fi
10706
10707 if test $ol_enable_local != no ; then
10708         for ac_hdr in sys/un.h 
10709 do
10710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10712 echo "configure:10713: checking for $ac_hdr" >&5
10713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <$ac_hdr>
10720 EOF
10721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10722 { (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10724 if test -z "$ac_err"; then
10725   rm -rf conftest*
10726   eval "ac_cv_header_$ac_safe=yes"
10727 else
10728   echo "$ac_err" >&5
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_header_$ac_safe=no"
10733 fi
10734 rm -f conftest*
10735 fi
10736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10737   echo "$ac_t""yes" 1>&6
10738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10739   cat >> confdefs.h <<EOF
10740 #define $ac_tr_hdr 1
10741 EOF
10742  
10743 else
10744   echo "$ac_t""no" 1>&6
10745 fi
10746 done
10747
10748
10749         if test $ol_enable_local = auto ; then
10750                 ol_enable_local=$ac_cv_header_sys_un_h
10751         elif test $ac_cv_header_sys_un_h = no ; then
10752                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10753         fi
10754 fi
10755
10756 ol_link_kbind=no
10757 ol_link_krb5=no
10758 ol_link_krb4=no
10759
10760 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10761         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10762         -o $ol_with_kerberos = k425 ; then
10763
10764         for ac_hdr in krb5.h
10765 do
10766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10768 echo "configure:10769: checking for $ac_hdr" >&5
10769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10770   echo $ac_n "(cached) $ac_c" 1>&6
10771 else
10772   cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775 #include <$ac_hdr>
10776 EOF
10777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10778 { (eval echo configure:10779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10780 if test -z "$ac_err"; then
10781   rm -rf conftest*
10782   eval "ac_cv_header_$ac_safe=yes"
10783 else
10784   echo "$ac_err" >&5
10785   echo "configure: failed program was:" >&5
10786   cat conftest.$ac_ext >&5
10787   rm -rf conftest*
10788   eval "ac_cv_header_$ac_safe=no"
10789 fi
10790 rm -f conftest*
10791 fi
10792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10793   echo "$ac_t""yes" 1>&6
10794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10795   cat >> confdefs.h <<EOF
10796 #define $ac_tr_hdr 1
10797 EOF
10798  
10799 else
10800   echo "$ac_t""no" 1>&6
10801 fi
10802 done
10803
10804
10805         if test $ac_cv_header_krb5_h = yes ; then
10806                                 for ac_hdr in heim_err.h
10807 do
10808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10810 echo "configure:10811: checking for $ac_hdr" >&5
10811 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10812   echo $ac_n "(cached) $ac_c" 1>&6
10813 else
10814   cat > conftest.$ac_ext <<EOF
10815 #line 10816 "configure"
10816 #include "confdefs.h"
10817 #include <$ac_hdr>
10818 EOF
10819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10820 { (eval echo configure:10821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10822 if test -z "$ac_err"; then
10823   rm -rf conftest*
10824   eval "ac_cv_header_$ac_safe=yes"
10825 else
10826   echo "$ac_err" >&5
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_header_$ac_safe=no"
10831 fi
10832 rm -f conftest*
10833 fi
10834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10835   echo "$ac_t""yes" 1>&6
10836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10837   cat >> confdefs.h <<EOF
10838 #define $ac_tr_hdr 1
10839 EOF
10840  
10841 else
10842   echo "$ac_t""no" 1>&6
10843 fi
10844 done
10845
10846                 if test $ac_cv_header_heim_err_h = yes ; then
10847                         krb5_impl=heimdal
10848                 else
10849                         krb5_impl=mit
10850                 fi
10851
10852                 if test $krb5_impl = mit; then
10853                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10854 echo "configure:10855: checking for main in -lk5crypto" >&5
10855 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   ac_save_LIBS="$LIBS"
10860 LIBS="-lk5crypto  $LIBS"
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864
10865 int main() {
10866 main()
10867 ; return 0; }
10868 EOF
10869 if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10870   rm -rf conftest*
10871   eval "ac_cv_lib_$ac_lib_var=yes"
10872 else
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -rf conftest*
10876   eval "ac_cv_lib_$ac_lib_var=no"
10877 fi
10878 rm -f conftest*
10879 LIBS="$ac_save_LIBS"
10880
10881 fi
10882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10883   echo "$ac_t""yes" 1>&6
10884   krb5crypto=k5crypto
10885 else
10886   echo "$ac_t""no" 1>&6
10887 krb5crypto=crypto
10888 fi
10889
10890
10891                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10892 echo "configure:10893: checking for main in -lkrb5" >&5
10893 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10894 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   ac_save_LIBS="$LIBS"
10898 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10899 cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902
10903 int main() {
10904 main()
10905 ; return 0; }
10906 EOF
10907 if { (eval echo configure:10908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10908   rm -rf conftest*
10909   eval "ac_cv_lib_$ac_lib_var=yes"
10910 else
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=no"
10915 fi
10916 rm -f conftest*
10917 LIBS="$ac_save_LIBS"
10918
10919 fi
10920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10921   echo "$ac_t""yes" 1>&6
10922   have_krb5=yes
10923                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10924 else
10925   echo "$ac_t""no" 1>&6
10926 have_krb5=no
10927 fi
10928
10929
10930                 elif test $krb5_impl = heimdal; then
10931                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10932 echo "configure:10933: checking for main in -ldes" >&5
10933 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10935   echo $ac_n "(cached) $ac_c" 1>&6
10936 else
10937   ac_save_LIBS="$LIBS"
10938 LIBS="-ldes  $LIBS"
10939 cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942
10943 int main() {
10944 main()
10945 ; return 0; }
10946 EOF
10947 if { (eval echo configure:10948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10948   rm -rf conftest*
10949   eval "ac_cv_lib_$ac_lib_var=yes"
10950 else
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -rf conftest*
10954   eval "ac_cv_lib_$ac_lib_var=no"
10955 fi
10956 rm -f conftest*
10957 LIBS="$ac_save_LIBS"
10958
10959 fi
10960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10961   echo "$ac_t""yes" 1>&6
10962   krb5crypto=des
10963 else
10964   echo "$ac_t""no" 1>&6
10965 krb5crypto=crypto
10966 fi
10967
10968
10969                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10970 echo "configure:10971: checking for main in -lkrb5" >&5
10971 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10973   echo $ac_n "(cached) $ac_c" 1>&6
10974 else
10975   ac_save_LIBS="$LIBS"
10976 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10977 cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980
10981 int main() {
10982 main()
10983 ; return 0; }
10984 EOF
10985 if { (eval echo configure:10986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10986   rm -rf conftest*
10987   eval "ac_cv_lib_$ac_lib_var=yes"
10988 else
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   eval "ac_cv_lib_$ac_lib_var=no"
10993 fi
10994 rm -f conftest*
10995 LIBS="$ac_save_LIBS"
10996
10997 fi
10998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10999   echo "$ac_t""yes" 1>&6
11000   have_krb5=yes
11001                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11002 else
11003   echo "$ac_t""no" 1>&6
11004 have_krb5=no
11005 fi
11006
11007
11008                         cat >> confdefs.h <<\EOF
11009 #define HAVE_HEIMDAL_KERBEROS 1
11010 EOF
11011
11012
11013                 else
11014                         have_krb5=no
11015                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11016                 fi
11017
11018                 if test $have_krb5 = yes ; then
11019                         ol_link_krb5=yes
11020
11021                         cat >> confdefs.h <<\EOF
11022 #define HAVE_KRB5 1
11023 EOF
11024
11025
11026                         if test $ol_with_kerberos = k5only ; then
11027                                 ol_with_kerberos=found
11028                         fi
11029
11030                 elif test $ol_with_kerberos != auto ; then
11031                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11032                 fi
11033
11034         fi
11035 fi
11036
11037 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11038         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11039
11040         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11041 do
11042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11044 echo "configure:11045: checking for $ac_hdr" >&5
11045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11046   echo $ac_n "(cached) $ac_c" 1>&6
11047 else
11048   cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 #include <$ac_hdr>
11052 EOF
11053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11054 { (eval echo configure:11055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11056 if test -z "$ac_err"; then
11057   rm -rf conftest*
11058   eval "ac_cv_header_$ac_safe=yes"
11059 else
11060   echo "$ac_err" >&5
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -rf conftest*
11064   eval "ac_cv_header_$ac_safe=no"
11065 fi
11066 rm -f conftest*
11067 fi
11068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11069   echo "$ac_t""yes" 1>&6
11070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11071   cat >> confdefs.h <<EOF
11072 #define $ac_tr_hdr 1
11073 EOF
11074  
11075 else
11076   echo "$ac_t""no" 1>&6
11077 fi
11078 done
11079
11080
11081         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11082                 if test $krb5_impl = mit; then
11083                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11084 echo "configure:11085: checking for main in -lkrb4" >&5
11085 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   ac_save_LIBS="$LIBS"
11090 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11091 cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094
11095 int main() {
11096 main()
11097 ; return 0; }
11098 EOF
11099 if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11100   rm -rf conftest*
11101   eval "ac_cv_lib_$ac_lib_var=yes"
11102 else
11103   echo "configure: failed program was:" >&5
11104   cat conftest.$ac_ext >&5
11105   rm -rf conftest*
11106   eval "ac_cv_lib_$ac_lib_var=no"
11107 fi
11108 rm -f conftest*
11109 LIBS="$ac_save_LIBS"
11110
11111 fi
11112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11113   echo "$ac_t""yes" 1>&6
11114   have_k425=yes
11115                                 KRB4_LIBS="-lkrb4 -ldes425"
11116 else
11117   echo "$ac_t""no" 1>&6
11118 have_k425=no
11119 fi
11120
11121
11122                 elif test $krb5_impl = heimdal; then
11123                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11124 echo "configure:11125: checking for main in -lkrb4" >&5
11125 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11127   echo $ac_n "(cached) $ac_c" 1>&6
11128 else
11129   ac_save_LIBS="$LIBS"
11130 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11131 cat > conftest.$ac_ext <<EOF
11132 #line 11133 "configure"
11133 #include "confdefs.h"
11134
11135 int main() {
11136 main()
11137 ; return 0; }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11140   rm -rf conftest*
11141   eval "ac_cv_lib_$ac_lib_var=yes"
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=no"
11147 fi
11148 rm -f conftest*
11149 LIBS="$ac_save_LIBS"
11150
11151 fi
11152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   have_k425=yes
11155                                 KRB4_LIBS="-lkrb4"
11156 else
11157   echo "$ac_t""no" 1>&6
11158 have_k425=no
11159 fi
11160
11161
11162                 else
11163                         have_425=no
11164                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11165                 fi
11166
11167                 if test $have_k425 = yes ; then
11168                         ol_with_kerberos=found
11169                         ol_link_krb4=yes
11170
11171                         cat >> confdefs.h <<\EOF
11172 #define HAVE_KRB425 1
11173 EOF
11174
11175                         cat >> confdefs.h <<\EOF
11176 #define HAVE_KRB4 1
11177 EOF
11178
11179
11180                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11181 echo "configure:11182: checking for des_debug in Kerberos libraries" >&5
11182 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   
11186                                                                 save_LIBS="$LIBS"
11187                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11188                                 cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11191
11192 #include <kerberosIV/krb.h>
11193 #include <kerberosIV/des.h>
11194 extern int des_debug;
11195
11196 int main() {
11197
11198 des_debug = 1;
11199
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11203   rm -rf conftest*
11204   ol_cv_var_des_debug=yes
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   ol_cv_var_des_debug=no
11210 fi
11211 rm -f conftest*
11212                                                                 LIBS="$save_LIBS"
11213                         
11214 fi
11215
11216 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11217
11218                         if test $ol_cv_var_des_debug = yes ; then
11219                                 cat >> confdefs.h <<\EOF
11220 #define HAVE_DES_DEBUG 1
11221 EOF
11222
11223                         fi
11224
11225                         LIBS="$save_LIBS"
11226                 fi
11227         fi
11228 fi
11229
11230 if test $ol_link_krb5 = yes ; then
11231         ol_with_kerberos=found
11232 fi
11233
11234 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11235         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11236
11237         for ac_hdr in krb.h des.h krb-archaeology.h 
11238 do
11239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11241 echo "configure:11242: checking for $ac_hdr" >&5
11242 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11243   echo $ac_n "(cached) $ac_c" 1>&6
11244 else
11245   cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 #include <$ac_hdr>
11249 EOF
11250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11251 { (eval echo configure:11252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11253 if test -z "$ac_err"; then
11254   rm -rf conftest*
11255   eval "ac_cv_header_$ac_safe=yes"
11256 else
11257   echo "$ac_err" >&5
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_header_$ac_safe=no"
11262 fi
11263 rm -f conftest*
11264 fi
11265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11266   echo "$ac_t""yes" 1>&6
11267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11268   cat >> confdefs.h <<EOF
11269 #define $ac_tr_hdr 1
11270 EOF
11271  
11272 else
11273   echo "$ac_t""no" 1>&6
11274 fi
11275 done
11276
11277
11278         if test $ac_cv_header_krb_h = yes ; then
11279                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11280 echo "configure:11281: checking for main in -lkrb" >&5
11281 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   ac_save_LIBS="$LIBS"
11286 LIBS="-lkrb -ldes $LIBS"
11287 cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290
11291 int main() {
11292 main()
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_k4=yes
11311 else
11312   echo "$ac_t""no" 1>&6
11313 have_k4=no
11314 fi
11315
11316
11317                 if test $have_k4 = yes ; then
11318                         ol_with_kerberos=found
11319                         ol_link_krb4=yes
11320
11321                         cat >> confdefs.h <<\EOF
11322 #define HAVE_KRB4 1
11323 EOF
11324
11325
11326                         KRB4_LIBS="-lkrb -ldes"
11327
11328                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11329                                 cat >> confdefs.h <<\EOF
11330 #define HAVE_KTH_KERBEROS 1
11331 EOF
11332
11333                         fi
11334                 fi
11335         fi
11336 fi
11337
11338 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11339         ol_link_kbind=yes
11340
11341 elif test $ol_enable_kbind = yes ; then
11342         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11343 fi
11344
11345 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11346         cat >> confdefs.h <<\EOF
11347 #define HAVE_KERBEROS 1
11348 EOF
11349
11350
11351 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11352         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11353 fi
11354
11355         
11356 ol_link_tls=no
11357 if test $ol_with_tls != no ; then
11358         for ac_hdr in openssl/ssl.h ssl.h
11359 do
11360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11362 echo "configure:11363: checking for $ac_hdr" >&5
11363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11364   echo $ac_n "(cached) $ac_c" 1>&6
11365 else
11366   cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 #include <$ac_hdr>
11370 EOF
11371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11372 { (eval echo configure:11373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11374 if test -z "$ac_err"; then
11375   rm -rf conftest*
11376   eval "ac_cv_header_$ac_safe=yes"
11377 else
11378   echo "$ac_err" >&5
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=no"
11383 fi
11384 rm -f conftest*
11385 fi
11386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11387   echo "$ac_t""yes" 1>&6
11388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11389   cat >> confdefs.h <<EOF
11390 #define $ac_tr_hdr 1
11391 EOF
11392  
11393 else
11394   echo "$ac_t""no" 1>&6
11395 fi
11396 done
11397
11398
11399         if test $ac_cv_header_openssl_ssl_h = yes \
11400                 -o $ac_cv_header_ssl_h = yes ; then
11401                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11402 echo "configure:11403: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11403 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   ac_save_LIBS="$LIBS"
11408 LIBS="-lssl -lcrypto $LIBS"
11409 cat > conftest.$ac_ext <<EOF
11410 #line 11411 "configure"
11411 #include "confdefs.h"
11412 /* Override any gcc2 internal prototype to avoid an error.  */
11413 /* We use char because int might match the return type of a gcc2
11414     builtin and then its argument prototype would still apply.  */
11415 char SSLeay_add_ssl_algorithms();
11416
11417 int main() {
11418 SSLeay_add_ssl_algorithms()
11419 ; return 0; }
11420 EOF
11421 if { (eval echo configure:11422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11422   rm -rf conftest*
11423   eval "ac_cv_lib_$ac_lib_var=yes"
11424 else
11425   echo "configure: failed program was:" >&5
11426   cat conftest.$ac_ext >&5
11427   rm -rf conftest*
11428   eval "ac_cv_lib_$ac_lib_var=no"
11429 fi
11430 rm -f conftest*
11431 LIBS="$ac_save_LIBS"
11432
11433 fi
11434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11435   echo "$ac_t""yes" 1>&6
11436   have_ssleay=yes
11437                         need_rsaref=no
11438 else
11439   echo "$ac_t""no" 1>&6
11440 have_ssleay=no
11441 fi
11442
11443                         
11444                 if test $have_ssleay = no ; then
11445                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11446 echo "configure:11447: checking for SSL_library_init in -lssl" >&5
11447 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11449   echo $ac_n "(cached) $ac_c" 1>&6
11450 else
11451   ac_save_LIBS="$LIBS"
11452 LIBS="-lssl -lcrypto $LIBS"
11453 cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 /* Override any gcc2 internal prototype to avoid an error.  */
11457 /* We use char because int might match the return type of a gcc2
11458     builtin and then its argument prototype would still apply.  */
11459 char SSL_library_init();
11460
11461 int main() {
11462 SSL_library_init()
11463 ; return 0; }
11464 EOF
11465 if { (eval echo configure:11466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11466   rm -rf conftest*
11467   eval "ac_cv_lib_$ac_lib_var=yes"
11468 else
11469   echo "configure: failed program was:" >&5
11470   cat conftest.$ac_ext >&5
11471   rm -rf conftest*
11472   eval "ac_cv_lib_$ac_lib_var=no"
11473 fi
11474 rm -f conftest*
11475 LIBS="$ac_save_LIBS"
11476
11477 fi
11478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11479   echo "$ac_t""yes" 1>&6
11480   have_ssleay=yes
11481                                 need_rsaref=no
11482 else
11483   echo "$ac_t""no" 1>&6
11484 have_ssleay=no
11485 fi
11486
11487                 fi
11488
11489                 if test $have_ssleay = no ; then
11490                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11491 echo "configure:11492: checking for ssl3_accept in -lssl" >&5
11492 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   ac_save_LIBS="$LIBS"
11497 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11498 cat > conftest.$ac_ext <<EOF
11499 #line 11500 "configure"
11500 #include "confdefs.h"
11501 /* Override any gcc2 internal prototype to avoid an error.  */
11502 /* We use char because int might match the return type of a gcc2
11503     builtin and then its argument prototype would still apply.  */
11504 char ssl3_accept();
11505
11506 int main() {
11507 ssl3_accept()
11508 ; return 0; }
11509 EOF
11510 if { (eval echo configure:11511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11511   rm -rf conftest*
11512   eval "ac_cv_lib_$ac_lib_var=yes"
11513 else
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   eval "ac_cv_lib_$ac_lib_var=no"
11518 fi
11519 rm -f conftest*
11520 LIBS="$ac_save_LIBS"
11521
11522 fi
11523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11524   echo "$ac_t""yes" 1>&6
11525   have_ssleay=yes
11526                                 need_rsaref=yes
11527 else
11528   echo "$ac_t""no" 1>&6
11529 have_ssleay=no
11530 fi
11531
11532                 fi
11533
11534                 if test $have_ssleay = yes ; then
11535                         ol_with_tls=found
11536                         ol_link_tls=yes
11537
11538                         cat >> confdefs.h <<\EOF
11539 #define HAVE_SSLEAY 1
11540 EOF
11541
11542
11543                         if test $need_rsaref = yes; then
11544                                 cat >> confdefs.h <<\EOF
11545 #define HAVE_RSAREF 1
11546 EOF
11547
11548
11549                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11550                         else
11551                                 TLS_LIBS="-lssl -lcrypto"
11552                         fi
11553                 fi
11554                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11555 echo "configure:11556: checking OpenSSL library version (CRL checking capability)" >&5
11556 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11557   echo $ac_n "(cached) $ac_c" 1>&6
11558 else
11559   
11560         cat > conftest.$ac_ext <<EOF
11561 #line 11562 "configure"
11562 #include "confdefs.h"
11563
11564 #ifdef HAVE_OPENSSL_SSL_H
11565 #include <openssl/ssl.h>
11566 #else
11567 #include <ssl.h>
11568 #endif
11569
11570 /* Require 0.9.7d+ */
11571 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11572         char *__ssl_compat = "0.9.7d";
11573 #endif
11574         
11575 EOF
11576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11577   egrep "__ssl_compat" >/dev/null 2>&1; then
11578   rm -rf conftest*
11579   ol_cv_ssl_crl_compat=yes
11580 else
11581   rm -rf conftest*
11582   ol_cv_ssl_crl_compat=no
11583 fi
11584 rm -f conftest*
11585
11586 fi
11587
11588 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11589
11590                 if test $ol_cv_ssl_crl_compat = no ; then
11591                         ol_link_ssl=no
11592                 else 
11593                         cat >> confdefs.h <<\EOF
11594 #define HAVE_OPENSSL_CRL 1
11595 EOF
11596
11597                 fi
11598         fi
11599
11600 else
11601         echo "configure: warning: TLS data protection not supported!" 1>&2
11602 fi
11603
11604 WITH_TLS=no
11605 if test $ol_link_tls = yes ; then
11606         cat >> confdefs.h <<\EOF
11607 #define HAVE_TLS 1
11608 EOF
11609
11610         WITH_TLS=yes
11611
11612 elif test $ol_with_tls = auto ; then
11613         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11614         echo "configure: warning: TLS data protection not supported!" 1>&2
11615
11616 elif test $ol_with_tls != no ; then
11617         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11618 fi
11619
11620 if test $ol_enable_lmpasswd != no; then
11621         if test $ol_link_tls != yes ; then
11622                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11623         fi
11624
11625         cat >> confdefs.h <<\EOF
11626 #define SLAPD_LMHASH 1
11627 EOF
11628
11629 fi
11630
11631 ol_link_threads=no
11632
11633 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11634         -o $ol_with_threads = nt ; then
11635
11636         
11637         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11638 echo "configure:11639: checking for _beginthread" >&5
11639 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11640   echo $ac_n "(cached) $ac_c" 1>&6
11641 else
11642   cat > conftest.$ac_ext <<EOF
11643 #line 11644 "configure"
11644 #include "confdefs.h"
11645 /* System header to define __stub macros and hopefully few prototypes,
11646     which can conflict with char _beginthread(); below.  */
11647 #include <assert.h>
11648 /* Override any gcc2 internal prototype to avoid an error.  */
11649 /* We use char because int might match the return type of a gcc2
11650     builtin and then its argument prototype would still apply.  */
11651 char _beginthread();
11652 char (*f)();
11653
11654 int main() {
11655
11656 /* The GNU C library defines this for functions which it implements
11657     to always fail with ENOSYS.  Some functions are actually named
11658     something starting with __ and the normal name is an alias.  */
11659 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11660 choke me
11661 #else
11662 f = _beginthread;
11663 #endif
11664
11665 ; return 0; }
11666 EOF
11667 if { (eval echo configure:11668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11668   rm -rf conftest*
11669   eval "ac_cv_func__beginthread=yes"
11670 else
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   eval "ac_cv_func__beginthread=no"
11675 fi
11676 rm -f conftest*
11677 fi
11678
11679 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11680   echo "$ac_t""yes" 1>&6
11681   :
11682 else
11683   echo "$ac_t""no" 1>&6
11684 fi
11685
11686
11687         if test $ac_cv_func__beginthread = yes ; then
11688                 cat >> confdefs.h <<\EOF
11689 #define HAVE_NT_THREADS 1
11690 EOF
11691
11692                 ol_cv_nt_threads=yes
11693         fi
11694
11695
11696         if test "$ol_cv_nt_threads" = yes ; then
11697                 ol_link_threads=nt
11698                 ol_with_threads=found
11699                 ol_with_yielding_select=yes
11700
11701                 cat >> confdefs.h <<\EOF
11702 #define HAVE_NT_SERVICE_MANAGER 1
11703 EOF
11704
11705                 cat >> confdefs.h <<\EOF
11706 #define HAVE_NT_EVENT_LOG 1
11707 EOF
11708
11709         fi
11710
11711         if test $ol_with_threads = nt ; then
11712                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11713         fi
11714 fi
11715
11716 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11717         -o $ol_with_threads = posix ; then
11718
11719         for ac_hdr in pthread.h
11720 do
11721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11723 echo "configure:11724: checking for $ac_hdr" >&5
11724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11725   echo $ac_n "(cached) $ac_c" 1>&6
11726 else
11727   cat > conftest.$ac_ext <<EOF
11728 #line 11729 "configure"
11729 #include "confdefs.h"
11730 #include <$ac_hdr>
11731 EOF
11732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11733 { (eval echo configure:11734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11735 if test -z "$ac_err"; then
11736   rm -rf conftest*
11737   eval "ac_cv_header_$ac_safe=yes"
11738 else
11739   echo "$ac_err" >&5
11740   echo "configure: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   rm -rf conftest*
11743   eval "ac_cv_header_$ac_safe=no"
11744 fi
11745 rm -f conftest*
11746 fi
11747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11748   echo "$ac_t""yes" 1>&6
11749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11750   cat >> confdefs.h <<EOF
11751 #define $ac_tr_hdr 1
11752 EOF
11753  
11754 else
11755   echo "$ac_t""no" 1>&6
11756 fi
11757 done
11758
11759
11760         if test $ac_cv_header_pthread_h = yes ; then
11761                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11762 echo "configure:11763: checking POSIX thread version" >&5
11763 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11764   echo $ac_n "(cached) $ac_c" 1>&6
11765 else
11766   
11767         cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770
11771 #               include <pthread.h>
11772         
11773 int main() {
11774
11775                 int i = PTHREAD_CREATE_JOINABLE;
11776         
11777 ; return 0; }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11780   rm -rf conftest*
11781   
11782         cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <pthread.h>
11786 EOF
11787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11788   egrep "pthread_detach" >/dev/null 2>&1; then
11789   rm -rf conftest*
11790   ol_cv_pthread_version=10
11791 else
11792   rm -rf conftest*
11793   ol_cv_pthread_version=8
11794 fi
11795 rm -f conftest*
11796
11797 else
11798   echo "configure: failed program was:" >&5
11799   cat conftest.$ac_ext >&5
11800   rm -rf conftest*
11801   
11802         cat > conftest.$ac_ext <<EOF
11803 #line 11804 "configure"
11804 #include "confdefs.h"
11805
11806 #               include <pthread.h>
11807 #               ifdef PTHREAD_CREATE_UNDETACHED
11808                 draft7
11809 #               endif
11810         
11811 EOF
11812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11813   egrep "draft7" >/dev/null 2>&1; then
11814   rm -rf conftest*
11815   ol_cv_pthread_version=7
11816 else
11817   rm -rf conftest*
11818   
11819         cat > conftest.$ac_ext <<EOF
11820 #line 11821 "configure"
11821 #include "confdefs.h"
11822 #include <pthread.h>
11823 EOF
11824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11825   egrep "pthread_attr_init" >/dev/null 2>&1; then
11826   rm -rf conftest*
11827   ol_cv_pthread_version=6
11828 else
11829   rm -rf conftest*
11830   
11831         cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834
11835 #               include <pthread.h>
11836 #ifdef          PTHREAD_MUTEX_INITIALIZER
11837                 draft5
11838 #endif
11839         
11840 EOF
11841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11842   egrep "draft5" >/dev/null 2>&1; then
11843   rm -rf conftest*
11844   ol_cv_pthread_version=5
11845 else
11846   rm -rf conftest*
11847   ol_cv_pthread_version=4
11848 fi
11849 rm -f conftest*
11850  
11851 fi
11852 rm -f conftest*
11853  
11854 fi
11855 rm -f conftest*
11856  
11857 fi
11858 rm -f conftest*
11859
11860 fi
11861
11862 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11863
11864
11865                 if test $ol_cv_pthread_version != 0 ; then
11866                         cat >> confdefs.h <<EOF
11867 #define HAVE_PTHREADS $ol_cv_pthread_version
11868 EOF
11869
11870                 else
11871                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11872                 fi
11873
11874                 # consider threads found
11875                 ol_with_threads=found
11876
11877                 
11878         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11879 echo "configure:11880: checking for LinuxThreads pthread.h" >&5
11880 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11881   echo $ac_n "(cached) $ac_c" 1>&6
11882 else
11883   cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886 #include <pthread.h>
11887 EOF
11888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11889   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11890   rm -rf conftest*
11891   ol_cv_header_linux_threads=yes
11892 else
11893   rm -rf conftest*
11894   ol_cv_header_linux_threads=no
11895 fi
11896 rm -f conftest*
11897
11898                 
11899 fi
11900
11901 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11902         if test $ol_cv_header_linux_threads = yes; then
11903                 cat >> confdefs.h <<\EOF
11904 #define HAVE_LINUX_THREADS 1
11905 EOF
11906
11907         fi
11908
11909                 
11910         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11911 echo "configure:11912: checking for GNU Pth pthread.h" >&5
11912 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11913   echo $ac_n "(cached) $ac_c" 1>&6
11914 else
11915   cat > conftest.$ac_ext <<EOF
11916 #line 11917 "configure"
11917 #include "confdefs.h"
11918 #include <pthread.h>
11919 #ifdef _POSIX_THREAD_IS_GNU_PTH
11920         __gnu_pth__;
11921 #endif
11922
11923 EOF
11924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11925   egrep "__gnu_pth__" >/dev/null 2>&1; then
11926   rm -rf conftest*
11927   ol_cv_header_gnu_pth_pthread_h=yes
11928 else
11929   rm -rf conftest*
11930   ol_cv_header_gnu_pth_pthread_h=no
11931 fi
11932 rm -f conftest*
11933
11934                 
11935 fi
11936
11937 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11938
11939
11940                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11941                         for ac_hdr in sched.h
11942 do
11943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11945 echo "configure:11946: checking for $ac_hdr" >&5
11946 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11947   echo $ac_n "(cached) $ac_c" 1>&6
11948 else
11949   cat > conftest.$ac_ext <<EOF
11950 #line 11951 "configure"
11951 #include "confdefs.h"
11952 #include <$ac_hdr>
11953 EOF
11954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11955 { (eval echo configure:11956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11957 if test -z "$ac_err"; then
11958   rm -rf conftest*
11959   eval "ac_cv_header_$ac_safe=yes"
11960 else
11961   echo "$ac_err" >&5
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -rf conftest*
11965   eval "ac_cv_header_$ac_safe=no"
11966 fi
11967 rm -f conftest*
11968 fi
11969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11970   echo "$ac_t""yes" 1>&6
11971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11972   cat >> confdefs.h <<EOF
11973 #define $ac_tr_hdr 1
11974 EOF
11975  
11976 else
11977   echo "$ac_t""no" 1>&6
11978 fi
11979 done
11980
11981                 fi
11982
11983                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11984                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11985 echo "configure:11986: checking for pthread_create in default libraries" >&5
11986 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11987   echo $ac_n "(cached) $ac_c" 1>&6
11988 else
11989   
11990                 if test "$cross_compiling" = yes; then
11991   cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994 /* pthread test headers */
11995 #include <pthread.h>
11996 #if HAVE_PTHREADS < 7
11997 #include <errno.h>
11998 #endif
11999 #ifndef NULL
12000 #define NULL (void*)0
12001 #endif
12002
12003 static void *task(p)
12004         void *p;
12005 {
12006         return (void *) (p == NULL);
12007 }
12008
12009 int main() {
12010
12011         /* pthread test function */
12012 #ifndef PTHREAD_CREATE_DETACHED
12013 #define PTHREAD_CREATE_DETACHED 1
12014 #endif
12015         pthread_t t;
12016         int status;
12017         int detach = PTHREAD_CREATE_DETACHED;
12018
12019 #if HAVE_PTHREADS > 4
12020         /* Final pthreads */
12021         pthread_attr_t attr;
12022
12023         status = pthread_attr_init(&attr);
12024         if( status ) return status;
12025
12026 #if HAVE_PTHREADS < 7
12027         status = pthread_attr_setdetachstate(&attr, &detach);
12028         if( status < 0 ) status = errno;
12029 #else
12030         status = pthread_attr_setdetachstate(&attr, detach);
12031 #endif
12032         if( status ) return status;
12033         status = pthread_create( &t, &attr, task, NULL );
12034 #if HAVE_PTHREADS < 7
12035         if( status < 0 ) status = errno;
12036 #endif
12037         if( status ) return status;
12038 #else
12039         /* Draft 4 pthreads */
12040         status = pthread_create( &t, pthread_attr_default, task, NULL );
12041         if( status ) return errno;
12042
12043         /* give thread a chance to complete */
12044         /* it should remain joinable and hence detachable */
12045         sleep( 1 );
12046
12047         status = pthread_detach( &t );
12048         if( status ) return errno;
12049 #endif
12050
12051 #ifdef HAVE_LINUX_THREADS
12052         pthread_kill_other_threads_np();
12053 #endif
12054
12055         return 0;
12056
12057 ; return 0; }
12058 EOF
12059 if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12060   rm -rf conftest*
12061   ol_cv_pthread_create=yes
12062 else
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -rf conftest*
12066   ol_cv_pthread_create=no
12067 fi
12068 rm -f conftest*
12069 else
12070   cat > conftest.$ac_ext <<EOF
12071 #line 12072 "configure"
12072 #include "confdefs.h"
12073 /* pthread test headers */
12074 #include <pthread.h>
12075 #if HAVE_PTHREADS < 7
12076 #include <errno.h>
12077 #endif
12078 #ifndef NULL
12079 #define NULL (void*)0
12080 #endif
12081
12082 static void *task(p)
12083         void *p;
12084 {
12085         return (void *) (p == NULL);
12086 }
12087
12088
12089 int main(argc, argv)
12090         int argc;
12091         char **argv;
12092 {
12093
12094         /* pthread test function */
12095 #ifndef PTHREAD_CREATE_DETACHED
12096 #define PTHREAD_CREATE_DETACHED 1
12097 #endif
12098         pthread_t t;
12099         int status;
12100         int detach = PTHREAD_CREATE_DETACHED;
12101
12102 #if HAVE_PTHREADS > 4
12103         /* Final pthreads */
12104         pthread_attr_t attr;
12105
12106         status = pthread_attr_init(&attr);
12107         if( status ) return status;
12108
12109 #if HAVE_PTHREADS < 7
12110         status = pthread_attr_setdetachstate(&attr, &detach);
12111         if( status < 0 ) status = errno;
12112 #else
12113         status = pthread_attr_setdetachstate(&attr, detach);
12114 #endif
12115         if( status ) return status;
12116         status = pthread_create( &t, &attr, task, NULL );
12117 #if HAVE_PTHREADS < 7
12118         if( status < 0 ) status = errno;
12119 #endif
12120         if( status ) return status;
12121 #else
12122         /* Draft 4 pthreads */
12123         status = pthread_create( &t, pthread_attr_default, task, NULL );
12124         if( status ) return errno;
12125
12126         /* give thread a chance to complete */
12127         /* it should remain joinable and hence detachable */
12128         sleep( 1 );
12129
12130         status = pthread_detach( &t );
12131         if( status ) return errno;
12132 #endif
12133
12134 #ifdef HAVE_LINUX_THREADS
12135         pthread_kill_other_threads_np();
12136 #endif
12137
12138         return 0;
12139
12140 }
12141
12142 EOF
12143 if { (eval echo configure:12144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12144 then
12145   ol_cv_pthread_create=yes
12146 else
12147   echo "configure: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   rm -fr conftest*
12150   ol_cv_pthread_create=no
12151 fi
12152 rm -fr conftest*
12153 fi
12154
12155 fi
12156
12157 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12158
12159                 if test $ol_cv_pthread_create != no ; then
12160                         ol_link_threads=posix
12161                         ol_link_pthreads=""
12162                 fi
12163                 
12164                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12165 if test "$ol_link_threads" = no ; then
12166         # try -kthread
12167         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12168 echo "configure:12169: checking for pthread link with -kthread" >&5
12169 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12170   echo $ac_n "(cached) $ac_c" 1>&6
12171 else
12172   
12173                 # save the flags
12174                 ol_LIBS="$LIBS"
12175                 LIBS="-kthread $LIBS"
12176
12177                 if test "$cross_compiling" = yes; then
12178   cat > conftest.$ac_ext <<EOF
12179 #line 12180 "configure"
12180 #include "confdefs.h"
12181 /* pthread test headers */
12182 #include <pthread.h>
12183 #if HAVE_PTHREADS < 7
12184 #include <errno.h>
12185 #endif
12186 #ifndef NULL
12187 #define NULL (void*)0
12188 #endif
12189
12190 static void *task(p)
12191         void *p;
12192 {
12193         return (void *) (p == NULL);
12194 }
12195
12196 int main() {
12197
12198         /* pthread test function */
12199 #ifndef PTHREAD_CREATE_DETACHED
12200 #define PTHREAD_CREATE_DETACHED 1
12201 #endif
12202         pthread_t t;
12203         int status;
12204         int detach = PTHREAD_CREATE_DETACHED;
12205
12206 #if HAVE_PTHREADS > 4
12207         /* Final pthreads */
12208         pthread_attr_t attr;
12209
12210         status = pthread_attr_init(&attr);
12211         if( status ) return status;
12212
12213 #if HAVE_PTHREADS < 7
12214         status = pthread_attr_setdetachstate(&attr, &detach);
12215         if( status < 0 ) status = errno;
12216 #else
12217         status = pthread_attr_setdetachstate(&attr, detach);
12218 #endif
12219         if( status ) return status;
12220         status = pthread_create( &t, &attr, task, NULL );
12221 #if HAVE_PTHREADS < 7
12222         if( status < 0 ) status = errno;
12223 #endif
12224         if( status ) return status;
12225 #else
12226         /* Draft 4 pthreads */
12227         status = pthread_create( &t, pthread_attr_default, task, NULL );
12228         if( status ) return errno;
12229
12230         /* give thread a chance to complete */
12231         /* it should remain joinable and hence detachable */
12232         sleep( 1 );
12233
12234         status = pthread_detach( &t );
12235         if( status ) return errno;
12236 #endif
12237
12238 #ifdef HAVE_LINUX_THREADS
12239         pthread_kill_other_threads_np();
12240 #endif
12241
12242         return 0;
12243
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   ol_cv_pthread_kthread=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   ol_cv_pthread_kthread=no
12254 fi
12255 rm -f conftest*
12256 else
12257   cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 /* pthread test headers */
12261 #include <pthread.h>
12262 #if HAVE_PTHREADS < 7
12263 #include <errno.h>
12264 #endif
12265 #ifndef NULL
12266 #define NULL (void*)0
12267 #endif
12268
12269 static void *task(p)
12270         void *p;
12271 {
12272         return (void *) (p == NULL);
12273 }
12274
12275
12276 int main(argc, argv)
12277         int argc;
12278         char **argv;
12279 {
12280
12281         /* pthread test function */
12282 #ifndef PTHREAD_CREATE_DETACHED
12283 #define PTHREAD_CREATE_DETACHED 1
12284 #endif
12285         pthread_t t;
12286         int status;
12287         int detach = PTHREAD_CREATE_DETACHED;
12288
12289 #if HAVE_PTHREADS > 4
12290         /* Final pthreads */
12291         pthread_attr_t attr;
12292
12293         status = pthread_attr_init(&attr);
12294         if( status ) return status;
12295
12296 #if HAVE_PTHREADS < 7
12297         status = pthread_attr_setdetachstate(&attr, &detach);
12298         if( status < 0 ) status = errno;
12299 #else
12300         status = pthread_attr_setdetachstate(&attr, detach);
12301 #endif
12302         if( status ) return status;
12303         status = pthread_create( &t, &attr, task, NULL );
12304 #if HAVE_PTHREADS < 7
12305         if( status < 0 ) status = errno;
12306 #endif
12307         if( status ) return status;
12308 #else
12309         /* Draft 4 pthreads */
12310         status = pthread_create( &t, pthread_attr_default, task, NULL );
12311         if( status ) return errno;
12312
12313         /* give thread a chance to complete */
12314         /* it should remain joinable and hence detachable */
12315         sleep( 1 );
12316
12317         status = pthread_detach( &t );
12318         if( status ) return errno;
12319 #endif
12320
12321 #ifdef HAVE_LINUX_THREADS
12322         pthread_kill_other_threads_np();
12323 #endif
12324
12325         return 0;
12326
12327 }
12328
12329 EOF
12330 if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12331 then
12332   ol_cv_pthread_kthread=yes
12333 else
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -fr conftest*
12337   ol_cv_pthread_kthread=no
12338 fi
12339 rm -fr conftest*
12340 fi
12341
12342
12343                 # restore the LIBS
12344                 LIBS="$ol_LIBS"
12345         
12346 fi
12347
12348 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12349
12350         if test $ol_cv_pthread_kthread = yes ; then
12351                 ol_link_pthreads="-kthread"
12352                 ol_link_threads=posix
12353         fi
12354 fi
12355
12356                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12357 if test "$ol_link_threads" = no ; then
12358         # try -pthread
12359         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12360 echo "configure:12361: checking for pthread link with -pthread" >&5
12361 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12362   echo $ac_n "(cached) $ac_c" 1>&6
12363 else
12364   
12365                 # save the flags
12366                 ol_LIBS="$LIBS"
12367                 LIBS="-pthread $LIBS"
12368
12369                 if test "$cross_compiling" = yes; then
12370   cat > conftest.$ac_ext <<EOF
12371 #line 12372 "configure"
12372 #include "confdefs.h"
12373 /* pthread test headers */
12374 #include <pthread.h>
12375 #if HAVE_PTHREADS < 7
12376 #include <errno.h>
12377 #endif
12378 #ifndef NULL
12379 #define NULL (void*)0
12380 #endif
12381
12382 static void *task(p)
12383         void *p;
12384 {
12385         return (void *) (p == NULL);
12386 }
12387
12388 int main() {
12389
12390         /* pthread test function */
12391 #ifndef PTHREAD_CREATE_DETACHED
12392 #define PTHREAD_CREATE_DETACHED 1
12393 #endif
12394         pthread_t t;
12395         int status;
12396         int detach = PTHREAD_CREATE_DETACHED;
12397
12398 #if HAVE_PTHREADS > 4
12399         /* Final pthreads */
12400         pthread_attr_t attr;
12401
12402         status = pthread_attr_init(&attr);
12403         if( status ) return status;
12404
12405 #if HAVE_PTHREADS < 7
12406         status = pthread_attr_setdetachstate(&attr, &detach);
12407         if( status < 0 ) status = errno;
12408 #else
12409         status = pthread_attr_setdetachstate(&attr, detach);
12410 #endif
12411         if( status ) return status;
12412         status = pthread_create( &t, &attr, task, NULL );
12413 #if HAVE_PTHREADS < 7
12414         if( status < 0 ) status = errno;
12415 #endif
12416         if( status ) return status;
12417 #else
12418         /* Draft 4 pthreads */
12419         status = pthread_create( &t, pthread_attr_default, task, NULL );
12420         if( status ) return errno;
12421
12422         /* give thread a chance to complete */
12423         /* it should remain joinable and hence detachable */
12424         sleep( 1 );
12425
12426         status = pthread_detach( &t );
12427         if( status ) return errno;
12428 #endif
12429
12430 #ifdef HAVE_LINUX_THREADS
12431         pthread_kill_other_threads_np();
12432 #endif
12433
12434         return 0;
12435
12436 ; return 0; }
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12439   rm -rf conftest*
12440   ol_cv_pthread_pthread=yes
12441 else
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -rf conftest*
12445   ol_cv_pthread_pthread=no
12446 fi
12447 rm -f conftest*
12448 else
12449   cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452 /* pthread test headers */
12453 #include <pthread.h>
12454 #if HAVE_PTHREADS < 7
12455 #include <errno.h>
12456 #endif
12457 #ifndef NULL
12458 #define NULL (void*)0
12459 #endif
12460
12461 static void *task(p)
12462         void *p;
12463 {
12464         return (void *) (p == NULL);
12465 }
12466
12467
12468 int main(argc, argv)
12469         int argc;
12470         char **argv;
12471 {
12472
12473         /* pthread test function */
12474 #ifndef PTHREAD_CREATE_DETACHED
12475 #define PTHREAD_CREATE_DETACHED 1
12476 #endif
12477         pthread_t t;
12478         int status;
12479         int detach = PTHREAD_CREATE_DETACHED;
12480
12481 #if HAVE_PTHREADS > 4
12482         /* Final pthreads */
12483         pthread_attr_t attr;
12484
12485         status = pthread_attr_init(&attr);
12486         if( status ) return status;
12487
12488 #if HAVE_PTHREADS < 7
12489         status = pthread_attr_setdetachstate(&attr, &detach);
12490         if( status < 0 ) status = errno;
12491 #else
12492         status = pthread_attr_setdetachstate(&attr, detach);
12493 #endif
12494         if( status ) return status;
12495         status = pthread_create( &t, &attr, task, NULL );
12496 #if HAVE_PTHREADS < 7
12497         if( status < 0 ) status = errno;
12498 #endif
12499         if( status ) return status;
12500 #else
12501         /* Draft 4 pthreads */
12502         status = pthread_create( &t, pthread_attr_default, task, NULL );
12503         if( status ) return errno;
12504
12505         /* give thread a chance to complete */
12506         /* it should remain joinable and hence detachable */
12507         sleep( 1 );
12508
12509         status = pthread_detach( &t );
12510         if( status ) return errno;
12511 #endif
12512
12513 #ifdef HAVE_LINUX_THREADS
12514         pthread_kill_other_threads_np();
12515 #endif
12516
12517         return 0;
12518
12519 }
12520
12521 EOF
12522 if { (eval echo configure:12523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12523 then
12524   ol_cv_pthread_pthread=yes
12525 else
12526   echo "configure: failed program was:" >&5
12527   cat conftest.$ac_ext >&5
12528   rm -fr conftest*
12529   ol_cv_pthread_pthread=no
12530 fi
12531 rm -fr conftest*
12532 fi
12533
12534
12535                 # restore the LIBS
12536                 LIBS="$ol_LIBS"
12537         
12538 fi
12539
12540 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12541
12542         if test $ol_cv_pthread_pthread = yes ; then
12543                 ol_link_pthreads="-pthread"
12544                 ol_link_threads=posix
12545         fi
12546 fi
12547
12548                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12549 if test "$ol_link_threads" = no ; then
12550         # try -pthreads
12551         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12552 echo "configure:12553: checking for pthread link with -pthreads" >&5
12553 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12554   echo $ac_n "(cached) $ac_c" 1>&6
12555 else
12556   
12557                 # save the flags
12558                 ol_LIBS="$LIBS"
12559                 LIBS="-pthreads $LIBS"
12560
12561                 if test "$cross_compiling" = yes; then
12562   cat > conftest.$ac_ext <<EOF
12563 #line 12564 "configure"
12564 #include "confdefs.h"
12565 /* pthread test headers */
12566 #include <pthread.h>
12567 #if HAVE_PTHREADS < 7
12568 #include <errno.h>
12569 #endif
12570 #ifndef NULL
12571 #define NULL (void*)0
12572 #endif
12573
12574 static void *task(p)
12575         void *p;
12576 {
12577         return (void *) (p == NULL);
12578 }
12579
12580 int main() {
12581
12582         /* pthread test function */
12583 #ifndef PTHREAD_CREATE_DETACHED
12584 #define PTHREAD_CREATE_DETACHED 1
12585 #endif
12586         pthread_t t;
12587         int status;
12588         int detach = PTHREAD_CREATE_DETACHED;
12589
12590 #if HAVE_PTHREADS > 4
12591         /* Final pthreads */
12592         pthread_attr_t attr;
12593
12594         status = pthread_attr_init(&attr);
12595         if( status ) return status;
12596
12597 #if HAVE_PTHREADS < 7
12598         status = pthread_attr_setdetachstate(&attr, &detach);
12599         if( status < 0 ) status = errno;
12600 #else
12601         status = pthread_attr_setdetachstate(&attr, detach);
12602 #endif
12603         if( status ) return status;
12604         status = pthread_create( &t, &attr, task, NULL );
12605 #if HAVE_PTHREADS < 7
12606         if( status < 0 ) status = errno;
12607 #endif
12608         if( status ) return status;
12609 #else
12610         /* Draft 4 pthreads */
12611         status = pthread_create( &t, pthread_attr_default, task, NULL );
12612         if( status ) return errno;
12613
12614         /* give thread a chance to complete */
12615         /* it should remain joinable and hence detachable */
12616         sleep( 1 );
12617
12618         status = pthread_detach( &t );
12619         if( status ) return errno;
12620 #endif
12621
12622 #ifdef HAVE_LINUX_THREADS
12623         pthread_kill_other_threads_np();
12624 #endif
12625
12626         return 0;
12627
12628 ; return 0; }
12629 EOF
12630 if { (eval echo configure:12631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12631   rm -rf conftest*
12632   ol_cv_pthread_pthreads=yes
12633 else
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -rf conftest*
12637   ol_cv_pthread_pthreads=no
12638 fi
12639 rm -f conftest*
12640 else
12641   cat > conftest.$ac_ext <<EOF
12642 #line 12643 "configure"
12643 #include "confdefs.h"
12644 /* pthread test headers */
12645 #include <pthread.h>
12646 #if HAVE_PTHREADS < 7
12647 #include <errno.h>
12648 #endif
12649 #ifndef NULL
12650 #define NULL (void*)0
12651 #endif
12652
12653 static void *task(p)
12654         void *p;
12655 {
12656         return (void *) (p == NULL);
12657 }
12658
12659
12660 int main(argc, argv)
12661         int argc;
12662         char **argv;
12663 {
12664
12665         /* pthread test function */
12666 #ifndef PTHREAD_CREATE_DETACHED
12667 #define PTHREAD_CREATE_DETACHED 1
12668 #endif
12669         pthread_t t;
12670         int status;
12671         int detach = PTHREAD_CREATE_DETACHED;
12672
12673 #if HAVE_PTHREADS > 4
12674         /* Final pthreads */
12675         pthread_attr_t attr;
12676
12677         status = pthread_attr_init(&attr);
12678         if( status ) return status;
12679
12680 #if HAVE_PTHREADS < 7
12681         status = pthread_attr_setdetachstate(&attr, &detach);
12682         if( status < 0 ) status = errno;
12683 #else
12684         status = pthread_attr_setdetachstate(&attr, detach);
12685 #endif
12686         if( status ) return status;
12687         status = pthread_create( &t, &attr, task, NULL );
12688 #if HAVE_PTHREADS < 7
12689         if( status < 0 ) status = errno;
12690 #endif
12691         if( status ) return status;
12692 #else
12693         /* Draft 4 pthreads */
12694         status = pthread_create( &t, pthread_attr_default, task, NULL );
12695         if( status ) return errno;
12696
12697         /* give thread a chance to complete */
12698         /* it should remain joinable and hence detachable */
12699         sleep( 1 );
12700
12701         status = pthread_detach( &t );
12702         if( status ) return errno;
12703 #endif
12704
12705 #ifdef HAVE_LINUX_THREADS
12706         pthread_kill_other_threads_np();
12707 #endif
12708
12709         return 0;
12710
12711 }
12712
12713 EOF
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12715 then
12716   ol_cv_pthread_pthreads=yes
12717 else
12718   echo "configure: failed program was:" >&5
12719   cat conftest.$ac_ext >&5
12720   rm -fr conftest*
12721   ol_cv_pthread_pthreads=no
12722 fi
12723 rm -fr conftest*
12724 fi
12725
12726
12727                 # restore the LIBS
12728                 LIBS="$ol_LIBS"
12729         
12730 fi
12731
12732 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12733
12734         if test $ol_cv_pthread_pthreads = yes ; then
12735                 ol_link_pthreads="-pthreads"
12736                 ol_link_threads=posix
12737         fi
12738 fi
12739
12740                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12741 if test "$ol_link_threads" = no ; then
12742         # try -mthreads
12743         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12744 echo "configure:12745: checking for pthread link with -mthreads" >&5
12745 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12746   echo $ac_n "(cached) $ac_c" 1>&6
12747 else
12748   
12749                 # save the flags
12750                 ol_LIBS="$LIBS"
12751                 LIBS="-mthreads $LIBS"
12752
12753                 if test "$cross_compiling" = yes; then
12754   cat > conftest.$ac_ext <<EOF
12755 #line 12756 "configure"
12756 #include "confdefs.h"
12757 /* pthread test headers */
12758 #include <pthread.h>
12759 #if HAVE_PTHREADS < 7
12760 #include <errno.h>
12761 #endif
12762 #ifndef NULL
12763 #define NULL (void*)0
12764 #endif
12765
12766 static void *task(p)
12767         void *p;
12768 {
12769         return (void *) (p == NULL);
12770 }
12771
12772 int main() {
12773
12774         /* pthread test function */
12775 #ifndef PTHREAD_CREATE_DETACHED
12776 #define PTHREAD_CREATE_DETACHED 1
12777 #endif
12778         pthread_t t;
12779         int status;
12780         int detach = PTHREAD_CREATE_DETACHED;
12781
12782 #if HAVE_PTHREADS > 4
12783         /* Final pthreads */
12784         pthread_attr_t attr;
12785
12786         status = pthread_attr_init(&attr);
12787         if( status ) return status;
12788
12789 #if HAVE_PTHREADS < 7
12790         status = pthread_attr_setdetachstate(&attr, &detach);
12791         if( status < 0 ) status = errno;
12792 #else
12793         status = pthread_attr_setdetachstate(&attr, detach);
12794 #endif
12795         if( status ) return status;
12796         status = pthread_create( &t, &attr, task, NULL );
12797 #if HAVE_PTHREADS < 7
12798         if( status < 0 ) status = errno;
12799 #endif
12800         if( status ) return status;
12801 #else
12802         /* Draft 4 pthreads */
12803         status = pthread_create( &t, pthread_attr_default, task, NULL );
12804         if( status ) return errno;
12805
12806         /* give thread a chance to complete */
12807         /* it should remain joinable and hence detachable */
12808         sleep( 1 );
12809
12810         status = pthread_detach( &t );
12811         if( status ) return errno;
12812 #endif
12813
12814 #ifdef HAVE_LINUX_THREADS
12815         pthread_kill_other_threads_np();
12816 #endif
12817
12818         return 0;
12819
12820 ; return 0; }
12821 EOF
12822 if { (eval echo configure:12823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12823   rm -rf conftest*
12824   ol_cv_pthread_mthreads=yes
12825 else
12826   echo "configure: failed program was:" >&5
12827   cat conftest.$ac_ext >&5
12828   rm -rf conftest*
12829   ol_cv_pthread_mthreads=no
12830 fi
12831 rm -f conftest*
12832 else
12833   cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 /* pthread test headers */
12837 #include <pthread.h>
12838 #if HAVE_PTHREADS < 7
12839 #include <errno.h>
12840 #endif
12841 #ifndef NULL
12842 #define NULL (void*)0
12843 #endif
12844
12845 static void *task(p)
12846         void *p;
12847 {
12848         return (void *) (p == NULL);
12849 }
12850
12851
12852 int main(argc, argv)
12853         int argc;
12854         char **argv;
12855 {
12856
12857         /* pthread test function */
12858 #ifndef PTHREAD_CREATE_DETACHED
12859 #define PTHREAD_CREATE_DETACHED 1
12860 #endif
12861         pthread_t t;
12862         int status;
12863         int detach = PTHREAD_CREATE_DETACHED;
12864
12865 #if HAVE_PTHREADS > 4
12866         /* Final pthreads */
12867         pthread_attr_t attr;
12868
12869         status = pthread_attr_init(&attr);
12870         if( status ) return status;
12871
12872 #if HAVE_PTHREADS < 7
12873         status = pthread_attr_setdetachstate(&attr, &detach);
12874         if( status < 0 ) status = errno;
12875 #else
12876         status = pthread_attr_setdetachstate(&attr, detach);
12877 #endif
12878         if( status ) return status;
12879         status = pthread_create( &t, &attr, task, NULL );
12880 #if HAVE_PTHREADS < 7
12881         if( status < 0 ) status = errno;
12882 #endif
12883         if( status ) return status;
12884 #else
12885         /* Draft 4 pthreads */
12886         status = pthread_create( &t, pthread_attr_default, task, NULL );
12887         if( status ) return errno;
12888
12889         /* give thread a chance to complete */
12890         /* it should remain joinable and hence detachable */
12891         sleep( 1 );
12892
12893         status = pthread_detach( &t );
12894         if( status ) return errno;
12895 #endif
12896
12897 #ifdef HAVE_LINUX_THREADS
12898         pthread_kill_other_threads_np();
12899 #endif
12900
12901         return 0;
12902
12903 }
12904
12905 EOF
12906 if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12907 then
12908   ol_cv_pthread_mthreads=yes
12909 else
12910   echo "configure: failed program was:" >&5
12911   cat conftest.$ac_ext >&5
12912   rm -fr conftest*
12913   ol_cv_pthread_mthreads=no
12914 fi
12915 rm -fr conftest*
12916 fi
12917
12918
12919                 # restore the LIBS
12920                 LIBS="$ol_LIBS"
12921         
12922 fi
12923
12924 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12925
12926         if test $ol_cv_pthread_mthreads = yes ; then
12927                 ol_link_pthreads="-mthreads"
12928                 ol_link_threads=posix
12929         fi
12930 fi
12931
12932                 # Pthread try link: -thread (ol_cv_pthread_thread)
12933 if test "$ol_link_threads" = no ; then
12934         # try -thread
12935         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12936 echo "configure:12937: checking for pthread link with -thread" >&5
12937 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12938   echo $ac_n "(cached) $ac_c" 1>&6
12939 else
12940   
12941                 # save the flags
12942                 ol_LIBS="$LIBS"
12943                 LIBS="-thread $LIBS"
12944
12945                 if test "$cross_compiling" = yes; then
12946   cat > conftest.$ac_ext <<EOF
12947 #line 12948 "configure"
12948 #include "confdefs.h"
12949 /* pthread test headers */
12950 #include <pthread.h>
12951 #if HAVE_PTHREADS < 7
12952 #include <errno.h>
12953 #endif
12954 #ifndef NULL
12955 #define NULL (void*)0
12956 #endif
12957
12958 static void *task(p)
12959         void *p;
12960 {
12961         return (void *) (p == NULL);
12962 }
12963
12964 int main() {
12965
12966         /* pthread test function */
12967 #ifndef PTHREAD_CREATE_DETACHED
12968 #define PTHREAD_CREATE_DETACHED 1
12969 #endif
12970         pthread_t t;
12971         int status;
12972         int detach = PTHREAD_CREATE_DETACHED;
12973
12974 #if HAVE_PTHREADS > 4
12975         /* Final pthreads */
12976         pthread_attr_t attr;
12977
12978         status = pthread_attr_init(&attr);
12979         if( status ) return status;
12980
12981 #if HAVE_PTHREADS < 7
12982         status = pthread_attr_setdetachstate(&attr, &detach);
12983         if( status < 0 ) status = errno;
12984 #else
12985         status = pthread_attr_setdetachstate(&attr, detach);
12986 #endif
12987         if( status ) return status;
12988         status = pthread_create( &t, &attr, task, NULL );
12989 #if HAVE_PTHREADS < 7
12990         if( status < 0 ) status = errno;
12991 #endif
12992         if( status ) return status;
12993 #else
12994         /* Draft 4 pthreads */
12995         status = pthread_create( &t, pthread_attr_default, task, NULL );
12996         if( status ) return errno;
12997
12998         /* give thread a chance to complete */
12999         /* it should remain joinable and hence detachable */
13000         sleep( 1 );
13001
13002         status = pthread_detach( &t );
13003         if( status ) return errno;
13004 #endif
13005
13006 #ifdef HAVE_LINUX_THREADS
13007         pthread_kill_other_threads_np();
13008 #endif
13009
13010         return 0;
13011
13012 ; return 0; }
13013 EOF
13014 if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13015   rm -rf conftest*
13016   ol_cv_pthread_thread=yes
13017 else
13018   echo "configure: failed program was:" >&5
13019   cat conftest.$ac_ext >&5
13020   rm -rf conftest*
13021   ol_cv_pthread_thread=no
13022 fi
13023 rm -f conftest*
13024 else
13025   cat > conftest.$ac_ext <<EOF
13026 #line 13027 "configure"
13027 #include "confdefs.h"
13028 /* pthread test headers */
13029 #include <pthread.h>
13030 #if HAVE_PTHREADS < 7
13031 #include <errno.h>
13032 #endif
13033 #ifndef NULL
13034 #define NULL (void*)0
13035 #endif
13036
13037 static void *task(p)
13038         void *p;
13039 {
13040         return (void *) (p == NULL);
13041 }
13042
13043
13044 int main(argc, argv)
13045         int argc;
13046         char **argv;
13047 {
13048
13049         /* pthread test function */
13050 #ifndef PTHREAD_CREATE_DETACHED
13051 #define PTHREAD_CREATE_DETACHED 1
13052 #endif
13053         pthread_t t;
13054         int status;
13055         int detach = PTHREAD_CREATE_DETACHED;
13056
13057 #if HAVE_PTHREADS > 4
13058         /* Final pthreads */
13059         pthread_attr_t attr;
13060
13061         status = pthread_attr_init(&attr);
13062         if( status ) return status;
13063
13064 #if HAVE_PTHREADS < 7
13065         status = pthread_attr_setdetachstate(&attr, &detach);
13066         if( status < 0 ) status = errno;
13067 #else
13068         status = pthread_attr_setdetachstate(&attr, detach);
13069 #endif
13070         if( status ) return status;
13071         status = pthread_create( &t, &attr, task, NULL );
13072 #if HAVE_PTHREADS < 7
13073         if( status < 0 ) status = errno;
13074 #endif
13075         if( status ) return status;
13076 #else
13077         /* Draft 4 pthreads */
13078         status = pthread_create( &t, pthread_attr_default, task, NULL );
13079         if( status ) return errno;
13080
13081         /* give thread a chance to complete */
13082         /* it should remain joinable and hence detachable */
13083         sleep( 1 );
13084
13085         status = pthread_detach( &t );
13086         if( status ) return errno;
13087 #endif
13088
13089 #ifdef HAVE_LINUX_THREADS
13090         pthread_kill_other_threads_np();
13091 #endif
13092
13093         return 0;
13094
13095 }
13096
13097 EOF
13098 if { (eval echo configure:13099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13099 then
13100   ol_cv_pthread_thread=yes
13101 else
13102   echo "configure: failed program was:" >&5
13103   cat conftest.$ac_ext >&5
13104   rm -fr conftest*
13105   ol_cv_pthread_thread=no
13106 fi
13107 rm -fr conftest*
13108 fi
13109
13110
13111                 # restore the LIBS
13112                 LIBS="$ol_LIBS"
13113         
13114 fi
13115
13116 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13117
13118         if test $ol_cv_pthread_thread = yes ; then
13119                 ol_link_pthreads="-thread"
13120                 ol_link_threads=posix
13121         fi
13122 fi
13123
13124
13125                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13126 if test "$ol_link_threads" = no ; then
13127         # try -lpthread -lmach -lexc -lc_r
13128         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13129 echo "configure:13130: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13130 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13131   echo $ac_n "(cached) $ac_c" 1>&6
13132 else
13133   
13134                 # save the flags
13135                 ol_LIBS="$LIBS"
13136                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13137
13138                 if test "$cross_compiling" = yes; then
13139   cat > conftest.$ac_ext <<EOF
13140 #line 13141 "configure"
13141 #include "confdefs.h"
13142 /* pthread test headers */
13143 #include <pthread.h>
13144 #if HAVE_PTHREADS < 7
13145 #include <errno.h>
13146 #endif
13147 #ifndef NULL
13148 #define NULL (void*)0
13149 #endif
13150
13151 static void *task(p)
13152         void *p;
13153 {
13154         return (void *) (p == NULL);
13155 }
13156
13157 int main() {
13158
13159         /* pthread test function */
13160 #ifndef PTHREAD_CREATE_DETACHED
13161 #define PTHREAD_CREATE_DETACHED 1
13162 #endif
13163         pthread_t t;
13164         int status;
13165         int detach = PTHREAD_CREATE_DETACHED;
13166
13167 #if HAVE_PTHREADS > 4
13168         /* Final pthreads */
13169         pthread_attr_t attr;
13170
13171         status = pthread_attr_init(&attr);
13172         if( status ) return status;
13173
13174 #if HAVE_PTHREADS < 7
13175         status = pthread_attr_setdetachstate(&attr, &detach);
13176         if( status < 0 ) status = errno;
13177 #else
13178         status = pthread_attr_setdetachstate(&attr, detach);
13179 #endif
13180         if( status ) return status;
13181         status = pthread_create( &t, &attr, task, NULL );
13182 #if HAVE_PTHREADS < 7
13183         if( status < 0 ) status = errno;
13184 #endif
13185         if( status ) return status;
13186 #else
13187         /* Draft 4 pthreads */
13188         status = pthread_create( &t, pthread_attr_default, task, NULL );
13189         if( status ) return errno;
13190
13191         /* give thread a chance to complete */
13192         /* it should remain joinable and hence detachable */
13193         sleep( 1 );
13194
13195         status = pthread_detach( &t );
13196         if( status ) return errno;
13197 #endif
13198
13199 #ifdef HAVE_LINUX_THREADS
13200         pthread_kill_other_threads_np();
13201 #endif
13202
13203         return 0;
13204
13205 ; return 0; }
13206 EOF
13207 if { (eval echo configure:13208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13208   rm -rf conftest*
13209   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13210 else
13211   echo "configure: failed program was:" >&5
13212   cat conftest.$ac_ext >&5
13213   rm -rf conftest*
13214   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13215 fi
13216 rm -f conftest*
13217 else
13218   cat > conftest.$ac_ext <<EOF
13219 #line 13220 "configure"
13220 #include "confdefs.h"
13221 /* pthread test headers */
13222 #include <pthread.h>
13223 #if HAVE_PTHREADS < 7
13224 #include <errno.h>
13225 #endif
13226 #ifndef NULL
13227 #define NULL (void*)0
13228 #endif
13229
13230 static void *task(p)
13231         void *p;
13232 {
13233         return (void *) (p == NULL);
13234 }
13235
13236
13237 int main(argc, argv)
13238         int argc;
13239         char **argv;
13240 {
13241
13242         /* pthread test function */
13243 #ifndef PTHREAD_CREATE_DETACHED
13244 #define PTHREAD_CREATE_DETACHED 1
13245 #endif
13246         pthread_t t;
13247         int status;
13248         int detach = PTHREAD_CREATE_DETACHED;
13249
13250 #if HAVE_PTHREADS > 4
13251         /* Final pthreads */
13252         pthread_attr_t attr;
13253
13254         status = pthread_attr_init(&attr);
13255         if( status ) return status;
13256
13257 #if HAVE_PTHREADS < 7
13258         status = pthread_attr_setdetachstate(&attr, &detach);
13259         if( status < 0 ) status = errno;
13260 #else
13261         status = pthread_attr_setdetachstate(&attr, detach);
13262 #endif
13263         if( status ) return status;
13264         status = pthread_create( &t, &attr, task, NULL );
13265 #if HAVE_PTHREADS < 7
13266         if( status < 0 ) status = errno;
13267 #endif
13268         if( status ) return status;
13269 #else
13270         /* Draft 4 pthreads */
13271         status = pthread_create( &t, pthread_attr_default, task, NULL );
13272         if( status ) return errno;
13273
13274         /* give thread a chance to complete */
13275         /* it should remain joinable and hence detachable */
13276         sleep( 1 );
13277
13278         status = pthread_detach( &t );
13279         if( status ) return errno;
13280 #endif
13281
13282 #ifdef HAVE_LINUX_THREADS
13283         pthread_kill_other_threads_np();
13284 #endif
13285
13286         return 0;
13287
13288 }
13289
13290 EOF
13291 if { (eval echo configure:13292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13292 then
13293   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13294 else
13295   echo "configure: failed program was:" >&5
13296   cat conftest.$ac_ext >&5
13297   rm -fr conftest*
13298   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13299 fi
13300 rm -fr conftest*
13301 fi
13302
13303
13304                 # restore the LIBS
13305                 LIBS="$ol_LIBS"
13306         
13307 fi
13308
13309 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13310
13311         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13312                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13313                 ol_link_threads=posix
13314         fi
13315 fi
13316
13317                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13318 if test "$ol_link_threads" = no ; then
13319         # try -lpthread -lmach -lexc
13320         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13321 echo "configure:13322: checking for pthread link with -lpthread -lmach -lexc" >&5
13322 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13323   echo $ac_n "(cached) $ac_c" 1>&6
13324 else
13325   
13326                 # save the flags
13327                 ol_LIBS="$LIBS"
13328                 LIBS="-lpthread -lmach -lexc $LIBS"
13329
13330                 if test "$cross_compiling" = yes; then
13331   cat > conftest.$ac_ext <<EOF
13332 #line 13333 "configure"
13333 #include "confdefs.h"
13334 /* pthread test headers */
13335 #include <pthread.h>
13336 #if HAVE_PTHREADS < 7
13337 #include <errno.h>
13338 #endif
13339 #ifndef NULL
13340 #define NULL (void*)0
13341 #endif
13342
13343 static void *task(p)
13344         void *p;
13345 {
13346         return (void *) (p == NULL);
13347 }
13348
13349 int main() {
13350
13351         /* pthread test function */
13352 #ifndef PTHREAD_CREATE_DETACHED
13353 #define PTHREAD_CREATE_DETACHED 1
13354 #endif
13355         pthread_t t;
13356         int status;
13357         int detach = PTHREAD_CREATE_DETACHED;
13358
13359 #if HAVE_PTHREADS > 4
13360         /* Final pthreads */
13361         pthread_attr_t attr;
13362
13363         status = pthread_attr_init(&attr);
13364         if( status ) return status;
13365
13366 #if HAVE_PTHREADS < 7
13367         status = pthread_attr_setdetachstate(&attr, &detach);
13368         if( status < 0 ) status = errno;
13369 #else
13370         status = pthread_attr_setdetachstate(&attr, detach);
13371 #endif
13372         if( status ) return status;
13373         status = pthread_create( &t, &attr, task, NULL );
13374 #if HAVE_PTHREADS < 7
13375         if( status < 0 ) status = errno;
13376 #endif
13377         if( status ) return status;
13378 #else
13379         /* Draft 4 pthreads */
13380         status = pthread_create( &t, pthread_attr_default, task, NULL );
13381         if( status ) return errno;
13382
13383         /* give thread a chance to complete */
13384         /* it should remain joinable and hence detachable */
13385         sleep( 1 );
13386
13387         status = pthread_detach( &t );
13388         if( status ) return errno;
13389 #endif
13390
13391 #ifdef HAVE_LINUX_THREADS
13392         pthread_kill_other_threads_np();
13393 #endif
13394
13395         return 0;
13396
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13400   rm -rf conftest*
13401   ol_cv_pthread_lpthread_lmach_lexc=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -rf conftest*
13406   ol_cv_pthread_lpthread_lmach_lexc=no
13407 fi
13408 rm -f conftest*
13409 else
13410   cat > conftest.$ac_ext <<EOF
13411 #line 13412 "configure"
13412 #include "confdefs.h"
13413 /* pthread test headers */
13414 #include <pthread.h>
13415 #if HAVE_PTHREADS < 7
13416 #include <errno.h>
13417 #endif
13418 #ifndef NULL
13419 #define NULL (void*)0
13420 #endif
13421
13422 static void *task(p)
13423         void *p;
13424 {
13425         return (void *) (p == NULL);
13426 }
13427
13428
13429 int main(argc, argv)
13430         int argc;
13431         char **argv;
13432 {
13433
13434         /* pthread test function */
13435 #ifndef PTHREAD_CREATE_DETACHED
13436 #define PTHREAD_CREATE_DETACHED 1
13437 #endif
13438         pthread_t t;
13439         int status;
13440         int detach = PTHREAD_CREATE_DETACHED;
13441
13442 #if HAVE_PTHREADS > 4
13443         /* Final pthreads */
13444         pthread_attr_t attr;
13445
13446         status = pthread_attr_init(&attr);
13447         if( status ) return status;
13448
13449 #if HAVE_PTHREADS < 7
13450         status = pthread_attr_setdetachstate(&attr, &detach);
13451         if( status < 0 ) status = errno;
13452 #else
13453         status = pthread_attr_setdetachstate(&attr, detach);
13454 #endif
13455         if( status ) return status;
13456         status = pthread_create( &t, &attr, task, NULL );
13457 #if HAVE_PTHREADS < 7
13458         if( status < 0 ) status = errno;
13459 #endif
13460         if( status ) return status;
13461 #else
13462         /* Draft 4 pthreads */
13463         status = pthread_create( &t, pthread_attr_default, task, NULL );
13464         if( status ) return errno;
13465
13466         /* give thread a chance to complete */
13467         /* it should remain joinable and hence detachable */
13468         sleep( 1 );
13469
13470         status = pthread_detach( &t );
13471         if( status ) return errno;
13472 #endif
13473
13474 #ifdef HAVE_LINUX_THREADS
13475         pthread_kill_other_threads_np();
13476 #endif
13477
13478         return 0;
13479
13480 }
13481
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13484 then
13485   ol_cv_pthread_lpthread_lmach_lexc=yes
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -fr conftest*
13490   ol_cv_pthread_lpthread_lmach_lexc=no
13491 fi
13492 rm -fr conftest*
13493 fi
13494
13495
13496                 # restore the LIBS
13497                 LIBS="$ol_LIBS"
13498         
13499 fi
13500
13501 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13502
13503         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13504                 ol_link_pthreads="-lpthread -lmach -lexc"
13505                 ol_link_threads=posix
13506         fi
13507 fi
13508
13509
13510                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13511 if test "$ol_link_threads" = no ; then
13512         # try -lpthread -Wl,-woff,85
13513         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13514 echo "configure:13515: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13515 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13516   echo $ac_n "(cached) $ac_c" 1>&6
13517 else
13518   
13519                 # save the flags
13520                 ol_LIBS="$LIBS"
13521                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13522
13523                 if test "$cross_compiling" = yes; then
13524   cat > conftest.$ac_ext <<EOF
13525 #line 13526 "configure"
13526 #include "confdefs.h"
13527 /* pthread test headers */
13528 #include <pthread.h>
13529 #if HAVE_PTHREADS < 7
13530 #include <errno.h>
13531 #endif
13532 #ifndef NULL
13533 #define NULL (void*)0
13534 #endif
13535
13536 static void *task(p)
13537         void *p;
13538 {
13539         return (void *) (p == NULL);
13540 }
13541
13542 int main() {
13543
13544         /* pthread test function */
13545 #ifndef PTHREAD_CREATE_DETACHED
13546 #define PTHREAD_CREATE_DETACHED 1
13547 #endif
13548         pthread_t t;
13549         int status;
13550         int detach = PTHREAD_CREATE_DETACHED;
13551
13552 #if HAVE_PTHREADS > 4
13553         /* Final pthreads */
13554         pthread_attr_t attr;
13555
13556         status = pthread_attr_init(&attr);
13557         if( status ) return status;
13558
13559 #if HAVE_PTHREADS < 7
13560         status = pthread_attr_setdetachstate(&attr, &detach);
13561         if( status < 0 ) status = errno;
13562 #else
13563         status = pthread_attr_setdetachstate(&attr, detach);
13564 #endif
13565         if( status ) return status;
13566         status = pthread_create( &t, &attr, task, NULL );
13567 #if HAVE_PTHREADS < 7
13568         if( status < 0 ) status = errno;
13569 #endif
13570         if( status ) return status;
13571 #else
13572         /* Draft 4 pthreads */
13573         status = pthread_create( &t, pthread_attr_default, task, NULL );
13574         if( status ) return errno;
13575
13576         /* give thread a chance to complete */
13577         /* it should remain joinable and hence detachable */
13578         sleep( 1 );
13579
13580         status = pthread_detach( &t );
13581         if( status ) return errno;
13582 #endif
13583
13584 #ifdef HAVE_LINUX_THREADS
13585         pthread_kill_other_threads_np();
13586 #endif
13587
13588         return 0;
13589
13590 ; return 0; }
13591 EOF
13592 if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13593   rm -rf conftest*
13594   ol_cv_pthread_lib_lpthread_woff=yes
13595 else
13596   echo "configure: failed program was:" >&5
13597   cat conftest.$ac_ext >&5
13598   rm -rf conftest*
13599   ol_cv_pthread_lib_lpthread_woff=no
13600 fi
13601 rm -f conftest*
13602 else
13603   cat > conftest.$ac_ext <<EOF
13604 #line 13605 "configure"
13605 #include "confdefs.h"
13606 /* pthread test headers */
13607 #include <pthread.h>
13608 #if HAVE_PTHREADS < 7
13609 #include <errno.h>
13610 #endif
13611 #ifndef NULL
13612 #define NULL (void*)0
13613 #endif
13614
13615 static void *task(p)
13616         void *p;
13617 {
13618         return (void *) (p == NULL);
13619 }
13620
13621
13622 int main(argc, argv)
13623         int argc;
13624         char **argv;
13625 {
13626
13627         /* pthread test function */
13628 #ifndef PTHREAD_CREATE_DETACHED
13629 #define PTHREAD_CREATE_DETACHED 1
13630 #endif
13631         pthread_t t;
13632         int status;
13633         int detach = PTHREAD_CREATE_DETACHED;
13634
13635 #if HAVE_PTHREADS > 4
13636         /* Final pthreads */
13637         pthread_attr_t attr;
13638
13639         status = pthread_attr_init(&attr);
13640         if( status ) return status;
13641
13642 #if HAVE_PTHREADS < 7
13643         status = pthread_attr_setdetachstate(&attr, &detach);
13644         if( status < 0 ) status = errno;
13645 #else
13646         status = pthread_attr_setdetachstate(&attr, detach);
13647 #endif
13648         if( status ) return status;
13649         status = pthread_create( &t, &attr, task, NULL );
13650 #if HAVE_PTHREADS < 7
13651         if( status < 0 ) status = errno;
13652 #endif
13653         if( status ) return status;
13654 #else
13655         /* Draft 4 pthreads */
13656         status = pthread_create( &t, pthread_attr_default, task, NULL );
13657         if( status ) return errno;
13658
13659         /* give thread a chance to complete */
13660         /* it should remain joinable and hence detachable */
13661         sleep( 1 );
13662
13663         status = pthread_detach( &t );
13664         if( status ) return errno;
13665 #endif
13666
13667 #ifdef HAVE_LINUX_THREADS
13668         pthread_kill_other_threads_np();
13669 #endif
13670
13671         return 0;
13672
13673 }
13674
13675 EOF
13676 if { (eval echo configure:13677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13677 then
13678   ol_cv_pthread_lib_lpthread_woff=yes
13679 else
13680   echo "configure: failed program was:" >&5
13681   cat conftest.$ac_ext >&5
13682   rm -fr conftest*
13683   ol_cv_pthread_lib_lpthread_woff=no
13684 fi
13685 rm -fr conftest*
13686 fi
13687
13688
13689                 # restore the LIBS
13690                 LIBS="$ol_LIBS"
13691         
13692 fi
13693
13694 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13695
13696         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13697                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13698                 ol_link_threads=posix
13699         fi
13700 fi
13701
13702
13703                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13704 if test "$ol_link_threads" = no ; then
13705         # try -lpthread
13706         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13707 echo "configure:13708: checking for pthread link with -lpthread" >&5
13708 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13709   echo $ac_n "(cached) $ac_c" 1>&6
13710 else
13711   
13712                 # save the flags
13713                 ol_LIBS="$LIBS"
13714                 LIBS="-lpthread $LIBS"
13715
13716                 if test "$cross_compiling" = yes; then
13717   cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* pthread test headers */
13721 #include <pthread.h>
13722 #if HAVE_PTHREADS < 7
13723 #include <errno.h>
13724 #endif
13725 #ifndef NULL
13726 #define NULL (void*)0
13727 #endif
13728
13729 static void *task(p)
13730         void *p;
13731 {
13732         return (void *) (p == NULL);
13733 }
13734
13735 int main() {
13736
13737         /* pthread test function */
13738 #ifndef PTHREAD_CREATE_DETACHED
13739 #define PTHREAD_CREATE_DETACHED 1
13740 #endif
13741         pthread_t t;
13742         int status;
13743         int detach = PTHREAD_CREATE_DETACHED;
13744
13745 #if HAVE_PTHREADS > 4
13746         /* Final pthreads */
13747         pthread_attr_t attr;
13748
13749         status = pthread_attr_init(&attr);
13750         if( status ) return status;
13751
13752 #if HAVE_PTHREADS < 7
13753         status = pthread_attr_setdetachstate(&attr, &detach);
13754         if( status < 0 ) status = errno;
13755 #else
13756         status = pthread_attr_setdetachstate(&attr, detach);
13757 #endif
13758         if( status ) return status;
13759         status = pthread_create( &t, &attr, task, NULL );
13760 #if HAVE_PTHREADS < 7
13761         if( status < 0 ) status = errno;
13762 #endif
13763         if( status ) return status;
13764 #else
13765         /* Draft 4 pthreads */
13766         status = pthread_create( &t, pthread_attr_default, task, NULL );
13767         if( status ) return errno;
13768
13769         /* give thread a chance to complete */
13770         /* it should remain joinable and hence detachable */
13771         sleep( 1 );
13772
13773         status = pthread_detach( &t );
13774         if( status ) return errno;
13775 #endif
13776
13777 #ifdef HAVE_LINUX_THREADS
13778         pthread_kill_other_threads_np();
13779 #endif
13780
13781         return 0;
13782
13783 ; return 0; }
13784 EOF
13785 if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13786   rm -rf conftest*
13787   ol_cv_pthread_lpthread=yes
13788 else
13789   echo "configure: failed program was:" >&5
13790   cat conftest.$ac_ext >&5
13791   rm -rf conftest*
13792   ol_cv_pthread_lpthread=no
13793 fi
13794 rm -f conftest*
13795 else
13796   cat > conftest.$ac_ext <<EOF
13797 #line 13798 "configure"
13798 #include "confdefs.h"
13799 /* pthread test headers */
13800 #include <pthread.h>
13801 #if HAVE_PTHREADS < 7
13802 #include <errno.h>
13803 #endif
13804 #ifndef NULL
13805 #define NULL (void*)0
13806 #endif
13807
13808 static void *task(p)
13809         void *p;
13810 {
13811         return (void *) (p == NULL);
13812 }
13813
13814
13815 int main(argc, argv)
13816         int argc;
13817         char **argv;
13818 {
13819
13820         /* pthread test function */
13821 #ifndef PTHREAD_CREATE_DETACHED
13822 #define PTHREAD_CREATE_DETACHED 1
13823 #endif
13824         pthread_t t;
13825         int status;
13826         int detach = PTHREAD_CREATE_DETACHED;
13827
13828 #if HAVE_PTHREADS > 4
13829         /* Final pthreads */
13830         pthread_attr_t attr;
13831
13832         status = pthread_attr_init(&attr);
13833         if( status ) return status;
13834
13835 #if HAVE_PTHREADS < 7
13836         status = pthread_attr_setdetachstate(&attr, &detach);
13837         if( status < 0 ) status = errno;
13838 #else
13839         status = pthread_attr_setdetachstate(&attr, detach);
13840 #endif
13841         if( status ) return status;
13842         status = pthread_create( &t, &attr, task, NULL );
13843 #if HAVE_PTHREADS < 7
13844         if( status < 0 ) status = errno;
13845 #endif
13846         if( status ) return status;
13847 #else
13848         /* Draft 4 pthreads */
13849         status = pthread_create( &t, pthread_attr_default, task, NULL );
13850         if( status ) return errno;
13851
13852         /* give thread a chance to complete */
13853         /* it should remain joinable and hence detachable */
13854         sleep( 1 );
13855
13856         status = pthread_detach( &t );
13857         if( status ) return errno;
13858 #endif
13859
13860 #ifdef HAVE_LINUX_THREADS
13861         pthread_kill_other_threads_np();
13862 #endif
13863
13864         return 0;
13865
13866 }
13867
13868 EOF
13869 if { (eval echo configure:13870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13870 then
13871   ol_cv_pthread_lpthread=yes
13872 else
13873   echo "configure: failed program was:" >&5
13874   cat conftest.$ac_ext >&5
13875   rm -fr conftest*
13876   ol_cv_pthread_lpthread=no
13877 fi
13878 rm -fr conftest*
13879 fi
13880
13881
13882                 # restore the LIBS
13883                 LIBS="$ol_LIBS"
13884         
13885 fi
13886
13887 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13888
13889         if test $ol_cv_pthread_lpthread = yes ; then
13890                 ol_link_pthreads="-lpthread"
13891                 ol_link_threads=posix
13892         fi
13893 fi
13894
13895                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13896 if test "$ol_link_threads" = no ; then
13897         # try -lc_r
13898         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13899 echo "configure:13900: checking for pthread link with -lc_r" >&5
13900 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13901   echo $ac_n "(cached) $ac_c" 1>&6
13902 else
13903   
13904                 # save the flags
13905                 ol_LIBS="$LIBS"
13906                 LIBS="-lc_r $LIBS"
13907
13908                 if test "$cross_compiling" = yes; then
13909   cat > conftest.$ac_ext <<EOF
13910 #line 13911 "configure"
13911 #include "confdefs.h"
13912 /* pthread test headers */
13913 #include <pthread.h>
13914 #if HAVE_PTHREADS < 7
13915 #include <errno.h>
13916 #endif
13917 #ifndef NULL
13918 #define NULL (void*)0
13919 #endif
13920
13921 static void *task(p)
13922         void *p;
13923 {
13924         return (void *) (p == NULL);
13925 }
13926
13927 int main() {
13928
13929         /* pthread test function */
13930 #ifndef PTHREAD_CREATE_DETACHED
13931 #define PTHREAD_CREATE_DETACHED 1
13932 #endif
13933         pthread_t t;
13934         int status;
13935         int detach = PTHREAD_CREATE_DETACHED;
13936
13937 #if HAVE_PTHREADS > 4
13938         /* Final pthreads */
13939         pthread_attr_t attr;
13940
13941         status = pthread_attr_init(&attr);
13942         if( status ) return status;
13943
13944 #if HAVE_PTHREADS < 7
13945         status = pthread_attr_setdetachstate(&attr, &detach);
13946         if( status < 0 ) status = errno;
13947 #else
13948         status = pthread_attr_setdetachstate(&attr, detach);
13949 #endif
13950         if( status ) return status;
13951         status = pthread_create( &t, &attr, task, NULL );
13952 #if HAVE_PTHREADS < 7
13953         if( status < 0 ) status = errno;
13954 #endif
13955         if( status ) return status;
13956 #else
13957         /* Draft 4 pthreads */
13958         status = pthread_create( &t, pthread_attr_default, task, NULL );
13959         if( status ) return errno;
13960
13961         /* give thread a chance to complete */
13962         /* it should remain joinable and hence detachable */
13963         sleep( 1 );
13964
13965         status = pthread_detach( &t );
13966         if( status ) return errno;
13967 #endif
13968
13969 #ifdef HAVE_LINUX_THREADS
13970         pthread_kill_other_threads_np();
13971 #endif
13972
13973         return 0;
13974
13975 ; return 0; }
13976 EOF
13977 if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13978   rm -rf conftest*
13979   ol_cv_pthread_lc_r=yes
13980 else
13981   echo "configure: failed program was:" >&5
13982   cat conftest.$ac_ext >&5
13983   rm -rf conftest*
13984   ol_cv_pthread_lc_r=no
13985 fi
13986 rm -f conftest*
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991 /* pthread test headers */
13992 #include <pthread.h>
13993 #if HAVE_PTHREADS < 7
13994 #include <errno.h>
13995 #endif
13996 #ifndef NULL
13997 #define NULL (void*)0
13998 #endif
13999
14000 static void *task(p)
14001         void *p;
14002 {
14003         return (void *) (p == NULL);
14004 }
14005
14006
14007 int main(argc, argv)
14008         int argc;
14009         char **argv;
14010 {
14011
14012         /* pthread test function */
14013 #ifndef PTHREAD_CREATE_DETACHED
14014 #define PTHREAD_CREATE_DETACHED 1
14015 #endif
14016         pthread_t t;
14017         int status;
14018         int detach = PTHREAD_CREATE_DETACHED;
14019
14020 #if HAVE_PTHREADS > 4
14021         /* Final pthreads */
14022         pthread_attr_t attr;
14023
14024         status = pthread_attr_init(&attr);
14025         if( status ) return status;
14026
14027 #if HAVE_PTHREADS < 7
14028         status = pthread_attr_setdetachstate(&attr, &detach);
14029         if( status < 0 ) status = errno;
14030 #else
14031         status = pthread_attr_setdetachstate(&attr, detach);
14032 #endif
14033         if( status ) return status;
14034         status = pthread_create( &t, &attr, task, NULL );
14035 #if HAVE_PTHREADS < 7
14036         if( status < 0 ) status = errno;
14037 #endif
14038         if( status ) return status;
14039 #else
14040         /* Draft 4 pthreads */
14041         status = pthread_create( &t, pthread_attr_default, task, NULL );
14042         if( status ) return errno;
14043
14044         /* give thread a chance to complete */
14045         /* it should remain joinable and hence detachable */
14046         sleep( 1 );
14047
14048         status = pthread_detach( &t );
14049         if( status ) return errno;
14050 #endif
14051
14052 #ifdef HAVE_LINUX_THREADS
14053         pthread_kill_other_threads_np();
14054 #endif
14055
14056         return 0;
14057
14058 }
14059
14060 EOF
14061 if { (eval echo configure:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14062 then
14063   ol_cv_pthread_lc_r=yes
14064 else
14065   echo "configure: failed program was:" >&5
14066   cat conftest.$ac_ext >&5
14067   rm -fr conftest*
14068   ol_cv_pthread_lc_r=no
14069 fi
14070 rm -fr conftest*
14071 fi
14072
14073
14074                 # restore the LIBS
14075                 LIBS="$ol_LIBS"
14076         
14077 fi
14078
14079 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14080
14081         if test $ol_cv_pthread_lc_r = yes ; then
14082                 ol_link_pthreads="-lc_r"
14083                 ol_link_threads=posix
14084         fi
14085 fi
14086
14087
14088                 # Pthread try link: -threads (ol_cv_pthread_threads)
14089 if test "$ol_link_threads" = no ; then
14090         # try -threads
14091         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14092 echo "configure:14093: checking for pthread link with -threads" >&5
14093 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14094   echo $ac_n "(cached) $ac_c" 1>&6
14095 else
14096   
14097                 # save the flags
14098                 ol_LIBS="$LIBS"
14099                 LIBS="-threads $LIBS"
14100
14101                 if test "$cross_compiling" = yes; then
14102   cat > conftest.$ac_ext <<EOF
14103 #line 14104 "configure"
14104 #include "confdefs.h"
14105 /* pthread test headers */
14106 #include <pthread.h>
14107 #if HAVE_PTHREADS < 7
14108 #include <errno.h>
14109 #endif
14110 #ifndef NULL
14111 #define NULL (void*)0
14112 #endif
14113
14114 static void *task(p)
14115         void *p;
14116 {
14117         return (void *) (p == NULL);
14118 }
14119
14120 int main() {
14121
14122         /* pthread test function */
14123 #ifndef PTHREAD_CREATE_DETACHED
14124 #define PTHREAD_CREATE_DETACHED 1
14125 #endif
14126         pthread_t t;
14127         int status;
14128         int detach = PTHREAD_CREATE_DETACHED;
14129
14130 #if HAVE_PTHREADS > 4
14131         /* Final pthreads */
14132         pthread_attr_t attr;
14133
14134         status = pthread_attr_init(&attr);
14135         if( status ) return status;
14136
14137 #if HAVE_PTHREADS < 7
14138         status = pthread_attr_setdetachstate(&attr, &detach);
14139         if( status < 0 ) status = errno;
14140 #else
14141         status = pthread_attr_setdetachstate(&attr, detach);
14142 #endif
14143         if( status ) return status;
14144         status = pthread_create( &t, &attr, task, NULL );
14145 #if HAVE_PTHREADS < 7
14146         if( status < 0 ) status = errno;
14147 #endif
14148         if( status ) return status;
14149 #else
14150         /* Draft 4 pthreads */
14151         status = pthread_create( &t, pthread_attr_default, task, NULL );
14152         if( status ) return errno;
14153
14154         /* give thread a chance to complete */
14155         /* it should remain joinable and hence detachable */
14156         sleep( 1 );
14157
14158         status = pthread_detach( &t );
14159         if( status ) return errno;
14160 #endif
14161
14162 #ifdef HAVE_LINUX_THREADS
14163         pthread_kill_other_threads_np();
14164 #endif
14165
14166         return 0;
14167
14168 ; return 0; }
14169 EOF
14170 if { (eval echo configure:14171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14171   rm -rf conftest*
14172   ol_cv_pthread_threads=yes
14173 else
14174   echo "configure: failed program was:" >&5
14175   cat conftest.$ac_ext >&5
14176   rm -rf conftest*
14177   ol_cv_pthread_threads=no
14178 fi
14179 rm -f conftest*
14180 else
14181   cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14184 /* pthread test headers */
14185 #include <pthread.h>
14186 #if HAVE_PTHREADS < 7
14187 #include <errno.h>
14188 #endif
14189 #ifndef NULL
14190 #define NULL (void*)0
14191 #endif
14192
14193 static void *task(p)
14194         void *p;
14195 {
14196         return (void *) (p == NULL);
14197 }
14198
14199
14200 int main(argc, argv)
14201         int argc;
14202         char **argv;
14203 {
14204
14205         /* pthread test function */
14206 #ifndef PTHREAD_CREATE_DETACHED
14207 #define PTHREAD_CREATE_DETACHED 1
14208 #endif
14209         pthread_t t;
14210         int status;
14211         int detach = PTHREAD_CREATE_DETACHED;
14212
14213 #if HAVE_PTHREADS > 4
14214         /* Final pthreads */
14215         pthread_attr_t attr;
14216
14217         status = pthread_attr_init(&attr);
14218         if( status ) return status;
14219
14220 #if HAVE_PTHREADS < 7
14221         status = pthread_attr_setdetachstate(&attr, &detach);
14222         if( status < 0 ) status = errno;
14223 #else
14224         status = pthread_attr_setdetachstate(&attr, detach);
14225 #endif
14226         if( status ) return status;
14227         status = pthread_create( &t, &attr, task, NULL );
14228 #if HAVE_PTHREADS < 7
14229         if( status < 0 ) status = errno;
14230 #endif
14231         if( status ) return status;
14232 #else
14233         /* Draft 4 pthreads */
14234         status = pthread_create( &t, pthread_attr_default, task, NULL );
14235         if( status ) return errno;
14236
14237         /* give thread a chance to complete */
14238         /* it should remain joinable and hence detachable */
14239         sleep( 1 );
14240
14241         status = pthread_detach( &t );
14242         if( status ) return errno;
14243 #endif
14244
14245 #ifdef HAVE_LINUX_THREADS
14246         pthread_kill_other_threads_np();
14247 #endif
14248
14249         return 0;
14250
14251 }
14252
14253 EOF
14254 if { (eval echo configure:14255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14255 then
14256   ol_cv_pthread_threads=yes
14257 else
14258   echo "configure: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   rm -fr conftest*
14261   ol_cv_pthread_threads=no
14262 fi
14263 rm -fr conftest*
14264 fi
14265
14266
14267                 # restore the LIBS
14268                 LIBS="$ol_LIBS"
14269         
14270 fi
14271
14272 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14273
14274         if test $ol_cv_pthread_threads = yes ; then
14275                 ol_link_pthreads="-threads"
14276                 ol_link_threads=posix
14277         fi
14278 fi
14279
14280
14281                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14282 if test "$ol_link_threads" = no ; then
14283         # try -lpthreads -lmach -lexc -lc_r
14284         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14285 echo "configure:14286: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14286 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14287   echo $ac_n "(cached) $ac_c" 1>&6
14288 else
14289   
14290                 # save the flags
14291                 ol_LIBS="$LIBS"
14292                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14293
14294                 if test "$cross_compiling" = yes; then
14295   cat > conftest.$ac_ext <<EOF
14296 #line 14297 "configure"
14297 #include "confdefs.h"
14298 /* pthread test headers */
14299 #include <pthread.h>
14300 #if HAVE_PTHREADS < 7
14301 #include <errno.h>
14302 #endif
14303 #ifndef NULL
14304 #define NULL (void*)0
14305 #endif
14306
14307 static void *task(p)
14308         void *p;
14309 {
14310         return (void *) (p == NULL);
14311 }
14312
14313 int main() {
14314
14315         /* pthread test function */
14316 #ifndef PTHREAD_CREATE_DETACHED
14317 #define PTHREAD_CREATE_DETACHED 1
14318 #endif
14319         pthread_t t;
14320         int status;
14321         int detach = PTHREAD_CREATE_DETACHED;
14322
14323 #if HAVE_PTHREADS > 4
14324         /* Final pthreads */
14325         pthread_attr_t attr;
14326
14327         status = pthread_attr_init(&attr);
14328         if( status ) return status;
14329
14330 #if HAVE_PTHREADS < 7
14331         status = pthread_attr_setdetachstate(&attr, &detach);
14332         if( status < 0 ) status = errno;
14333 #else
14334         status = pthread_attr_setdetachstate(&attr, detach);
14335 #endif
14336         if( status ) return status;
14337         status = pthread_create( &t, &attr, task, NULL );
14338 #if HAVE_PTHREADS < 7
14339         if( status < 0 ) status = errno;
14340 #endif
14341         if( status ) return status;
14342 #else
14343         /* Draft 4 pthreads */
14344         status = pthread_create( &t, pthread_attr_default, task, NULL );
14345         if( status ) return errno;
14346
14347         /* give thread a chance to complete */
14348         /* it should remain joinable and hence detachable */
14349         sleep( 1 );
14350
14351         status = pthread_detach( &t );
14352         if( status ) return errno;
14353 #endif
14354
14355 #ifdef HAVE_LINUX_THREADS
14356         pthread_kill_other_threads_np();
14357 #endif
14358
14359         return 0;
14360
14361 ; return 0; }
14362 EOF
14363 if { (eval echo configure:14364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14364   rm -rf conftest*
14365   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14366 else
14367   echo "configure: failed program was:" >&5
14368   cat conftest.$ac_ext >&5
14369   rm -rf conftest*
14370   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14371 fi
14372 rm -f conftest*
14373 else
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377 /* pthread test headers */
14378 #include <pthread.h>
14379 #if HAVE_PTHREADS < 7
14380 #include <errno.h>
14381 #endif
14382 #ifndef NULL
14383 #define NULL (void*)0
14384 #endif
14385
14386 static void *task(p)
14387         void *p;
14388 {
14389         return (void *) (p == NULL);
14390 }
14391
14392
14393 int main(argc, argv)
14394         int argc;
14395         char **argv;
14396 {
14397
14398         /* pthread test function */
14399 #ifndef PTHREAD_CREATE_DETACHED
14400 #define PTHREAD_CREATE_DETACHED 1
14401 #endif
14402         pthread_t t;
14403         int status;
14404         int detach = PTHREAD_CREATE_DETACHED;
14405
14406 #if HAVE_PTHREADS > 4
14407         /* Final pthreads */
14408         pthread_attr_t attr;
14409
14410         status = pthread_attr_init(&attr);
14411         if( status ) return status;
14412
14413 #if HAVE_PTHREADS < 7
14414         status = pthread_attr_setdetachstate(&attr, &detach);
14415         if( status < 0 ) status = errno;
14416 #else
14417         status = pthread_attr_setdetachstate(&attr, detach);
14418 #endif
14419         if( status ) return status;
14420         status = pthread_create( &t, &attr, task, NULL );
14421 #if HAVE_PTHREADS < 7
14422         if( status < 0 ) status = errno;
14423 #endif
14424         if( status ) return status;
14425 #else
14426         /* Draft 4 pthreads */
14427         status = pthread_create( &t, pthread_attr_default, task, NULL );
14428         if( status ) return errno;
14429
14430         /* give thread a chance to complete */
14431         /* it should remain joinable and hence detachable */
14432         sleep( 1 );
14433
14434         status = pthread_detach( &t );
14435         if( status ) return errno;
14436 #endif
14437
14438 #ifdef HAVE_LINUX_THREADS
14439         pthread_kill_other_threads_np();
14440 #endif
14441
14442         return 0;
14443
14444 }
14445
14446 EOF
14447 if { (eval echo configure:14448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14448 then
14449   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14450 else
14451   echo "configure: failed program was:" >&5
14452   cat conftest.$ac_ext >&5
14453   rm -fr conftest*
14454   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14455 fi
14456 rm -fr conftest*
14457 fi
14458
14459
14460                 # restore the LIBS
14461                 LIBS="$ol_LIBS"
14462         
14463 fi
14464
14465 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14466
14467         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14468                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14469                 ol_link_threads=posix
14470         fi
14471 fi
14472
14473                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14474 if test "$ol_link_threads" = no ; then
14475         # try -lpthreads -lmach -lexc
14476         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14477 echo "configure:14478: checking for pthread link with -lpthreads -lmach -lexc" >&5
14478 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14479   echo $ac_n "(cached) $ac_c" 1>&6
14480 else
14481   
14482                 # save the flags
14483                 ol_LIBS="$LIBS"
14484                 LIBS="-lpthreads -lmach -lexc $LIBS"
14485
14486                 if test "$cross_compiling" = yes; then
14487   cat > conftest.$ac_ext <<EOF
14488 #line 14489 "configure"
14489 #include "confdefs.h"
14490 /* pthread test headers */
14491 #include <pthread.h>
14492 #if HAVE_PTHREADS < 7
14493 #include <errno.h>
14494 #endif
14495 #ifndef NULL
14496 #define NULL (void*)0
14497 #endif
14498
14499 static void *task(p)
14500         void *p;
14501 {
14502         return (void *) (p == NULL);
14503 }
14504
14505 int main() {
14506
14507         /* pthread test function */
14508 #ifndef PTHREAD_CREATE_DETACHED
14509 #define PTHREAD_CREATE_DETACHED 1
14510 #endif
14511         pthread_t t;
14512         int status;
14513         int detach = PTHREAD_CREATE_DETACHED;
14514
14515 #if HAVE_PTHREADS > 4
14516         /* Final pthreads */
14517         pthread_attr_t attr;
14518
14519         status = pthread_attr_init(&attr);
14520         if( status ) return status;
14521
14522 #if HAVE_PTHREADS < 7
14523         status = pthread_attr_setdetachstate(&attr, &detach);
14524         if( status < 0 ) status = errno;
14525 #else
14526         status = pthread_attr_setdetachstate(&attr, detach);
14527 #endif
14528         if( status ) return status;
14529         status = pthread_create( &t, &attr, task, NULL );
14530 #if HAVE_PTHREADS < 7
14531         if( status < 0 ) status = errno;
14532 #endif
14533         if( status ) return status;
14534 #else
14535         /* Draft 4 pthreads */
14536         status = pthread_create( &t, pthread_attr_default, task, NULL );
14537         if( status ) return errno;
14538
14539         /* give thread a chance to complete */
14540         /* it should remain joinable and hence detachable */
14541         sleep( 1 );
14542
14543         status = pthread_detach( &t );
14544         if( status ) return errno;
14545 #endif
14546
14547 #ifdef HAVE_LINUX_THREADS
14548         pthread_kill_other_threads_np();
14549 #endif
14550
14551         return 0;
14552
14553 ; return 0; }
14554 EOF
14555 if { (eval echo configure:14556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14556   rm -rf conftest*
14557   ol_cv_pthread_lpthreads_lmach_lexc=yes
14558 else
14559   echo "configure: failed program was:" >&5
14560   cat conftest.$ac_ext >&5
14561   rm -rf conftest*
14562   ol_cv_pthread_lpthreads_lmach_lexc=no
14563 fi
14564 rm -f conftest*
14565 else
14566   cat > conftest.$ac_ext <<EOF
14567 #line 14568 "configure"
14568 #include "confdefs.h"
14569 /* pthread test headers */
14570 #include <pthread.h>
14571 #if HAVE_PTHREADS < 7
14572 #include <errno.h>
14573 #endif
14574 #ifndef NULL
14575 #define NULL (void*)0
14576 #endif
14577
14578 static void *task(p)
14579         void *p;
14580 {
14581         return (void *) (p == NULL);
14582 }
14583
14584
14585 int main(argc, argv)
14586         int argc;
14587         char **argv;
14588 {
14589
14590         /* pthread test function */
14591 #ifndef PTHREAD_CREATE_DETACHED
14592 #define PTHREAD_CREATE_DETACHED 1
14593 #endif
14594         pthread_t t;
14595         int status;
14596         int detach = PTHREAD_CREATE_DETACHED;
14597
14598 #if HAVE_PTHREADS > 4
14599         /* Final pthreads */
14600         pthread_attr_t attr;
14601
14602         status = pthread_attr_init(&attr);
14603         if( status ) return status;
14604
14605 #if HAVE_PTHREADS < 7
14606         status = pthread_attr_setdetachstate(&attr, &detach);
14607         if( status < 0 ) status = errno;
14608 #else
14609         status = pthread_attr_setdetachstate(&attr, detach);
14610 #endif
14611         if( status ) return status;
14612         status = pthread_create( &t, &attr, task, NULL );
14613 #if HAVE_PTHREADS < 7
14614         if( status < 0 ) status = errno;
14615 #endif
14616         if( status ) return status;
14617 #else
14618         /* Draft 4 pthreads */
14619         status = pthread_create( &t, pthread_attr_default, task, NULL );
14620         if( status ) return errno;
14621
14622         /* give thread a chance to complete */
14623         /* it should remain joinable and hence detachable */
14624         sleep( 1 );
14625
14626         status = pthread_detach( &t );
14627         if( status ) return errno;
14628 #endif
14629
14630 #ifdef HAVE_LINUX_THREADS
14631         pthread_kill_other_threads_np();
14632 #endif
14633
14634         return 0;
14635
14636 }
14637
14638 EOF
14639 if { (eval echo configure:14640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14640 then
14641   ol_cv_pthread_lpthreads_lmach_lexc=yes
14642 else
14643   echo "configure: failed program was:" >&5
14644   cat conftest.$ac_ext >&5
14645   rm -fr conftest*
14646   ol_cv_pthread_lpthreads_lmach_lexc=no
14647 fi
14648 rm -fr conftest*
14649 fi
14650
14651
14652                 # restore the LIBS
14653                 LIBS="$ol_LIBS"
14654         
14655 fi
14656
14657 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14658
14659         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14660                 ol_link_pthreads="-lpthreads -lmach -lexc"
14661                 ol_link_threads=posix
14662         fi
14663 fi
14664
14665                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14666 if test "$ol_link_threads" = no ; then
14667         # try -lpthreads -lexc
14668         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14669 echo "configure:14670: checking for pthread link with -lpthreads -lexc" >&5
14670 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14671   echo $ac_n "(cached) $ac_c" 1>&6
14672 else
14673   
14674                 # save the flags
14675                 ol_LIBS="$LIBS"
14676                 LIBS="-lpthreads -lexc $LIBS"
14677
14678                 if test "$cross_compiling" = yes; then
14679   cat > conftest.$ac_ext <<EOF
14680 #line 14681 "configure"
14681 #include "confdefs.h"
14682 /* pthread test headers */
14683 #include <pthread.h>
14684 #if HAVE_PTHREADS < 7
14685 #include <errno.h>
14686 #endif
14687 #ifndef NULL
14688 #define NULL (void*)0
14689 #endif
14690
14691 static void *task(p)
14692         void *p;
14693 {
14694         return (void *) (p == NULL);
14695 }
14696
14697 int main() {
14698
14699         /* pthread test function */
14700 #ifndef PTHREAD_CREATE_DETACHED
14701 #define PTHREAD_CREATE_DETACHED 1
14702 #endif
14703         pthread_t t;
14704         int status;
14705         int detach = PTHREAD_CREATE_DETACHED;
14706
14707 #if HAVE_PTHREADS > 4
14708         /* Final pthreads */
14709         pthread_attr_t attr;
14710
14711         status = pthread_attr_init(&attr);
14712         if( status ) return status;
14713
14714 #if HAVE_PTHREADS < 7
14715         status = pthread_attr_setdetachstate(&attr, &detach);
14716         if( status < 0 ) status = errno;
14717 #else
14718         status = pthread_attr_setdetachstate(&attr, detach);
14719 #endif
14720         if( status ) return status;
14721         status = pthread_create( &t, &attr, task, NULL );
14722 #if HAVE_PTHREADS < 7
14723         if( status < 0 ) status = errno;
14724 #endif
14725         if( status ) return status;
14726 #else
14727         /* Draft 4 pthreads */
14728         status = pthread_create( &t, pthread_attr_default, task, NULL );
14729         if( status ) return errno;
14730
14731         /* give thread a chance to complete */
14732         /* it should remain joinable and hence detachable */
14733         sleep( 1 );
14734
14735         status = pthread_detach( &t );
14736         if( status ) return errno;
14737 #endif
14738
14739 #ifdef HAVE_LINUX_THREADS
14740         pthread_kill_other_threads_np();
14741 #endif
14742
14743         return 0;
14744
14745 ; return 0; }
14746 EOF
14747 if { (eval echo configure:14748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14748   rm -rf conftest*
14749   ol_cv_pthread_lpthreads_lexc=yes
14750 else
14751   echo "configure: failed program was:" >&5
14752   cat conftest.$ac_ext >&5
14753   rm -rf conftest*
14754   ol_cv_pthread_lpthreads_lexc=no
14755 fi
14756 rm -f conftest*
14757 else
14758   cat > conftest.$ac_ext <<EOF
14759 #line 14760 "configure"
14760 #include "confdefs.h"
14761 /* pthread test headers */
14762 #include <pthread.h>
14763 #if HAVE_PTHREADS < 7
14764 #include <errno.h>
14765 #endif
14766 #ifndef NULL
14767 #define NULL (void*)0
14768 #endif
14769
14770 static void *task(p)
14771         void *p;
14772 {
14773         return (void *) (p == NULL);
14774 }
14775
14776
14777 int main(argc, argv)
14778         int argc;
14779         char **argv;
14780 {
14781
14782         /* pthread test function */
14783 #ifndef PTHREAD_CREATE_DETACHED
14784 #define PTHREAD_CREATE_DETACHED 1
14785 #endif
14786         pthread_t t;
14787         int status;
14788         int detach = PTHREAD_CREATE_DETACHED;
14789
14790 #if HAVE_PTHREADS > 4
14791         /* Final pthreads */
14792         pthread_attr_t attr;
14793
14794         status = pthread_attr_init(&attr);
14795         if( status ) return status;
14796
14797 #if HAVE_PTHREADS < 7
14798         status = pthread_attr_setdetachstate(&attr, &detach);
14799         if( status < 0 ) status = errno;
14800 #else
14801         status = pthread_attr_setdetachstate(&attr, detach);
14802 #endif
14803         if( status ) return status;
14804         status = pthread_create( &t, &attr, task, NULL );
14805 #if HAVE_PTHREADS < 7
14806         if( status < 0 ) status = errno;
14807 #endif
14808         if( status ) return status;
14809 #else
14810         /* Draft 4 pthreads */
14811         status = pthread_create( &t, pthread_attr_default, task, NULL );
14812         if( status ) return errno;
14813
14814         /* give thread a chance to complete */
14815         /* it should remain joinable and hence detachable */
14816         sleep( 1 );
14817
14818         status = pthread_detach( &t );
14819         if( status ) return errno;
14820 #endif
14821
14822 #ifdef HAVE_LINUX_THREADS
14823         pthread_kill_other_threads_np();
14824 #endif
14825
14826         return 0;
14827
14828 }
14829
14830 EOF
14831 if { (eval echo configure:14832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14832 then
14833   ol_cv_pthread_lpthreads_lexc=yes
14834 else
14835   echo "configure: failed program was:" >&5
14836   cat conftest.$ac_ext >&5
14837   rm -fr conftest*
14838   ol_cv_pthread_lpthreads_lexc=no
14839 fi
14840 rm -fr conftest*
14841 fi
14842
14843
14844                 # restore the LIBS
14845                 LIBS="$ol_LIBS"
14846         
14847 fi
14848
14849 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14850
14851         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14852                 ol_link_pthreads="-lpthreads -lexc"
14853                 ol_link_threads=posix
14854         fi
14855 fi
14856
14857
14858                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14859 if test "$ol_link_threads" = no ; then
14860         # try -lpthreads
14861         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14862 echo "configure:14863: checking for pthread link with -lpthreads" >&5
14863 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14864   echo $ac_n "(cached) $ac_c" 1>&6
14865 else
14866   
14867                 # save the flags
14868                 ol_LIBS="$LIBS"
14869                 LIBS="-lpthreads $LIBS"
14870
14871                 if test "$cross_compiling" = yes; then
14872   cat > conftest.$ac_ext <<EOF
14873 #line 14874 "configure"
14874 #include "confdefs.h"
14875 /* pthread test headers */
14876 #include <pthread.h>
14877 #if HAVE_PTHREADS < 7
14878 #include <errno.h>
14879 #endif
14880 #ifndef NULL
14881 #define NULL (void*)0
14882 #endif
14883
14884 static void *task(p)
14885         void *p;
14886 {
14887         return (void *) (p == NULL);
14888 }
14889
14890 int main() {
14891
14892         /* pthread test function */
14893 #ifndef PTHREAD_CREATE_DETACHED
14894 #define PTHREAD_CREATE_DETACHED 1
14895 #endif
14896         pthread_t t;
14897         int status;
14898         int detach = PTHREAD_CREATE_DETACHED;
14899
14900 #if HAVE_PTHREADS > 4
14901         /* Final pthreads */
14902         pthread_attr_t attr;
14903
14904         status = pthread_attr_init(&attr);
14905         if( status ) return status;
14906
14907 #if HAVE_PTHREADS < 7
14908         status = pthread_attr_setdetachstate(&attr, &detach);
14909         if( status < 0 ) status = errno;
14910 #else
14911         status = pthread_attr_setdetachstate(&attr, detach);
14912 #endif
14913         if( status ) return status;
14914         status = pthread_create( &t, &attr, task, NULL );
14915 #if HAVE_PTHREADS < 7
14916         if( status < 0 ) status = errno;
14917 #endif
14918         if( status ) return status;
14919 #else
14920         /* Draft 4 pthreads */
14921         status = pthread_create( &t, pthread_attr_default, task, NULL );
14922         if( status ) return errno;
14923
14924         /* give thread a chance to complete */
14925         /* it should remain joinable and hence detachable */
14926         sleep( 1 );
14927
14928         status = pthread_detach( &t );
14929         if( status ) return errno;
14930 #endif
14931
14932 #ifdef HAVE_LINUX_THREADS
14933         pthread_kill_other_threads_np();
14934 #endif
14935
14936         return 0;
14937
14938 ; return 0; }
14939 EOF
14940 if { (eval echo configure:14941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14941   rm -rf conftest*
14942   ol_cv_pthread_lib_lpthreads=yes
14943 else
14944   echo "configure: failed program was:" >&5
14945   cat conftest.$ac_ext >&5
14946   rm -rf conftest*
14947   ol_cv_pthread_lib_lpthreads=no
14948 fi
14949 rm -f conftest*
14950 else
14951   cat > conftest.$ac_ext <<EOF
14952 #line 14953 "configure"
14953 #include "confdefs.h"
14954 /* pthread test headers */
14955 #include <pthread.h>
14956 #if HAVE_PTHREADS < 7
14957 #include <errno.h>
14958 #endif
14959 #ifndef NULL
14960 #define NULL (void*)0
14961 #endif
14962
14963 static void *task(p)
14964         void *p;
14965 {
14966         return (void *) (p == NULL);
14967 }
14968
14969
14970 int main(argc, argv)
14971         int argc;
14972         char **argv;
14973 {
14974
14975         /* pthread test function */
14976 #ifndef PTHREAD_CREATE_DETACHED
14977 #define PTHREAD_CREATE_DETACHED 1
14978 #endif
14979         pthread_t t;
14980         int status;
14981         int detach = PTHREAD_CREATE_DETACHED;
14982
14983 #if HAVE_PTHREADS > 4
14984         /* Final pthreads */
14985         pthread_attr_t attr;
14986
14987         status = pthread_attr_init(&attr);
14988         if( status ) return status;
14989
14990 #if HAVE_PTHREADS < 7
14991         status = pthread_attr_setdetachstate(&attr, &detach);
14992         if( status < 0 ) status = errno;
14993 #else
14994         status = pthread_attr_setdetachstate(&attr, detach);
14995 #endif
14996         if( status ) return status;
14997         status = pthread_create( &t, &attr, task, NULL );
14998 #if HAVE_PTHREADS < 7
14999         if( status < 0 ) status = errno;
15000 #endif
15001         if( status ) return status;
15002 #else
15003         /* Draft 4 pthreads */
15004         status = pthread_create( &t, pthread_attr_default, task, NULL );
15005         if( status ) return errno;
15006
15007         /* give thread a chance to complete */
15008         /* it should remain joinable and hence detachable */
15009         sleep( 1 );
15010
15011         status = pthread_detach( &t );
15012         if( status ) return errno;
15013 #endif
15014
15015 #ifdef HAVE_LINUX_THREADS
15016         pthread_kill_other_threads_np();
15017 #endif
15018
15019         return 0;
15020
15021 }
15022
15023 EOF
15024 if { (eval echo configure:15025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15025 then
15026   ol_cv_pthread_lib_lpthreads=yes
15027 else
15028   echo "configure: failed program was:" >&5
15029   cat conftest.$ac_ext >&5
15030   rm -fr conftest*
15031   ol_cv_pthread_lib_lpthreads=no
15032 fi
15033 rm -fr conftest*
15034 fi
15035
15036
15037                 # restore the LIBS
15038                 LIBS="$ol_LIBS"
15039         
15040 fi
15041
15042 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15043
15044         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15045                 ol_link_pthreads="-lpthreads"
15046                 ol_link_threads=posix
15047         fi
15048 fi
15049
15050
15051                 if test $ol_link_threads != no ; then
15052                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15053
15054                                                 save_CPPFLAGS="$CPPFLAGS"
15055                         save_LIBS="$LIBS"
15056                         LIBS="$LTHREAD_LIBS $LIBS"
15057
15058                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15059 do
15060 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15061 echo "configure:15062: checking for $ac_func" >&5
15062 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15063   echo $ac_n "(cached) $ac_c" 1>&6
15064 else
15065   cat > conftest.$ac_ext <<EOF
15066 #line 15067 "configure"
15067 #include "confdefs.h"
15068 /* System header to define __stub macros and hopefully few prototypes,
15069     which can conflict with char $ac_func(); below.  */
15070 #include <assert.h>
15071 /* Override any gcc2 internal prototype to avoid an error.  */
15072 /* We use char because int might match the return type of a gcc2
15073     builtin and then its argument prototype would still apply.  */
15074 char $ac_func();
15075 char (*f)();
15076
15077 int main() {
15078
15079 /* The GNU C library defines this for functions which it implements
15080     to always fail with ENOSYS.  Some functions are actually named
15081     something starting with __ and the normal name is an alias.  */
15082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15083 choke me
15084 #else
15085 f = $ac_func;
15086 #endif
15087
15088 ; return 0; }
15089 EOF
15090 if { (eval echo configure:15091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15091   rm -rf conftest*
15092   eval "ac_cv_func_$ac_func=yes"
15093 else
15094   echo "configure: failed program was:" >&5
15095   cat conftest.$ac_ext >&5
15096   rm -rf conftest*
15097   eval "ac_cv_func_$ac_func=no"
15098 fi
15099 rm -f conftest*
15100 fi
15101
15102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15103   echo "$ac_t""yes" 1>&6
15104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15105   cat >> confdefs.h <<EOF
15106 #define $ac_tr_func 1
15107 EOF
15108  
15109 else
15110   echo "$ac_t""no" 1>&6
15111 fi
15112 done
15113
15114
15115                         if test $ac_cv_func_sched_yield = no -a \
15116                                 $ac_cv_func_pthread_yield = no -a \
15117                                 $ac_cv_func_thr_yield = no ; then
15118                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15119 echo "configure:15120: checking for sched_yield in -lrt" >&5
15120 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15122   echo $ac_n "(cached) $ac_c" 1>&6
15123 else
15124   ac_save_LIBS="$LIBS"
15125 LIBS="-lrt  $LIBS"
15126 cat > conftest.$ac_ext <<EOF
15127 #line 15128 "configure"
15128 #include "confdefs.h"
15129 /* Override any gcc2 internal prototype to avoid an error.  */
15130 /* We use char because int might match the return type of a gcc2
15131     builtin and then its argument prototype would still apply.  */
15132 char sched_yield();
15133
15134 int main() {
15135 sched_yield()
15136 ; return 0; }
15137 EOF
15138 if { (eval echo configure:15139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15139   rm -rf conftest*
15140   eval "ac_cv_lib_$ac_lib_var=yes"
15141 else
15142   echo "configure: failed program was:" >&5
15143   cat conftest.$ac_ext >&5
15144   rm -rf conftest*
15145   eval "ac_cv_lib_$ac_lib_var=no"
15146 fi
15147 rm -f conftest*
15148 LIBS="$ac_save_LIBS"
15149
15150 fi
15151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15152   echo "$ac_t""yes" 1>&6
15153   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15154                                         cat >> confdefs.h <<\EOF
15155 #define HAVE_SCHED_YIELD 1
15156 EOF
15157
15158                                         ac_cv_func_sched_yield=yes
15159 else
15160   echo "$ac_t""no" 1>&6
15161 ac_cv_func_sched_yield=no
15162 fi
15163
15164                         fi
15165                         if test $ac_cv_func_sched_yield = no -a \
15166                                 $ac_cv_func_pthread_yield = no -a \
15167                                 "$ac_cv_func_thr_yield" = no ; then
15168                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15169                         fi
15170
15171                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15172 do
15173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15174 echo "configure:15175: checking for $ac_func" >&5
15175 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15176   echo $ac_n "(cached) $ac_c" 1>&6
15177 else
15178   cat > conftest.$ac_ext <<EOF
15179 #line 15180 "configure"
15180 #include "confdefs.h"
15181 /* System header to define __stub macros and hopefully few prototypes,
15182     which can conflict with char $ac_func(); below.  */
15183 #include <assert.h>
15184 /* Override any gcc2 internal prototype to avoid an error.  */
15185 /* We use char because int might match the return type of a gcc2
15186     builtin and then its argument prototype would still apply.  */
15187 char $ac_func();
15188 char (*f)();
15189
15190 int main() {
15191
15192 /* The GNU C library defines this for functions which it implements
15193     to always fail with ENOSYS.  Some functions are actually named
15194     something starting with __ and the normal name is an alias.  */
15195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15196 choke me
15197 #else
15198 f = $ac_func;
15199 #endif
15200
15201 ; return 0; }
15202 EOF
15203 if { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15204   rm -rf conftest*
15205   eval "ac_cv_func_$ac_func=yes"
15206 else
15207   echo "configure: failed program was:" >&5
15208   cat conftest.$ac_ext >&5
15209   rm -rf conftest*
15210   eval "ac_cv_func_$ac_func=no"
15211 fi
15212 rm -f conftest*
15213 fi
15214
15215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15216   echo "$ac_t""yes" 1>&6
15217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15218   cat >> confdefs.h <<EOF
15219 #define $ac_tr_func 1
15220 EOF
15221  
15222 else
15223   echo "$ac_t""no" 1>&6
15224 fi
15225 done
15226
15227
15228                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15229 echo "configure:15230: checking for pthread_detach with <pthread.h>" >&5
15230 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15231   echo $ac_n "(cached) $ac_c" 1>&6
15232 else
15233   
15234                                                                 cat > conftest.$ac_ext <<EOF
15235 #line 15236 "configure"
15236 #include "confdefs.h"
15237
15238 #include <pthread.h>
15239 #ifndef NULL
15240 #define NULL (void*)0
15241 #endif
15242
15243 int main() {
15244 pthread_detach(NULL);
15245 ; return 0; }
15246 EOF
15247 if { (eval echo configure:15248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15248   rm -rf conftest*
15249   ol_cv_func_pthread_detach=yes
15250 else
15251   echo "configure: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   rm -rf conftest*
15254   ol_cv_func_pthread_detach=no
15255 fi
15256 rm -f conftest*
15257                         
15258 fi
15259
15260 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15261
15262                         if test $ol_cv_func_pthread_detach = no ; then
15263                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15264                         fi
15265
15266                         cat >> confdefs.h <<\EOF
15267 #define HAVE_PTHREAD_DETACH 1
15268 EOF
15269
15270
15271                                                 for ac_func in \
15272                                 pthread_setconcurrency \
15273                                 pthread_getconcurrency \
15274                                 thr_setconcurrency \
15275                                 thr_getconcurrency \
15276                         
15277 do
15278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15279 echo "configure:15280: checking for $ac_func" >&5
15280 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   cat > conftest.$ac_ext <<EOF
15284 #line 15285 "configure"
15285 #include "confdefs.h"
15286 /* System header to define __stub macros and hopefully few prototypes,
15287     which can conflict with char $ac_func(); below.  */
15288 #include <assert.h>
15289 /* Override any gcc2 internal prototype to avoid an error.  */
15290 /* We use char because int might match the return type of a gcc2
15291     builtin and then its argument prototype would still apply.  */
15292 char $ac_func();
15293 char (*f)();
15294
15295 int main() {
15296
15297 /* The GNU C library defines this for functions which it implements
15298     to always fail with ENOSYS.  Some functions are actually named
15299     something starting with __ and the normal name is an alias.  */
15300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15301 choke me
15302 #else
15303 f = $ac_func;
15304 #endif
15305
15306 ; return 0; }
15307 EOF
15308 if { (eval echo configure:15309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15309   rm -rf conftest*
15310   eval "ac_cv_func_$ac_func=yes"
15311 else
15312   echo "configure: failed program was:" >&5
15313   cat conftest.$ac_ext >&5
15314   rm -rf conftest*
15315   eval "ac_cv_func_$ac_func=no"
15316 fi
15317 rm -f conftest*
15318 fi
15319
15320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15321   echo "$ac_t""yes" 1>&6
15322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15323   cat >> confdefs.h <<EOF
15324 #define $ac_tr_func 1
15325 EOF
15326  
15327 else
15328   echo "$ac_t""no" 1>&6
15329 fi
15330 done
15331
15332
15333                         
15334         for ac_func in pthread_kill_other_threads_np
15335 do
15336 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15337 echo "configure:15338: checking for $ac_func" >&5
15338 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15339   echo $ac_n "(cached) $ac_c" 1>&6
15340 else
15341   cat > conftest.$ac_ext <<EOF
15342 #line 15343 "configure"
15343 #include "confdefs.h"
15344 /* System header to define __stub macros and hopefully few prototypes,
15345     which can conflict with char $ac_func(); below.  */
15346 #include <assert.h>
15347 /* Override any gcc2 internal prototype to avoid an error.  */
15348 /* We use char because int might match the return type of a gcc2
15349     builtin and then its argument prototype would still apply.  */
15350 char $ac_func();
15351 char (*f)();
15352
15353 int main() {
15354
15355 /* The GNU C library defines this for functions which it implements
15356     to always fail with ENOSYS.  Some functions are actually named
15357     something starting with __ and the normal name is an alias.  */
15358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15359 choke me
15360 #else
15361 f = $ac_func;
15362 #endif
15363
15364 ; return 0; }
15365 EOF
15366 if { (eval echo configure:15367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15367   rm -rf conftest*
15368   eval "ac_cv_func_$ac_func=yes"
15369 else
15370   echo "configure: failed program was:" >&5
15371   cat conftest.$ac_ext >&5
15372   rm -rf conftest*
15373   eval "ac_cv_func_$ac_func=no"
15374 fi
15375 rm -f conftest*
15376 fi
15377
15378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15379   echo "$ac_t""yes" 1>&6
15380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15381   cat >> confdefs.h <<EOF
15382 #define $ac_tr_func 1
15383 EOF
15384  
15385 else
15386   echo "$ac_t""no" 1>&6
15387 fi
15388 done
15389
15390         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15391 echo "configure:15392: checking for LinuxThreads implementation" >&5
15392 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15393   echo $ac_n "(cached) $ac_c" 1>&6
15394 else
15395   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15396 fi
15397
15398 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15399
15400                         
15401         
15402         
15403         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15404 echo "configure:15405: checking for LinuxThreads consistency" >&5
15405 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15406   echo $ac_n "(cached) $ac_c" 1>&6
15407 else
15408   
15409                 if test $ol_cv_header_linux_threads = yes -a \
15410                         $ol_cv_sys_linux_threads = yes; then
15411                         ol_cv_linux_threads=yes
15412                 elif test $ol_cv_header_linux_threads = no -a \
15413                         $ol_cv_sys_linux_threads = no; then
15414                         ol_cv_linux_threads=no
15415                 else
15416                         ol_cv_linux_threads=error
15417                 fi
15418         
15419 fi
15420
15421 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15422
15423
15424                         if test $ol_cv_linux_threads = error; then
15425                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15426                         fi
15427
15428                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15429 echo "configure:15430: checking if pthread_create() works" >&5
15430 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15431   echo $ac_n "(cached) $ac_c" 1>&6
15432 else
15433   
15434                         if test "$cross_compiling" = yes; then
15435                                 ol_cv_pthread_create_works=yes
15436 else
15437   cat > conftest.$ac_ext <<EOF
15438 #line 15439 "configure"
15439 #include "confdefs.h"
15440 /* pthread test headers */
15441 #include <pthread.h>
15442 #if HAVE_PTHREADS < 7
15443 #include <errno.h>
15444 #endif
15445 #ifndef NULL
15446 #define NULL (void*)0
15447 #endif
15448
15449 static void *task(p)
15450         void *p;
15451 {
15452         return (void *) (p == NULL);
15453 }
15454
15455
15456 int main(argc, argv)
15457         int argc;
15458         char **argv;
15459 {
15460
15461         /* pthread test function */
15462 #ifndef PTHREAD_CREATE_DETACHED
15463 #define PTHREAD_CREATE_DETACHED 1
15464 #endif
15465         pthread_t t;
15466         int status;
15467         int detach = PTHREAD_CREATE_DETACHED;
15468
15469 #if HAVE_PTHREADS > 4
15470         /* Final pthreads */
15471         pthread_attr_t attr;
15472
15473         status = pthread_attr_init(&attr);
15474         if( status ) return status;
15475
15476 #if HAVE_PTHREADS < 7
15477         status = pthread_attr_setdetachstate(&attr, &detach);
15478         if( status < 0 ) status = errno;
15479 #else
15480         status = pthread_attr_setdetachstate(&attr, detach);
15481 #endif
15482         if( status ) return status;
15483         status = pthread_create( &t, &attr, task, NULL );
15484 #if HAVE_PTHREADS < 7
15485         if( status < 0 ) status = errno;
15486 #endif
15487         if( status ) return status;
15488 #else
15489         /* Draft 4 pthreads */
15490         status = pthread_create( &t, pthread_attr_default, task, NULL );
15491         if( status ) return errno;
15492
15493         /* give thread a chance to complete */
15494         /* it should remain joinable and hence detachable */
15495         sleep( 1 );
15496
15497         status = pthread_detach( &t );
15498         if( status ) return errno;
15499 #endif
15500
15501 #ifdef HAVE_LINUX_THREADS
15502         pthread_kill_other_threads_np();
15503 #endif
15504
15505         return 0;
15506
15507 }
15508
15509 EOF
15510 if { (eval echo configure:15511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15511 then
15512   ol_cv_pthread_create_works=yes
15513 else
15514   echo "configure: failed program was:" >&5
15515   cat conftest.$ac_ext >&5
15516   rm -fr conftest*
15517   ol_cv_pthread_create_works=no
15518 fi
15519 rm -fr conftest*
15520 fi
15521
15522 fi
15523
15524 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15525
15526                         if test $ol_cv_pthread_create_works = no ; then
15527                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15528                         fi
15529
15530                                                 if test $ol_with_yielding_select = auto ; then
15531                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15532 echo "configure:15533: checking if select yields when using pthreads" >&5
15533 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15534   echo $ac_n "(cached) $ac_c" 1>&6
15535 else
15536   
15537                                 if test "$cross_compiling" = yes; then
15538   ol_cv_pthread_select_yields=cross
15539 else
15540   cat > conftest.$ac_ext <<EOF
15541 #line 15542 "configure"
15542 #include "confdefs.h"
15543
15544 #include <sys/types.h>
15545 #include <sys/time.h>
15546 #include <unistd.h>
15547 #include <pthread.h>
15548 #ifndef NULL
15549 #define NULL (void*) 0
15550 #endif
15551
15552 static int fildes[2];
15553
15554 static void *task(p)
15555         void *p;
15556 {
15557         int i;
15558         struct timeval tv;
15559
15560         fd_set rfds;
15561
15562         tv.tv_sec=10;
15563         tv.tv_usec=0;
15564
15565         FD_ZERO(&rfds);
15566         FD_SET(fildes[0], &rfds);
15567
15568         /* we're not interested in any fds */
15569         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15570
15571         if(i < 0) {
15572                 perror("select");
15573                 exit(10);
15574         }
15575
15576         exit(0); /* if we exit here, the select blocked the whole process */
15577 }
15578
15579 int main(argc, argv)
15580         int argc;
15581         char **argv;
15582 {
15583         pthread_t t;
15584
15585         /* create a pipe to select */
15586         if(pipe(&fildes[0])) {
15587                 perror("select");
15588                 exit(1);
15589         }
15590
15591 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15592         (void) pthread_setconcurrency(2);
15593 #else
15594 #ifdef HAVE_THR_SETCONCURRENCY
15595         /* Set Solaris LWP concurrency to 2 */
15596         thr_setconcurrency(2);
15597 #endif
15598 #endif
15599
15600 #if HAVE_PTHREADS < 6
15601         pthread_create(&t, pthread_attr_default, task, NULL);
15602 #else
15603         pthread_create(&t, NULL, task, NULL);
15604 #endif
15605
15606         /* make sure task runs first */
15607 #if HAVE_THR_YIELD
15608         thr_yield();
15609 #elif defined( HAVE_SCHED_YIELD )
15610         sched_yield();
15611 #elif defined( HAVE_PTHREAD_YIELD )
15612         pthread_yield();
15613 #endif
15614
15615         exit(2);
15616 }
15617 EOF
15618 if { (eval echo configure:15619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15619 then
15620   ol_cv_pthread_select_yields=no
15621 else
15622   echo "configure: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   rm -fr conftest*
15625   ol_cv_pthread_select_yields=yes
15626 fi
15627 rm -fr conftest*
15628 fi
15629
15630 fi
15631
15632 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15633
15634                                 if test $ol_cv_pthread_select_yields = cross ; then
15635                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15636                                 fi
15637
15638                                 if test $ol_cv_pthread_select_yields = yes ; then
15639                                         ol_with_yielding_select=yes
15640                                 fi
15641                         fi
15642
15643                                                 CPPFLAGS="$save_CPPFLAGS"
15644                         LIBS="$save_LIBS"
15645                 else
15646                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15647                 fi
15648         fi
15649
15650         if test $ol_with_threads = posix ; then
15651                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15652         fi
15653 fi
15654
15655 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15656         -o $ol_with_threads = mach ; then
15657
15658                 for ac_hdr in mach/cthreads.h cthreads.h
15659 do
15660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15662 echo "configure:15663: checking for $ac_hdr" >&5
15663 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15664   echo $ac_n "(cached) $ac_c" 1>&6
15665 else
15666   cat > conftest.$ac_ext <<EOF
15667 #line 15668 "configure"
15668 #include "confdefs.h"
15669 #include <$ac_hdr>
15670 EOF
15671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15672 { (eval echo configure:15673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15674 if test -z "$ac_err"; then
15675   rm -rf conftest*
15676   eval "ac_cv_header_$ac_safe=yes"
15677 else
15678   echo "$ac_err" >&5
15679   echo "configure: failed program was:" >&5
15680   cat conftest.$ac_ext >&5
15681   rm -rf conftest*
15682   eval "ac_cv_header_$ac_safe=no"
15683 fi
15684 rm -f conftest*
15685 fi
15686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15687   echo "$ac_t""yes" 1>&6
15688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15689   cat >> confdefs.h <<EOF
15690 #define $ac_tr_hdr 1
15691 EOF
15692  
15693 else
15694   echo "$ac_t""no" 1>&6
15695 fi
15696 done
15697
15698         if test $ac_cv_header_mach_cthreads_h = yes ; then
15699                 ol_with_threads=found
15700
15701                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15702 echo "configure:15703: checking for cthread_fork" >&5
15703 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15704   echo $ac_n "(cached) $ac_c" 1>&6
15705 else
15706   cat > conftest.$ac_ext <<EOF
15707 #line 15708 "configure"
15708 #include "confdefs.h"
15709 /* System header to define __stub macros and hopefully few prototypes,
15710     which can conflict with char cthread_fork(); below.  */
15711 #include <assert.h>
15712 /* Override any gcc2 internal prototype to avoid an error.  */
15713 /* We use char because int might match the return type of a gcc2
15714     builtin and then its argument prototype would still apply.  */
15715 char cthread_fork();
15716 char (*f)();
15717
15718 int main() {
15719
15720 /* The GNU C library defines this for functions which it implements
15721     to always fail with ENOSYS.  Some functions are actually named
15722     something starting with __ and the normal name is an alias.  */
15723 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15724 choke me
15725 #else
15726 f = cthread_fork;
15727 #endif
15728
15729 ; return 0; }
15730 EOF
15731 if { (eval echo configure:15732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15732   rm -rf conftest*
15733   eval "ac_cv_func_cthread_fork=yes"
15734 else
15735   echo "configure: failed program was:" >&5
15736   cat conftest.$ac_ext >&5
15737   rm -rf conftest*
15738   eval "ac_cv_func_cthread_fork=no"
15739 fi
15740 rm -f conftest*
15741 fi
15742
15743 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15744   echo "$ac_t""yes" 1>&6
15745   ol_link_threads=yes
15746 else
15747   echo "$ac_t""no" 1>&6
15748 fi
15749
15750
15751                 if test $ol_link_threads = no ; then
15752                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15753 echo "configure:15754: checking for cthread_fork with -all_load" >&5
15754 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   
15758                                                                 save_LIBS="$LIBS"
15759                                 LIBS="-all_load $LIBS"
15760                                 cat > conftest.$ac_ext <<EOF
15761 #line 15762 "configure"
15762 #include "confdefs.h"
15763 #include <mach/cthreads.h>
15764 int main() {
15765
15766                                         cthread_fork((void *)0, (void *)0);
15767                                         
15768 ; return 0; }
15769 EOF
15770 if { (eval echo configure:15771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15771   rm -rf conftest*
15772   ol_cv_cthread_all_load=yes
15773 else
15774   echo "configure: failed program was:" >&5
15775   cat conftest.$ac_ext >&5
15776   rm -rf conftest*
15777   ol_cv_cthread_all_load=no
15778 fi
15779 rm -f conftest*
15780                                                                 LIBS="$save_LIBS"
15781                         
15782 fi
15783
15784 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15785
15786                         if test $ol_cv_cthread_all_load = yes ; then
15787                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15788                                 ol_link_threads=mach
15789                                 ol_with_threads=found
15790                         fi
15791                 fi
15792
15793         elif test $ac_cv_header_cthreads_h = yes ; then
15794                                 
15795                 ol_with_threads=found
15796  
15797                                 save_LIBS="$LIBS"
15798                 LIBS="$LIBS -lthreads"
15799                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15800 echo "configure:15801: checking for cthread_fork" >&5
15801 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15802   echo $ac_n "(cached) $ac_c" 1>&6
15803 else
15804   cat > conftest.$ac_ext <<EOF
15805 #line 15806 "configure"
15806 #include "confdefs.h"
15807 /* System header to define __stub macros and hopefully few prototypes,
15808     which can conflict with char cthread_fork(); below.  */
15809 #include <assert.h>
15810 /* Override any gcc2 internal prototype to avoid an error.  */
15811 /* We use char because int might match the return type of a gcc2
15812     builtin and then its argument prototype would still apply.  */
15813 char cthread_fork();
15814 char (*f)();
15815
15816 int main() {
15817
15818 /* The GNU C library defines this for functions which it implements
15819     to always fail with ENOSYS.  Some functions are actually named
15820     something starting with __ and the normal name is an alias.  */
15821 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15822 choke me
15823 #else
15824 f = cthread_fork;
15825 #endif
15826
15827 ; return 0; }
15828 EOF
15829 if { (eval echo configure:15830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15830   rm -rf conftest*
15831   eval "ac_cv_func_cthread_fork=yes"
15832 else
15833   echo "configure: failed program was:" >&5
15834   cat conftest.$ac_ext >&5
15835   rm -rf conftest*
15836   eval "ac_cv_func_cthread_fork=no"
15837 fi
15838 rm -f conftest*
15839 fi
15840
15841 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15842   echo "$ac_t""yes" 1>&6
15843   ol_link_threads=yes
15844 else
15845   echo "$ac_t""no" 1>&6
15846 fi
15847
15848                 LIBS="$save_LIBS"
15849
15850                 if test $ol_link_threads = yes ; then
15851                         LTHREAD_LIBS="-lthreads"
15852                         ol_link_threads=mach
15853                         ol_with_threads=found
15854                 else
15855                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15856                 fi
15857
15858         elif test $ol_with_threads = mach ; then
15859                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15860         fi
15861
15862         if test $ol_link_threads = mach ; then
15863                 cat >> confdefs.h <<\EOF
15864 #define HAVE_MACH_CTHREADS 1
15865 EOF
15866
15867         elif test $ol_with_threads = found ; then
15868                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15869         fi
15870 fi
15871
15872 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15873         -o $ol_with_threads = pth ; then
15874
15875         for ac_hdr in pth.h
15876 do
15877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15879 echo "configure:15880: checking for $ac_hdr" >&5
15880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15881   echo $ac_n "(cached) $ac_c" 1>&6
15882 else
15883   cat > conftest.$ac_ext <<EOF
15884 #line 15885 "configure"
15885 #include "confdefs.h"
15886 #include <$ac_hdr>
15887 EOF
15888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15889 { (eval echo configure:15890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15891 if test -z "$ac_err"; then
15892   rm -rf conftest*
15893   eval "ac_cv_header_$ac_safe=yes"
15894 else
15895   echo "$ac_err" >&5
15896   echo "configure: failed program was:" >&5
15897   cat conftest.$ac_ext >&5
15898   rm -rf conftest*
15899   eval "ac_cv_header_$ac_safe=no"
15900 fi
15901 rm -f conftest*
15902 fi
15903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15904   echo "$ac_t""yes" 1>&6
15905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15906   cat >> confdefs.h <<EOF
15907 #define $ac_tr_hdr 1
15908 EOF
15909  
15910 else
15911   echo "$ac_t""no" 1>&6
15912 fi
15913 done
15914
15915
15916         if test $ac_cv_header_pth_h = yes ; then
15917                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15918 echo "configure:15919: checking for pth_version in -lpth" >&5
15919 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15921   echo $ac_n "(cached) $ac_c" 1>&6
15922 else
15923   ac_save_LIBS="$LIBS"
15924 LIBS="-lpth  $LIBS"
15925 cat > conftest.$ac_ext <<EOF
15926 #line 15927 "configure"
15927 #include "confdefs.h"
15928 /* Override any gcc2 internal prototype to avoid an error.  */
15929 /* We use char because int might match the return type of a gcc2
15930     builtin and then its argument prototype would still apply.  */
15931 char pth_version();
15932
15933 int main() {
15934 pth_version()
15935 ; return 0; }
15936 EOF
15937 if { (eval echo configure:15938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15938   rm -rf conftest*
15939   eval "ac_cv_lib_$ac_lib_var=yes"
15940 else
15941   echo "configure: failed program was:" >&5
15942   cat conftest.$ac_ext >&5
15943   rm -rf conftest*
15944   eval "ac_cv_lib_$ac_lib_var=no"
15945 fi
15946 rm -f conftest*
15947 LIBS="$ac_save_LIBS"
15948
15949 fi
15950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15951   echo "$ac_t""yes" 1>&6
15952   have_pth=yes
15953 else
15954   echo "$ac_t""no" 1>&6
15955 have_pth=no
15956 fi
15957
15958
15959                 if test $have_pth = yes ; then
15960                         cat >> confdefs.h <<\EOF
15961 #define HAVE_GNU_PTH 1
15962 EOF
15963
15964                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15965                         ol_link_threads=pth
15966                         ol_with_threads=found
15967
15968                         if test $ol_with_yielding_select = auto ; then
15969                                 ol_with_yielding_select=yes
15970                         fi
15971                 fi
15972         fi
15973 fi
15974
15975 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15976         -o $ol_with_threads = lwp ; then
15977
15978                 for ac_hdr in thread.h synch.h
15979 do
15980 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15981 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15982 echo "configure:15983: checking for $ac_hdr" >&5
15983 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15984   echo $ac_n "(cached) $ac_c" 1>&6
15985 else
15986   cat > conftest.$ac_ext <<EOF
15987 #line 15988 "configure"
15988 #include "confdefs.h"
15989 #include <$ac_hdr>
15990 EOF
15991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15992 { (eval echo configure:15993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15994 if test -z "$ac_err"; then
15995   rm -rf conftest*
15996   eval "ac_cv_header_$ac_safe=yes"
15997 else
15998   echo "$ac_err" >&5
15999   echo "configure: failed program was:" >&5
16000   cat conftest.$ac_ext >&5
16001   rm -rf conftest*
16002   eval "ac_cv_header_$ac_safe=no"
16003 fi
16004 rm -f conftest*
16005 fi
16006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16007   echo "$ac_t""yes" 1>&6
16008     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16009   cat >> confdefs.h <<EOF
16010 #define $ac_tr_hdr 1
16011 EOF
16012  
16013 else
16014   echo "$ac_t""no" 1>&6
16015 fi
16016 done
16017
16018         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16019                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16020 echo "configure:16021: checking for thr_create in -lthread" >&5
16021 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16023   echo $ac_n "(cached) $ac_c" 1>&6
16024 else
16025   ac_save_LIBS="$LIBS"
16026 LIBS="-lthread  $LIBS"
16027 cat > conftest.$ac_ext <<EOF
16028 #line 16029 "configure"
16029 #include "confdefs.h"
16030 /* Override any gcc2 internal prototype to avoid an error.  */
16031 /* We use char because int might match the return type of a gcc2
16032     builtin and then its argument prototype would still apply.  */
16033 char thr_create();
16034
16035 int main() {
16036 thr_create()
16037 ; return 0; }
16038 EOF
16039 if { (eval echo configure:16040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16040   rm -rf conftest*
16041   eval "ac_cv_lib_$ac_lib_var=yes"
16042 else
16043   echo "configure: failed program was:" >&5
16044   cat conftest.$ac_ext >&5
16045   rm -rf conftest*
16046   eval "ac_cv_lib_$ac_lib_var=no"
16047 fi
16048 rm -f conftest*
16049 LIBS="$ac_save_LIBS"
16050
16051 fi
16052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16053   echo "$ac_t""yes" 1>&6
16054   have_thr=yes
16055 else
16056   echo "$ac_t""no" 1>&6
16057 have_thr=no
16058 fi
16059
16060
16061                 if test $have_thr = yes ; then
16062                         cat >> confdefs.h <<\EOF
16063 #define HAVE_THR 1
16064 EOF
16065
16066                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16067                         ol_link_threads=thr
16068
16069                         if test $ol_with_yielding_select = auto ; then
16070                                 ol_with_yielding_select=yes
16071                         fi
16072
16073                                                 for ac_func in \
16074                                 thr_setconcurrency \
16075                                 thr_getconcurrency \
16076                         
16077 do
16078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16079 echo "configure:16080: checking for $ac_func" >&5
16080 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16081   echo $ac_n "(cached) $ac_c" 1>&6
16082 else
16083   cat > conftest.$ac_ext <<EOF
16084 #line 16085 "configure"
16085 #include "confdefs.h"
16086 /* System header to define __stub macros and hopefully few prototypes,
16087     which can conflict with char $ac_func(); below.  */
16088 #include <assert.h>
16089 /* Override any gcc2 internal prototype to avoid an error.  */
16090 /* We use char because int might match the return type of a gcc2
16091     builtin and then its argument prototype would still apply.  */
16092 char $ac_func();
16093 char (*f)();
16094
16095 int main() {
16096
16097 /* The GNU C library defines this for functions which it implements
16098     to always fail with ENOSYS.  Some functions are actually named
16099     something starting with __ and the normal name is an alias.  */
16100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16101 choke me
16102 #else
16103 f = $ac_func;
16104 #endif
16105
16106 ; return 0; }
16107 EOF
16108 if { (eval echo configure:16109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16109   rm -rf conftest*
16110   eval "ac_cv_func_$ac_func=yes"
16111 else
16112   echo "configure: failed program was:" >&5
16113   cat conftest.$ac_ext >&5
16114   rm -rf conftest*
16115   eval "ac_cv_func_$ac_func=no"
16116 fi
16117 rm -f conftest*
16118 fi
16119
16120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16121   echo "$ac_t""yes" 1>&6
16122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16123   cat >> confdefs.h <<EOF
16124 #define $ac_tr_func 1
16125 EOF
16126  
16127 else
16128   echo "$ac_t""no" 1>&6
16129 fi
16130 done
16131
16132                 fi
16133         fi
16134
16135                 for ac_hdr in lwp/lwp.h
16136 do
16137 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16138 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16139 echo "configure:16140: checking for $ac_hdr" >&5
16140 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16141   echo $ac_n "(cached) $ac_c" 1>&6
16142 else
16143   cat > conftest.$ac_ext <<EOF
16144 #line 16145 "configure"
16145 #include "confdefs.h"
16146 #include <$ac_hdr>
16147 EOF
16148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16149 { (eval echo configure:16150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16151 if test -z "$ac_err"; then
16152   rm -rf conftest*
16153   eval "ac_cv_header_$ac_safe=yes"
16154 else
16155   echo "$ac_err" >&5
16156   echo "configure: failed program was:" >&5
16157   cat conftest.$ac_ext >&5
16158   rm -rf conftest*
16159   eval "ac_cv_header_$ac_safe=no"
16160 fi
16161 rm -f conftest*
16162 fi
16163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16164   echo "$ac_t""yes" 1>&6
16165     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16166   cat >> confdefs.h <<EOF
16167 #define $ac_tr_hdr 1
16168 EOF
16169  
16170 else
16171   echo "$ac_t""no" 1>&6
16172 fi
16173 done
16174
16175         if test $ac_cv_header_lwp_lwp_h = yes ; then
16176                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16177 echo "configure:16178: checking for lwp_create in -llwp" >&5
16178 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16180   echo $ac_n "(cached) $ac_c" 1>&6
16181 else
16182   ac_save_LIBS="$LIBS"
16183 LIBS="-llwp  $LIBS"
16184 cat > conftest.$ac_ext <<EOF
16185 #line 16186 "configure"
16186 #include "confdefs.h"
16187 /* Override any gcc2 internal prototype to avoid an error.  */
16188 /* We use char because int might match the return type of a gcc2
16189     builtin and then its argument prototype would still apply.  */
16190 char lwp_create();
16191
16192 int main() {
16193 lwp_create()
16194 ; return 0; }
16195 EOF
16196 if { (eval echo configure:16197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16197   rm -rf conftest*
16198   eval "ac_cv_lib_$ac_lib_var=yes"
16199 else
16200   echo "configure: failed program was:" >&5
16201   cat conftest.$ac_ext >&5
16202   rm -rf conftest*
16203   eval "ac_cv_lib_$ac_lib_var=no"
16204 fi
16205 rm -f conftest*
16206 LIBS="$ac_save_LIBS"
16207
16208 fi
16209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16210   echo "$ac_t""yes" 1>&6
16211   have_lwp=yes
16212 else
16213   echo "$ac_t""no" 1>&6
16214 have_lwp=no
16215 fi
16216
16217
16218                 if test $have_lwp = yes ; then
16219                         cat >> confdefs.h <<\EOF
16220 #define HAVE_LWP 1
16221 EOF
16222
16223                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16224                         ol_link_threads=lwp
16225
16226                         if test $ol_with_yielding_select = auto ; then
16227                                 ol_with_yielding_select=no
16228                         fi
16229                 fi
16230         fi
16231 fi
16232
16233 if test $ol_with_yielding_select = yes ; then
16234         cat >> confdefs.h <<\EOF
16235 #define HAVE_YIELDING_SELECT 1
16236 EOF
16237
16238 fi
16239
16240 if test $ol_with_threads = manual ; then
16241                 ol_link_threads=yes
16242
16243         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16244
16245         for ac_hdr in pthread.h sched.h
16246 do
16247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16249 echo "configure:16250: checking for $ac_hdr" >&5
16250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16251   echo $ac_n "(cached) $ac_c" 1>&6
16252 else
16253   cat > conftest.$ac_ext <<EOF
16254 #line 16255 "configure"
16255 #include "confdefs.h"
16256 #include <$ac_hdr>
16257 EOF
16258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16259 { (eval echo configure:16260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16261 if test -z "$ac_err"; then
16262   rm -rf conftest*
16263   eval "ac_cv_header_$ac_safe=yes"
16264 else
16265   echo "$ac_err" >&5
16266   echo "configure: failed program was:" >&5
16267   cat conftest.$ac_ext >&5
16268   rm -rf conftest*
16269   eval "ac_cv_header_$ac_safe=no"
16270 fi
16271 rm -f conftest*
16272 fi
16273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16274   echo "$ac_t""yes" 1>&6
16275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16276   cat >> confdefs.h <<EOF
16277 #define $ac_tr_hdr 1
16278 EOF
16279  
16280 else
16281   echo "$ac_t""no" 1>&6
16282 fi
16283 done
16284
16285         for ac_func in sched_yield pthread_yield
16286 do
16287 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16288 echo "configure:16289: checking for $ac_func" >&5
16289 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16290   echo $ac_n "(cached) $ac_c" 1>&6
16291 else
16292   cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 /* System header to define __stub macros and hopefully few prototypes,
16296     which can conflict with char $ac_func(); below.  */
16297 #include <assert.h>
16298 /* Override any gcc2 internal prototype to avoid an error.  */
16299 /* We use char because int might match the return type of a gcc2
16300     builtin and then its argument prototype would still apply.  */
16301 char $ac_func();
16302 char (*f)();
16303
16304 int main() {
16305
16306 /* The GNU C library defines this for functions which it implements
16307     to always fail with ENOSYS.  Some functions are actually named
16308     something starting with __ and the normal name is an alias.  */
16309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16310 choke me
16311 #else
16312 f = $ac_func;
16313 #endif
16314
16315 ; return 0; }
16316 EOF
16317 if { (eval echo configure:16318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16318   rm -rf conftest*
16319   eval "ac_cv_func_$ac_func=yes"
16320 else
16321   echo "configure: failed program was:" >&5
16322   cat conftest.$ac_ext >&5
16323   rm -rf conftest*
16324   eval "ac_cv_func_$ac_func=no"
16325 fi
16326 rm -f conftest*
16327 fi
16328
16329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16330   echo "$ac_t""yes" 1>&6
16331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16332   cat >> confdefs.h <<EOF
16333 #define $ac_tr_func 1
16334 EOF
16335  
16336 else
16337   echo "$ac_t""no" 1>&6
16338 fi
16339 done
16340
16341         
16342         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16343 echo "configure:16344: checking for LinuxThreads pthread.h" >&5
16344 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16345   echo $ac_n "(cached) $ac_c" 1>&6
16346 else
16347   cat > conftest.$ac_ext <<EOF
16348 #line 16349 "configure"
16349 #include "confdefs.h"
16350 #include <pthread.h>
16351 EOF
16352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16353   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16354   rm -rf conftest*
16355   ol_cv_header_linux_threads=yes
16356 else
16357   rm -rf conftest*
16358   ol_cv_header_linux_threads=no
16359 fi
16360 rm -f conftest*
16361
16362                 
16363 fi
16364
16365 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16366         if test $ol_cv_header_linux_threads = yes; then
16367                 cat >> confdefs.h <<\EOF
16368 #define HAVE_LINUX_THREADS 1
16369 EOF
16370
16371         fi
16372
16373
16374         for ac_hdr in mach/cthreads.h
16375 do
16376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16378 echo "configure:16379: checking for $ac_hdr" >&5
16379 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16380   echo $ac_n "(cached) $ac_c" 1>&6
16381 else
16382   cat > conftest.$ac_ext <<EOF
16383 #line 16384 "configure"
16384 #include "confdefs.h"
16385 #include <$ac_hdr>
16386 EOF
16387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16388 { (eval echo configure:16389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16390 if test -z "$ac_err"; then
16391   rm -rf conftest*
16392   eval "ac_cv_header_$ac_safe=yes"
16393 else
16394   echo "$ac_err" >&5
16395   echo "configure: failed program was:" >&5
16396   cat conftest.$ac_ext >&5
16397   rm -rf conftest*
16398   eval "ac_cv_header_$ac_safe=no"
16399 fi
16400 rm -f conftest*
16401 fi
16402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16403   echo "$ac_t""yes" 1>&6
16404     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16405   cat >> confdefs.h <<EOF
16406 #define $ac_tr_hdr 1
16407 EOF
16408  
16409 else
16410   echo "$ac_t""no" 1>&6
16411 fi
16412 done
16413
16414         for ac_hdr in lwp/lwp.h
16415 do
16416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16418 echo "configure:16419: checking for $ac_hdr" >&5
16419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16420   echo $ac_n "(cached) $ac_c" 1>&6
16421 else
16422   cat > conftest.$ac_ext <<EOF
16423 #line 16424 "configure"
16424 #include "confdefs.h"
16425 #include <$ac_hdr>
16426 EOF
16427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16428 { (eval echo configure:16429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16430 if test -z "$ac_err"; then
16431   rm -rf conftest*
16432   eval "ac_cv_header_$ac_safe=yes"
16433 else
16434   echo "$ac_err" >&5
16435   echo "configure: failed program was:" >&5
16436   cat conftest.$ac_ext >&5
16437   rm -rf conftest*
16438   eval "ac_cv_header_$ac_safe=no"
16439 fi
16440 rm -f conftest*
16441 fi
16442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16443   echo "$ac_t""yes" 1>&6
16444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16445   cat >> confdefs.h <<EOF
16446 #define $ac_tr_hdr 1
16447 EOF
16448  
16449 else
16450   echo "$ac_t""no" 1>&6
16451 fi
16452 done
16453
16454         for ac_hdr in thread.h synch.h
16455 do
16456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16458 echo "configure:16459: checking for $ac_hdr" >&5
16459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16460   echo $ac_n "(cached) $ac_c" 1>&6
16461 else
16462   cat > conftest.$ac_ext <<EOF
16463 #line 16464 "configure"
16464 #include "confdefs.h"
16465 #include <$ac_hdr>
16466 EOF
16467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16468 { (eval echo configure:16469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16470 if test -z "$ac_err"; then
16471   rm -rf conftest*
16472   eval "ac_cv_header_$ac_safe=yes"
16473 else
16474   echo "$ac_err" >&5
16475   echo "configure: failed program was:" >&5
16476   cat conftest.$ac_ext >&5
16477   rm -rf conftest*
16478   eval "ac_cv_header_$ac_safe=no"
16479 fi
16480 rm -f conftest*
16481 fi
16482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16483   echo "$ac_t""yes" 1>&6
16484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16485   cat >> confdefs.h <<EOF
16486 #define $ac_tr_hdr 1
16487 EOF
16488  
16489 else
16490   echo "$ac_t""no" 1>&6
16491 fi
16492 done
16493
16494 fi
16495
16496 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16497                         cat >> confdefs.h <<\EOF
16498 #define REENTRANT 1
16499 EOF
16500
16501         cat >> confdefs.h <<\EOF
16502 #define _REENTRANT 1
16503 EOF
16504
16505         cat >> confdefs.h <<\EOF
16506 #define THREAD_SAFE 1
16507 EOF
16508
16509         cat >> confdefs.h <<\EOF
16510 #define _THREAD_SAFE 1
16511 EOF
16512
16513         cat >> confdefs.h <<\EOF
16514 #define THREADSAFE 1
16515 EOF
16516
16517         cat >> confdefs.h <<\EOF
16518 #define _THREADSAFE 1
16519 EOF
16520
16521         cat >> confdefs.h <<\EOF
16522 #define _SGI_MP_SOURCE 1
16523 EOF
16524
16525
16526                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16527 echo "configure:16528: checking for thread specific errno" >&5
16528 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16529   echo $ac_n "(cached) $ac_c" 1>&6
16530 else
16531   
16532                 cat > conftest.$ac_ext <<EOF
16533 #line 16534 "configure"
16534 #include "confdefs.h"
16535 #include <errno.h>
16536 int main() {
16537 errno = 0;
16538 ; return 0; }
16539 EOF
16540 if { (eval echo configure:16541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16541   rm -rf conftest*
16542   ol_cv_errno_thread_specific=yes
16543 else
16544   echo "configure: failed program was:" >&5
16545   cat conftest.$ac_ext >&5
16546   rm -rf conftest*
16547   ol_cv_errno_thread_specific=no
16548 fi
16549 rm -f conftest*
16550         
16551 fi
16552
16553 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16554
16555                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16556 echo "configure:16557: checking for thread specific h_errno" >&5
16557 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16558   echo $ac_n "(cached) $ac_c" 1>&6
16559 else
16560   
16561                 cat > conftest.$ac_ext <<EOF
16562 #line 16563 "configure"
16563 #include "confdefs.h"
16564 #include <netdb.h>
16565 int main() {
16566 h_errno = 0;
16567 ; return 0; }
16568 EOF
16569 if { (eval echo configure:16570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16570   rm -rf conftest*
16571   ol_cv_h_errno_thread_specific=yes
16572 else
16573   echo "configure: failed program was:" >&5
16574   cat conftest.$ac_ext >&5
16575   rm -rf conftest*
16576   ol_cv_h_errno_thread_specific=no
16577 fi
16578 rm -f conftest*
16579         
16580 fi
16581
16582 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16583
16584         if test $ol_cv_errno_thread_specific != yes \
16585                 -o $ol_cv_h_errno_thread_specific != yes ; then
16586                 LIBS="$LTHREAD_LIBS $LIBS"
16587                 LTHREAD_LIBS=""
16588         fi
16589
16590 fi  
16591
16592 if test $ol_link_threads = no ; then
16593         if test $ol_with_threads = yes ; then
16594                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16595         fi
16596
16597         if test $ol_with_threads = auto ; then
16598                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16599                 ol_with_threads=no
16600         fi
16601
16602         cat >> confdefs.h <<\EOF
16603 #define NO_THREADS 1
16604 EOF
16605
16606         LTHREAD_LIBS=""
16607 fi
16608
16609 if test $ol_link_threads != no ; then
16610         cat >> confdefs.h <<\EOF
16611 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16612 EOF
16613
16614 fi
16615
16616 for ac_func in \
16617         ctime_r                 \
16618         gethostbyname_r gethostbyaddr_r \
16619
16620 do
16621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16622 echo "configure:16623: checking for $ac_func" >&5
16623 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16624   echo $ac_n "(cached) $ac_c" 1>&6
16625 else
16626   cat > conftest.$ac_ext <<EOF
16627 #line 16628 "configure"
16628 #include "confdefs.h"
16629 /* System header to define __stub macros and hopefully few prototypes,
16630     which can conflict with char $ac_func(); below.  */
16631 #include <assert.h>
16632 /* Override any gcc2 internal prototype to avoid an error.  */
16633 /* We use char because int might match the return type of a gcc2
16634     builtin and then its argument prototype would still apply.  */
16635 char $ac_func();
16636 char (*f)();
16637
16638 int main() {
16639
16640 /* The GNU C library defines this for functions which it implements
16641     to always fail with ENOSYS.  Some functions are actually named
16642     something starting with __ and the normal name is an alias.  */
16643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16644 choke me
16645 #else
16646 f = $ac_func;
16647 #endif
16648
16649 ; return 0; }
16650 EOF
16651 if { (eval echo configure:16652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16652   rm -rf conftest*
16653   eval "ac_cv_func_$ac_func=yes"
16654 else
16655   echo "configure: failed program was:" >&5
16656   cat conftest.$ac_ext >&5
16657   rm -rf conftest*
16658   eval "ac_cv_func_$ac_func=no"
16659 fi
16660 rm -f conftest*
16661 fi
16662
16663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16664   echo "$ac_t""yes" 1>&6
16665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16666   cat >> confdefs.h <<EOF
16667 #define $ac_tr_func 1
16668 EOF
16669  
16670 else
16671   echo "$ac_t""no" 1>&6
16672 fi
16673 done
16674
16675
16676 if test "$ac_cv_func_ctime_r" = no ; then
16677         ol_cv_func_ctime_r_nargs=0
16678 else
16679         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16680 echo "configure:16681: checking number of arguments of ctime_r" >&5
16681 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16682   echo $ac_n "(cached) $ac_c" 1>&6
16683 else
16684   cat > conftest.$ac_ext <<EOF
16685 #line 16686 "configure"
16686 #include "confdefs.h"
16687 #include <time.h>
16688 int main() {
16689 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16690 ; return 0; }
16691 EOF
16692 if { (eval echo configure:16693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16693   rm -rf conftest*
16694   ol_cv_func_ctime_r_nargs3=yes
16695 else
16696   echo "configure: failed program was:" >&5
16697   cat conftest.$ac_ext >&5
16698   rm -rf conftest*
16699   ol_cv_func_ctime_r_nargs3=no
16700 fi
16701 rm -f conftest*
16702
16703         cat > conftest.$ac_ext <<EOF
16704 #line 16705 "configure"
16705 #include "confdefs.h"
16706 #include <time.h>
16707 int main() {
16708 time_t ti; char *buffer; ctime_r(&ti,buffer);
16709 ; return 0; }
16710 EOF
16711 if { (eval echo configure:16712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16712   rm -rf conftest*
16713   ol_cv_func_ctime_r_nargs2=yes
16714 else
16715   echo "configure: failed program was:" >&5
16716   cat conftest.$ac_ext >&5
16717   rm -rf conftest*
16718   ol_cv_func_ctime_r_nargs2=no
16719 fi
16720 rm -f conftest*
16721
16722         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16723                 $ol_cv_func_ctime_r_nargs2 = no ; then
16724
16725                 ol_cv_func_ctime_r_nargs=3
16726
16727         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16728                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16729
16730                 ol_cv_func_ctime_r_nargs=2
16731
16732         else
16733                 ol_cv_func_ctime_r_nargs=0
16734         fi
16735   
16736 fi
16737
16738 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16739
16740   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16741         cat >> confdefs.h <<EOF
16742 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16743 EOF
16744
16745   fi
16746
16747 fi
16748
16749 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16750         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16751 echo "configure:16752: checking number of arguments of gethostbyname_r" >&5
16752 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16753   echo $ac_n "(cached) $ac_c" 1>&6
16754 else
16755   cat > conftest.$ac_ext <<EOF
16756 #line 16757 "configure"
16757 #include "confdefs.h"
16758 #include <sys/types.h>
16759 #include <sys/socket.h>
16760 #include <netinet/in.h>
16761 #include <netdb.h>
16762 #define BUFSIZE (sizeof(struct hostent)+10)
16763 int main() {
16764 struct hostent hent; char buffer[BUFSIZE];
16765                 int bufsize=BUFSIZE;int h_errno;
16766                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16767                         buffer, bufsize, &h_errno);
16768 ; return 0; }
16769 EOF
16770 if { (eval echo configure:16771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16771   rm -rf conftest*
16772   ol_cv_func_gethostbyname_r_nargs5=yes
16773 else
16774   echo "configure: failed program was:" >&5
16775   cat conftest.$ac_ext >&5
16776   rm -rf conftest*
16777   ol_cv_func_gethostbyname_r_nargs5=no
16778 fi
16779 rm -f conftest*
16780
16781         cat > conftest.$ac_ext <<EOF
16782 #line 16783 "configure"
16783 #include "confdefs.h"
16784 #include <sys/types.h>
16785 #include <sys/socket.h>
16786 #include <netinet/in.h>
16787 #include <netdb.h>
16788 #define BUFSIZE (sizeof(struct hostent)+10)
16789 int main() {
16790 struct hostent hent;struct hostent *rhent;
16791                 char buffer[BUFSIZE];
16792                 int bufsize=BUFSIZE;int h_errno;
16793                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16794                         &rhent, &h_errno);
16795 ; return 0; }
16796 EOF
16797 if { (eval echo configure:16798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16798   rm -rf conftest*
16799   ol_cv_func_gethostbyname_r_nargs6=yes
16800 else
16801   echo "configure: failed program was:" >&5
16802   cat conftest.$ac_ext >&5
16803   rm -rf conftest*
16804   ol_cv_func_gethostbyname_r_nargs6=no
16805 fi
16806 rm -f conftest*
16807
16808         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16809                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16810
16811                 ol_cv_func_gethostbyname_r_nargs=5
16812
16813         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16814                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16815
16816                 ol_cv_func_gethostbyname_r_nargs=6
16817
16818         else
16819                 ol_cv_func_gethostbyname_r_nargs=0
16820         fi
16821   
16822 fi
16823
16824 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16825   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16826         cat >> confdefs.h <<EOF
16827 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16828 EOF
16829
16830   fi
16831
16832 else
16833         ol_cv_func_gethostbyname_r_nargs=0
16834 fi
16835  
16836 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16837         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16838 echo "configure:16839: checking number of arguments of gethostbyaddr_r" >&5
16839 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16840   echo $ac_n "(cached) $ac_c" 1>&6
16841 else
16842   cat > conftest.$ac_ext <<EOF
16843 #line 16844 "configure"
16844 #include "confdefs.h"
16845 #include <sys/types.h>
16846 #include <sys/socket.h>
16847 #include <netinet/in.h>
16848 #include <netdb.h>
16849 #define BUFSIZE (sizeof(struct hostent)+10)
16850 int main() {
16851 struct hostent hent; char buffer[BUFSIZE]; 
16852             struct in_addr add;
16853             size_t alen=sizeof(struct in_addr);
16854             int bufsize=BUFSIZE;int h_errno;
16855                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16856                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16857 ; return 0; }
16858 EOF
16859 if { (eval echo configure:16860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16860   rm -rf conftest*
16861   ol_cv_func_gethostbyaddr_r_nargs7=yes
16862 else
16863   echo "configure: failed program was:" >&5
16864   cat conftest.$ac_ext >&5
16865   rm -rf conftest*
16866   ol_cv_func_gethostbyaddr_r_nargs7=no
16867 fi
16868 rm -f conftest*
16869
16870         cat > conftest.$ac_ext <<EOF
16871 #line 16872 "configure"
16872 #include "confdefs.h"
16873 #include <sys/types.h>
16874 #include <sys/socket.h>
16875 #include <netinet/in.h>
16876 #include <netdb.h>
16877 #define BUFSIZE (sizeof(struct hostent)+10)
16878 int main() {
16879 struct hostent hent;
16880                 struct hostent *rhent; char buffer[BUFSIZE]; 
16881                 struct in_addr add;
16882                 size_t alen=sizeof(struct in_addr);
16883                 int bufsize=BUFSIZE;int h_errno;
16884                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16885                         alen, AF_INET, &hent, buffer, bufsize, 
16886                         &rhent, &h_errno);
16887 ; return 0; }
16888 EOF
16889 if { (eval echo configure:16890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16890   rm -rf conftest*
16891   ol_cv_func_gethostbyaddr_r_nargs8=yes
16892 else
16893   echo "configure: failed program was:" >&5
16894   cat conftest.$ac_ext >&5
16895   rm -rf conftest*
16896   ol_cv_func_gethostbyaddr_r_nargs8=no
16897 fi
16898 rm -f conftest*
16899
16900         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16901                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16902
16903                 ol_cv_func_gethostbyaddr_r_nargs=7
16904
16905         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16906                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16907
16908                 ol_cv_func_gethostbyaddr_r_nargs=8
16909
16910         else
16911                 ol_cv_func_gethostbyaddr_r_nargs=0
16912         fi
16913   
16914 fi
16915
16916 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16917   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16918     cat >> confdefs.h <<EOF
16919 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16920 EOF
16921
16922   fi
16923
16924 else
16925         ol_cv_func_gethostbyaddr_r_nargs=0
16926 fi
16927
16928 ol_link_ldbm=no 
16929
16930 if test $ol_with_ldbm_api = auto \
16931         -o $ol_with_ldbm_api = berkeley \
16932         -o $ol_with_ldbm_api = bcompat ; then
16933
16934         if test $ol_with_ldbm_api = bcompat; then \
16935                 for ac_hdr in db_185.h db.h
16936 do
16937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16939 echo "configure:16940: checking for $ac_hdr" >&5
16940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16941   echo $ac_n "(cached) $ac_c" 1>&6
16942 else
16943   cat > conftest.$ac_ext <<EOF
16944 #line 16945 "configure"
16945 #include "confdefs.h"
16946 #include <$ac_hdr>
16947 EOF
16948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16949 { (eval echo configure:16950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16951 if test -z "$ac_err"; then
16952   rm -rf conftest*
16953   eval "ac_cv_header_$ac_safe=yes"
16954 else
16955   echo "$ac_err" >&5
16956   echo "configure: failed program was:" >&5
16957   cat conftest.$ac_ext >&5
16958   rm -rf conftest*
16959   eval "ac_cv_header_$ac_safe=no"
16960 fi
16961 rm -f conftest*
16962 fi
16963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16964   echo "$ac_t""yes" 1>&6
16965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16966   cat >> confdefs.h <<EOF
16967 #define $ac_tr_hdr 1
16968 EOF
16969  
16970 else
16971   echo "$ac_t""no" 1>&6
16972 fi
16973 done
16974
16975 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16976         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16977 echo "configure:16978: checking if Berkeley DB header compatibility" >&5
16978 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16979   echo $ac_n "(cached) $ac_c" 1>&6
16980 else
16981   
16982                 cat > conftest.$ac_ext <<EOF
16983 #line 16984 "configure"
16984 #include "confdefs.h"
16985
16986 #if HAVE_DB_185_H
16987 #       include <db_185.h>
16988 #else
16989 #       include <db.h>
16990 #endif
16991
16992  /* this check could be improved */
16993 #ifndef DB_VERSION_MAJOR
16994 #       define DB_VERSION_MAJOR 1
16995 #endif
16996
16997 #if DB_VERSION_MAJOR == 1 
16998         __db_version_1
16999 #endif
17000
17001 EOF
17002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17003   egrep "__db_version_1" >/dev/null 2>&1; then
17004   rm -rf conftest*
17005   ol_cv_header_db1=yes
17006 else
17007   rm -rf conftest*
17008   ol_cv_header_db1=no
17009 fi
17010 rm -f conftest*
17011
17012 fi
17013
17014 echo "$ac_t""$ol_cv_header_db1" 1>&6
17015
17016         if test $ol_cv_header_db1 = yes ; then
17017                 ol_cv_lib_db=no
17018 if test $ol_cv_lib_db = no ; then
17019         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17020 echo "configure:17021: checking for Berkeley DB link (default)" >&5
17021 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17022   echo $ac_n "(cached) $ac_c" 1>&6
17023 else
17024   
17025         ol_DB_LIB=
17026         ol_LIBS=$LIBS
17027         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17028
17029         cat > conftest.$ac_ext <<EOF
17030 #line 17031 "configure"
17031 #include "confdefs.h"
17032
17033 #ifdef HAVE_DB_185_H
17034 # include <db_185.h>
17035 #else
17036 # include <db.h>
17037 #endif
17038
17039 #ifndef DB_VERSION_MAJOR
17040 # define DB_VERSION_MAJOR 1
17041 #endif
17042
17043 #ifndef NULL
17044 #define NULL ((void*)0)
17045 #endif
17046
17047 int main() {
17048
17049 #if DB_VERSION_MAJOR > 1
17050         {
17051                 char *version;
17052                 int major, minor, patch;
17053
17054                 version = db_version( &major, &minor, &patch );
17055
17056                 if( major != DB_VERSION_MAJOR ||
17057                         minor < DB_VERSION_MINOR )
17058                 {
17059                         printf("Berkeley DB version mismatch\n"
17060                                 "\theader: %s\n\tlibrary: %s\n",
17061                                 DB_VERSION_STRING, version);
17062                         return 1;
17063                 }
17064         }
17065 #endif
17066
17067 #if DB_VERSION_MAJOR > 2
17068         db_env_create( NULL, 0 );
17069 #elif DB_VERSION_MAJOR > 1
17070         db_appexit( NULL );
17071 #else
17072         (void) dbopen( NULL, 0, 0, 0, NULL);
17073 #endif
17074
17075 ; return 0; }
17076 EOF
17077 if { (eval echo configure:17078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17078   rm -rf conftest*
17079   ol_cv_db_none=yes
17080 else
17081   echo "configure: failed program was:" >&5
17082   cat conftest.$ac_ext >&5
17083   rm -rf conftest*
17084   ol_cv_db_none=no
17085 fi
17086 rm -f conftest*
17087
17088         LIBS="$ol_LIBS"
17089
17090 fi
17091
17092 echo "$ac_t""$ol_cv_db_none" 1>&6
17093
17094         if test $ol_cv_db_none = yes ; then
17095                 ol_cv_lib_db=yes
17096         fi
17097 fi
17098
17099 if test $ol_cv_lib_db = no ; then
17100         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17101 echo "configure:17102: checking for Berkeley DB link (-ldb43)" >&5
17102 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17103   echo $ac_n "(cached) $ac_c" 1>&6
17104 else
17105   
17106         ol_DB_LIB=-ldb43
17107         ol_LIBS=$LIBS
17108         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17109
17110         cat > conftest.$ac_ext <<EOF
17111 #line 17112 "configure"
17112 #include "confdefs.h"
17113
17114 #ifdef HAVE_DB_185_H
17115 # include <db_185.h>
17116 #else
17117 # include <db.h>
17118 #endif
17119
17120 #ifndef DB_VERSION_MAJOR
17121 # define DB_VERSION_MAJOR 1
17122 #endif
17123
17124 #ifndef NULL
17125 #define NULL ((void*)0)
17126 #endif
17127
17128 int main() {
17129
17130 #if DB_VERSION_MAJOR > 1
17131         {
17132                 char *version;
17133                 int major, minor, patch;
17134
17135                 version = db_version( &major, &minor, &patch );
17136
17137                 if( major != DB_VERSION_MAJOR ||
17138                         minor < DB_VERSION_MINOR )
17139                 {
17140                         printf("Berkeley DB version mismatch\n"
17141                                 "\theader: %s\n\tlibrary: %s\n",
17142                                 DB_VERSION_STRING, version);
17143                         return 1;
17144                 }
17145         }
17146 #endif
17147
17148 #if DB_VERSION_MAJOR > 2
17149         db_env_create( NULL, 0 );
17150 #elif DB_VERSION_MAJOR > 1
17151         db_appexit( NULL );
17152 #else
17153         (void) dbopen( NULL, 0, 0, 0, NULL);
17154 #endif
17155
17156 ; return 0; }
17157 EOF
17158 if { (eval echo configure:17159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17159   rm -rf conftest*
17160   ol_cv_db_db43=yes
17161 else
17162   echo "configure: failed program was:" >&5
17163   cat conftest.$ac_ext >&5
17164   rm -rf conftest*
17165   ol_cv_db_db43=no
17166 fi
17167 rm -f conftest*
17168
17169         LIBS="$ol_LIBS"
17170
17171 fi
17172
17173 echo "$ac_t""$ol_cv_db_db43" 1>&6
17174
17175         if test $ol_cv_db_db43 = yes ; then
17176                 ol_cv_lib_db=-ldb43
17177         fi
17178 fi
17179
17180 if test $ol_cv_lib_db = no ; then
17181         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17182 echo "configure:17183: checking for Berkeley DB link (-ldb-43)" >&5
17183 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17184   echo $ac_n "(cached) $ac_c" 1>&6
17185 else
17186   
17187         ol_DB_LIB=-ldb-43
17188         ol_LIBS=$LIBS
17189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17190
17191         cat > conftest.$ac_ext <<EOF
17192 #line 17193 "configure"
17193 #include "confdefs.h"
17194
17195 #ifdef HAVE_DB_185_H
17196 # include <db_185.h>
17197 #else
17198 # include <db.h>
17199 #endif
17200
17201 #ifndef DB_VERSION_MAJOR
17202 # define DB_VERSION_MAJOR 1
17203 #endif
17204
17205 #ifndef NULL
17206 #define NULL ((void*)0)
17207 #endif
17208
17209 int main() {
17210
17211 #if DB_VERSION_MAJOR > 1
17212         {
17213                 char *version;
17214                 int major, minor, patch;
17215
17216                 version = db_version( &major, &minor, &patch );
17217
17218                 if( major != DB_VERSION_MAJOR ||
17219                         minor < DB_VERSION_MINOR )
17220                 {
17221                         printf("Berkeley DB version mismatch\n"
17222                                 "\theader: %s\n\tlibrary: %s\n",
17223                                 DB_VERSION_STRING, version);
17224                         return 1;
17225                 }
17226         }
17227 #endif
17228
17229 #if DB_VERSION_MAJOR > 2
17230         db_env_create( NULL, 0 );
17231 #elif DB_VERSION_MAJOR > 1
17232         db_appexit( NULL );
17233 #else
17234         (void) dbopen( NULL, 0, 0, 0, NULL);
17235 #endif
17236
17237 ; return 0; }
17238 EOF
17239 if { (eval echo configure:17240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17240   rm -rf conftest*
17241   ol_cv_db_db_43=yes
17242 else
17243   echo "configure: failed program was:" >&5
17244   cat conftest.$ac_ext >&5
17245   rm -rf conftest*
17246   ol_cv_db_db_43=no
17247 fi
17248 rm -f conftest*
17249
17250         LIBS="$ol_LIBS"
17251
17252 fi
17253
17254 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17255
17256         if test $ol_cv_db_db_43 = yes ; then
17257                 ol_cv_lib_db=-ldb-43
17258         fi
17259 fi
17260
17261 if test $ol_cv_lib_db = no ; then
17262         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17263 echo "configure:17264: checking for Berkeley DB link (-ldb-4.3)" >&5
17264 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17265   echo $ac_n "(cached) $ac_c" 1>&6
17266 else
17267   
17268         ol_DB_LIB=-ldb-4.3
17269         ol_LIBS=$LIBS
17270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17271
17272         cat > conftest.$ac_ext <<EOF
17273 #line 17274 "configure"
17274 #include "confdefs.h"
17275
17276 #ifdef HAVE_DB_185_H
17277 # include <db_185.h>
17278 #else
17279 # include <db.h>
17280 #endif
17281
17282 #ifndef DB_VERSION_MAJOR
17283 # define DB_VERSION_MAJOR 1
17284 #endif
17285
17286 #ifndef NULL
17287 #define NULL ((void*)0)
17288 #endif
17289
17290 int main() {
17291
17292 #if DB_VERSION_MAJOR > 1
17293         {
17294                 char *version;
17295                 int major, minor, patch;
17296
17297                 version = db_version( &major, &minor, &patch );
17298
17299                 if( major != DB_VERSION_MAJOR ||
17300                         minor < DB_VERSION_MINOR )
17301                 {
17302                         printf("Berkeley DB version mismatch\n"
17303                                 "\theader: %s\n\tlibrary: %s\n",
17304                                 DB_VERSION_STRING, version);
17305                         return 1;
17306                 }
17307         }
17308 #endif
17309
17310 #if DB_VERSION_MAJOR > 2
17311         db_env_create( NULL, 0 );
17312 #elif DB_VERSION_MAJOR > 1
17313         db_appexit( NULL );
17314 #else
17315         (void) dbopen( NULL, 0, 0, 0, NULL);
17316 #endif
17317
17318 ; return 0; }
17319 EOF
17320 if { (eval echo configure:17321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17321   rm -rf conftest*
17322   ol_cv_db_db_4_dot_3=yes
17323 else
17324   echo "configure: failed program was:" >&5
17325   cat conftest.$ac_ext >&5
17326   rm -rf conftest*
17327   ol_cv_db_db_4_dot_3=no
17328 fi
17329 rm -f conftest*
17330
17331         LIBS="$ol_LIBS"
17332
17333 fi
17334
17335 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17336
17337         if test $ol_cv_db_db_4_dot_3 = yes ; then
17338                 ol_cv_lib_db=-ldb-4.3
17339         fi
17340 fi
17341
17342 if test $ol_cv_lib_db = no ; then
17343         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17344 echo "configure:17345: checking for Berkeley DB link (-ldb-4-3)" >&5
17345 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17346   echo $ac_n "(cached) $ac_c" 1>&6
17347 else
17348   
17349         ol_DB_LIB=-ldb-4-3
17350         ol_LIBS=$LIBS
17351         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17352
17353         cat > conftest.$ac_ext <<EOF
17354 #line 17355 "configure"
17355 #include "confdefs.h"
17356
17357 #ifdef HAVE_DB_185_H
17358 # include <db_185.h>
17359 #else
17360 # include <db.h>
17361 #endif
17362
17363 #ifndef DB_VERSION_MAJOR
17364 # define DB_VERSION_MAJOR 1
17365 #endif
17366
17367 #ifndef NULL
17368 #define NULL ((void*)0)
17369 #endif
17370
17371 int main() {
17372
17373 #if DB_VERSION_MAJOR > 1
17374         {
17375                 char *version;
17376                 int major, minor, patch;
17377
17378                 version = db_version( &major, &minor, &patch );
17379
17380                 if( major != DB_VERSION_MAJOR ||
17381                         minor < DB_VERSION_MINOR )
17382                 {
17383                         printf("Berkeley DB version mismatch\n"
17384                                 "\theader: %s\n\tlibrary: %s\n",
17385                                 DB_VERSION_STRING, version);
17386                         return 1;
17387                 }
17388         }
17389 #endif
17390
17391 #if DB_VERSION_MAJOR > 2
17392         db_env_create( NULL, 0 );
17393 #elif DB_VERSION_MAJOR > 1
17394         db_appexit( NULL );
17395 #else
17396         (void) dbopen( NULL, 0, 0, 0, NULL);
17397 #endif
17398
17399 ; return 0; }
17400 EOF
17401 if { (eval echo configure:17402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17402   rm -rf conftest*
17403   ol_cv_db_db_4_3=yes
17404 else
17405   echo "configure: failed program was:" >&5
17406   cat conftest.$ac_ext >&5
17407   rm -rf conftest*
17408   ol_cv_db_db_4_3=no
17409 fi
17410 rm -f conftest*
17411
17412         LIBS="$ol_LIBS"
17413
17414 fi
17415
17416 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17417
17418         if test $ol_cv_db_db_4_3 = yes ; then
17419                 ol_cv_lib_db=-ldb-4-3
17420         fi
17421 fi
17422
17423 if test $ol_cv_lib_db = no ; then
17424         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17425 echo "configure:17426: checking for Berkeley DB link (-ldb42)" >&5
17426 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17427   echo $ac_n "(cached) $ac_c" 1>&6
17428 else
17429   
17430         ol_DB_LIB=-ldb42
17431         ol_LIBS=$LIBS
17432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17433
17434         cat > conftest.$ac_ext <<EOF
17435 #line 17436 "configure"
17436 #include "confdefs.h"
17437
17438 #ifdef HAVE_DB_185_H
17439 # include <db_185.h>
17440 #else
17441 # include <db.h>
17442 #endif
17443
17444 #ifndef DB_VERSION_MAJOR
17445 # define DB_VERSION_MAJOR 1
17446 #endif
17447
17448 #ifndef NULL
17449 #define NULL ((void*)0)
17450 #endif
17451
17452 int main() {
17453
17454 #if DB_VERSION_MAJOR > 1
17455         {
17456                 char *version;
17457                 int major, minor, patch;
17458
17459                 version = db_version( &major, &minor, &patch );
17460
17461                 if( major != DB_VERSION_MAJOR ||
17462                         minor < DB_VERSION_MINOR )
17463                 {
17464                         printf("Berkeley DB version mismatch\n"
17465                                 "\theader: %s\n\tlibrary: %s\n",
17466                                 DB_VERSION_STRING, version);
17467                         return 1;
17468                 }
17469         }
17470 #endif
17471
17472 #if DB_VERSION_MAJOR > 2
17473         db_env_create( NULL, 0 );
17474 #elif DB_VERSION_MAJOR > 1
17475         db_appexit( NULL );
17476 #else
17477         (void) dbopen( NULL, 0, 0, 0, NULL);
17478 #endif
17479
17480 ; return 0; }
17481 EOF
17482 if { (eval echo configure:17483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17483   rm -rf conftest*
17484   ol_cv_db_db42=yes
17485 else
17486   echo "configure: failed program was:" >&5
17487   cat conftest.$ac_ext >&5
17488   rm -rf conftest*
17489   ol_cv_db_db42=no
17490 fi
17491 rm -f conftest*
17492
17493         LIBS="$ol_LIBS"
17494
17495 fi
17496
17497 echo "$ac_t""$ol_cv_db_db42" 1>&6
17498
17499         if test $ol_cv_db_db42 = yes ; then
17500                 ol_cv_lib_db=-ldb42
17501         fi
17502 fi
17503
17504 if test $ol_cv_lib_db = no ; then
17505         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17506 echo "configure:17507: checking for Berkeley DB link (-ldb-42)" >&5
17507 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17508   echo $ac_n "(cached) $ac_c" 1>&6
17509 else
17510   
17511         ol_DB_LIB=-ldb-42
17512         ol_LIBS=$LIBS
17513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17514
17515         cat > conftest.$ac_ext <<EOF
17516 #line 17517 "configure"
17517 #include "confdefs.h"
17518
17519 #ifdef HAVE_DB_185_H
17520 # include <db_185.h>
17521 #else
17522 # include <db.h>
17523 #endif
17524
17525 #ifndef DB_VERSION_MAJOR
17526 # define DB_VERSION_MAJOR 1
17527 #endif
17528
17529 #ifndef NULL
17530 #define NULL ((void*)0)
17531 #endif
17532
17533 int main() {
17534
17535 #if DB_VERSION_MAJOR > 1
17536         {
17537                 char *version;
17538                 int major, minor, patch;
17539
17540                 version = db_version( &major, &minor, &patch );
17541
17542                 if( major != DB_VERSION_MAJOR ||
17543                         minor < DB_VERSION_MINOR )
17544                 {
17545                         printf("Berkeley DB version mismatch\n"
17546                                 "\theader: %s\n\tlibrary: %s\n",
17547                                 DB_VERSION_STRING, version);
17548                         return 1;
17549                 }
17550         }
17551 #endif
17552
17553 #if DB_VERSION_MAJOR > 2
17554         db_env_create( NULL, 0 );
17555 #elif DB_VERSION_MAJOR > 1
17556         db_appexit( NULL );
17557 #else
17558         (void) dbopen( NULL, 0, 0, 0, NULL);
17559 #endif
17560
17561 ; return 0; }
17562 EOF
17563 if { (eval echo configure:17564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17564   rm -rf conftest*
17565   ol_cv_db_db_42=yes
17566 else
17567   echo "configure: failed program was:" >&5
17568   cat conftest.$ac_ext >&5
17569   rm -rf conftest*
17570   ol_cv_db_db_42=no
17571 fi
17572 rm -f conftest*
17573
17574         LIBS="$ol_LIBS"
17575
17576 fi
17577
17578 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17579
17580         if test $ol_cv_db_db_42 = yes ; then
17581                 ol_cv_lib_db=-ldb-42
17582         fi
17583 fi
17584
17585 if test $ol_cv_lib_db = no ; then
17586         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17587 echo "configure:17588: checking for Berkeley DB link (-ldb-4.2)" >&5
17588 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17589   echo $ac_n "(cached) $ac_c" 1>&6
17590 else
17591   
17592         ol_DB_LIB=-ldb-4.2
17593         ol_LIBS=$LIBS
17594         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17595
17596         cat > conftest.$ac_ext <<EOF
17597 #line 17598 "configure"
17598 #include "confdefs.h"
17599
17600 #ifdef HAVE_DB_185_H
17601 # include <db_185.h>
17602 #else
17603 # include <db.h>
17604 #endif
17605
17606 #ifndef DB_VERSION_MAJOR
17607 # define DB_VERSION_MAJOR 1
17608 #endif
17609
17610 #ifndef NULL
17611 #define NULL ((void*)0)
17612 #endif
17613
17614 int main() {
17615
17616 #if DB_VERSION_MAJOR > 1
17617         {
17618                 char *version;
17619                 int major, minor, patch;
17620
17621                 version = db_version( &major, &minor, &patch );
17622
17623                 if( major != DB_VERSION_MAJOR ||
17624                         minor < DB_VERSION_MINOR )
17625                 {
17626                         printf("Berkeley DB version mismatch\n"
17627                                 "\theader: %s\n\tlibrary: %s\n",
17628                                 DB_VERSION_STRING, version);
17629                         return 1;
17630                 }
17631         }
17632 #endif
17633
17634 #if DB_VERSION_MAJOR > 2
17635         db_env_create( NULL, 0 );
17636 #elif DB_VERSION_MAJOR > 1
17637         db_appexit( NULL );
17638 #else
17639         (void) dbopen( NULL, 0, 0, 0, NULL);
17640 #endif
17641
17642 ; return 0; }
17643 EOF
17644 if { (eval echo configure:17645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17645   rm -rf conftest*
17646   ol_cv_db_db_4_dot_2=yes
17647 else
17648   echo "configure: failed program was:" >&5
17649   cat conftest.$ac_ext >&5
17650   rm -rf conftest*
17651   ol_cv_db_db_4_dot_2=no
17652 fi
17653 rm -f conftest*
17654
17655         LIBS="$ol_LIBS"
17656
17657 fi
17658
17659 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17660
17661         if test $ol_cv_db_db_4_dot_2 = yes ; then
17662                 ol_cv_lib_db=-ldb-4.2
17663         fi
17664 fi
17665
17666 if test $ol_cv_lib_db = no ; then
17667         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17668 echo "configure:17669: checking for Berkeley DB link (-ldb-4-2)" >&5
17669 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17670   echo $ac_n "(cached) $ac_c" 1>&6
17671 else
17672   
17673         ol_DB_LIB=-ldb-4-2
17674         ol_LIBS=$LIBS
17675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17676
17677         cat > conftest.$ac_ext <<EOF
17678 #line 17679 "configure"
17679 #include "confdefs.h"
17680
17681 #ifdef HAVE_DB_185_H
17682 # include <db_185.h>
17683 #else
17684 # include <db.h>
17685 #endif
17686
17687 #ifndef DB_VERSION_MAJOR
17688 # define DB_VERSION_MAJOR 1
17689 #endif
17690
17691 #ifndef NULL
17692 #define NULL ((void*)0)
17693 #endif
17694
17695 int main() {
17696
17697 #if DB_VERSION_MAJOR > 1
17698         {
17699                 char *version;
17700                 int major, minor, patch;
17701
17702                 version = db_version( &major, &minor, &patch );
17703
17704                 if( major != DB_VERSION_MAJOR ||
17705                         minor < DB_VERSION_MINOR )
17706                 {
17707                         printf("Berkeley DB version mismatch\n"
17708                                 "\theader: %s\n\tlibrary: %s\n",
17709                                 DB_VERSION_STRING, version);
17710                         return 1;
17711                 }
17712         }
17713 #endif
17714
17715 #if DB_VERSION_MAJOR > 2
17716         db_env_create( NULL, 0 );
17717 #elif DB_VERSION_MAJOR > 1
17718         db_appexit( NULL );
17719 #else
17720         (void) dbopen( NULL, 0, 0, 0, NULL);
17721 #endif
17722
17723 ; return 0; }
17724 EOF
17725 if { (eval echo configure:17726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17726   rm -rf conftest*
17727   ol_cv_db_db_4_2=yes
17728 else
17729   echo "configure: failed program was:" >&5
17730   cat conftest.$ac_ext >&5
17731   rm -rf conftest*
17732   ol_cv_db_db_4_2=no
17733 fi
17734 rm -f conftest*
17735
17736         LIBS="$ol_LIBS"
17737
17738 fi
17739
17740 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17741
17742         if test $ol_cv_db_db_4_2 = yes ; then
17743                 ol_cv_lib_db=-ldb-4-2
17744         fi
17745 fi
17746
17747 if test $ol_cv_lib_db = no ; then
17748         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17749 echo "configure:17750: checking for Berkeley DB link (-ldb-4)" >&5
17750 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17751   echo $ac_n "(cached) $ac_c" 1>&6
17752 else
17753   
17754         ol_DB_LIB=-ldb-4
17755         ol_LIBS=$LIBS
17756         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17757
17758         cat > conftest.$ac_ext <<EOF
17759 #line 17760 "configure"
17760 #include "confdefs.h"
17761
17762 #ifdef HAVE_DB_185_H
17763 # include <db_185.h>
17764 #else
17765 # include <db.h>
17766 #endif
17767
17768 #ifndef DB_VERSION_MAJOR
17769 # define DB_VERSION_MAJOR 1
17770 #endif
17771
17772 #ifndef NULL
17773 #define NULL ((void*)0)
17774 #endif
17775
17776 int main() {
17777
17778 #if DB_VERSION_MAJOR > 1
17779         {
17780                 char *version;
17781                 int major, minor, patch;
17782
17783                 version = db_version( &major, &minor, &patch );
17784
17785                 if( major != DB_VERSION_MAJOR ||
17786                         minor < DB_VERSION_MINOR )
17787                 {
17788                         printf("Berkeley DB version mismatch\n"
17789                                 "\theader: %s\n\tlibrary: %s\n",
17790                                 DB_VERSION_STRING, version);
17791                         return 1;
17792                 }
17793         }
17794 #endif
17795
17796 #if DB_VERSION_MAJOR > 2
17797         db_env_create( NULL, 0 );
17798 #elif DB_VERSION_MAJOR > 1
17799         db_appexit( NULL );
17800 #else
17801         (void) dbopen( NULL, 0, 0, 0, NULL);
17802 #endif
17803
17804 ; return 0; }
17805 EOF
17806 if { (eval echo configure:17807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17807   rm -rf conftest*
17808   ol_cv_db_db_4=yes
17809 else
17810   echo "configure: failed program was:" >&5
17811   cat conftest.$ac_ext >&5
17812   rm -rf conftest*
17813   ol_cv_db_db_4=no
17814 fi
17815 rm -f conftest*
17816
17817         LIBS="$ol_LIBS"
17818
17819 fi
17820
17821 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17822
17823         if test $ol_cv_db_db_4 = yes ; then
17824                 ol_cv_lib_db=-ldb-4
17825         fi
17826 fi
17827
17828 if test $ol_cv_lib_db = no ; then
17829         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17830 echo "configure:17831: checking for Berkeley DB link (-ldb4)" >&5
17831 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17832   echo $ac_n "(cached) $ac_c" 1>&6
17833 else
17834   
17835         ol_DB_LIB=-ldb4
17836         ol_LIBS=$LIBS
17837         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17838
17839         cat > conftest.$ac_ext <<EOF
17840 #line 17841 "configure"
17841 #include "confdefs.h"
17842
17843 #ifdef HAVE_DB_185_H
17844 # include <db_185.h>
17845 #else
17846 # include <db.h>
17847 #endif
17848
17849 #ifndef DB_VERSION_MAJOR
17850 # define DB_VERSION_MAJOR 1
17851 #endif
17852
17853 #ifndef NULL
17854 #define NULL ((void*)0)
17855 #endif
17856
17857 int main() {
17858
17859 #if DB_VERSION_MAJOR > 1
17860         {
17861                 char *version;
17862                 int major, minor, patch;
17863
17864                 version = db_version( &major, &minor, &patch );
17865
17866                 if( major != DB_VERSION_MAJOR ||
17867                         minor < DB_VERSION_MINOR )
17868                 {
17869                         printf("Berkeley DB version mismatch\n"
17870                                 "\theader: %s\n\tlibrary: %s\n",
17871                                 DB_VERSION_STRING, version);
17872                         return 1;
17873                 }
17874         }
17875 #endif
17876
17877 #if DB_VERSION_MAJOR > 2
17878         db_env_create( NULL, 0 );
17879 #elif DB_VERSION_MAJOR > 1
17880         db_appexit( NULL );
17881 #else
17882         (void) dbopen( NULL, 0, 0, 0, NULL);
17883 #endif
17884
17885 ; return 0; }
17886 EOF
17887 if { (eval echo configure:17888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17888   rm -rf conftest*
17889   ol_cv_db_db4=yes
17890 else
17891   echo "configure: failed program was:" >&5
17892   cat conftest.$ac_ext >&5
17893   rm -rf conftest*
17894   ol_cv_db_db4=no
17895 fi
17896 rm -f conftest*
17897
17898         LIBS="$ol_LIBS"
17899
17900 fi
17901
17902 echo "$ac_t""$ol_cv_db_db4" 1>&6
17903
17904         if test $ol_cv_db_db4 = yes ; then
17905                 ol_cv_lib_db=-ldb4
17906         fi
17907 fi
17908
17909 if test $ol_cv_lib_db = no ; then
17910         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17911 echo "configure:17912: checking for Berkeley DB link (-ldb)" >&5
17912 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17913   echo $ac_n "(cached) $ac_c" 1>&6
17914 else
17915   
17916         ol_DB_LIB=-ldb
17917         ol_LIBS=$LIBS
17918         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17919
17920         cat > conftest.$ac_ext <<EOF
17921 #line 17922 "configure"
17922 #include "confdefs.h"
17923
17924 #ifdef HAVE_DB_185_H
17925 # include <db_185.h>
17926 #else
17927 # include <db.h>
17928 #endif
17929
17930 #ifndef DB_VERSION_MAJOR
17931 # define DB_VERSION_MAJOR 1
17932 #endif
17933
17934 #ifndef NULL
17935 #define NULL ((void*)0)
17936 #endif
17937
17938 int main() {
17939
17940 #if DB_VERSION_MAJOR > 1
17941         {
17942                 char *version;
17943                 int major, minor, patch;
17944
17945                 version = db_version( &major, &minor, &patch );
17946
17947                 if( major != DB_VERSION_MAJOR ||
17948                         minor < DB_VERSION_MINOR )
17949                 {
17950                         printf("Berkeley DB version mismatch\n"
17951                                 "\theader: %s\n\tlibrary: %s\n",
17952                                 DB_VERSION_STRING, version);
17953                         return 1;
17954                 }
17955         }
17956 #endif
17957
17958 #if DB_VERSION_MAJOR > 2
17959         db_env_create( NULL, 0 );
17960 #elif DB_VERSION_MAJOR > 1
17961         db_appexit( NULL );
17962 #else
17963         (void) dbopen( NULL, 0, 0, 0, NULL);
17964 #endif
17965
17966 ; return 0; }
17967 EOF
17968 if { (eval echo configure:17969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17969   rm -rf conftest*
17970   ol_cv_db_db=yes
17971 else
17972   echo "configure: failed program was:" >&5
17973   cat conftest.$ac_ext >&5
17974   rm -rf conftest*
17975   ol_cv_db_db=no
17976 fi
17977 rm -f conftest*
17978
17979         LIBS="$ol_LIBS"
17980
17981 fi
17982
17983 echo "$ac_t""$ol_cv_db_db" 1>&6
17984
17985         if test $ol_cv_db_db = yes ; then
17986                 ol_cv_lib_db=-ldb
17987         fi
17988 fi
17989
17990 if test $ol_cv_lib_db = no ; then
17991         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17992 echo "configure:17993: checking for Berkeley DB link (-ldb41)" >&5
17993 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17994   echo $ac_n "(cached) $ac_c" 1>&6
17995 else
17996   
17997         ol_DB_LIB=-ldb41
17998         ol_LIBS=$LIBS
17999         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18000
18001         cat > conftest.$ac_ext <<EOF
18002 #line 18003 "configure"
18003 #include "confdefs.h"
18004
18005 #ifdef HAVE_DB_185_H
18006 # include <db_185.h>
18007 #else
18008 # include <db.h>
18009 #endif
18010
18011 #ifndef DB_VERSION_MAJOR
18012 # define DB_VERSION_MAJOR 1
18013 #endif
18014
18015 #ifndef NULL
18016 #define NULL ((void*)0)
18017 #endif
18018
18019 int main() {
18020
18021 #if DB_VERSION_MAJOR > 1
18022         {
18023                 char *version;
18024                 int major, minor, patch;
18025
18026                 version = db_version( &major, &minor, &patch );
18027
18028                 if( major != DB_VERSION_MAJOR ||
18029                         minor < DB_VERSION_MINOR )
18030                 {
18031                         printf("Berkeley DB version mismatch\n"
18032                                 "\theader: %s\n\tlibrary: %s\n",
18033                                 DB_VERSION_STRING, version);
18034                         return 1;
18035                 }
18036         }
18037 #endif
18038
18039 #if DB_VERSION_MAJOR > 2
18040         db_env_create( NULL, 0 );
18041 #elif DB_VERSION_MAJOR > 1
18042         db_appexit( NULL );
18043 #else
18044         (void) dbopen( NULL, 0, 0, 0, NULL);
18045 #endif
18046
18047 ; return 0; }
18048 EOF
18049 if { (eval echo configure:18050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18050   rm -rf conftest*
18051   ol_cv_db_db41=yes
18052 else
18053   echo "configure: failed program was:" >&5
18054   cat conftest.$ac_ext >&5
18055   rm -rf conftest*
18056   ol_cv_db_db41=no
18057 fi
18058 rm -f conftest*
18059
18060         LIBS="$ol_LIBS"
18061
18062 fi
18063
18064 echo "$ac_t""$ol_cv_db_db41" 1>&6
18065
18066         if test $ol_cv_db_db41 = yes ; then
18067                 ol_cv_lib_db=-ldb41
18068         fi
18069 fi
18070
18071 if test $ol_cv_lib_db = no ; then
18072         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18073 echo "configure:18074: checking for Berkeley DB link (-ldb-41)" >&5
18074 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18075   echo $ac_n "(cached) $ac_c" 1>&6
18076 else
18077   
18078         ol_DB_LIB=-ldb-41
18079         ol_LIBS=$LIBS
18080         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18081
18082         cat > conftest.$ac_ext <<EOF
18083 #line 18084 "configure"
18084 #include "confdefs.h"
18085
18086 #ifdef HAVE_DB_185_H
18087 # include <db_185.h>
18088 #else
18089 # include <db.h>
18090 #endif
18091
18092 #ifndef DB_VERSION_MAJOR
18093 # define DB_VERSION_MAJOR 1
18094 #endif
18095
18096 #ifndef NULL
18097 #define NULL ((void*)0)
18098 #endif
18099
18100 int main() {
18101
18102 #if DB_VERSION_MAJOR > 1
18103         {
18104                 char *version;
18105                 int major, minor, patch;
18106
18107                 version = db_version( &major, &minor, &patch );
18108
18109                 if( major != DB_VERSION_MAJOR ||
18110                         minor < DB_VERSION_MINOR )
18111                 {
18112                         printf("Berkeley DB version mismatch\n"
18113                                 "\theader: %s\n\tlibrary: %s\n",
18114                                 DB_VERSION_STRING, version);
18115                         return 1;
18116                 }
18117         }
18118 #endif
18119
18120 #if DB_VERSION_MAJOR > 2
18121         db_env_create( NULL, 0 );
18122 #elif DB_VERSION_MAJOR > 1
18123         db_appexit( NULL );
18124 #else
18125         (void) dbopen( NULL, 0, 0, 0, NULL);
18126 #endif
18127
18128 ; return 0; }
18129 EOF
18130 if { (eval echo configure:18131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18131   rm -rf conftest*
18132   ol_cv_db_db_41=yes
18133 else
18134   echo "configure: failed program was:" >&5
18135   cat conftest.$ac_ext >&5
18136   rm -rf conftest*
18137   ol_cv_db_db_41=no
18138 fi
18139 rm -f conftest*
18140
18141         LIBS="$ol_LIBS"
18142
18143 fi
18144
18145 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18146
18147         if test $ol_cv_db_db_41 = yes ; then
18148                 ol_cv_lib_db=-ldb-41
18149         fi
18150 fi
18151
18152 if test $ol_cv_lib_db = no ; then
18153         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18154 echo "configure:18155: checking for Berkeley DB link (-ldb-4.1)" >&5
18155 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18156   echo $ac_n "(cached) $ac_c" 1>&6
18157 else
18158   
18159         ol_DB_LIB=-ldb-4.1
18160         ol_LIBS=$LIBS
18161         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18162
18163         cat > conftest.$ac_ext <<EOF
18164 #line 18165 "configure"
18165 #include "confdefs.h"
18166
18167 #ifdef HAVE_DB_185_H
18168 # include <db_185.h>
18169 #else
18170 # include <db.h>
18171 #endif
18172
18173 #ifndef DB_VERSION_MAJOR
18174 # define DB_VERSION_MAJOR 1
18175 #endif
18176
18177 #ifndef NULL
18178 #define NULL ((void*)0)
18179 #endif
18180
18181 int main() {
18182
18183 #if DB_VERSION_MAJOR > 1
18184         {
18185                 char *version;
18186                 int major, minor, patch;
18187
18188                 version = db_version( &major, &minor, &patch );
18189
18190                 if( major != DB_VERSION_MAJOR ||
18191                         minor < DB_VERSION_MINOR )
18192                 {
18193                         printf("Berkeley DB version mismatch\n"
18194                                 "\theader: %s\n\tlibrary: %s\n",
18195                                 DB_VERSION_STRING, version);
18196                         return 1;
18197                 }
18198         }
18199 #endif
18200
18201 #if DB_VERSION_MAJOR > 2
18202         db_env_create( NULL, 0 );
18203 #elif DB_VERSION_MAJOR > 1
18204         db_appexit( NULL );
18205 #else
18206         (void) dbopen( NULL, 0, 0, 0, NULL);
18207 #endif
18208
18209 ; return 0; }
18210 EOF
18211 if { (eval echo configure:18212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18212   rm -rf conftest*
18213   ol_cv_db_db_4_dot_1=yes
18214 else
18215   echo "configure: failed program was:" >&5
18216   cat conftest.$ac_ext >&5
18217   rm -rf conftest*
18218   ol_cv_db_db_4_dot_1=no
18219 fi
18220 rm -f conftest*
18221
18222         LIBS="$ol_LIBS"
18223
18224 fi
18225
18226 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18227
18228         if test $ol_cv_db_db_4_dot_1 = yes ; then
18229                 ol_cv_lib_db=-ldb-4.1
18230         fi
18231 fi
18232
18233 if test $ol_cv_lib_db = no ; then
18234         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18235 echo "configure:18236: checking for Berkeley DB link (-ldb-4-1)" >&5
18236 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18237   echo $ac_n "(cached) $ac_c" 1>&6
18238 else
18239   
18240         ol_DB_LIB=-ldb-4-1
18241         ol_LIBS=$LIBS
18242         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18243
18244         cat > conftest.$ac_ext <<EOF
18245 #line 18246 "configure"
18246 #include "confdefs.h"
18247
18248 #ifdef HAVE_DB_185_H
18249 # include <db_185.h>
18250 #else
18251 # include <db.h>
18252 #endif
18253
18254 #ifndef DB_VERSION_MAJOR
18255 # define DB_VERSION_MAJOR 1
18256 #endif
18257
18258 #ifndef NULL
18259 #define NULL ((void*)0)
18260 #endif
18261
18262 int main() {
18263
18264 #if DB_VERSION_MAJOR > 1
18265         {
18266                 char *version;
18267                 int major, minor, patch;
18268
18269                 version = db_version( &major, &minor, &patch );
18270
18271                 if( major != DB_VERSION_MAJOR ||
18272                         minor < DB_VERSION_MINOR )
18273                 {
18274                         printf("Berkeley DB version mismatch\n"
18275                                 "\theader: %s\n\tlibrary: %s\n",
18276                                 DB_VERSION_STRING, version);
18277                         return 1;
18278                 }
18279         }
18280 #endif
18281
18282 #if DB_VERSION_MAJOR > 2
18283         db_env_create( NULL, 0 );
18284 #elif DB_VERSION_MAJOR > 1
18285         db_appexit( NULL );
18286 #else
18287         (void) dbopen( NULL, 0, 0, 0, NULL);
18288 #endif
18289
18290 ; return 0; }
18291 EOF
18292 if { (eval echo configure:18293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18293   rm -rf conftest*
18294   ol_cv_db_db_4_1=yes
18295 else
18296   echo "configure: failed program was:" >&5
18297   cat conftest.$ac_ext >&5
18298   rm -rf conftest*
18299   ol_cv_db_db_4_1=no
18300 fi
18301 rm -f conftest*
18302
18303         LIBS="$ol_LIBS"
18304
18305 fi
18306
18307 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18308
18309         if test $ol_cv_db_db_4_1 = yes ; then
18310                 ol_cv_lib_db=-ldb-4-1
18311         fi
18312 fi
18313
18314 if test $ol_cv_lib_db = no ; then
18315         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18316 echo "configure:18317: checking for Berkeley DB link (-ldb3)" >&5
18317 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18318   echo $ac_n "(cached) $ac_c" 1>&6
18319 else
18320   
18321         ol_DB_LIB=-ldb3
18322         ol_LIBS=$LIBS
18323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18324
18325         cat > conftest.$ac_ext <<EOF
18326 #line 18327 "configure"
18327 #include "confdefs.h"
18328
18329 #ifdef HAVE_DB_185_H
18330 # include <db_185.h>
18331 #else
18332 # include <db.h>
18333 #endif
18334
18335 #ifndef DB_VERSION_MAJOR
18336 # define DB_VERSION_MAJOR 1
18337 #endif
18338
18339 #ifndef NULL
18340 #define NULL ((void*)0)
18341 #endif
18342
18343 int main() {
18344
18345 #if DB_VERSION_MAJOR > 1
18346         {
18347                 char *version;
18348                 int major, minor, patch;
18349
18350                 version = db_version( &major, &minor, &patch );
18351
18352                 if( major != DB_VERSION_MAJOR ||
18353                         minor < DB_VERSION_MINOR )
18354                 {
18355                         printf("Berkeley DB version mismatch\n"
18356                                 "\theader: %s\n\tlibrary: %s\n",
18357                                 DB_VERSION_STRING, version);
18358                         return 1;
18359                 }
18360         }
18361 #endif
18362
18363 #if DB_VERSION_MAJOR > 2
18364         db_env_create( NULL, 0 );
18365 #elif DB_VERSION_MAJOR > 1
18366         db_appexit( NULL );
18367 #else
18368         (void) dbopen( NULL, 0, 0, 0, NULL);
18369 #endif
18370
18371 ; return 0; }
18372 EOF
18373 if { (eval echo configure:18374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18374   rm -rf conftest*
18375   ol_cv_db_db3=yes
18376 else
18377   echo "configure: failed program was:" >&5
18378   cat conftest.$ac_ext >&5
18379   rm -rf conftest*
18380   ol_cv_db_db3=no
18381 fi
18382 rm -f conftest*
18383
18384         LIBS="$ol_LIBS"
18385
18386 fi
18387
18388 echo "$ac_t""$ol_cv_db_db3" 1>&6
18389
18390         if test $ol_cv_db_db3 = yes ; then
18391                 ol_cv_lib_db=-ldb3
18392         fi
18393 fi
18394
18395 if test $ol_cv_lib_db = no ; then
18396         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18397 echo "configure:18398: checking for Berkeley DB link (-ldb-3)" >&5
18398 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18399   echo $ac_n "(cached) $ac_c" 1>&6
18400 else
18401   
18402         ol_DB_LIB=-ldb-3
18403         ol_LIBS=$LIBS
18404         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18405
18406         cat > conftest.$ac_ext <<EOF
18407 #line 18408 "configure"
18408 #include "confdefs.h"
18409
18410 #ifdef HAVE_DB_185_H
18411 # include <db_185.h>
18412 #else
18413 # include <db.h>
18414 #endif
18415
18416 #ifndef DB_VERSION_MAJOR
18417 # define DB_VERSION_MAJOR 1
18418 #endif
18419
18420 #ifndef NULL
18421 #define NULL ((void*)0)
18422 #endif
18423
18424 int main() {
18425
18426 #if DB_VERSION_MAJOR > 1
18427         {
18428                 char *version;
18429                 int major, minor, patch;
18430
18431                 version = db_version( &major, &minor, &patch );
18432
18433                 if( major != DB_VERSION_MAJOR ||
18434                         minor < DB_VERSION_MINOR )
18435                 {
18436                         printf("Berkeley DB version mismatch\n"
18437                                 "\theader: %s\n\tlibrary: %s\n",
18438                                 DB_VERSION_STRING, version);
18439                         return 1;
18440                 }
18441         }
18442 #endif
18443
18444 #if DB_VERSION_MAJOR > 2
18445         db_env_create( NULL, 0 );
18446 #elif DB_VERSION_MAJOR > 1
18447         db_appexit( NULL );
18448 #else
18449         (void) dbopen( NULL, 0, 0, 0, NULL);
18450 #endif
18451
18452 ; return 0; }
18453 EOF
18454 if { (eval echo configure:18455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18455   rm -rf conftest*
18456   ol_cv_db_db_3=yes
18457 else
18458   echo "configure: failed program was:" >&5
18459   cat conftest.$ac_ext >&5
18460   rm -rf conftest*
18461   ol_cv_db_db_3=no
18462 fi
18463 rm -f conftest*
18464
18465         LIBS="$ol_LIBS"
18466
18467 fi
18468
18469 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18470
18471         if test $ol_cv_db_db_3 = yes ; then
18472                 ol_cv_lib_db=-ldb-3
18473         fi
18474 fi
18475
18476 if test $ol_cv_lib_db = no ; then
18477         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18478 echo "configure:18479: checking for Berkeley DB link (-ldb2)" >&5
18479 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18480   echo $ac_n "(cached) $ac_c" 1>&6
18481 else
18482   
18483         ol_DB_LIB=-ldb2
18484         ol_LIBS=$LIBS
18485         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18486
18487         cat > conftest.$ac_ext <<EOF
18488 #line 18489 "configure"
18489 #include "confdefs.h"
18490
18491 #ifdef HAVE_DB_185_H
18492 # include <db_185.h>
18493 #else
18494 # include <db.h>
18495 #endif
18496
18497 #ifndef DB_VERSION_MAJOR
18498 # define DB_VERSION_MAJOR 1
18499 #endif
18500
18501 #ifndef NULL
18502 #define NULL ((void*)0)
18503 #endif
18504
18505 int main() {
18506
18507 #if DB_VERSION_MAJOR > 1
18508         {
18509                 char *version;
18510                 int major, minor, patch;
18511
18512                 version = db_version( &major, &minor, &patch );
18513
18514                 if( major != DB_VERSION_MAJOR ||
18515                         minor < DB_VERSION_MINOR )
18516                 {
18517                         printf("Berkeley DB version mismatch\n"
18518                                 "\theader: %s\n\tlibrary: %s\n",
18519                                 DB_VERSION_STRING, version);
18520                         return 1;
18521                 }
18522         }
18523 #endif
18524
18525 #if DB_VERSION_MAJOR > 2
18526         db_env_create( NULL, 0 );
18527 #elif DB_VERSION_MAJOR > 1
18528         db_appexit( NULL );
18529 #else
18530         (void) dbopen( NULL, 0, 0, 0, NULL);
18531 #endif
18532
18533 ; return 0; }
18534 EOF
18535 if { (eval echo configure:18536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18536   rm -rf conftest*
18537   ol_cv_db_db2=yes
18538 else
18539   echo "configure: failed program was:" >&5
18540   cat conftest.$ac_ext >&5
18541   rm -rf conftest*
18542   ol_cv_db_db2=no
18543 fi
18544 rm -f conftest*
18545
18546         LIBS="$ol_LIBS"
18547
18548 fi
18549
18550 echo "$ac_t""$ol_cv_db_db2" 1>&6
18551
18552         if test $ol_cv_db_db2 = yes ; then
18553                 ol_cv_lib_db=-ldb2
18554         fi
18555 fi
18556
18557 if test $ol_cv_lib_db = no ; then
18558         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18559 echo "configure:18560: checking for Berkeley DB link (-ldb-2)" >&5
18560 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18561   echo $ac_n "(cached) $ac_c" 1>&6
18562 else
18563   
18564         ol_DB_LIB=-ldb-2
18565         ol_LIBS=$LIBS
18566         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18567
18568         cat > conftest.$ac_ext <<EOF
18569 #line 18570 "configure"
18570 #include "confdefs.h"
18571
18572 #ifdef HAVE_DB_185_H
18573 # include <db_185.h>
18574 #else
18575 # include <db.h>
18576 #endif
18577
18578 #ifndef DB_VERSION_MAJOR
18579 # define DB_VERSION_MAJOR 1
18580 #endif
18581
18582 #ifndef NULL
18583 #define NULL ((void*)0)
18584 #endif
18585
18586 int main() {
18587
18588 #if DB_VERSION_MAJOR > 1
18589         {
18590                 char *version;
18591                 int major, minor, patch;
18592
18593                 version = db_version( &major, &minor, &patch );
18594
18595                 if( major != DB_VERSION_MAJOR ||
18596                         minor < DB_VERSION_MINOR )
18597                 {
18598                         printf("Berkeley DB version mismatch\n"
18599                                 "\theader: %s\n\tlibrary: %s\n",
18600                                 DB_VERSION_STRING, version);
18601                         return 1;
18602                 }
18603         }
18604 #endif
18605
18606 #if DB_VERSION_MAJOR > 2
18607         db_env_create( NULL, 0 );
18608 #elif DB_VERSION_MAJOR > 1
18609         db_appexit( NULL );
18610 #else
18611         (void) dbopen( NULL, 0, 0, 0, NULL);
18612 #endif
18613
18614 ; return 0; }
18615 EOF
18616 if { (eval echo configure:18617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18617   rm -rf conftest*
18618   ol_cv_db_db_2=yes
18619 else
18620   echo "configure: failed program was:" >&5
18621   cat conftest.$ac_ext >&5
18622   rm -rf conftest*
18623   ol_cv_db_db_2=no
18624 fi
18625 rm -f conftest*
18626
18627         LIBS="$ol_LIBS"
18628
18629 fi
18630
18631 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18632
18633         if test $ol_cv_db_db_2 = yes ; then
18634                 ol_cv_lib_db=-ldb-2
18635         fi
18636 fi
18637
18638 if test $ol_cv_lib_db = no ; then
18639         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18640 echo "configure:18641: checking for Berkeley DB link (-ldb1)" >&5
18641 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18642   echo $ac_n "(cached) $ac_c" 1>&6
18643 else
18644   
18645         ol_DB_LIB=-ldb1
18646         ol_LIBS=$LIBS
18647         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18648
18649         cat > conftest.$ac_ext <<EOF
18650 #line 18651 "configure"
18651 #include "confdefs.h"
18652
18653 #ifdef HAVE_DB_185_H
18654 # include <db_185.h>
18655 #else
18656 # include <db.h>
18657 #endif
18658
18659 #ifndef DB_VERSION_MAJOR
18660 # define DB_VERSION_MAJOR 1
18661 #endif
18662
18663 #ifndef NULL
18664 #define NULL ((void*)0)
18665 #endif
18666
18667 int main() {
18668
18669 #if DB_VERSION_MAJOR > 1
18670         {
18671                 char *version;
18672                 int major, minor, patch;
18673
18674                 version = db_version( &major, &minor, &patch );
18675
18676                 if( major != DB_VERSION_MAJOR ||
18677                         minor < DB_VERSION_MINOR )
18678                 {
18679                         printf("Berkeley DB version mismatch\n"
18680                                 "\theader: %s\n\tlibrary: %s\n",
18681                                 DB_VERSION_STRING, version);
18682                         return 1;
18683                 }
18684         }
18685 #endif
18686
18687 #if DB_VERSION_MAJOR > 2
18688         db_env_create( NULL, 0 );
18689 #elif DB_VERSION_MAJOR > 1
18690         db_appexit( NULL );
18691 #else
18692         (void) dbopen( NULL, 0, 0, 0, NULL);
18693 #endif
18694
18695 ; return 0; }
18696 EOF
18697 if { (eval echo configure:18698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18698   rm -rf conftest*
18699   ol_cv_db_db1=yes
18700 else
18701   echo "configure: failed program was:" >&5
18702   cat conftest.$ac_ext >&5
18703   rm -rf conftest*
18704   ol_cv_db_db1=no
18705 fi
18706 rm -f conftest*
18707
18708         LIBS="$ol_LIBS"
18709
18710 fi
18711
18712 echo "$ac_t""$ol_cv_db_db1" 1>&6
18713
18714         if test $ol_cv_db_db1 = yes ; then
18715                 ol_cv_lib_db=-ldb1
18716         fi
18717 fi
18718
18719 if test $ol_cv_lib_db = no ; then
18720         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18721 echo "configure:18722: checking for Berkeley DB link (-ldb-1)" >&5
18722 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18723   echo $ac_n "(cached) $ac_c" 1>&6
18724 else
18725   
18726         ol_DB_LIB=-ldb-1
18727         ol_LIBS=$LIBS
18728         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18729
18730         cat > conftest.$ac_ext <<EOF
18731 #line 18732 "configure"
18732 #include "confdefs.h"
18733
18734 #ifdef HAVE_DB_185_H
18735 # include <db_185.h>
18736 #else
18737 # include <db.h>
18738 #endif
18739
18740 #ifndef DB_VERSION_MAJOR
18741 # define DB_VERSION_MAJOR 1
18742 #endif
18743
18744 #ifndef NULL
18745 #define NULL ((void*)0)
18746 #endif
18747
18748 int main() {
18749
18750 #if DB_VERSION_MAJOR > 1
18751         {
18752                 char *version;
18753                 int major, minor, patch;
18754
18755                 version = db_version( &major, &minor, &patch );
18756
18757                 if( major != DB_VERSION_MAJOR ||
18758                         minor < DB_VERSION_MINOR )
18759                 {
18760                         printf("Berkeley DB version mismatch\n"
18761                                 "\theader: %s\n\tlibrary: %s\n",
18762                                 DB_VERSION_STRING, version);
18763                         return 1;
18764                 }
18765         }
18766 #endif
18767
18768 #if DB_VERSION_MAJOR > 2
18769         db_env_create( NULL, 0 );
18770 #elif DB_VERSION_MAJOR > 1
18771         db_appexit( NULL );
18772 #else
18773         (void) dbopen( NULL, 0, 0, 0, NULL);
18774 #endif
18775
18776 ; return 0; }
18777 EOF
18778 if { (eval echo configure:18779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18779   rm -rf conftest*
18780   ol_cv_db_db_1=yes
18781 else
18782   echo "configure: failed program was:" >&5
18783   cat conftest.$ac_ext >&5
18784   rm -rf conftest*
18785   ol_cv_db_db_1=no
18786 fi
18787 rm -f conftest*
18788
18789         LIBS="$ol_LIBS"
18790
18791 fi
18792
18793 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18794
18795         if test $ol_cv_db_db_1 = yes ; then
18796                 ol_cv_lib_db=-ldb-1
18797         fi
18798 fi
18799
18800
18801                 if test "$ol_cv_lib_db" != no ; then
18802                         ol_cv_berkeley_db=yes
18803                 fi
18804         fi
18805 fi
18806
18807         else
18808                 ol_cv_berkeley_db=no
18809 for ac_hdr in db.h
18810 do
18811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18813 echo "configure:18814: checking for $ac_hdr" >&5
18814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18815   echo $ac_n "(cached) $ac_c" 1>&6
18816 else
18817   cat > conftest.$ac_ext <<EOF
18818 #line 18819 "configure"
18819 #include "confdefs.h"
18820 #include <$ac_hdr>
18821 EOF
18822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18823 { (eval echo configure:18824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18825 if test -z "$ac_err"; then
18826   rm -rf conftest*
18827   eval "ac_cv_header_$ac_safe=yes"
18828 else
18829   echo "$ac_err" >&5
18830   echo "configure: failed program was:" >&5
18831   cat conftest.$ac_ext >&5
18832   rm -rf conftest*
18833   eval "ac_cv_header_$ac_safe=no"
18834 fi
18835 rm -f conftest*
18836 fi
18837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18838   echo "$ac_t""yes" 1>&6
18839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18840   cat >> confdefs.h <<EOF
18841 #define $ac_tr_hdr 1
18842 EOF
18843  
18844 else
18845   echo "$ac_t""no" 1>&6
18846 fi
18847 done
18848
18849 if test $ac_cv_header_db_h = yes; then
18850         ol_cv_lib_db=no
18851 if test $ol_cv_lib_db = no ; then
18852         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18853 echo "configure:18854: checking for Berkeley DB link (default)" >&5
18854 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18855   echo $ac_n "(cached) $ac_c" 1>&6
18856 else
18857   
18858         ol_DB_LIB=
18859         ol_LIBS=$LIBS
18860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18861
18862         cat > conftest.$ac_ext <<EOF
18863 #line 18864 "configure"
18864 #include "confdefs.h"
18865
18866 #ifdef HAVE_DB_185_H
18867 # include <db_185.h>
18868 #else
18869 # include <db.h>
18870 #endif
18871
18872 #ifndef DB_VERSION_MAJOR
18873 # define DB_VERSION_MAJOR 1
18874 #endif
18875
18876 #ifndef NULL
18877 #define NULL ((void*)0)
18878 #endif
18879
18880 int main() {
18881
18882 #if DB_VERSION_MAJOR > 1
18883         {
18884                 char *version;
18885                 int major, minor, patch;
18886
18887                 version = db_version( &major, &minor, &patch );
18888
18889                 if( major != DB_VERSION_MAJOR ||
18890                         minor < DB_VERSION_MINOR )
18891                 {
18892                         printf("Berkeley DB version mismatch\n"
18893                                 "\theader: %s\n\tlibrary: %s\n",
18894                                 DB_VERSION_STRING, version);
18895                         return 1;
18896                 }
18897         }
18898 #endif
18899
18900 #if DB_VERSION_MAJOR > 2
18901         db_env_create( NULL, 0 );
18902 #elif DB_VERSION_MAJOR > 1
18903         db_appexit( NULL );
18904 #else
18905         (void) dbopen( NULL, 0, 0, 0, NULL);
18906 #endif
18907
18908 ; return 0; }
18909 EOF
18910 if { (eval echo configure:18911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18911   rm -rf conftest*
18912   ol_cv_db_none=yes
18913 else
18914   echo "configure: failed program was:" >&5
18915   cat conftest.$ac_ext >&5
18916   rm -rf conftest*
18917   ol_cv_db_none=no
18918 fi
18919 rm -f conftest*
18920
18921         LIBS="$ol_LIBS"
18922
18923 fi
18924
18925 echo "$ac_t""$ol_cv_db_none" 1>&6
18926
18927         if test $ol_cv_db_none = yes ; then
18928                 ol_cv_lib_db=yes
18929         fi
18930 fi
18931
18932 if test $ol_cv_lib_db = no ; then
18933         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18934 echo "configure:18935: checking for Berkeley DB link (-ldb43)" >&5
18935 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18936   echo $ac_n "(cached) $ac_c" 1>&6
18937 else
18938   
18939         ol_DB_LIB=-ldb43
18940         ol_LIBS=$LIBS
18941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18942
18943         cat > conftest.$ac_ext <<EOF
18944 #line 18945 "configure"
18945 #include "confdefs.h"
18946
18947 #ifdef HAVE_DB_185_H
18948 # include <db_185.h>
18949 #else
18950 # include <db.h>
18951 #endif
18952
18953 #ifndef DB_VERSION_MAJOR
18954 # define DB_VERSION_MAJOR 1
18955 #endif
18956
18957 #ifndef NULL
18958 #define NULL ((void*)0)
18959 #endif
18960
18961 int main() {
18962
18963 #if DB_VERSION_MAJOR > 1
18964         {
18965                 char *version;
18966                 int major, minor, patch;
18967
18968                 version = db_version( &major, &minor, &patch );
18969
18970                 if( major != DB_VERSION_MAJOR ||
18971                         minor < DB_VERSION_MINOR )
18972                 {
18973                         printf("Berkeley DB version mismatch\n"
18974                                 "\theader: %s\n\tlibrary: %s\n",
18975                                 DB_VERSION_STRING, version);
18976                         return 1;
18977                 }
18978         }
18979 #endif
18980
18981 #if DB_VERSION_MAJOR > 2
18982         db_env_create( NULL, 0 );
18983 #elif DB_VERSION_MAJOR > 1
18984         db_appexit( NULL );
18985 #else
18986         (void) dbopen( NULL, 0, 0, 0, NULL);
18987 #endif
18988
18989 ; return 0; }
18990 EOF
18991 if { (eval echo configure:18992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18992   rm -rf conftest*
18993   ol_cv_db_db43=yes
18994 else
18995   echo "configure: failed program was:" >&5
18996   cat conftest.$ac_ext >&5
18997   rm -rf conftest*
18998   ol_cv_db_db43=no
18999 fi
19000 rm -f conftest*
19001
19002         LIBS="$ol_LIBS"
19003
19004 fi
19005
19006 echo "$ac_t""$ol_cv_db_db43" 1>&6
19007
19008         if test $ol_cv_db_db43 = yes ; then
19009                 ol_cv_lib_db=-ldb43
19010         fi
19011 fi
19012
19013 if test $ol_cv_lib_db = no ; then
19014         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19015 echo "configure:19016: checking for Berkeley DB link (-ldb-43)" >&5
19016 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19017   echo $ac_n "(cached) $ac_c" 1>&6
19018 else
19019   
19020         ol_DB_LIB=-ldb-43
19021         ol_LIBS=$LIBS
19022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19023
19024         cat > conftest.$ac_ext <<EOF
19025 #line 19026 "configure"
19026 #include "confdefs.h"
19027
19028 #ifdef HAVE_DB_185_H
19029 # include <db_185.h>
19030 #else
19031 # include <db.h>
19032 #endif
19033
19034 #ifndef DB_VERSION_MAJOR
19035 # define DB_VERSION_MAJOR 1
19036 #endif
19037
19038 #ifndef NULL
19039 #define NULL ((void*)0)
19040 #endif
19041
19042 int main() {
19043
19044 #if DB_VERSION_MAJOR > 1
19045         {
19046                 char *version;
19047                 int major, minor, patch;
19048
19049                 version = db_version( &major, &minor, &patch );
19050
19051                 if( major != DB_VERSION_MAJOR ||
19052                         minor < DB_VERSION_MINOR )
19053                 {
19054                         printf("Berkeley DB version mismatch\n"
19055                                 "\theader: %s\n\tlibrary: %s\n",
19056                                 DB_VERSION_STRING, version);
19057                         return 1;
19058                 }
19059         }
19060 #endif
19061
19062 #if DB_VERSION_MAJOR > 2
19063         db_env_create( NULL, 0 );
19064 #elif DB_VERSION_MAJOR > 1
19065         db_appexit( NULL );
19066 #else
19067         (void) dbopen( NULL, 0, 0, 0, NULL);
19068 #endif
19069
19070 ; return 0; }
19071 EOF
19072 if { (eval echo configure:19073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19073   rm -rf conftest*
19074   ol_cv_db_db_43=yes
19075 else
19076   echo "configure: failed program was:" >&5
19077   cat conftest.$ac_ext >&5
19078   rm -rf conftest*
19079   ol_cv_db_db_43=no
19080 fi
19081 rm -f conftest*
19082
19083         LIBS="$ol_LIBS"
19084
19085 fi
19086
19087 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19088
19089         if test $ol_cv_db_db_43 = yes ; then
19090                 ol_cv_lib_db=-ldb-43
19091         fi
19092 fi
19093
19094 if test $ol_cv_lib_db = no ; then
19095         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19096 echo "configure:19097: checking for Berkeley DB link (-ldb-4.3)" >&5
19097 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19098   echo $ac_n "(cached) $ac_c" 1>&6
19099 else
19100   
19101         ol_DB_LIB=-ldb-4.3
19102         ol_LIBS=$LIBS
19103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19104
19105         cat > conftest.$ac_ext <<EOF
19106 #line 19107 "configure"
19107 #include "confdefs.h"
19108
19109 #ifdef HAVE_DB_185_H
19110 # include <db_185.h>
19111 #else
19112 # include <db.h>
19113 #endif
19114
19115 #ifndef DB_VERSION_MAJOR
19116 # define DB_VERSION_MAJOR 1
19117 #endif
19118
19119 #ifndef NULL
19120 #define NULL ((void*)0)
19121 #endif
19122
19123 int main() {
19124
19125 #if DB_VERSION_MAJOR > 1
19126         {
19127                 char *version;
19128                 int major, minor, patch;
19129
19130                 version = db_version( &major, &minor, &patch );
19131
19132                 if( major != DB_VERSION_MAJOR ||
19133                         minor < DB_VERSION_MINOR )
19134                 {
19135                         printf("Berkeley DB version mismatch\n"
19136                                 "\theader: %s\n\tlibrary: %s\n",
19137                                 DB_VERSION_STRING, version);
19138                         return 1;
19139                 }
19140         }
19141 #endif
19142
19143 #if DB_VERSION_MAJOR > 2
19144         db_env_create( NULL, 0 );
19145 #elif DB_VERSION_MAJOR > 1
19146         db_appexit( NULL );
19147 #else
19148         (void) dbopen( NULL, 0, 0, 0, NULL);
19149 #endif
19150
19151 ; return 0; }
19152 EOF
19153 if { (eval echo configure:19154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19154   rm -rf conftest*
19155   ol_cv_db_db_4_dot_3=yes
19156 else
19157   echo "configure: failed program was:" >&5
19158   cat conftest.$ac_ext >&5
19159   rm -rf conftest*
19160   ol_cv_db_db_4_dot_3=no
19161 fi
19162 rm -f conftest*
19163
19164         LIBS="$ol_LIBS"
19165
19166 fi
19167
19168 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19169
19170         if test $ol_cv_db_db_4_dot_3 = yes ; then
19171                 ol_cv_lib_db=-ldb-4.3
19172         fi
19173 fi
19174
19175 if test $ol_cv_lib_db = no ; then
19176         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19177 echo "configure:19178: checking for Berkeley DB link (-ldb-4-3)" >&5
19178 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19179   echo $ac_n "(cached) $ac_c" 1>&6
19180 else
19181   
19182         ol_DB_LIB=-ldb-4-3
19183         ol_LIBS=$LIBS
19184         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19185
19186         cat > conftest.$ac_ext <<EOF
19187 #line 19188 "configure"
19188 #include "confdefs.h"
19189
19190 #ifdef HAVE_DB_185_H
19191 # include <db_185.h>
19192 #else
19193 # include <db.h>
19194 #endif
19195
19196 #ifndef DB_VERSION_MAJOR
19197 # define DB_VERSION_MAJOR 1
19198 #endif
19199
19200 #ifndef NULL
19201 #define NULL ((void*)0)
19202 #endif
19203
19204 int main() {
19205
19206 #if DB_VERSION_MAJOR > 1
19207         {
19208                 char *version;
19209                 int major, minor, patch;
19210
19211                 version = db_version( &major, &minor, &patch );
19212
19213                 if( major != DB_VERSION_MAJOR ||
19214                         minor < DB_VERSION_MINOR )
19215                 {
19216                         printf("Berkeley DB version mismatch\n"
19217                                 "\theader: %s\n\tlibrary: %s\n",
19218                                 DB_VERSION_STRING, version);
19219                         return 1;
19220                 }
19221         }
19222 #endif
19223
19224 #if DB_VERSION_MAJOR > 2
19225         db_env_create( NULL, 0 );
19226 #elif DB_VERSION_MAJOR > 1
19227         db_appexit( NULL );
19228 #else
19229         (void) dbopen( NULL, 0, 0, 0, NULL);
19230 #endif
19231
19232 ; return 0; }
19233 EOF
19234 if { (eval echo configure:19235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19235   rm -rf conftest*
19236   ol_cv_db_db_4_3=yes
19237 else
19238   echo "configure: failed program was:" >&5
19239   cat conftest.$ac_ext >&5
19240   rm -rf conftest*
19241   ol_cv_db_db_4_3=no
19242 fi
19243 rm -f conftest*
19244
19245         LIBS="$ol_LIBS"
19246
19247 fi
19248
19249 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19250
19251         if test $ol_cv_db_db_4_3 = yes ; then
19252                 ol_cv_lib_db=-ldb-4-3
19253         fi
19254 fi
19255
19256 if test $ol_cv_lib_db = no ; then
19257         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19258 echo "configure:19259: checking for Berkeley DB link (-ldb42)" >&5
19259 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19260   echo $ac_n "(cached) $ac_c" 1>&6
19261 else
19262   
19263         ol_DB_LIB=-ldb42
19264         ol_LIBS=$LIBS
19265         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19266
19267         cat > conftest.$ac_ext <<EOF
19268 #line 19269 "configure"
19269 #include "confdefs.h"
19270
19271 #ifdef HAVE_DB_185_H
19272 # include <db_185.h>
19273 #else
19274 # include <db.h>
19275 #endif
19276
19277 #ifndef DB_VERSION_MAJOR
19278 # define DB_VERSION_MAJOR 1
19279 #endif
19280
19281 #ifndef NULL
19282 #define NULL ((void*)0)
19283 #endif
19284
19285 int main() {
19286
19287 #if DB_VERSION_MAJOR > 1
19288         {
19289                 char *version;
19290                 int major, minor, patch;
19291
19292                 version = db_version( &major, &minor, &patch );
19293
19294                 if( major != DB_VERSION_MAJOR ||
19295                         minor < DB_VERSION_MINOR )
19296                 {
19297                         printf("Berkeley DB version mismatch\n"
19298                                 "\theader: %s\n\tlibrary: %s\n",
19299                                 DB_VERSION_STRING, version);
19300                         return 1;
19301                 }
19302         }
19303 #endif
19304
19305 #if DB_VERSION_MAJOR > 2
19306         db_env_create( NULL, 0 );
19307 #elif DB_VERSION_MAJOR > 1
19308         db_appexit( NULL );
19309 #else
19310         (void) dbopen( NULL, 0, 0, 0, NULL);
19311 #endif
19312
19313 ; return 0; }
19314 EOF
19315 if { (eval echo configure:19316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19316   rm -rf conftest*
19317   ol_cv_db_db42=yes
19318 else
19319   echo "configure: failed program was:" >&5
19320   cat conftest.$ac_ext >&5
19321   rm -rf conftest*
19322   ol_cv_db_db42=no
19323 fi
19324 rm -f conftest*
19325
19326         LIBS="$ol_LIBS"
19327
19328 fi
19329
19330 echo "$ac_t""$ol_cv_db_db42" 1>&6
19331
19332         if test $ol_cv_db_db42 = yes ; then
19333                 ol_cv_lib_db=-ldb42
19334         fi
19335 fi
19336
19337 if test $ol_cv_lib_db = no ; then
19338         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19339 echo "configure:19340: checking for Berkeley DB link (-ldb-42)" >&5
19340 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19341   echo $ac_n "(cached) $ac_c" 1>&6
19342 else
19343   
19344         ol_DB_LIB=-ldb-42
19345         ol_LIBS=$LIBS
19346         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19347
19348         cat > conftest.$ac_ext <<EOF
19349 #line 19350 "configure"
19350 #include "confdefs.h"
19351
19352 #ifdef HAVE_DB_185_H
19353 # include <db_185.h>
19354 #else
19355 # include <db.h>
19356 #endif
19357
19358 #ifndef DB_VERSION_MAJOR
19359 # define DB_VERSION_MAJOR 1
19360 #endif
19361
19362 #ifndef NULL
19363 #define NULL ((void*)0)
19364 #endif
19365
19366 int main() {
19367
19368 #if DB_VERSION_MAJOR > 1
19369         {
19370                 char *version;
19371                 int major, minor, patch;
19372
19373                 version = db_version( &major, &minor, &patch );
19374
19375                 if( major != DB_VERSION_MAJOR ||
19376                         minor < DB_VERSION_MINOR )
19377                 {
19378                         printf("Berkeley DB version mismatch\n"
19379                                 "\theader: %s\n\tlibrary: %s\n",
19380                                 DB_VERSION_STRING, version);
19381                         return 1;
19382                 }
19383         }
19384 #endif
19385
19386 #if DB_VERSION_MAJOR > 2
19387         db_env_create( NULL, 0 );
19388 #elif DB_VERSION_MAJOR > 1
19389         db_appexit( NULL );
19390 #else
19391         (void) dbopen( NULL, 0, 0, 0, NULL);
19392 #endif
19393
19394 ; return 0; }
19395 EOF
19396 if { (eval echo configure:19397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19397   rm -rf conftest*
19398   ol_cv_db_db_42=yes
19399 else
19400   echo "configure: failed program was:" >&5
19401   cat conftest.$ac_ext >&5
19402   rm -rf conftest*
19403   ol_cv_db_db_42=no
19404 fi
19405 rm -f conftest*
19406
19407         LIBS="$ol_LIBS"
19408
19409 fi
19410
19411 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19412
19413         if test $ol_cv_db_db_42 = yes ; then
19414                 ol_cv_lib_db=-ldb-42
19415         fi
19416 fi
19417
19418 if test $ol_cv_lib_db = no ; then
19419         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19420 echo "configure:19421: checking for Berkeley DB link (-ldb-4.2)" >&5
19421 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19422   echo $ac_n "(cached) $ac_c" 1>&6
19423 else
19424   
19425         ol_DB_LIB=-ldb-4.2
19426         ol_LIBS=$LIBS
19427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19428
19429         cat > conftest.$ac_ext <<EOF
19430 #line 19431 "configure"
19431 #include "confdefs.h"
19432
19433 #ifdef HAVE_DB_185_H
19434 # include <db_185.h>
19435 #else
19436 # include <db.h>
19437 #endif
19438
19439 #ifndef DB_VERSION_MAJOR
19440 # define DB_VERSION_MAJOR 1
19441 #endif
19442
19443 #ifndef NULL
19444 #define NULL ((void*)0)
19445 #endif
19446
19447 int main() {
19448
19449 #if DB_VERSION_MAJOR > 1
19450         {
19451                 char *version;
19452                 int major, minor, patch;
19453
19454                 version = db_version( &major, &minor, &patch );
19455
19456                 if( major != DB_VERSION_MAJOR ||
19457                         minor < DB_VERSION_MINOR )
19458                 {
19459                         printf("Berkeley DB version mismatch\n"
19460                                 "\theader: %s\n\tlibrary: %s\n",
19461                                 DB_VERSION_STRING, version);
19462                         return 1;
19463                 }
19464         }
19465 #endif
19466
19467 #if DB_VERSION_MAJOR > 2
19468         db_env_create( NULL, 0 );
19469 #elif DB_VERSION_MAJOR > 1
19470         db_appexit( NULL );
19471 #else
19472         (void) dbopen( NULL, 0, 0, 0, NULL);
19473 #endif
19474
19475 ; return 0; }
19476 EOF
19477 if { (eval echo configure:19478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19478   rm -rf conftest*
19479   ol_cv_db_db_4_dot_2=yes
19480 else
19481   echo "configure: failed program was:" >&5
19482   cat conftest.$ac_ext >&5
19483   rm -rf conftest*
19484   ol_cv_db_db_4_dot_2=no
19485 fi
19486 rm -f conftest*
19487
19488         LIBS="$ol_LIBS"
19489
19490 fi
19491
19492 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19493
19494         if test $ol_cv_db_db_4_dot_2 = yes ; then
19495                 ol_cv_lib_db=-ldb-4.2
19496         fi
19497 fi
19498
19499 if test $ol_cv_lib_db = no ; then
19500         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19501 echo "configure:19502: checking for Berkeley DB link (-ldb-4-2)" >&5
19502 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19503   echo $ac_n "(cached) $ac_c" 1>&6
19504 else
19505   
19506         ol_DB_LIB=-ldb-4-2
19507         ol_LIBS=$LIBS
19508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19509
19510         cat > conftest.$ac_ext <<EOF
19511 #line 19512 "configure"
19512 #include "confdefs.h"
19513
19514 #ifdef HAVE_DB_185_H
19515 # include <db_185.h>
19516 #else
19517 # include <db.h>
19518 #endif
19519
19520 #ifndef DB_VERSION_MAJOR
19521 # define DB_VERSION_MAJOR 1
19522 #endif
19523
19524 #ifndef NULL
19525 #define NULL ((void*)0)
19526 #endif
19527
19528 int main() {
19529
19530 #if DB_VERSION_MAJOR > 1
19531         {
19532                 char *version;
19533                 int major, minor, patch;
19534
19535                 version = db_version( &major, &minor, &patch );
19536
19537                 if( major != DB_VERSION_MAJOR ||
19538                         minor < DB_VERSION_MINOR )
19539                 {
19540                         printf("Berkeley DB version mismatch\n"
19541                                 "\theader: %s\n\tlibrary: %s\n",
19542                                 DB_VERSION_STRING, version);
19543                         return 1;
19544                 }
19545         }
19546 #endif
19547
19548 #if DB_VERSION_MAJOR > 2
19549         db_env_create( NULL, 0 );
19550 #elif DB_VERSION_MAJOR > 1
19551         db_appexit( NULL );
19552 #else
19553         (void) dbopen( NULL, 0, 0, 0, NULL);
19554 #endif
19555
19556 ; return 0; }
19557 EOF
19558 if { (eval echo configure:19559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19559   rm -rf conftest*
19560   ol_cv_db_db_4_2=yes
19561 else
19562   echo "configure: failed program was:" >&5
19563   cat conftest.$ac_ext >&5
19564   rm -rf conftest*
19565   ol_cv_db_db_4_2=no
19566 fi
19567 rm -f conftest*
19568
19569         LIBS="$ol_LIBS"
19570
19571 fi
19572
19573 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19574
19575         if test $ol_cv_db_db_4_2 = yes ; then
19576                 ol_cv_lib_db=-ldb-4-2
19577         fi
19578 fi
19579
19580 if test $ol_cv_lib_db = no ; then
19581         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19582 echo "configure:19583: checking for Berkeley DB link (-ldb-4)" >&5
19583 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19584   echo $ac_n "(cached) $ac_c" 1>&6
19585 else
19586   
19587         ol_DB_LIB=-ldb-4
19588         ol_LIBS=$LIBS
19589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19590
19591         cat > conftest.$ac_ext <<EOF
19592 #line 19593 "configure"
19593 #include "confdefs.h"
19594
19595 #ifdef HAVE_DB_185_H
19596 # include <db_185.h>
19597 #else
19598 # include <db.h>
19599 #endif
19600
19601 #ifndef DB_VERSION_MAJOR
19602 # define DB_VERSION_MAJOR 1
19603 #endif
19604
19605 #ifndef NULL
19606 #define NULL ((void*)0)
19607 #endif
19608
19609 int main() {
19610
19611 #if DB_VERSION_MAJOR > 1
19612         {
19613                 char *version;
19614                 int major, minor, patch;
19615
19616                 version = db_version( &major, &minor, &patch );
19617
19618                 if( major != DB_VERSION_MAJOR ||
19619                         minor < DB_VERSION_MINOR )
19620                 {
19621                         printf("Berkeley DB version mismatch\n"
19622                                 "\theader: %s\n\tlibrary: %s\n",
19623                                 DB_VERSION_STRING, version);
19624                         return 1;
19625                 }
19626         }
19627 #endif
19628
19629 #if DB_VERSION_MAJOR > 2
19630         db_env_create( NULL, 0 );
19631 #elif DB_VERSION_MAJOR > 1
19632         db_appexit( NULL );
19633 #else
19634         (void) dbopen( NULL, 0, 0, 0, NULL);
19635 #endif
19636
19637 ; return 0; }
19638 EOF
19639 if { (eval echo configure:19640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19640   rm -rf conftest*
19641   ol_cv_db_db_4=yes
19642 else
19643   echo "configure: failed program was:" >&5
19644   cat conftest.$ac_ext >&5
19645   rm -rf conftest*
19646   ol_cv_db_db_4=no
19647 fi
19648 rm -f conftest*
19649
19650         LIBS="$ol_LIBS"
19651
19652 fi
19653
19654 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19655
19656         if test $ol_cv_db_db_4 = yes ; then
19657                 ol_cv_lib_db=-ldb-4
19658         fi
19659 fi
19660
19661 if test $ol_cv_lib_db = no ; then
19662         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19663 echo "configure:19664: checking for Berkeley DB link (-ldb4)" >&5
19664 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19665   echo $ac_n "(cached) $ac_c" 1>&6
19666 else
19667   
19668         ol_DB_LIB=-ldb4
19669         ol_LIBS=$LIBS
19670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19671
19672         cat > conftest.$ac_ext <<EOF
19673 #line 19674 "configure"
19674 #include "confdefs.h"
19675
19676 #ifdef HAVE_DB_185_H
19677 # include <db_185.h>
19678 #else
19679 # include <db.h>
19680 #endif
19681
19682 #ifndef DB_VERSION_MAJOR
19683 # define DB_VERSION_MAJOR 1
19684 #endif
19685
19686 #ifndef NULL
19687 #define NULL ((void*)0)
19688 #endif
19689
19690 int main() {
19691
19692 #if DB_VERSION_MAJOR > 1
19693         {
19694                 char *version;
19695                 int major, minor, patch;
19696
19697                 version = db_version( &major, &minor, &patch );
19698
19699                 if( major != DB_VERSION_MAJOR ||
19700                         minor < DB_VERSION_MINOR )
19701                 {
19702                         printf("Berkeley DB version mismatch\n"
19703                                 "\theader: %s\n\tlibrary: %s\n",
19704                                 DB_VERSION_STRING, version);
19705                         return 1;
19706                 }
19707         }
19708 #endif
19709
19710 #if DB_VERSION_MAJOR > 2
19711         db_env_create( NULL, 0 );
19712 #elif DB_VERSION_MAJOR > 1
19713         db_appexit( NULL );
19714 #else
19715         (void) dbopen( NULL, 0, 0, 0, NULL);
19716 #endif
19717
19718 ; return 0; }
19719 EOF
19720 if { (eval echo configure:19721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19721   rm -rf conftest*
19722   ol_cv_db_db4=yes
19723 else
19724   echo "configure: failed program was:" >&5
19725   cat conftest.$ac_ext >&5
19726   rm -rf conftest*
19727   ol_cv_db_db4=no
19728 fi
19729 rm -f conftest*
19730
19731         LIBS="$ol_LIBS"
19732
19733 fi
19734
19735 echo "$ac_t""$ol_cv_db_db4" 1>&6
19736
19737         if test $ol_cv_db_db4 = yes ; then
19738                 ol_cv_lib_db=-ldb4
19739         fi
19740 fi
19741
19742 if test $ol_cv_lib_db = no ; then
19743         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19744 echo "configure:19745: checking for Berkeley DB link (-ldb)" >&5
19745 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19746   echo $ac_n "(cached) $ac_c" 1>&6
19747 else
19748   
19749         ol_DB_LIB=-ldb
19750         ol_LIBS=$LIBS
19751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19752
19753         cat > conftest.$ac_ext <<EOF
19754 #line 19755 "configure"
19755 #include "confdefs.h"
19756
19757 #ifdef HAVE_DB_185_H
19758 # include <db_185.h>
19759 #else
19760 # include <db.h>
19761 #endif
19762
19763 #ifndef DB_VERSION_MAJOR
19764 # define DB_VERSION_MAJOR 1
19765 #endif
19766
19767 #ifndef NULL
19768 #define NULL ((void*)0)
19769 #endif
19770
19771 int main() {
19772
19773 #if DB_VERSION_MAJOR > 1
19774         {
19775                 char *version;
19776                 int major, minor, patch;
19777
19778                 version = db_version( &major, &minor, &patch );
19779
19780                 if( major != DB_VERSION_MAJOR ||
19781                         minor < DB_VERSION_MINOR )
19782                 {
19783                         printf("Berkeley DB version mismatch\n"
19784                                 "\theader: %s\n\tlibrary: %s\n",
19785                                 DB_VERSION_STRING, version);
19786                         return 1;
19787                 }
19788         }
19789 #endif
19790
19791 #if DB_VERSION_MAJOR > 2
19792         db_env_create( NULL, 0 );
19793 #elif DB_VERSION_MAJOR > 1
19794         db_appexit( NULL );
19795 #else
19796         (void) dbopen( NULL, 0, 0, 0, NULL);
19797 #endif
19798
19799 ; return 0; }
19800 EOF
19801 if { (eval echo configure:19802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19802   rm -rf conftest*
19803   ol_cv_db_db=yes
19804 else
19805   echo "configure: failed program was:" >&5
19806   cat conftest.$ac_ext >&5
19807   rm -rf conftest*
19808   ol_cv_db_db=no
19809 fi
19810 rm -f conftest*
19811
19812         LIBS="$ol_LIBS"
19813
19814 fi
19815
19816 echo "$ac_t""$ol_cv_db_db" 1>&6
19817
19818         if test $ol_cv_db_db = yes ; then
19819                 ol_cv_lib_db=-ldb
19820         fi
19821 fi
19822
19823 if test $ol_cv_lib_db = no ; then
19824         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19825 echo "configure:19826: checking for Berkeley DB link (-ldb41)" >&5
19826 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19827   echo $ac_n "(cached) $ac_c" 1>&6
19828 else
19829   
19830         ol_DB_LIB=-ldb41
19831         ol_LIBS=$LIBS
19832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19833
19834         cat > conftest.$ac_ext <<EOF
19835 #line 19836 "configure"
19836 #include "confdefs.h"
19837
19838 #ifdef HAVE_DB_185_H
19839 # include <db_185.h>
19840 #else
19841 # include <db.h>
19842 #endif
19843
19844 #ifndef DB_VERSION_MAJOR
19845 # define DB_VERSION_MAJOR 1
19846 #endif
19847
19848 #ifndef NULL
19849 #define NULL ((void*)0)
19850 #endif
19851
19852 int main() {
19853
19854 #if DB_VERSION_MAJOR > 1
19855         {
19856                 char *version;
19857                 int major, minor, patch;
19858
19859                 version = db_version( &major, &minor, &patch );
19860
19861                 if( major != DB_VERSION_MAJOR ||
19862                         minor < DB_VERSION_MINOR )
19863                 {
19864                         printf("Berkeley DB version mismatch\n"
19865                                 "\theader: %s\n\tlibrary: %s\n",
19866                                 DB_VERSION_STRING, version);
19867                         return 1;
19868                 }
19869         }
19870 #endif
19871
19872 #if DB_VERSION_MAJOR > 2
19873         db_env_create( NULL, 0 );
19874 #elif DB_VERSION_MAJOR > 1
19875         db_appexit( NULL );
19876 #else
19877         (void) dbopen( NULL, 0, 0, 0, NULL);
19878 #endif
19879
19880 ; return 0; }
19881 EOF
19882 if { (eval echo configure:19883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19883   rm -rf conftest*
19884   ol_cv_db_db41=yes
19885 else
19886   echo "configure: failed program was:" >&5
19887   cat conftest.$ac_ext >&5
19888   rm -rf conftest*
19889   ol_cv_db_db41=no
19890 fi
19891 rm -f conftest*
19892
19893         LIBS="$ol_LIBS"
19894
19895 fi
19896
19897 echo "$ac_t""$ol_cv_db_db41" 1>&6
19898
19899         if test $ol_cv_db_db41 = yes ; then
19900                 ol_cv_lib_db=-ldb41
19901         fi
19902 fi
19903
19904 if test $ol_cv_lib_db = no ; then
19905         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19906 echo "configure:19907: checking for Berkeley DB link (-ldb-41)" >&5
19907 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19908   echo $ac_n "(cached) $ac_c" 1>&6
19909 else
19910   
19911         ol_DB_LIB=-ldb-41
19912         ol_LIBS=$LIBS
19913         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19914
19915         cat > conftest.$ac_ext <<EOF
19916 #line 19917 "configure"
19917 #include "confdefs.h"
19918
19919 #ifdef HAVE_DB_185_H
19920 # include <db_185.h>
19921 #else
19922 # include <db.h>
19923 #endif
19924
19925 #ifndef DB_VERSION_MAJOR
19926 # define DB_VERSION_MAJOR 1
19927 #endif
19928
19929 #ifndef NULL
19930 #define NULL ((void*)0)
19931 #endif
19932
19933 int main() {
19934
19935 #if DB_VERSION_MAJOR > 1
19936         {
19937                 char *version;
19938                 int major, minor, patch;
19939
19940                 version = db_version( &major, &minor, &patch );
19941
19942                 if( major != DB_VERSION_MAJOR ||
19943                         minor < DB_VERSION_MINOR )
19944                 {
19945                         printf("Berkeley DB version mismatch\n"
19946                                 "\theader: %s\n\tlibrary: %s\n",
19947                                 DB_VERSION_STRING, version);
19948                         return 1;
19949                 }
19950         }
19951 #endif
19952
19953 #if DB_VERSION_MAJOR > 2
19954         db_env_create( NULL, 0 );
19955 #elif DB_VERSION_MAJOR > 1
19956         db_appexit( NULL );
19957 #else
19958         (void) dbopen( NULL, 0, 0, 0, NULL);
19959 #endif
19960
19961 ; return 0; }
19962 EOF
19963 if { (eval echo configure:19964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19964   rm -rf conftest*
19965   ol_cv_db_db_41=yes
19966 else
19967   echo "configure: failed program was:" >&5
19968   cat conftest.$ac_ext >&5
19969   rm -rf conftest*
19970   ol_cv_db_db_41=no
19971 fi
19972 rm -f conftest*
19973
19974         LIBS="$ol_LIBS"
19975
19976 fi
19977
19978 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19979
19980         if test $ol_cv_db_db_41 = yes ; then
19981                 ol_cv_lib_db=-ldb-41
19982         fi
19983 fi
19984
19985 if test $ol_cv_lib_db = no ; then
19986         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19987 echo "configure:19988: checking for Berkeley DB link (-ldb-4.1)" >&5
19988 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19989   echo $ac_n "(cached) $ac_c" 1>&6
19990 else
19991   
19992         ol_DB_LIB=-ldb-4.1
19993         ol_LIBS=$LIBS
19994         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19995
19996         cat > conftest.$ac_ext <<EOF
19997 #line 19998 "configure"
19998 #include "confdefs.h"
19999
20000 #ifdef HAVE_DB_185_H
20001 # include <db_185.h>
20002 #else
20003 # include <db.h>
20004 #endif
20005
20006 #ifndef DB_VERSION_MAJOR
20007 # define DB_VERSION_MAJOR 1
20008 #endif
20009
20010 #ifndef NULL
20011 #define NULL ((void*)0)
20012 #endif
20013
20014 int main() {
20015
20016 #if DB_VERSION_MAJOR > 1
20017         {
20018                 char *version;
20019                 int major, minor, patch;
20020
20021                 version = db_version( &major, &minor, &patch );
20022
20023                 if( major != DB_VERSION_MAJOR ||
20024                         minor < DB_VERSION_MINOR )
20025                 {
20026                         printf("Berkeley DB version mismatch\n"
20027                                 "\theader: %s\n\tlibrary: %s\n",
20028                                 DB_VERSION_STRING, version);
20029                         return 1;
20030                 }
20031         }
20032 #endif
20033
20034 #if DB_VERSION_MAJOR > 2
20035         db_env_create( NULL, 0 );
20036 #elif DB_VERSION_MAJOR > 1
20037         db_appexit( NULL );
20038 #else
20039         (void) dbopen( NULL, 0, 0, 0, NULL);
20040 #endif
20041
20042 ; return 0; }
20043 EOF
20044 if { (eval echo configure:20045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20045   rm -rf conftest*
20046   ol_cv_db_db_4_dot_1=yes
20047 else
20048   echo "configure: failed program was:" >&5
20049   cat conftest.$ac_ext >&5
20050   rm -rf conftest*
20051   ol_cv_db_db_4_dot_1=no
20052 fi
20053 rm -f conftest*
20054
20055         LIBS="$ol_LIBS"
20056
20057 fi
20058
20059 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20060
20061         if test $ol_cv_db_db_4_dot_1 = yes ; then
20062                 ol_cv_lib_db=-ldb-4.1
20063         fi
20064 fi
20065
20066 if test $ol_cv_lib_db = no ; then
20067         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20068 echo "configure:20069: checking for Berkeley DB link (-ldb-4-1)" >&5
20069 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20070   echo $ac_n "(cached) $ac_c" 1>&6
20071 else
20072   
20073         ol_DB_LIB=-ldb-4-1
20074         ol_LIBS=$LIBS
20075         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20076
20077         cat > conftest.$ac_ext <<EOF
20078 #line 20079 "configure"
20079 #include "confdefs.h"
20080
20081 #ifdef HAVE_DB_185_H
20082 # include <db_185.h>
20083 #else
20084 # include <db.h>
20085 #endif
20086
20087 #ifndef DB_VERSION_MAJOR
20088 # define DB_VERSION_MAJOR 1
20089 #endif
20090
20091 #ifndef NULL
20092 #define NULL ((void*)0)
20093 #endif
20094
20095 int main() {
20096
20097 #if DB_VERSION_MAJOR > 1
20098         {
20099                 char *version;
20100                 int major, minor, patch;
20101
20102                 version = db_version( &major, &minor, &patch );
20103
20104                 if( major != DB_VERSION_MAJOR ||
20105                         minor < DB_VERSION_MINOR )
20106                 {
20107                         printf("Berkeley DB version mismatch\n"
20108                                 "\theader: %s\n\tlibrary: %s\n",
20109                                 DB_VERSION_STRING, version);
20110                         return 1;
20111                 }
20112         }
20113 #endif
20114
20115 #if DB_VERSION_MAJOR > 2
20116         db_env_create( NULL, 0 );
20117 #elif DB_VERSION_MAJOR > 1
20118         db_appexit( NULL );
20119 #else
20120         (void) dbopen( NULL, 0, 0, 0, NULL);
20121 #endif
20122
20123 ; return 0; }
20124 EOF
20125 if { (eval echo configure:20126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20126   rm -rf conftest*
20127   ol_cv_db_db_4_1=yes
20128 else
20129   echo "configure: failed program was:" >&5
20130   cat conftest.$ac_ext >&5
20131   rm -rf conftest*
20132   ol_cv_db_db_4_1=no
20133 fi
20134 rm -f conftest*
20135
20136         LIBS="$ol_LIBS"
20137
20138 fi
20139
20140 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20141
20142         if test $ol_cv_db_db_4_1 = yes ; then
20143                 ol_cv_lib_db=-ldb-4-1
20144         fi
20145 fi
20146
20147 if test $ol_cv_lib_db = no ; then
20148         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20149 echo "configure:20150: checking for Berkeley DB link (-ldb3)" >&5
20150 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20151   echo $ac_n "(cached) $ac_c" 1>&6
20152 else
20153   
20154         ol_DB_LIB=-ldb3
20155         ol_LIBS=$LIBS
20156         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20157
20158         cat > conftest.$ac_ext <<EOF
20159 #line 20160 "configure"
20160 #include "confdefs.h"
20161
20162 #ifdef HAVE_DB_185_H
20163 # include <db_185.h>
20164 #else
20165 # include <db.h>
20166 #endif
20167
20168 #ifndef DB_VERSION_MAJOR
20169 # define DB_VERSION_MAJOR 1
20170 #endif
20171
20172 #ifndef NULL
20173 #define NULL ((void*)0)
20174 #endif
20175
20176 int main() {
20177
20178 #if DB_VERSION_MAJOR > 1
20179         {
20180                 char *version;
20181                 int major, minor, patch;
20182
20183                 version = db_version( &major, &minor, &patch );
20184
20185                 if( major != DB_VERSION_MAJOR ||
20186                         minor < DB_VERSION_MINOR )
20187                 {
20188                         printf("Berkeley DB version mismatch\n"
20189                                 "\theader: %s\n\tlibrary: %s\n",
20190                                 DB_VERSION_STRING, version);
20191                         return 1;
20192                 }
20193         }
20194 #endif
20195
20196 #if DB_VERSION_MAJOR > 2
20197         db_env_create( NULL, 0 );
20198 #elif DB_VERSION_MAJOR > 1
20199         db_appexit( NULL );
20200 #else
20201         (void) dbopen( NULL, 0, 0, 0, NULL);
20202 #endif
20203
20204 ; return 0; }
20205 EOF
20206 if { (eval echo configure:20207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20207   rm -rf conftest*
20208   ol_cv_db_db3=yes
20209 else
20210   echo "configure: failed program was:" >&5
20211   cat conftest.$ac_ext >&5
20212   rm -rf conftest*
20213   ol_cv_db_db3=no
20214 fi
20215 rm -f conftest*
20216
20217         LIBS="$ol_LIBS"
20218
20219 fi
20220
20221 echo "$ac_t""$ol_cv_db_db3" 1>&6
20222
20223         if test $ol_cv_db_db3 = yes ; then
20224                 ol_cv_lib_db=-ldb3
20225         fi
20226 fi
20227
20228 if test $ol_cv_lib_db = no ; then
20229         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20230 echo "configure:20231: checking for Berkeley DB link (-ldb-3)" >&5
20231 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20232   echo $ac_n "(cached) $ac_c" 1>&6
20233 else
20234   
20235         ol_DB_LIB=-ldb-3
20236         ol_LIBS=$LIBS
20237         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20238
20239         cat > conftest.$ac_ext <<EOF
20240 #line 20241 "configure"
20241 #include "confdefs.h"
20242
20243 #ifdef HAVE_DB_185_H
20244 # include <db_185.h>
20245 #else
20246 # include <db.h>
20247 #endif
20248
20249 #ifndef DB_VERSION_MAJOR
20250 # define DB_VERSION_MAJOR 1
20251 #endif
20252
20253 #ifndef NULL
20254 #define NULL ((void*)0)
20255 #endif
20256
20257 int main() {
20258
20259 #if DB_VERSION_MAJOR > 1
20260         {
20261                 char *version;
20262                 int major, minor, patch;
20263
20264                 version = db_version( &major, &minor, &patch );
20265
20266                 if( major != DB_VERSION_MAJOR ||
20267                         minor < DB_VERSION_MINOR )
20268                 {
20269                         printf("Berkeley DB version mismatch\n"
20270                                 "\theader: %s\n\tlibrary: %s\n",
20271                                 DB_VERSION_STRING, version);
20272                         return 1;
20273                 }
20274         }
20275 #endif
20276
20277 #if DB_VERSION_MAJOR > 2
20278         db_env_create( NULL, 0 );
20279 #elif DB_VERSION_MAJOR > 1
20280         db_appexit( NULL );
20281 #else
20282         (void) dbopen( NULL, 0, 0, 0, NULL);
20283 #endif
20284
20285 ; return 0; }
20286 EOF
20287 if { (eval echo configure:20288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20288   rm -rf conftest*
20289   ol_cv_db_db_3=yes
20290 else
20291   echo "configure: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   rm -rf conftest*
20294   ol_cv_db_db_3=no
20295 fi
20296 rm -f conftest*
20297
20298         LIBS="$ol_LIBS"
20299
20300 fi
20301
20302 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20303
20304         if test $ol_cv_db_db_3 = yes ; then
20305                 ol_cv_lib_db=-ldb-3
20306         fi
20307 fi
20308
20309 if test $ol_cv_lib_db = no ; then
20310         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20311 echo "configure:20312: checking for Berkeley DB link (-ldb2)" >&5
20312 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   
20316         ol_DB_LIB=-ldb2
20317         ol_LIBS=$LIBS
20318         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20319
20320         cat > conftest.$ac_ext <<EOF
20321 #line 20322 "configure"
20322 #include "confdefs.h"
20323
20324 #ifdef HAVE_DB_185_H
20325 # include <db_185.h>
20326 #else
20327 # include <db.h>
20328 #endif
20329
20330 #ifndef DB_VERSION_MAJOR
20331 # define DB_VERSION_MAJOR 1
20332 #endif
20333
20334 #ifndef NULL
20335 #define NULL ((void*)0)
20336 #endif
20337
20338 int main() {
20339
20340 #if DB_VERSION_MAJOR > 1
20341         {
20342                 char *version;
20343                 int major, minor, patch;
20344
20345                 version = db_version( &major, &minor, &patch );
20346
20347                 if( major != DB_VERSION_MAJOR ||
20348                         minor < DB_VERSION_MINOR )
20349                 {
20350                         printf("Berkeley DB version mismatch\n"
20351                                 "\theader: %s\n\tlibrary: %s\n",
20352                                 DB_VERSION_STRING, version);
20353                         return 1;
20354                 }
20355         }
20356 #endif
20357
20358 #if DB_VERSION_MAJOR > 2
20359         db_env_create( NULL, 0 );
20360 #elif DB_VERSION_MAJOR > 1
20361         db_appexit( NULL );
20362 #else
20363         (void) dbopen( NULL, 0, 0, 0, NULL);
20364 #endif
20365
20366 ; return 0; }
20367 EOF
20368 if { (eval echo configure:20369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20369   rm -rf conftest*
20370   ol_cv_db_db2=yes
20371 else
20372   echo "configure: failed program was:" >&5
20373   cat conftest.$ac_ext >&5
20374   rm -rf conftest*
20375   ol_cv_db_db2=no
20376 fi
20377 rm -f conftest*
20378
20379         LIBS="$ol_LIBS"
20380
20381 fi
20382
20383 echo "$ac_t""$ol_cv_db_db2" 1>&6
20384
20385         if test $ol_cv_db_db2 = yes ; then
20386                 ol_cv_lib_db=-ldb2
20387         fi
20388 fi
20389
20390 if test $ol_cv_lib_db = no ; then
20391         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20392 echo "configure:20393: checking for Berkeley DB link (-ldb-2)" >&5
20393 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20394   echo $ac_n "(cached) $ac_c" 1>&6
20395 else
20396   
20397         ol_DB_LIB=-ldb-2
20398         ol_LIBS=$LIBS
20399         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20400
20401         cat > conftest.$ac_ext <<EOF
20402 #line 20403 "configure"
20403 #include "confdefs.h"
20404
20405 #ifdef HAVE_DB_185_H
20406 # include <db_185.h>
20407 #else
20408 # include <db.h>
20409 #endif
20410
20411 #ifndef DB_VERSION_MAJOR
20412 # define DB_VERSION_MAJOR 1
20413 #endif
20414
20415 #ifndef NULL
20416 #define NULL ((void*)0)
20417 #endif
20418
20419 int main() {
20420
20421 #if DB_VERSION_MAJOR > 1
20422         {
20423                 char *version;
20424                 int major, minor, patch;
20425
20426                 version = db_version( &major, &minor, &patch );
20427
20428                 if( major != DB_VERSION_MAJOR ||
20429                         minor < DB_VERSION_MINOR )
20430                 {
20431                         printf("Berkeley DB version mismatch\n"
20432                                 "\theader: %s\n\tlibrary: %s\n",
20433                                 DB_VERSION_STRING, version);
20434                         return 1;
20435                 }
20436         }
20437 #endif
20438
20439 #if DB_VERSION_MAJOR > 2
20440         db_env_create( NULL, 0 );
20441 #elif DB_VERSION_MAJOR > 1
20442         db_appexit( NULL );
20443 #else
20444         (void) dbopen( NULL, 0, 0, 0, NULL);
20445 #endif
20446
20447 ; return 0; }
20448 EOF
20449 if { (eval echo configure:20450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20450   rm -rf conftest*
20451   ol_cv_db_db_2=yes
20452 else
20453   echo "configure: failed program was:" >&5
20454   cat conftest.$ac_ext >&5
20455   rm -rf conftest*
20456   ol_cv_db_db_2=no
20457 fi
20458 rm -f conftest*
20459
20460         LIBS="$ol_LIBS"
20461
20462 fi
20463
20464 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20465
20466         if test $ol_cv_db_db_2 = yes ; then
20467                 ol_cv_lib_db=-ldb-2
20468         fi
20469 fi
20470
20471 if test $ol_cv_lib_db = no ; then
20472         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20473 echo "configure:20474: checking for Berkeley DB link (-ldb1)" >&5
20474 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20475   echo $ac_n "(cached) $ac_c" 1>&6
20476 else
20477   
20478         ol_DB_LIB=-ldb1
20479         ol_LIBS=$LIBS
20480         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20481
20482         cat > conftest.$ac_ext <<EOF
20483 #line 20484 "configure"
20484 #include "confdefs.h"
20485
20486 #ifdef HAVE_DB_185_H
20487 # include <db_185.h>
20488 #else
20489 # include <db.h>
20490 #endif
20491
20492 #ifndef DB_VERSION_MAJOR
20493 # define DB_VERSION_MAJOR 1
20494 #endif
20495
20496 #ifndef NULL
20497 #define NULL ((void*)0)
20498 #endif
20499
20500 int main() {
20501
20502 #if DB_VERSION_MAJOR > 1
20503         {
20504                 char *version;
20505                 int major, minor, patch;
20506
20507                 version = db_version( &major, &minor, &patch );
20508
20509                 if( major != DB_VERSION_MAJOR ||
20510                         minor < DB_VERSION_MINOR )
20511                 {
20512                         printf("Berkeley DB version mismatch\n"
20513                                 "\theader: %s\n\tlibrary: %s\n",
20514                                 DB_VERSION_STRING, version);
20515                         return 1;
20516                 }
20517         }
20518 #endif
20519
20520 #if DB_VERSION_MAJOR > 2
20521         db_env_create( NULL, 0 );
20522 #elif DB_VERSION_MAJOR > 1
20523         db_appexit( NULL );
20524 #else
20525         (void) dbopen( NULL, 0, 0, 0, NULL);
20526 #endif
20527
20528 ; return 0; }
20529 EOF
20530 if { (eval echo configure:20531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20531   rm -rf conftest*
20532   ol_cv_db_db1=yes
20533 else
20534   echo "configure: failed program was:" >&5
20535   cat conftest.$ac_ext >&5
20536   rm -rf conftest*
20537   ol_cv_db_db1=no
20538 fi
20539 rm -f conftest*
20540
20541         LIBS="$ol_LIBS"
20542
20543 fi
20544
20545 echo "$ac_t""$ol_cv_db_db1" 1>&6
20546
20547         if test $ol_cv_db_db1 = yes ; then
20548                 ol_cv_lib_db=-ldb1
20549         fi
20550 fi
20551
20552 if test $ol_cv_lib_db = no ; then
20553         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20554 echo "configure:20555: checking for Berkeley DB link (-ldb-1)" >&5
20555 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20556   echo $ac_n "(cached) $ac_c" 1>&6
20557 else
20558   
20559         ol_DB_LIB=-ldb-1
20560         ol_LIBS=$LIBS
20561         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20562
20563         cat > conftest.$ac_ext <<EOF
20564 #line 20565 "configure"
20565 #include "confdefs.h"
20566
20567 #ifdef HAVE_DB_185_H
20568 # include <db_185.h>
20569 #else
20570 # include <db.h>
20571 #endif
20572
20573 #ifndef DB_VERSION_MAJOR
20574 # define DB_VERSION_MAJOR 1
20575 #endif
20576
20577 #ifndef NULL
20578 #define NULL ((void*)0)
20579 #endif
20580
20581 int main() {
20582
20583 #if DB_VERSION_MAJOR > 1
20584         {
20585                 char *version;
20586                 int major, minor, patch;
20587
20588                 version = db_version( &major, &minor, &patch );
20589
20590                 if( major != DB_VERSION_MAJOR ||
20591                         minor < DB_VERSION_MINOR )
20592                 {
20593                         printf("Berkeley DB version mismatch\n"
20594                                 "\theader: %s\n\tlibrary: %s\n",
20595                                 DB_VERSION_STRING, version);
20596                         return 1;
20597                 }
20598         }
20599 #endif
20600
20601 #if DB_VERSION_MAJOR > 2
20602         db_env_create( NULL, 0 );
20603 #elif DB_VERSION_MAJOR > 1
20604         db_appexit( NULL );
20605 #else
20606         (void) dbopen( NULL, 0, 0, 0, NULL);
20607 #endif
20608
20609 ; return 0; }
20610 EOF
20611 if { (eval echo configure:20612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20612   rm -rf conftest*
20613   ol_cv_db_db_1=yes
20614 else
20615   echo "configure: failed program was:" >&5
20616   cat conftest.$ac_ext >&5
20617   rm -rf conftest*
20618   ol_cv_db_db_1=no
20619 fi
20620 rm -f conftest*
20621
20622         LIBS="$ol_LIBS"
20623
20624 fi
20625
20626 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20627
20628         if test $ol_cv_db_db_1 = yes ; then
20629                 ol_cv_lib_db=-ldb-1
20630         fi
20631 fi
20632
20633
20634         if test "$ol_cv_lib_db" != no ; then
20635                 ol_cv_berkeley_db=yes
20636                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20637 echo "configure:20638: checking for Berkeley DB version match" >&5
20638 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20639   echo $ac_n "(cached) $ac_c" 1>&6
20640 else
20641   
20642         ol_LIBS="$LIBS"
20643         LIBS="$LTHREAD_LIBS $LIBS"
20644         if test $ol_cv_lib_db != yes ; then
20645                 LIBS="$ol_cv_lib_db $LIBS"
20646         fi
20647
20648         if test "$cross_compiling" = yes; then
20649   ol_cv_berkeley_db_version=cross
20650 else
20651   cat > conftest.$ac_ext <<EOF
20652 #line 20653 "configure"
20653 #include "confdefs.h"
20654
20655 #ifdef HAVE_DB_185_H
20656         choke me;
20657 #else
20658 #include <db.h>
20659 #endif
20660 #ifndef DB_VERSION_MAJOR
20661 # define DB_VERSION_MAJOR 1
20662 #endif
20663 #ifndef NULL
20664 #define NULL ((void *)0)
20665 #endif
20666 main()
20667 {
20668 #if DB_VERSION_MAJOR > 1
20669         char *version;
20670         int major, minor, patch;
20671
20672         version = db_version( &major, &minor, &patch );
20673
20674         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20675                 printf("Berkeley DB version mismatch\n"
20676                         "\theader: %s\n\tlibrary: %s\n",
20677                         DB_VERSION_STRING, version);
20678                 return 1;
20679         }
20680 #endif
20681
20682         return 0;
20683 }
20684 EOF
20685 if { (eval echo configure:20686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20686 then
20687   ol_cv_berkeley_db_version=yes
20688 else
20689   echo "configure: failed program was:" >&5
20690   cat conftest.$ac_ext >&5
20691   rm -fr conftest*
20692   ol_cv_berkeley_db_version=no
20693 fi
20694 rm -fr conftest*
20695 fi
20696
20697
20698         LIBS="$ol_LIBS"
20699
20700 fi
20701
20702 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20703
20704         if test $ol_cv_berkeley_db_version = no ; then
20705                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20706         fi
20707
20708                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20709 echo "configure:20710: checking for Berkeley DB thread support" >&5
20710 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20711   echo $ac_n "(cached) $ac_c" 1>&6
20712 else
20713   
20714         ol_LIBS="$LIBS"
20715         LIBS="$LTHREAD_LIBS $LIBS"
20716         if test $ol_cv_lib_db != yes ; then
20717                 LIBS="$ol_cv_lib_db $LIBS"
20718         fi
20719
20720         if test "$cross_compiling" = yes; then
20721   ol_cv_berkeley_db_thread=cross
20722 else
20723   cat > conftest.$ac_ext <<EOF
20724 #line 20725 "configure"
20725 #include "confdefs.h"
20726
20727 #ifdef HAVE_DB_185_H
20728         choke me;
20729 #else
20730 #include <db.h>
20731 #endif
20732 #ifndef NULL
20733 #define NULL ((void *)0)
20734 #endif
20735 main()
20736 {
20737         int rc;
20738         u_int32_t flags = DB_CREATE |
20739 #ifdef DB_PRIVATE
20740                 DB_PRIVATE |
20741 #endif
20742                 DB_THREAD;
20743
20744 #if DB_VERSION_MAJOR > 2
20745         DB_ENV *env = NULL;
20746
20747         rc = db_env_create( &env, 0 );
20748
20749         flags |= DB_INIT_MPOOL;
20750 #ifdef DB_MPOOL_PRIVATE
20751         flags |= DB_MPOOL_PRIVATE;
20752 #endif
20753
20754         if( rc ) {
20755                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20756                 return rc;
20757         }
20758
20759 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20760         rc = env->open( env, NULL, flags, 0 );
20761 #else
20762         rc = env->open( env, NULL, NULL, flags, 0 );
20763 #endif
20764
20765         if ( rc == 0 ) {
20766                 rc = env->close( env, 0 );
20767         }
20768
20769         if( rc ) {
20770                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20771                 return rc;
20772         }
20773
20774 #else
20775         DB_ENV env;
20776         memset( &env, '\0', sizeof(env) );
20777
20778         rc = db_appinit( NULL, NULL, &env, flags );
20779
20780         if( rc == 0 ) {
20781                 db_appexit( &env );
20782         }
20783
20784         unlink("__db_mpool.share");
20785         unlink("__db_lock.share");
20786 #endif
20787
20788         return rc;
20789 }
20790 EOF
20791 if { (eval echo configure:20792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20792 then
20793   ol_cv_berkeley_db_thread=yes
20794 else
20795   echo "configure: failed program was:" >&5
20796   cat conftest.$ac_ext >&5
20797   rm -fr conftest*
20798   ol_cv_berkeley_db_thread=no
20799 fi
20800 rm -fr conftest*
20801 fi
20802
20803
20804         LIBS="$ol_LIBS"
20805
20806 fi
20807
20808 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20809
20810         if test $ol_cv_berkeley_db_thread != no ; then
20811                 cat >> confdefs.h <<\EOF
20812 #define HAVE_BERKELEY_DB_THREAD 1
20813 EOF
20814
20815         fi
20816
20817         fi
20818 fi
20819
20820         fi
20821
20822         if test $ol_cv_berkeley_db != no ; then
20823                 cat >> confdefs.h <<\EOF
20824 #define HAVE_BERKELEY_DB 1
20825 EOF
20826
20827
20828                 ol_link_ldbm=berkeley
20829                 ol_with_ldbm_api=berkeley
20830
20831                 if test $ol_with_ldbm_type = hash ; then
20832                         cat >> confdefs.h <<\EOF
20833 #define LDBM_USE_DBHASH 1
20834 EOF
20835
20836                 else
20837                         cat >> confdefs.h <<\EOF
20838 #define LDBM_USE_DBBTREE 1
20839 EOF
20840
20841                 fi
20842
20843                                                 if test $ol_cv_lib_db != yes ; then
20844                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20845                 fi
20846         fi
20847 fi
20848
20849 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20850         if test $ol_link_ldbm != berkeley ; then
20851                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20852         else
20853                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20854 echo "configure:20855: checking Berkeley DB version for BDB backend" >&5
20855 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20856   echo $ac_n "(cached) $ac_c" 1>&6
20857 else
20858   
20859         cat > conftest.$ac_ext <<EOF
20860 #line 20861 "configure"
20861 #include "confdefs.h"
20862
20863 #include <db.h>
20864
20865  /* this check could be improved */
20866 #ifndef DB_VERSION_MAJOR
20867 #       define DB_VERSION_MAJOR 1
20868 #endif
20869 #ifndef DB_VERSION_MINOR
20870 #       define DB_VERSION_MINOR 0
20871 #endif
20872
20873 /* require 4.2 or later */
20874 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20875         __db_version_compat
20876 #endif
20877         
20878 EOF
20879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20880   egrep "__db_version_compat" >/dev/null 2>&1; then
20881   rm -rf conftest*
20882   ol_cv_bdb_compat=yes
20883 else
20884   rm -rf conftest*
20885   ol_cv_bdb_compat=no
20886 fi
20887 rm -f conftest*
20888
20889 fi
20890
20891 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20892
20893
20894                 if test $ol_cv_bdb_compat != yes ; then
20895                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20896                 fi
20897         fi
20898 fi
20899
20900 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20901         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20902         ol_with_ldbm_api=none
20903 fi
20904
20905 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20906         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20907 echo "configure:20908: checking for MDBM library" >&5
20908 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20909   echo $ac_n "(cached) $ac_c" 1>&6
20910 else
20911         ol_LIBS="$LIBS"
20912         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20913 echo "configure:20914: checking for mdbm_set_chain" >&5
20914 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20915   echo $ac_n "(cached) $ac_c" 1>&6
20916 else
20917   cat > conftest.$ac_ext <<EOF
20918 #line 20919 "configure"
20919 #include "confdefs.h"
20920 /* System header to define __stub macros and hopefully few prototypes,
20921     which can conflict with char mdbm_set_chain(); below.  */
20922 #include <assert.h>
20923 /* Override any gcc2 internal prototype to avoid an error.  */
20924 /* We use char because int might match the return type of a gcc2
20925     builtin and then its argument prototype would still apply.  */
20926 char mdbm_set_chain();
20927 char (*f)();
20928
20929 int main() {
20930
20931 /* The GNU C library defines this for functions which it implements
20932     to always fail with ENOSYS.  Some functions are actually named
20933     something starting with __ and the normal name is an alias.  */
20934 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20935 choke me
20936 #else
20937 f = mdbm_set_chain;
20938 #endif
20939
20940 ; return 0; }
20941 EOF
20942 if { (eval echo configure:20943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20943   rm -rf conftest*
20944   eval "ac_cv_func_mdbm_set_chain=yes"
20945 else
20946   echo "configure: failed program was:" >&5
20947   cat conftest.$ac_ext >&5
20948   rm -rf conftest*
20949   eval "ac_cv_func_mdbm_set_chain=no"
20950 fi
20951 rm -f conftest*
20952 fi
20953
20954 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20955   echo "$ac_t""yes" 1>&6
20956   ol_cv_lib_mdbm=yes
20957 else
20958   echo "$ac_t""no" 1>&6
20959
20960                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20961 echo "configure:20962: checking for mdbm_set_chain in -lmdbm" >&5
20962 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20964   echo $ac_n "(cached) $ac_c" 1>&6
20965 else
20966   ac_save_LIBS="$LIBS"
20967 LIBS="-lmdbm  $LIBS"
20968 cat > conftest.$ac_ext <<EOF
20969 #line 20970 "configure"
20970 #include "confdefs.h"
20971 /* Override any gcc2 internal prototype to avoid an error.  */
20972 /* We use char because int might match the return type of a gcc2
20973     builtin and then its argument prototype would still apply.  */
20974 char mdbm_set_chain();
20975
20976 int main() {
20977 mdbm_set_chain()
20978 ; return 0; }
20979 EOF
20980 if { (eval echo configure:20981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20981   rm -rf conftest*
20982   eval "ac_cv_lib_$ac_lib_var=yes"
20983 else
20984   echo "configure: failed program was:" >&5
20985   cat conftest.$ac_ext >&5
20986   rm -rf conftest*
20987   eval "ac_cv_lib_$ac_lib_var=no"
20988 fi
20989 rm -f conftest*
20990 LIBS="$ac_save_LIBS"
20991
20992 fi
20993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20994   echo "$ac_t""yes" 1>&6
20995   ol_cv_lib_mdbm=-lmdbm
20996 else
20997   echo "$ac_t""no" 1>&6
20998 ol_cv_lib_mdbm=no
20999 fi
21000
21001         
21002 fi
21003
21004         LIBS="$ol_LIBS"
21005
21006 fi
21007
21008 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21009
21010
21011  for ac_hdr in mdbm.h
21012 do
21013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21015 echo "configure:21016: checking for $ac_hdr" >&5
21016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21017   echo $ac_n "(cached) $ac_c" 1>&6
21018 else
21019   cat > conftest.$ac_ext <<EOF
21020 #line 21021 "configure"
21021 #include "confdefs.h"
21022 #include <$ac_hdr>
21023 EOF
21024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21025 { (eval echo configure:21026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21027 if test -z "$ac_err"; then
21028   rm -rf conftest*
21029   eval "ac_cv_header_$ac_safe=yes"
21030 else
21031   echo "$ac_err" >&5
21032   echo "configure: failed program was:" >&5
21033   cat conftest.$ac_ext >&5
21034   rm -rf conftest*
21035   eval "ac_cv_header_$ac_safe=no"
21036 fi
21037 rm -f conftest*
21038 fi
21039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21040   echo "$ac_t""yes" 1>&6
21041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21042   cat >> confdefs.h <<EOF
21043 #define $ac_tr_hdr 1
21044 EOF
21045  
21046 else
21047   echo "$ac_t""no" 1>&6
21048 fi
21049 done
21050
21051  echo $ac_n "checking for db""... $ac_c" 1>&6
21052 echo "configure:21053: checking for db" >&5
21053 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21054   echo $ac_n "(cached) $ac_c" 1>&6
21055 else
21056   
21057         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21058                 ol_cv_mdbm=no
21059         else
21060                 ol_cv_mdbm=yes
21061         fi
21062
21063 fi
21064
21065 echo "$ac_t""$ol_cv_mdbm" 1>&6
21066  if test $ol_cv_mdbm = yes ; then
21067         cat >> confdefs.h <<\EOF
21068 #define HAVE_MDBM 1
21069 EOF
21070
21071  fi
21072
21073
21074         if test $ol_cv_mdbm = yes ; then
21075                 ol_link_ldbm=mdbm
21076                 ol_with_ldbm_api=mdbm
21077                 if test $ol_cv_lib_mdbm != yes ; then
21078                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21079                 fi
21080         fi
21081 fi
21082
21083 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21084         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21085 echo "configure:21086: checking for GDBM library" >&5
21086 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21087   echo $ac_n "(cached) $ac_c" 1>&6
21088 else
21089         ol_LIBS="$LIBS"
21090         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21091 echo "configure:21092: checking for gdbm_open" >&5
21092 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21093   echo $ac_n "(cached) $ac_c" 1>&6
21094 else
21095   cat > conftest.$ac_ext <<EOF
21096 #line 21097 "configure"
21097 #include "confdefs.h"
21098 /* System header to define __stub macros and hopefully few prototypes,
21099     which can conflict with char gdbm_open(); below.  */
21100 #include <assert.h>
21101 /* Override any gcc2 internal prototype to avoid an error.  */
21102 /* We use char because int might match the return type of a gcc2
21103     builtin and then its argument prototype would still apply.  */
21104 char gdbm_open();
21105 char (*f)();
21106
21107 int main() {
21108
21109 /* The GNU C library defines this for functions which it implements
21110     to always fail with ENOSYS.  Some functions are actually named
21111     something starting with __ and the normal name is an alias.  */
21112 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21113 choke me
21114 #else
21115 f = gdbm_open;
21116 #endif
21117
21118 ; return 0; }
21119 EOF
21120 if { (eval echo configure:21121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21121   rm -rf conftest*
21122   eval "ac_cv_func_gdbm_open=yes"
21123 else
21124   echo "configure: failed program was:" >&5
21125   cat conftest.$ac_ext >&5
21126   rm -rf conftest*
21127   eval "ac_cv_func_gdbm_open=no"
21128 fi
21129 rm -f conftest*
21130 fi
21131
21132 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21133   echo "$ac_t""yes" 1>&6
21134   ol_cv_lib_gdbm=yes
21135 else
21136   echo "$ac_t""no" 1>&6
21137
21138                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21139 echo "configure:21140: checking for gdbm_open in -lgdbm" >&5
21140 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21142   echo $ac_n "(cached) $ac_c" 1>&6
21143 else
21144   ac_save_LIBS="$LIBS"
21145 LIBS="-lgdbm  $LIBS"
21146 cat > conftest.$ac_ext <<EOF
21147 #line 21148 "configure"
21148 #include "confdefs.h"
21149 /* Override any gcc2 internal prototype to avoid an error.  */
21150 /* We use char because int might match the return type of a gcc2
21151     builtin and then its argument prototype would still apply.  */
21152 char gdbm_open();
21153
21154 int main() {
21155 gdbm_open()
21156 ; return 0; }
21157 EOF
21158 if { (eval echo configure:21159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21159   rm -rf conftest*
21160   eval "ac_cv_lib_$ac_lib_var=yes"
21161 else
21162   echo "configure: failed program was:" >&5
21163   cat conftest.$ac_ext >&5
21164   rm -rf conftest*
21165   eval "ac_cv_lib_$ac_lib_var=no"
21166 fi
21167 rm -f conftest*
21168 LIBS="$ac_save_LIBS"
21169
21170 fi
21171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21172   echo "$ac_t""yes" 1>&6
21173   ol_cv_lib_gdbm=-lgdbm
21174 else
21175   echo "$ac_t""no" 1>&6
21176 ol_cv_lib_gdbm=no
21177 fi
21178
21179         
21180 fi
21181
21182         LIBS="$ol_LIBS"
21183
21184 fi
21185
21186 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21187
21188
21189  for ac_hdr in gdbm.h
21190 do
21191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21193 echo "configure:21194: checking for $ac_hdr" >&5
21194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21195   echo $ac_n "(cached) $ac_c" 1>&6
21196 else
21197   cat > conftest.$ac_ext <<EOF
21198 #line 21199 "configure"
21199 #include "confdefs.h"
21200 #include <$ac_hdr>
21201 EOF
21202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21203 { (eval echo configure:21204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21205 if test -z "$ac_err"; then
21206   rm -rf conftest*
21207   eval "ac_cv_header_$ac_safe=yes"
21208 else
21209   echo "$ac_err" >&5
21210   echo "configure: failed program was:" >&5
21211   cat conftest.$ac_ext >&5
21212   rm -rf conftest*
21213   eval "ac_cv_header_$ac_safe=no"
21214 fi
21215 rm -f conftest*
21216 fi
21217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21218   echo "$ac_t""yes" 1>&6
21219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21220   cat >> confdefs.h <<EOF
21221 #define $ac_tr_hdr 1
21222 EOF
21223  
21224 else
21225   echo "$ac_t""no" 1>&6
21226 fi
21227 done
21228
21229  echo $ac_n "checking for db""... $ac_c" 1>&6
21230 echo "configure:21231: checking for db" >&5
21231 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   
21235         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21236                 ol_cv_gdbm=no
21237         else
21238                 ol_cv_gdbm=yes
21239         fi
21240
21241 fi
21242
21243 echo "$ac_t""$ol_cv_gdbm" 1>&6
21244  if test $ol_cv_gdbm = yes ; then
21245         cat >> confdefs.h <<\EOF
21246 #define HAVE_GDBM 1
21247 EOF
21248
21249  fi
21250
21251
21252         if test $ol_cv_gdbm = yes ; then
21253                 ol_link_ldbm=gdbm
21254                 ol_with_ldbm_api=gdbm
21255
21256                 if test $ol_cv_lib_gdbm != yes ; then
21257                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21258                 fi
21259         fi
21260 fi
21261
21262 if test $ol_with_ldbm_api = ndbm ; then
21263         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21264 echo "configure:21265: checking for NDBM library" >&5
21265 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21266   echo $ac_n "(cached) $ac_c" 1>&6
21267 else
21268         ol_LIBS="$LIBS"
21269         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21270 echo "configure:21271: checking for dbm_open" >&5
21271 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21272   echo $ac_n "(cached) $ac_c" 1>&6
21273 else
21274   cat > conftest.$ac_ext <<EOF
21275 #line 21276 "configure"
21276 #include "confdefs.h"
21277 /* System header to define __stub macros and hopefully few prototypes,
21278     which can conflict with char dbm_open(); below.  */
21279 #include <assert.h>
21280 /* Override any gcc2 internal prototype to avoid an error.  */
21281 /* We use char because int might match the return type of a gcc2
21282     builtin and then its argument prototype would still apply.  */
21283 char dbm_open();
21284 char (*f)();
21285
21286 int main() {
21287
21288 /* The GNU C library defines this for functions which it implements
21289     to always fail with ENOSYS.  Some functions are actually named
21290     something starting with __ and the normal name is an alias.  */
21291 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21292 choke me
21293 #else
21294 f = dbm_open;
21295 #endif
21296
21297 ; return 0; }
21298 EOF
21299 if { (eval echo configure:21300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21300   rm -rf conftest*
21301   eval "ac_cv_func_dbm_open=yes"
21302 else
21303   echo "configure: failed program was:" >&5
21304   cat conftest.$ac_ext >&5
21305   rm -rf conftest*
21306   eval "ac_cv_func_dbm_open=no"
21307 fi
21308 rm -f conftest*
21309 fi
21310
21311 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21312   echo "$ac_t""yes" 1>&6
21313   ol_cv_lib_ndbm=yes
21314 else
21315   echo "$ac_t""no" 1>&6
21316
21317                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21318 echo "configure:21319: checking for dbm_open in -lndbm" >&5
21319 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21321   echo $ac_n "(cached) $ac_c" 1>&6
21322 else
21323   ac_save_LIBS="$LIBS"
21324 LIBS="-lndbm  $LIBS"
21325 cat > conftest.$ac_ext <<EOF
21326 #line 21327 "configure"
21327 #include "confdefs.h"
21328 /* Override any gcc2 internal prototype to avoid an error.  */
21329 /* We use char because int might match the return type of a gcc2
21330     builtin and then its argument prototype would still apply.  */
21331 char dbm_open();
21332
21333 int main() {
21334 dbm_open()
21335 ; return 0; }
21336 EOF
21337 if { (eval echo configure:21338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21338   rm -rf conftest*
21339   eval "ac_cv_lib_$ac_lib_var=yes"
21340 else
21341   echo "configure: failed program was:" >&5
21342   cat conftest.$ac_ext >&5
21343   rm -rf conftest*
21344   eval "ac_cv_lib_$ac_lib_var=no"
21345 fi
21346 rm -f conftest*
21347 LIBS="$ac_save_LIBS"
21348
21349 fi
21350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21351   echo "$ac_t""yes" 1>&6
21352   ol_cv_lib_ndbm=-lndbm
21353 else
21354   echo "$ac_t""no" 1>&6
21355
21356                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21357 echo "configure:21358: checking for dbm_open in -ldbm" >&5
21358 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21360   echo $ac_n "(cached) $ac_c" 1>&6
21361 else
21362   ac_save_LIBS="$LIBS"
21363 LIBS="-ldbm  $LIBS"
21364 cat > conftest.$ac_ext <<EOF
21365 #line 21366 "configure"
21366 #include "confdefs.h"
21367 /* Override any gcc2 internal prototype to avoid an error.  */
21368 /* We use char because int might match the return type of a gcc2
21369     builtin and then its argument prototype would still apply.  */
21370 char dbm_open();
21371
21372 int main() {
21373 dbm_open()
21374 ; return 0; }
21375 EOF
21376 if { (eval echo configure:21377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21377   rm -rf conftest*
21378   eval "ac_cv_lib_$ac_lib_var=yes"
21379 else
21380   echo "configure: failed program was:" >&5
21381   cat conftest.$ac_ext >&5
21382   rm -rf conftest*
21383   eval "ac_cv_lib_$ac_lib_var=no"
21384 fi
21385 rm -f conftest*
21386 LIBS="$ac_save_LIBS"
21387
21388 fi
21389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21390   echo "$ac_t""yes" 1>&6
21391   ol_cv_lib_ndbm=-ldbm
21392 else
21393   echo "$ac_t""no" 1>&6
21394 ol_cv_lib_ndbm=no
21395 fi
21396                 
21397 fi
21398
21399         
21400 fi
21401
21402         LIBS="$ol_LIBS"
21403
21404 fi
21405
21406 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21407
21408
21409  for ac_hdr in ndbm.h
21410 do
21411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21413 echo "configure:21414: checking for $ac_hdr" >&5
21414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21415   echo $ac_n "(cached) $ac_c" 1>&6
21416 else
21417   cat > conftest.$ac_ext <<EOF
21418 #line 21419 "configure"
21419 #include "confdefs.h"
21420 #include <$ac_hdr>
21421 EOF
21422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21423 { (eval echo configure:21424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21425 if test -z "$ac_err"; then
21426   rm -rf conftest*
21427   eval "ac_cv_header_$ac_safe=yes"
21428 else
21429   echo "$ac_err" >&5
21430   echo "configure: failed program was:" >&5
21431   cat conftest.$ac_ext >&5
21432   rm -rf conftest*
21433   eval "ac_cv_header_$ac_safe=no"
21434 fi
21435 rm -f conftest*
21436 fi
21437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21438   echo "$ac_t""yes" 1>&6
21439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21440   cat >> confdefs.h <<EOF
21441 #define $ac_tr_hdr 1
21442 EOF
21443  
21444 else
21445   echo "$ac_t""no" 1>&6
21446 fi
21447 done
21448
21449  echo $ac_n "checking for db""... $ac_c" 1>&6
21450 echo "configure:21451: checking for db" >&5
21451 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21452   echo $ac_n "(cached) $ac_c" 1>&6
21453 else
21454   
21455         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21456                 ol_cv_ndbm=no
21457         else
21458                 ol_cv_ndbm=yes
21459         fi
21460
21461 fi
21462
21463 echo "$ac_t""$ol_cv_ndbm" 1>&6
21464  if test $ol_cv_ndbm = yes ; then
21465         cat >> confdefs.h <<\EOF
21466 #define HAVE_NDBM 1
21467 EOF
21468
21469  fi
21470
21471
21472         if test $ol_cv_ndbm = yes ; then
21473                 ol_link_ldbm=ndbm
21474                 ol_with_ldbm_api=ndbm
21475
21476                 if test $ol_cv_lib_ndbm != yes ; then
21477                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21478                 fi
21479         fi
21480 fi
21481
21482 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21483         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21484 fi
21485
21486 if test $ol_enable_bdb = yes -o \
21487         $ol_enable_hdb = yes -o \
21488         $ol_enable_ldbm = yes ; then
21489         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21490 fi
21491
21492
21493 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21494         BUILD_LIBS_DYNAMIC=shared
21495         cat >> confdefs.h <<\EOF
21496 #define LDAP_LIBS_DYNAMIC 1
21497 EOF
21498
21499         LTSTATIC=""
21500 else
21501         BUILD_LIBS_DYNAMIC=static
21502         LTSTATIC="-static"
21503 fi
21504
21505 if test $ol_enable_wrappers != no ; then
21506         for ac_hdr in tcpd.h
21507 do
21508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21510 echo "configure:21511: checking for $ac_hdr" >&5
21511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21512   echo $ac_n "(cached) $ac_c" 1>&6
21513 else
21514   cat > conftest.$ac_ext <<EOF
21515 #line 21516 "configure"
21516 #include "confdefs.h"
21517 #include <$ac_hdr>
21518 EOF
21519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21520 { (eval echo configure:21521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21522 if test -z "$ac_err"; then
21523   rm -rf conftest*
21524   eval "ac_cv_header_$ac_safe=yes"
21525 else
21526   echo "$ac_err" >&5
21527   echo "configure: failed program was:" >&5
21528   cat conftest.$ac_ext >&5
21529   rm -rf conftest*
21530   eval "ac_cv_header_$ac_safe=no"
21531 fi
21532 rm -f conftest*
21533 fi
21534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21535   echo "$ac_t""yes" 1>&6
21536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21537   cat >> confdefs.h <<EOF
21538 #define $ac_tr_hdr 1
21539 EOF
21540  
21541                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21542 echo "configure:21543: checking for TCP wrappers library" >&5
21543                 save_LIBS="$LIBS"
21544                 LIBS="$LIBS -lwrap"
21545                 cat > conftest.$ac_ext <<EOF
21546 #line 21547 "configure"
21547 #include "confdefs.h"
21548
21549 #include <tcpd.h>
21550 int allow_severity = 0;
21551 int deny_severity  = 0;
21552
21553 struct request_info *req;
21554                 
21555 int main() {
21556
21557 hosts_access(req)
21558                 
21559 ; return 0; }
21560 EOF
21561 if { (eval echo configure:21562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21562   rm -rf conftest*
21563   echo "$ac_t""-lwrap" 1>&6
21564                 have_wrappers=yes
21565                 LIBS="$save_LIBS"
21566 else
21567   echo "configure: failed program was:" >&5
21568   cat conftest.$ac_ext >&5
21569   rm -rf conftest*
21570   
21571                                 LIBS="$LIBS -lnsl"
21572                 cat > conftest.$ac_ext <<EOF
21573 #line 21574 "configure"
21574 #include "confdefs.h"
21575
21576 #include <tcpd.h>
21577 int allow_severity = 0;
21578 int deny_severity  = 0;
21579
21580 struct request_info *req;
21581                 
21582 int main() {
21583
21584 hosts_access(req)
21585                 
21586 ; return 0; }
21587 EOF
21588 if { (eval echo configure:21589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21589   rm -rf conftest*
21590   echo "$ac_t""-lwrap -lnsl" 1>&6
21591                 have_wrappers=yes
21592                 LIBS="$save_LIBS -lnsl"
21593 else
21594   echo "configure: failed program was:" >&5
21595   cat conftest.$ac_ext >&5
21596   rm -rf conftest*
21597   
21598                 echo "$ac_t""no" 1>&6
21599                 have_wrappers=no
21600                 LIBS=$save_LIBS
21601 fi
21602 rm -f conftest*
21603 fi
21604 rm -f conftest*
21605 else
21606   echo "$ac_t""no" 1>&6
21607 have_wrappers=no
21608 fi
21609 done
21610
21611
21612         if test $have_wrappers = yes ; then
21613                 cat >> confdefs.h <<\EOF
21614 #define HAVE_TCPD 1
21615 EOF
21616
21617                 WRAP_LIBS="-lwrap"
21618         elif test $ol_enable_wrappers = yes ; then
21619                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21620         else
21621                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21622                 WRAP_LIBS=""
21623         fi
21624 fi
21625
21626 if test $ol_enable_syslog != no ; then
21627         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21628 echo "configure:21629: checking for openlog" >&5
21629 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21630   echo $ac_n "(cached) $ac_c" 1>&6
21631 else
21632   cat > conftest.$ac_ext <<EOF
21633 #line 21634 "configure"
21634 #include "confdefs.h"
21635 /* System header to define __stub macros and hopefully few prototypes,
21636     which can conflict with char openlog(); below.  */
21637 #include <assert.h>
21638 /* Override any gcc2 internal prototype to avoid an error.  */
21639 /* We use char because int might match the return type of a gcc2
21640     builtin and then its argument prototype would still apply.  */
21641 char openlog();
21642 char (*f)();
21643
21644 int main() {
21645
21646 /* The GNU C library defines this for functions which it implements
21647     to always fail with ENOSYS.  Some functions are actually named
21648     something starting with __ and the normal name is an alias.  */
21649 #if defined (__stub_openlog) || defined (__stub___openlog)
21650 choke me
21651 #else
21652 f = openlog;
21653 #endif
21654
21655 ; return 0; }
21656 EOF
21657 if { (eval echo configure:21658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21658   rm -rf conftest*
21659   eval "ac_cv_func_openlog=yes"
21660 else
21661   echo "configure: failed program was:" >&5
21662   cat conftest.$ac_ext >&5
21663   rm -rf conftest*
21664   eval "ac_cv_func_openlog=no"
21665 fi
21666 rm -f conftest*
21667 fi
21668
21669 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21670   echo "$ac_t""yes" 1>&6
21671   :
21672 else
21673   echo "$ac_t""no" 1>&6
21674 fi
21675
21676         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21677                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21678         fi
21679         ol_enable_syslog=$ac_cv_func_openlog
21680 fi
21681
21682
21683 ol_link_sql=no
21684 if test $ol_enable_sql != no ; then
21685         for ac_hdr in sql.h sqlext.h
21686 do
21687 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21688 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21689 echo "configure:21690: checking for $ac_hdr" >&5
21690 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21691   echo $ac_n "(cached) $ac_c" 1>&6
21692 else
21693   cat > conftest.$ac_ext <<EOF
21694 #line 21695 "configure"
21695 #include "confdefs.h"
21696 #include <$ac_hdr>
21697 EOF
21698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21699 { (eval echo configure:21700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21701 if test -z "$ac_err"; then
21702   rm -rf conftest*
21703   eval "ac_cv_header_$ac_safe=yes"
21704 else
21705   echo "$ac_err" >&5
21706   echo "configure: failed program was:" >&5
21707   cat conftest.$ac_ext >&5
21708   rm -rf conftest*
21709   eval "ac_cv_header_$ac_safe=no"
21710 fi
21711 rm -f conftest*
21712 fi
21713 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21714   echo "$ac_t""yes" 1>&6
21715     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21716   cat >> confdefs.h <<EOF
21717 #define $ac_tr_hdr 1
21718 EOF
21719  
21720 else
21721   echo "$ac_t""no" 1>&6
21722 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21723         
21724 fi
21725 done
21726
21727
21728         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21729 echo "configure:21730: checking for SQLDriverConnect in -liodbc" >&5
21730 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21732   echo $ac_n "(cached) $ac_c" 1>&6
21733 else
21734   ac_save_LIBS="$LIBS"
21735 LIBS="-liodbc  $LIBS"
21736 cat > conftest.$ac_ext <<EOF
21737 #line 21738 "configure"
21738 #include "confdefs.h"
21739 /* Override any gcc2 internal prototype to avoid an error.  */
21740 /* We use char because int might match the return type of a gcc2
21741     builtin and then its argument prototype would still apply.  */
21742 char SQLDriverConnect();
21743
21744 int main() {
21745 SQLDriverConnect()
21746 ; return 0; }
21747 EOF
21748 if { (eval echo configure:21749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21749   rm -rf conftest*
21750   eval "ac_cv_lib_$ac_lib_var=yes"
21751 else
21752   echo "configure: failed program was:" >&5
21753   cat conftest.$ac_ext >&5
21754   rm -rf conftest*
21755   eval "ac_cv_lib_$ac_lib_var=no"
21756 fi
21757 rm -f conftest*
21758 LIBS="$ac_save_LIBS"
21759
21760 fi
21761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21762   echo "$ac_t""yes" 1>&6
21763   have_iodbc=yes
21764 else
21765   echo "$ac_t""no" 1>&6
21766 have_iodbc=no
21767 fi
21768
21769         if test $have_iodbc = yes ; then
21770                 ol_link_sql="-liodbc"
21771         else
21772                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21773 echo "configure:21774: checking for SQLDriverConnect in -lodbc" >&5
21774 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21776   echo $ac_n "(cached) $ac_c" 1>&6
21777 else
21778   ac_save_LIBS="$LIBS"
21779 LIBS="-lodbc  $LIBS"
21780 cat > conftest.$ac_ext <<EOF
21781 #line 21782 "configure"
21782 #include "confdefs.h"
21783 /* Override any gcc2 internal prototype to avoid an error.  */
21784 /* We use char because int might match the return type of a gcc2
21785     builtin and then its argument prototype would still apply.  */
21786 char SQLDriverConnect();
21787
21788 int main() {
21789 SQLDriverConnect()
21790 ; return 0; }
21791 EOF
21792 if { (eval echo configure:21793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21793   rm -rf conftest*
21794   eval "ac_cv_lib_$ac_lib_var=yes"
21795 else
21796   echo "configure: failed program was:" >&5
21797   cat conftest.$ac_ext >&5
21798   rm -rf conftest*
21799   eval "ac_cv_lib_$ac_lib_var=no"
21800 fi
21801 rm -f conftest*
21802 LIBS="$ac_save_LIBS"
21803
21804 fi
21805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21806   echo "$ac_t""yes" 1>&6
21807   have_odbc=yes
21808 else
21809   echo "$ac_t""no" 1>&6
21810 have_odbc=no
21811 fi
21812
21813                 if test $have_odbc = yes ; then
21814                         ol_link_sql="-lodbc"
21815                 fi
21816         fi
21817
21818         if test $ol_link_sql != no ; then
21819                 SLAPD_SQL_LIBS="$ol_link_sql"
21820
21821         elif test $ol_enable_sql != auto ; then
21822                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21823         fi
21824 fi
21825
21826 WITH_SASL=no
21827 ol_link_sasl=no
21828 ol_link_spasswd=no
21829 if test $ol_with_cyrus_sasl != no ; then
21830         for ac_hdr in sasl/sasl.h sasl.h
21831 do
21832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21834 echo "configure:21835: checking for $ac_hdr" >&5
21835 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21836   echo $ac_n "(cached) $ac_c" 1>&6
21837 else
21838   cat > conftest.$ac_ext <<EOF
21839 #line 21840 "configure"
21840 #include "confdefs.h"
21841 #include <$ac_hdr>
21842 EOF
21843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21844 { (eval echo configure:21845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21846 if test -z "$ac_err"; then
21847   rm -rf conftest*
21848   eval "ac_cv_header_$ac_safe=yes"
21849 else
21850   echo "$ac_err" >&5
21851   echo "configure: failed program was:" >&5
21852   cat conftest.$ac_ext >&5
21853   rm -rf conftest*
21854   eval "ac_cv_header_$ac_safe=no"
21855 fi
21856 rm -f conftest*
21857 fi
21858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21859   echo "$ac_t""yes" 1>&6
21860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21861   cat >> confdefs.h <<EOF
21862 #define $ac_tr_hdr 1
21863 EOF
21864  
21865 else
21866   echo "$ac_t""no" 1>&6
21867 fi
21868 done
21869
21870
21871         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21872                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21873 echo "configure:21874: checking for sasl_client_init in -lsasl2" >&5
21874 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21876   echo $ac_n "(cached) $ac_c" 1>&6
21877 else
21878   ac_save_LIBS="$LIBS"
21879 LIBS="-lsasl2  $LIBS"
21880 cat > conftest.$ac_ext <<EOF
21881 #line 21882 "configure"
21882 #include "confdefs.h"
21883 /* Override any gcc2 internal prototype to avoid an error.  */
21884 /* We use char because int might match the return type of a gcc2
21885     builtin and then its argument prototype would still apply.  */
21886 char sasl_client_init();
21887
21888 int main() {
21889 sasl_client_init()
21890 ; return 0; }
21891 EOF
21892 if { (eval echo configure:21893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21893   rm -rf conftest*
21894   eval "ac_cv_lib_$ac_lib_var=yes"
21895 else
21896   echo "configure: failed program was:" >&5
21897   cat conftest.$ac_ext >&5
21898   rm -rf conftest*
21899   eval "ac_cv_lib_$ac_lib_var=no"
21900 fi
21901 rm -f conftest*
21902 LIBS="$ac_save_LIBS"
21903
21904 fi
21905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21906   echo "$ac_t""yes" 1>&6
21907   ol_link_sasl="-lsasl2"
21908 else
21909   echo "$ac_t""no" 1>&6
21910 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21911 echo "configure:21912: checking for sasl_client_init in -lsasl" >&5
21912 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21914   echo $ac_n "(cached) $ac_c" 1>&6
21915 else
21916   ac_save_LIBS="$LIBS"
21917 LIBS="-lsasl  $LIBS"
21918 cat > conftest.$ac_ext <<EOF
21919 #line 21920 "configure"
21920 #include "confdefs.h"
21921 /* Override any gcc2 internal prototype to avoid an error.  */
21922 /* We use char because int might match the return type of a gcc2
21923     builtin and then its argument prototype would still apply.  */
21924 char sasl_client_init();
21925
21926 int main() {
21927 sasl_client_init()
21928 ; return 0; }
21929 EOF
21930 if { (eval echo configure:21931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21931   rm -rf conftest*
21932   eval "ac_cv_lib_$ac_lib_var=yes"
21933 else
21934   echo "configure: failed program was:" >&5
21935   cat conftest.$ac_ext >&5
21936   rm -rf conftest*
21937   eval "ac_cv_lib_$ac_lib_var=no"
21938 fi
21939 rm -f conftest*
21940 LIBS="$ac_save_LIBS"
21941
21942 fi
21943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21944   echo "$ac_t""yes" 1>&6
21945   ol_link_sasl="-lsasl"
21946 else
21947   echo "$ac_t""no" 1>&6
21948 fi
21949
21950 fi
21951
21952         fi
21953
21954         if test $ol_link_sasl = no ; then
21955                 if test $ol_with_cyrus_sasl != auto ; then
21956                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21957                 else
21958                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21959                         echo "configure: warning: SASL authentication not supported!" 1>&2
21960                         if test $ol_link_tls = no ; then
21961                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21962                         fi
21963                 fi
21964         else
21965                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21966 echo "configure:21967: checking Cyrus SASL library version" >&5
21967 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21968   echo $ac_n "(cached) $ac_c" 1>&6
21969 else
21970   
21971         cat > conftest.$ac_ext <<EOF
21972 #line 21973 "configure"
21973 #include "confdefs.h"
21974
21975 #ifdef HAVE_SASL_SASL_H
21976 #include <sasl/sasl.h>
21977 #else
21978 #include <sasl.h>
21979 #endif
21980
21981 /* Require 2.1.15+ */
21982 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21983         char *__sasl_compat = "2.2+ or better okay (we guess)";
21984 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21985         && SASL_VERSION_STEP >=15
21986         char *__sasl_compat = "2.1.15+ or better okay";
21987 #endif
21988         
21989 EOF
21990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21991   egrep "__sasl_compat" >/dev/null 2>&1; then
21992   rm -rf conftest*
21993   ol_cv_sasl_compat=yes
21994 else
21995   rm -rf conftest*
21996   ol_cv_sasl_compat=no
21997 fi
21998 rm -f conftest*
21999
22000 fi
22001
22002 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22003
22004                 if test $ol_cv_sasl_compat = no ; then
22005                         ol_link_sasl=no
22006                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22007                 fi
22008
22009                 cat >> confdefs.h <<\EOF
22010 #define HAVE_CYRUS_SASL 1
22011 EOF
22012
22013                 SASL_LIBS="$ol_link_sasl"
22014                 if test $ol_enable_spasswd != no ; then
22015                         ol_link_spasswd=yes
22016                 fi
22017
22018                 ac_save_LIBS="$LIBS"
22019                 LIBS="$LIBS $ol_link_sasl"
22020                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22021 echo "configure:22022: checking for sasl_version" >&5
22022 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22023   echo $ac_n "(cached) $ac_c" 1>&6
22024 else
22025   cat > conftest.$ac_ext <<EOF
22026 #line 22027 "configure"
22027 #include "confdefs.h"
22028 /* System header to define __stub macros and hopefully few prototypes,
22029     which can conflict with char sasl_version(); below.  */
22030 #include <assert.h>
22031 /* Override any gcc2 internal prototype to avoid an error.  */
22032 /* We use char because int might match the return type of a gcc2
22033     builtin and then its argument prototype would still apply.  */
22034 char sasl_version();
22035 char (*f)();
22036
22037 int main() {
22038
22039 /* The GNU C library defines this for functions which it implements
22040     to always fail with ENOSYS.  Some functions are actually named
22041     something starting with __ and the normal name is an alias.  */
22042 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22043 choke me
22044 #else
22045 f = sasl_version;
22046 #endif
22047
22048 ; return 0; }
22049 EOF
22050 if { (eval echo configure:22051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22051   rm -rf conftest*
22052   eval "ac_cv_func_sasl_version=yes"
22053 else
22054   echo "configure: failed program was:" >&5
22055   cat conftest.$ac_ext >&5
22056   rm -rf conftest*
22057   eval "ac_cv_func_sasl_version=no"
22058 fi
22059 rm -f conftest*
22060 fi
22061
22062 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22063   echo "$ac_t""yes" 1>&6
22064   cat >> confdefs.h <<\EOF
22065 #define HAVE_SASL_VERSION 1
22066 EOF
22067
22068 else
22069   echo "$ac_t""no" 1>&6
22070 fi
22071
22072                 LIBS="$ac_save_LIBS"
22073
22074                 WITH_SASL=yes
22075         fi
22076
22077 else
22078         echo "configure: warning: SASL authentication not supported!" 1>&2
22079         if test $ol_link_tls = no ; then
22080                 echo "configure: warning: Strong authentication not supported!" 1>&2
22081         fi
22082 fi
22083
22084 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22085         dev=no
22086         if test -r /dev/urandom ; then
22087                 dev="/dev/urandom";
22088         elif test -r /idev/urandom ; then
22089                 dev="/idev/urandom";
22090         elif test -r /dev/srandom ; then
22091                 dev="/dev/srandom";
22092         elif test -r /dev/random ; then
22093                 dev="/dev/random";
22094         elif test -r /idev/random ; then
22095                 dev="/idev/random";
22096         fi
22097
22098         if test $dev != no ; then
22099                 cat >> confdefs.h <<EOF
22100 #define URANDOM_DEVICE "$dev"
22101 EOF
22102
22103         fi
22104 fi
22105
22106 ol_link_fetch=no
22107 if test $ol_with_fetch != no ; then
22108         ol_LIBS=$LIBS
22109 LIBS="-lfetch -lcom_err $LIBS"
22110 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22111 echo "configure:22112: checking fetch(3) library" >&5
22112 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22113   echo $ac_n "(cached) $ac_c" 1>&6
22114 else
22115   
22116         cat > conftest.$ac_ext <<EOF
22117 #line 22118 "configure"
22118 #include "confdefs.h"
22119
22120 #include <sys/param.h>
22121 #include <stdio.h>
22122 #include <fetch.h>
22123 int main() {
22124 struct url *u = fetchParseURL("file:///"); 
22125 ; return 0; }
22126 EOF
22127 if { (eval echo configure:22128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22128   rm -rf conftest*
22129   ol_cv_lib_fetch=yes
22130 else
22131   echo "configure: failed program was:" >&5
22132   cat conftest.$ac_ext >&5
22133   rm -rf conftest*
22134   ol_cv_lib_fetch=no
22135 fi
22136 rm -f conftest*
22137 fi
22138
22139 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22140 LIBS=$ol_LIBS
22141 if test $ol_cv_lib_fetch != no ; then
22142         ol_link_fetch="-lfetch -lcom_err"
22143         cat >> confdefs.h <<\EOF
22144 #define HAVE_FETCH 1
22145 EOF
22146
22147 fi
22148
22149
22150         if test $ol_cv_lib_fetch != no ; then
22151                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22152                 ol_link_fetch=freebsd
22153
22154         elif test $ol_with_fetch != auto ; then
22155                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22156         fi 
22157 fi
22158
22159 if test $ol_enable_crypt != no ; then
22160         save_LIBS="$LIBS"
22161         LIBS="$TLS_LIBS $LIBS"
22162
22163         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22164 echo "configure:22165: checking for crypt" >&5
22165 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22166   echo $ac_n "(cached) $ac_c" 1>&6
22167 else
22168   cat > conftest.$ac_ext <<EOF
22169 #line 22170 "configure"
22170 #include "confdefs.h"
22171 /* System header to define __stub macros and hopefully few prototypes,
22172     which can conflict with char crypt(); below.  */
22173 #include <assert.h>
22174 /* Override any gcc2 internal prototype to avoid an error.  */
22175 /* We use char because int might match the return type of a gcc2
22176     builtin and then its argument prototype would still apply.  */
22177 char crypt();
22178 char (*f)();
22179
22180 int main() {
22181
22182 /* The GNU C library defines this for functions which it implements
22183     to always fail with ENOSYS.  Some functions are actually named
22184     something starting with __ and the normal name is an alias.  */
22185 #if defined (__stub_crypt) || defined (__stub___crypt)
22186 choke me
22187 #else
22188 f = crypt;
22189 #endif
22190
22191 ; return 0; }
22192 EOF
22193 if { (eval echo configure:22194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22194   rm -rf conftest*
22195   eval "ac_cv_func_crypt=yes"
22196 else
22197   echo "configure: failed program was:" >&5
22198   cat conftest.$ac_ext >&5
22199   rm -rf conftest*
22200   eval "ac_cv_func_crypt=no"
22201 fi
22202 rm -f conftest*
22203 fi
22204
22205 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22206   echo "$ac_t""yes" 1>&6
22207   have_crypt=yes
22208 else
22209   echo "$ac_t""no" 1>&6
22210
22211                 LIBS="$save_LIBS"
22212                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22213 echo "configure:22214: checking for crypt in -lcrypt" >&5
22214 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22215 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22216   echo $ac_n "(cached) $ac_c" 1>&6
22217 else
22218   ac_save_LIBS="$LIBS"
22219 LIBS="-lcrypt  $LIBS"
22220 cat > conftest.$ac_ext <<EOF
22221 #line 22222 "configure"
22222 #include "confdefs.h"
22223 /* Override any gcc2 internal prototype to avoid an error.  */
22224 /* We use char because int might match the return type of a gcc2
22225     builtin and then its argument prototype would still apply.  */
22226 char crypt();
22227
22228 int main() {
22229 crypt()
22230 ; return 0; }
22231 EOF
22232 if { (eval echo configure:22233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22233   rm -rf conftest*
22234   eval "ac_cv_lib_$ac_lib_var=yes"
22235 else
22236   echo "configure: failed program was:" >&5
22237   cat conftest.$ac_ext >&5
22238   rm -rf conftest*
22239   eval "ac_cv_lib_$ac_lib_var=no"
22240 fi
22241 rm -f conftest*
22242 LIBS="$ac_save_LIBS"
22243
22244 fi
22245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22246   echo "$ac_t""yes" 1>&6
22247   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22248                         have_crypt=yes
22249 else
22250   echo "$ac_t""no" 1>&6
22251 have_crypt=no
22252 fi
22253
22254 fi
22255
22256
22257         LIBS="$save_LIBS"
22258
22259         if test $have_crypt = yes ; then
22260                 cat >> confdefs.h <<\EOF
22261 #define HAVE_CRYPT 1
22262 EOF
22263
22264         else
22265                 echo "configure: warning: could not find crypt" 1>&2
22266                 if test $ol_enable_crypt = yes ; then
22267                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22268                 fi
22269
22270                 echo "configure: warning: disabling crypt support" 1>&2
22271                 ol_enable_crypt=no
22272         fi
22273 fi
22274
22275 if test $ol_enable_proctitle != no ; then
22276         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22277 echo "configure:22278: checking for setproctitle" >&5
22278 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22279   echo $ac_n "(cached) $ac_c" 1>&6
22280 else
22281   cat > conftest.$ac_ext <<EOF
22282 #line 22283 "configure"
22283 #include "confdefs.h"
22284 /* System header to define __stub macros and hopefully few prototypes,
22285     which can conflict with char setproctitle(); below.  */
22286 #include <assert.h>
22287 /* Override any gcc2 internal prototype to avoid an error.  */
22288 /* We use char because int might match the return type of a gcc2
22289     builtin and then its argument prototype would still apply.  */
22290 char setproctitle();
22291 char (*f)();
22292
22293 int main() {
22294
22295 /* The GNU C library defines this for functions which it implements
22296     to always fail with ENOSYS.  Some functions are actually named
22297     something starting with __ and the normal name is an alias.  */
22298 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22299 choke me
22300 #else
22301 f = setproctitle;
22302 #endif
22303
22304 ; return 0; }
22305 EOF
22306 if { (eval echo configure:22307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22307   rm -rf conftest*
22308   eval "ac_cv_func_setproctitle=yes"
22309 else
22310   echo "configure: failed program was:" >&5
22311   cat conftest.$ac_ext >&5
22312   rm -rf conftest*
22313   eval "ac_cv_func_setproctitle=no"
22314 fi
22315 rm -f conftest*
22316 fi
22317
22318 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22319   echo "$ac_t""yes" 1>&6
22320   have_setproctitle=yes
22321 else
22322   echo "$ac_t""no" 1>&6
22323
22324                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22325 echo "configure:22326: checking for setproctitle in -lutil" >&5
22326 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22328   echo $ac_n "(cached) $ac_c" 1>&6
22329 else
22330   ac_save_LIBS="$LIBS"
22331 LIBS="-lutil  $LIBS"
22332 cat > conftest.$ac_ext <<EOF
22333 #line 22334 "configure"
22334 #include "confdefs.h"
22335 /* Override any gcc2 internal prototype to avoid an error.  */
22336 /* We use char because int might match the return type of a gcc2
22337     builtin and then its argument prototype would still apply.  */
22338 char setproctitle();
22339
22340 int main() {
22341 setproctitle()
22342 ; return 0; }
22343 EOF
22344 if { (eval echo configure:22345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22345   rm -rf conftest*
22346   eval "ac_cv_lib_$ac_lib_var=yes"
22347 else
22348   echo "configure: failed program was:" >&5
22349   cat conftest.$ac_ext >&5
22350   rm -rf conftest*
22351   eval "ac_cv_lib_$ac_lib_var=no"
22352 fi
22353 rm -f conftest*
22354 LIBS="$ac_save_LIBS"
22355
22356 fi
22357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22358   echo "$ac_t""yes" 1>&6
22359   have_setproctitle=yes
22360                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22361 else
22362   echo "$ac_t""no" 1>&6
22363 have_setproctitle=no
22364                         LIBOBJS="$LIBOBJS setproctitle.o"
22365                         LIBSRCS="$LIBSRCS setproctitle.c"
22366 fi
22367
22368 fi
22369
22370
22371         if test $have_setproctitle = yes ; then
22372                 cat >> confdefs.h <<\EOF
22373 #define HAVE_SETPROCTITLE 1
22374 EOF
22375
22376         fi
22377 fi
22378
22379 if test $ol_enable_slp != no ; then
22380         for ac_hdr in slp.h 
22381 do
22382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22384 echo "configure:22385: checking for $ac_hdr" >&5
22385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22386   echo $ac_n "(cached) $ac_c" 1>&6
22387 else
22388   cat > conftest.$ac_ext <<EOF
22389 #line 22390 "configure"
22390 #include "confdefs.h"
22391 #include <$ac_hdr>
22392 EOF
22393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22394 { (eval echo configure:22395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22396 if test -z "$ac_err"; then
22397   rm -rf conftest*
22398   eval "ac_cv_header_$ac_safe=yes"
22399 else
22400   echo "$ac_err" >&5
22401   echo "configure: failed program was:" >&5
22402   cat conftest.$ac_ext >&5
22403   rm -rf conftest*
22404   eval "ac_cv_header_$ac_safe=no"
22405 fi
22406 rm -f conftest*
22407 fi
22408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22409   echo "$ac_t""yes" 1>&6
22410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22411   cat >> confdefs.h <<EOF
22412 #define $ac_tr_hdr 1
22413 EOF
22414  
22415 else
22416   echo "$ac_t""no" 1>&6
22417 fi
22418 done
22419
22420
22421         if test $ac_cv_header_slp_h = yes ; then
22422                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22423 echo "configure:22424: checking for SLPOpen in -lslp" >&5
22424 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22426   echo $ac_n "(cached) $ac_c" 1>&6
22427 else
22428   ac_save_LIBS="$LIBS"
22429 LIBS="-lslp  $LIBS"
22430 cat > conftest.$ac_ext <<EOF
22431 #line 22432 "configure"
22432 #include "confdefs.h"
22433 /* Override any gcc2 internal prototype to avoid an error.  */
22434 /* We use char because int might match the return type of a gcc2
22435     builtin and then its argument prototype would still apply.  */
22436 char SLPOpen();
22437
22438 int main() {
22439 SLPOpen()
22440 ; return 0; }
22441 EOF
22442 if { (eval echo configure:22443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22443   rm -rf conftest*
22444   eval "ac_cv_lib_$ac_lib_var=yes"
22445 else
22446   echo "configure: failed program was:" >&5
22447   cat conftest.$ac_ext >&5
22448   rm -rf conftest*
22449   eval "ac_cv_lib_$ac_lib_var=no"
22450 fi
22451 rm -f conftest*
22452 LIBS="$ac_save_LIBS"
22453
22454 fi
22455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22456   echo "$ac_t""yes" 1>&6
22457   have_slp=yes
22458 else
22459   echo "$ac_t""no" 1>&6
22460 have_slp=no
22461 fi
22462
22463                 if test $have_slp = yes ; then
22464                         cat >> confdefs.h <<\EOF
22465 #define HAVE_SLP 1
22466 EOF
22467
22468                         SLAPD_SLP_LIBS=-lslp
22469                 fi
22470
22471         elif test $ol_enable_slp = yes ; then
22472                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22473         fi
22474 fi
22475
22476 if test "$ol_with_multiple_precision" != "no" ; then
22477         ol_have_bignum=no
22478         ol_have_gmp=no
22479
22480         for ac_hdr in openssl/bn.h bn.h
22481 do
22482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22484 echo "configure:22485: checking for $ac_hdr" >&5
22485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22486   echo $ac_n "(cached) $ac_c" 1>&6
22487 else
22488   cat > conftest.$ac_ext <<EOF
22489 #line 22490 "configure"
22490 #include "confdefs.h"
22491 #include <$ac_hdr>
22492 EOF
22493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22494 { (eval echo configure:22495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22496 if test -z "$ac_err"; then
22497   rm -rf conftest*
22498   eval "ac_cv_header_$ac_safe=yes"
22499 else
22500   echo "$ac_err" >&5
22501   echo "configure: failed program was:" >&5
22502   cat conftest.$ac_ext >&5
22503   rm -rf conftest*
22504   eval "ac_cv_header_$ac_safe=no"
22505 fi
22506 rm -f conftest*
22507 fi
22508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22509   echo "$ac_t""yes" 1>&6
22510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22511   cat >> confdefs.h <<EOF
22512 #define $ac_tr_hdr 1
22513 EOF
22514  
22515 else
22516   echo "$ac_t""no" 1>&6
22517 fi
22518 done
22519
22520         for ac_hdr in openssl/crypto.h crypto.h
22521 do
22522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22524 echo "configure:22525: checking for $ac_hdr" >&5
22525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22526   echo $ac_n "(cached) $ac_c" 1>&6
22527 else
22528   cat > conftest.$ac_ext <<EOF
22529 #line 22530 "configure"
22530 #include "confdefs.h"
22531 #include <$ac_hdr>
22532 EOF
22533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22534 { (eval echo configure:22535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22536 if test -z "$ac_err"; then
22537   rm -rf conftest*
22538   eval "ac_cv_header_$ac_safe=yes"
22539 else
22540   echo "$ac_err" >&5
22541   echo "configure: failed program was:" >&5
22542   cat conftest.$ac_ext >&5
22543   rm -rf conftest*
22544   eval "ac_cv_header_$ac_safe=no"
22545 fi
22546 rm -f conftest*
22547 fi
22548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22549   echo "$ac_t""yes" 1>&6
22550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22551   cat >> confdefs.h <<EOF
22552 #define $ac_tr_hdr 1
22553 EOF
22554  
22555 else
22556   echo "$ac_t""no" 1>&6
22557 fi
22558 done
22559
22560         for ac_hdr in gmp.h 
22561 do
22562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22564 echo "configure:22565: checking for $ac_hdr" >&5
22565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22566   echo $ac_n "(cached) $ac_c" 1>&6
22567 else
22568   cat > conftest.$ac_ext <<EOF
22569 #line 22570 "configure"
22570 #include "confdefs.h"
22571 #include <$ac_hdr>
22572 EOF
22573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22574 { (eval echo configure:22575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22576 if test -z "$ac_err"; then
22577   rm -rf conftest*
22578   eval "ac_cv_header_$ac_safe=yes"
22579 else
22580   echo "$ac_err" >&5
22581   echo "configure: failed program was:" >&5
22582   cat conftest.$ac_ext >&5
22583   rm -rf conftest*
22584   eval "ac_cv_header_$ac_safe=no"
22585 fi
22586 rm -f conftest*
22587 fi
22588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22589   echo "$ac_t""yes" 1>&6
22590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22591   cat >> confdefs.h <<EOF
22592 #define $ac_tr_hdr 1
22593 EOF
22594  
22595 else
22596   echo "$ac_t""no" 1>&6
22597 fi
22598 done
22599
22600
22601         if test "$ol_with_tls" = "found" ; then
22602                 ol_have_bn_h=no
22603                 ol_have_crypto_h=no
22604
22605                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22606                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22607                         ol_have_bn_h=yes
22608                 fi
22609
22610                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22611                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22612                         ol_have_crypto_h=yes
22613                 fi
22614
22615                 if test "$ol_have_bn_h" = "yes" \
22616                                 -a "$ol_have_crypto_h" = "yes" ; then
22617                         ol_have_bignum=yes
22618                 fi
22619         fi
22620
22621         if test $ac_cv_header_gmp_h = yes ; then
22622                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22623 echo "configure:22624: checking for __gmpz_add_ui in -lgmp" >&5
22624 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22626   echo $ac_n "(cached) $ac_c" 1>&6
22627 else
22628   ac_save_LIBS="$LIBS"
22629 LIBS="-lgmp  $LIBS"
22630 cat > conftest.$ac_ext <<EOF
22631 #line 22632 "configure"
22632 #include "confdefs.h"
22633 /* Override any gcc2 internal prototype to avoid an error.  */
22634 /* We use char because int might match the return type of a gcc2
22635     builtin and then its argument prototype would still apply.  */
22636 char __gmpz_add_ui();
22637
22638 int main() {
22639 __gmpz_add_ui()
22640 ; return 0; }
22641 EOF
22642 if { (eval echo configure:22643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22643   rm -rf conftest*
22644   eval "ac_cv_lib_$ac_lib_var=yes"
22645 else
22646   echo "configure: failed program was:" >&5
22647   cat conftest.$ac_ext >&5
22648   rm -rf conftest*
22649   eval "ac_cv_lib_$ac_lib_var=no"
22650 fi
22651 rm -f conftest*
22652 LIBS="$ac_save_LIBS"
22653
22654 fi
22655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22656   echo "$ac_t""yes" 1>&6
22657   have_gmp=yes
22658 else
22659   echo "$ac_t""no" 1>&6
22660 have_gmp=no
22661 fi
22662
22663                 if test $have_gmp = yes ; then
22664                         ol_have_gmp=yes
22665                 fi
22666         fi
22667
22668         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22669 echo "configure:22670: checking for multiple precision support" >&5
22670
22671         ol_mp_support="none"
22672         case "$ol_with_multiple_precision" in
22673         auto)
22674                                                                                 if test "$ol_have_bignum" = "yes" ; then
22675                         ol_mp_support="bignum"
22676                 else
22677                         if test "$ol_have_gmp" = "yes" ; then
22678                                 ol_mp_support="gmp"
22679                         fi
22680                 fi
22681                 ;;
22682         bignum)
22683                 if test "$ol_have_bignum" != "yes" ; then
22684                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22685                 fi
22686                 ol_mp_support="bignum"
22687                 ;;
22688         gmp)
22689                 if test "$ol_have_gmp" != "yes" ; then
22690                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22691                 fi
22692                 ol_mp_support="gmp"
22693                 ;;
22694         yes)
22695                 if test "$ol_have_bignum" = "yes" ; then
22696                         ol_mp_support="bignum"
22697                 elif test "$ol_have_gmp" = "yes" ; then
22698                         ol_mp_support="gmp"
22699                 else
22700                         { echo "configure: error: not available" 1>&2; exit 1; }
22701                 fi
22702                 ;;
22703         esac
22704
22705         case "$ol_mp_support" in
22706         bignum)
22707                 cat >> confdefs.h <<\EOF
22708 #define HAVE_BIGNUM 1
22709 EOF
22710
22711                 ;;
22712         gmp)
22713                 cat >> confdefs.h <<\EOF
22714 #define HAVE_GMP 1
22715 EOF
22716
22717                 SLAPD_GMP_LIBS=-lgmp
22718                 ;;
22719         none)
22720                 ;;
22721         esac
22722
22723         echo "$ac_t""$ol_mp_support" 1>&6
22724 fi
22725
22726
22727 echo $ac_n "checking long long""... $ac_c" 1>&6
22728 echo "configure:22729: checking long long" >&5
22729 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22730   echo $ac_n "(cached) $ac_c" 1>&6
22731 else
22732   
22733         cat > conftest.$ac_ext <<EOF
22734 #line 22735 "configure"
22735 #include "confdefs.h"
22736
22737 int main() {
22738 long long x;
22739 ; return 0; }
22740 EOF
22741 if { (eval echo configure:22742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22742   rm -rf conftest*
22743   ol_cv_type_long_long=yes
22744 else
22745   echo "configure: failed program was:" >&5
22746   cat conftest.$ac_ext >&5
22747   rm -rf conftest*
22748   ol_cv_type_long_long=no
22749 fi
22750 rm -f conftest*
22751 fi
22752
22753 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22754 if test $ol_cv_type_long_long = yes; then
22755         cat >> confdefs.h <<\EOF
22756 #define HAVE_LONG_LONG 1
22757 EOF
22758
22759 fi
22760
22761 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22762 echo "configure:22763: checking for ANSI C header files" >&5
22763 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22764   echo $ac_n "(cached) $ac_c" 1>&6
22765 else
22766   cat > conftest.$ac_ext <<EOF
22767 #line 22768 "configure"
22768 #include "confdefs.h"
22769 #include <stdlib.h>
22770 #include <stdarg.h>
22771 #include <string.h>
22772 #include <float.h>
22773 EOF
22774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22775 { (eval echo configure:22776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22777 if test -z "$ac_err"; then
22778   rm -rf conftest*
22779   ac_cv_header_stdc=yes
22780 else
22781   echo "$ac_err" >&5
22782   echo "configure: failed program was:" >&5
22783   cat conftest.$ac_ext >&5
22784   rm -rf conftest*
22785   ac_cv_header_stdc=no
22786 fi
22787 rm -f conftest*
22788
22789 if test $ac_cv_header_stdc = yes; then
22790   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22791 cat > conftest.$ac_ext <<EOF
22792 #line 22793 "configure"
22793 #include "confdefs.h"
22794 #include <string.h>
22795 EOF
22796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22797   egrep "memchr" >/dev/null 2>&1; then
22798   :
22799 else
22800   rm -rf conftest*
22801   ac_cv_header_stdc=no
22802 fi
22803 rm -f conftest*
22804
22805 fi
22806
22807 if test $ac_cv_header_stdc = yes; then
22808   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22809 cat > conftest.$ac_ext <<EOF
22810 #line 22811 "configure"
22811 #include "confdefs.h"
22812 #include <stdlib.h>
22813 EOF
22814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22815   egrep "free" >/dev/null 2>&1; then
22816   :
22817 else
22818   rm -rf conftest*
22819   ac_cv_header_stdc=no
22820 fi
22821 rm -f conftest*
22822
22823 fi
22824
22825 if test $ac_cv_header_stdc = yes; then
22826   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22827 if test "$cross_compiling" = yes; then
22828   :
22829 else
22830   cat > conftest.$ac_ext <<EOF
22831 #line 22832 "configure"
22832 #include "confdefs.h"
22833 #include <ctype.h>
22834 #if ((' ' & 0x0FF) == 0x020)
22835 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22836 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22837 #else
22838 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22839  || ('j' <= (c) && (c) <= 'r') \
22840  || ('s' <= (c) && (c) <= 'z'))
22841 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22842 #endif
22843 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22844 int main () { int i; for (i = 0; i < 256; i++)
22845 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22846 exit (0); }
22847
22848 EOF
22849 if { (eval echo configure:22850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22850 then
22851   :
22852 else
22853   echo "configure: failed program was:" >&5
22854   cat conftest.$ac_ext >&5
22855   rm -fr conftest*
22856   ac_cv_header_stdc=no
22857 fi
22858 rm -fr conftest*
22859 fi
22860
22861 fi
22862 fi
22863
22864 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22865 if test $ac_cv_header_stdc = yes; then
22866   cat >> confdefs.h <<\EOF
22867 #define STDC_HEADERS 1
22868 EOF
22869
22870 fi
22871
22872 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22873 echo "configure:22874: checking for mode_t" >&5
22874 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22875   echo $ac_n "(cached) $ac_c" 1>&6
22876 else
22877   cat > conftest.$ac_ext <<EOF
22878 #line 22879 "configure"
22879 #include "confdefs.h"
22880 #include <sys/types.h>
22881 #if STDC_HEADERS
22882 #include <stdlib.h>
22883 #include <stddef.h>
22884 #endif
22885
22886 EOF
22887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22888   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22889   rm -rf conftest*
22890   eval "ac_cv_type_mode_t=yes"
22891 else
22892   rm -rf conftest*
22893   eval "ac_cv_type_mode_t=no"
22894 fi
22895 rm -f conftest*
22896
22897 fi
22898 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22899   echo "$ac_t""yes" 1>&6
22900 else
22901   echo "$ac_t""no" 1>&6
22902   cat >> confdefs.h <<EOF
22903 #define mode_t int
22904 EOF
22905
22906 fi
22907
22908 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22909 echo "configure:22910: checking for off_t" >&5
22910 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22911   echo $ac_n "(cached) $ac_c" 1>&6
22912 else
22913   cat > conftest.$ac_ext <<EOF
22914 #line 22915 "configure"
22915 #include "confdefs.h"
22916 #include <sys/types.h>
22917 #if STDC_HEADERS
22918 #include <stdlib.h>
22919 #include <stddef.h>
22920 #endif
22921
22922 EOF
22923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22924   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22925   rm -rf conftest*
22926   eval "ac_cv_type_off_t=yes"
22927 else
22928   rm -rf conftest*
22929   eval "ac_cv_type_off_t=no"
22930 fi
22931 rm -f conftest*
22932
22933 fi
22934 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22935   echo "$ac_t""yes" 1>&6
22936 else
22937   echo "$ac_t""no" 1>&6
22938   cat >> confdefs.h <<EOF
22939 #define off_t long
22940 EOF
22941
22942 fi
22943
22944 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22945 echo "configure:22946: checking for pid_t" >&5
22946 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22947   echo $ac_n "(cached) $ac_c" 1>&6
22948 else
22949   cat > conftest.$ac_ext <<EOF
22950 #line 22951 "configure"
22951 #include "confdefs.h"
22952 #include <sys/types.h>
22953 #if STDC_HEADERS
22954 #include <stdlib.h>
22955 #include <stddef.h>
22956 #endif
22957
22958 EOF
22959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22960   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22961   rm -rf conftest*
22962   eval "ac_cv_type_pid_t=yes"
22963 else
22964   rm -rf conftest*
22965   eval "ac_cv_type_pid_t=no"
22966 fi
22967 rm -f conftest*
22968
22969 fi
22970 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22971   echo "$ac_t""yes" 1>&6
22972 else
22973   echo "$ac_t""no" 1>&6
22974   cat >> confdefs.h <<EOF
22975 #define pid_t int
22976 EOF
22977
22978 fi
22979
22980 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22981 echo "configure:22982: checking for ptrdiff_t" >&5
22982 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22983   echo $ac_n "(cached) $ac_c" 1>&6
22984 else
22985   cat > conftest.$ac_ext <<EOF
22986 #line 22987 "configure"
22987 #include "confdefs.h"
22988 #include <stddef.h>
22989 int main() {
22990 ptrdiff_t p
22991 ; return 0; }
22992 EOF
22993 if { (eval echo configure:22994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22994   rm -rf conftest*
22995   am_cv_type_ptrdiff_t=yes
22996 else
22997   echo "configure: failed program was:" >&5
22998   cat conftest.$ac_ext >&5
22999   rm -rf conftest*
23000   am_cv_type_ptrdiff_t=no
23001 fi
23002 rm -f conftest*
23003 fi
23004
23005 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23006    if test $am_cv_type_ptrdiff_t = yes; then
23007      cat >> confdefs.h <<\EOF
23008 #define HAVE_PTRDIFF_T 1
23009 EOF
23010
23011    fi
23012
23013 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23014 echo "configure:23015: checking return type of signal handlers" >&5
23015 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23016   echo $ac_n "(cached) $ac_c" 1>&6
23017 else
23018   cat > conftest.$ac_ext <<EOF
23019 #line 23020 "configure"
23020 #include "confdefs.h"
23021 #include <sys/types.h>
23022 #include <signal.h>
23023 #ifdef signal
23024 #undef signal
23025 #endif
23026 #ifdef __cplusplus
23027 extern "C" void (*signal (int, void (*)(int)))(int);
23028 #else
23029 void (*signal ()) ();
23030 #endif
23031
23032 int main() {
23033 int i;
23034 ; return 0; }
23035 EOF
23036 if { (eval echo configure:23037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23037   rm -rf conftest*
23038   ac_cv_type_signal=void
23039 else
23040   echo "configure: failed program was:" >&5
23041   cat conftest.$ac_ext >&5
23042   rm -rf conftest*
23043   ac_cv_type_signal=int
23044 fi
23045 rm -f conftest*
23046 fi
23047
23048 echo "$ac_t""$ac_cv_type_signal" 1>&6
23049 cat >> confdefs.h <<EOF
23050 #define RETSIGTYPE $ac_cv_type_signal
23051 EOF
23052
23053
23054 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23055 echo "configure:23056: checking for size_t" >&5
23056 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23057   echo $ac_n "(cached) $ac_c" 1>&6
23058 else
23059   cat > conftest.$ac_ext <<EOF
23060 #line 23061 "configure"
23061 #include "confdefs.h"
23062 #include <sys/types.h>
23063 #if STDC_HEADERS
23064 #include <stdlib.h>
23065 #include <stddef.h>
23066 #endif
23067
23068 EOF
23069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23070   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23071   rm -rf conftest*
23072   eval "ac_cv_type_size_t=yes"
23073 else
23074   rm -rf conftest*
23075   eval "ac_cv_type_size_t=no"
23076 fi
23077 rm -f conftest*
23078
23079 fi
23080 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23081   echo "$ac_t""yes" 1>&6
23082 else
23083   echo "$ac_t""no" 1>&6
23084   cat >> confdefs.h <<EOF
23085 #define size_t unsigned
23086 EOF
23087
23088 fi
23089
23090
23091 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23092 echo "configure:23093: checking for ssize_t" >&5
23093 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23094   echo $ac_n "(cached) $ac_c" 1>&6
23095 else
23096   cat > conftest.$ac_ext <<EOF
23097 #line 23098 "configure"
23098 #include "confdefs.h"
23099 #include <sys/types.h>
23100 #if STDC_HEADERS
23101 #include <stdlib.h>
23102 #include <stddef.h>
23103 #endif
23104
23105 EOF
23106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23107   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23108   rm -rf conftest*
23109   eval "ac_cv_type_ssize_t=yes"
23110 else
23111   rm -rf conftest*
23112   eval "ac_cv_type_ssize_t=no"
23113 fi
23114 rm -f conftest*
23115
23116 fi
23117 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23118   echo "$ac_t""yes" 1>&6
23119 else
23120   echo "$ac_t""no" 1>&6
23121   cat >> confdefs.h <<EOF
23122 #define ssize_t signed int
23123 EOF
23124
23125 fi
23126
23127 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23128 echo "configure:23129: checking for caddr_t" >&5
23129 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23130   echo $ac_n "(cached) $ac_c" 1>&6
23131 else
23132   cat > conftest.$ac_ext <<EOF
23133 #line 23134 "configure"
23134 #include "confdefs.h"
23135 #include <sys/types.h>
23136 #if STDC_HEADERS
23137 #include <stdlib.h>
23138 #include <stddef.h>
23139 #endif
23140
23141 EOF
23142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23143   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23144   rm -rf conftest*
23145   eval "ac_cv_type_caddr_t=yes"
23146 else
23147   rm -rf conftest*
23148   eval "ac_cv_type_caddr_t=no"
23149 fi
23150 rm -f conftest*
23151
23152 fi
23153 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23154   echo "$ac_t""yes" 1>&6
23155 else
23156   echo "$ac_t""no" 1>&6
23157   cat >> confdefs.h <<EOF
23158 #define caddr_t char *
23159 EOF
23160
23161 fi
23162
23163
23164 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23165 echo "configure:23166: checking for socklen_t" >&5
23166 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23167   echo $ac_n "(cached) $ac_c" 1>&6
23168 else
23169   cat > conftest.$ac_ext <<EOF
23170 #line 23171 "configure"
23171 #include "confdefs.h"
23172
23173 #ifdef HAVE_SYS_TYPES_H
23174 #include <sys/types.h>
23175 #endif
23176 #ifdef HAVE_SYS_SOCKET_H
23177 #include <sys/socket.h>
23178 #endif
23179
23180 int main() {
23181 socklen_t len;
23182 ; return 0; }
23183 EOF
23184 if { (eval echo configure:23185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23185   rm -rf conftest*
23186   ol_cv_type_socklen_t=yes
23187 else
23188   echo "configure: failed program was:" >&5
23189   cat conftest.$ac_ext >&5
23190   rm -rf conftest*
23191   ol_cv_type_socklen_t=no
23192 fi
23193 rm -f conftest*
23194 fi
23195
23196 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23197   if test $ol_cv_type_socklen_t = no; then
23198     cat >> confdefs.h <<\EOF
23199 #define socklen_t int
23200 EOF
23201
23202   fi
23203  
23204 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23205 echo "configure:23206: checking for member st_blksize in aggregate type struct stat" >&5
23206 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23207   echo $ac_n "(cached) $ac_c" 1>&6
23208 else
23209   cat > conftest.$ac_ext <<EOF
23210 #line 23211 "configure"
23211 #include "confdefs.h"
23212 #include <sys/types.h>
23213 #include <sys/stat.h>
23214 int main() {
23215 struct stat foo; foo.st_blksize;
23216 ; return 0; }
23217 EOF
23218 if { (eval echo configure:23219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23219   rm -rf conftest*
23220   ac_cv_c_struct_member_st_blksize=yes
23221 else
23222   echo "configure: failed program was:" >&5
23223   cat conftest.$ac_ext >&5
23224   rm -rf conftest*
23225   ac_cv_c_struct_member_st_blksize=no
23226 fi
23227 rm -f conftest*
23228 fi
23229
23230 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23231 st_blksize="$ac_cv_c_struct_member_st_blksize"
23232 if test $ac_cv_c_struct_member_st_blksize = yes; then
23233   cat >> confdefs.h <<\EOF
23234 #define HAVE_ST_BLKSIZE 1
23235 EOF
23236
23237 fi
23238
23239 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23240 echo "configure:23241: checking whether time.h and sys/time.h may both be included" >&5
23241 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23242   echo $ac_n "(cached) $ac_c" 1>&6
23243 else
23244   cat > conftest.$ac_ext <<EOF
23245 #line 23246 "configure"
23246 #include "confdefs.h"
23247 #include <sys/types.h>
23248 #include <sys/time.h>
23249 #include <time.h>
23250 int main() {
23251 struct tm *tp;
23252 ; return 0; }
23253 EOF
23254 if { (eval echo configure:23255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23255   rm -rf conftest*
23256   ac_cv_header_time=yes
23257 else
23258   echo "configure: failed program was:" >&5
23259   cat conftest.$ac_ext >&5
23260   rm -rf conftest*
23261   ac_cv_header_time=no
23262 fi
23263 rm -f conftest*
23264 fi
23265
23266 echo "$ac_t""$ac_cv_header_time" 1>&6
23267 if test $ac_cv_header_time = yes; then
23268   cat >> confdefs.h <<\EOF
23269 #define TIME_WITH_SYS_TIME 1
23270 EOF
23271
23272 fi
23273
23274 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23275 echo "configure:23276: checking whether struct tm is in sys/time.h or time.h" >&5
23276 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23277   echo $ac_n "(cached) $ac_c" 1>&6
23278 else
23279   cat > conftest.$ac_ext <<EOF
23280 #line 23281 "configure"
23281 #include "confdefs.h"
23282 #include <sys/types.h>
23283 #include <time.h>
23284 int main() {
23285 struct tm *tp; tp->tm_sec;
23286 ; return 0; }
23287 EOF
23288 if { (eval echo configure:23289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23289   rm -rf conftest*
23290   ac_cv_struct_tm=time.h
23291 else
23292   echo "configure: failed program was:" >&5
23293   cat conftest.$ac_ext >&5
23294   rm -rf conftest*
23295   ac_cv_struct_tm=sys/time.h
23296 fi
23297 rm -f conftest*
23298 fi
23299
23300 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23301 if test $ac_cv_struct_tm = sys/time.h; then
23302   cat >> confdefs.h <<\EOF
23303 #define TM_IN_SYS_TIME 1
23304 EOF
23305
23306 fi
23307
23308 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23309 echo "configure:23310: checking for uid_t in sys/types.h" >&5
23310 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23311   echo $ac_n "(cached) $ac_c" 1>&6
23312 else
23313   cat > conftest.$ac_ext <<EOF
23314 #line 23315 "configure"
23315 #include "confdefs.h"
23316 #include <sys/types.h>
23317 EOF
23318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23319   egrep "uid_t" >/dev/null 2>&1; then
23320   rm -rf conftest*
23321   ac_cv_type_uid_t=yes
23322 else
23323   rm -rf conftest*
23324   ac_cv_type_uid_t=no
23325 fi
23326 rm -f conftest*
23327
23328 fi
23329
23330 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23331 if test $ac_cv_type_uid_t = no; then
23332   cat >> confdefs.h <<\EOF
23333 #define uid_t int
23334 EOF
23335
23336   cat >> confdefs.h <<\EOF
23337 #define gid_t int
23338 EOF
23339
23340 fi
23341
23342 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23343 echo "configure:23344: checking for sig_atomic_t" >&5
23344 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23345   echo $ac_n "(cached) $ac_c" 1>&6
23346 else
23347   cat > conftest.$ac_ext <<EOF
23348 #line 23349 "configure"
23349 #include "confdefs.h"
23350 #include <signal.h>
23351 int main() {
23352 sig_atomic_t atomic;
23353 ; return 0; }
23354 EOF
23355 if { (eval echo configure:23356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23356   rm -rf conftest*
23357   ol_cv_type_sig_atomic_t=yes
23358 else
23359   echo "configure: failed program was:" >&5
23360   cat conftest.$ac_ext >&5
23361   rm -rf conftest*
23362   ol_cv_type_sig_atomic_t=no
23363 fi
23364 rm -f conftest*
23365 fi
23366
23367 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23368   if test $ol_cv_type_sig_atomic_t = no; then
23369     cat >> confdefs.h <<\EOF
23370 #define sig_atomic_t int
23371 EOF
23372
23373   fi
23374  
23375
23376
23377 # test for pw_gecos in struct passwd
23378 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23379 echo "configure:23380: checking struct passwd for pw_gecos" >&5
23380 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23381   echo $ac_n "(cached) $ac_c" 1>&6
23382 else
23383   
23384         cat > conftest.$ac_ext <<EOF
23385 #line 23386 "configure"
23386 #include "confdefs.h"
23387 #include <pwd.h>
23388 int main() {
23389
23390         struct passwd pwd;
23391         pwd.pw_gecos = pwd.pw_name;
23392
23393 ; return 0; }
23394 EOF
23395 if { (eval echo configure:23396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23396   rm -rf conftest*
23397   ol_cv_struct_passwd_pw_gecos=yes
23398 else
23399   echo "configure: failed program was:" >&5
23400   cat conftest.$ac_ext >&5
23401   rm -rf conftest*
23402   ol_cv_struct_passwd_pw_gecos=no
23403 fi
23404 rm -f conftest*
23405 fi
23406
23407 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23408 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23409         cat >> confdefs.h <<\EOF
23410 #define HAVE_PW_GECOS 1
23411 EOF
23412
23413 fi
23414
23415 # test for pw_passwd in struct passwd
23416 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23417 echo "configure:23418: checking struct passwd for pw_passwd" >&5
23418 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23419   echo $ac_n "(cached) $ac_c" 1>&6
23420 else
23421   
23422         cat > conftest.$ac_ext <<EOF
23423 #line 23424 "configure"
23424 #include "confdefs.h"
23425 #include <pwd.h>
23426 int main() {
23427
23428         struct passwd pwd;
23429         pwd.pw_passwd = pwd.pw_name;
23430
23431 ; return 0; }
23432 EOF
23433 if { (eval echo configure:23434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23434   rm -rf conftest*
23435   ol_cv_struct_passwd_pw_passwd=yes
23436 else
23437   echo "configure: failed program was:" >&5
23438   cat conftest.$ac_ext >&5
23439   rm -rf conftest*
23440   ol_cv_struct_passwd_pw_passwd=no
23441 fi
23442 rm -f conftest*
23443 fi
23444
23445 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23446 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23447         cat >> confdefs.h <<\EOF
23448 #define HAVE_PW_PASSWD 1
23449 EOF
23450
23451 fi
23452
23453
23454 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23455 echo "configure:23456: checking if toupper() requires islower()" >&5
23456 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23457   echo $ac_n "(cached) $ac_c" 1>&6
23458 else
23459   
23460         if test "$cross_compiling" = yes; then
23461   ol_cv_c_upper_lower=safe
23462 else
23463   cat > conftest.$ac_ext <<EOF
23464 #line 23465 "configure"
23465 #include "confdefs.h"
23466
23467 #include <ctype.h>
23468 main()
23469 {
23470         if ('C' == toupper('C'))
23471                 exit(0);
23472         else
23473                 exit(1);
23474 }
23475 EOF
23476 if { (eval echo configure:23477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23477 then
23478   ol_cv_c_upper_lower=no
23479 else
23480   echo "configure: failed program was:" >&5
23481   cat conftest.$ac_ext >&5
23482   rm -fr conftest*
23483   ol_cv_c_upper_lower=yes
23484 fi
23485 rm -fr conftest*
23486 fi
23487
23488 fi
23489
23490 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23491 if test $ol_cv_c_upper_lower != no ; then
23492         cat >> confdefs.h <<\EOF
23493 #define C_UPPER_LOWER 1
23494 EOF
23495
23496 fi
23497
23498 echo $ac_n "checking for working const""... $ac_c" 1>&6
23499 echo "configure:23500: checking for working const" >&5
23500 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23501   echo $ac_n "(cached) $ac_c" 1>&6
23502 else
23503   cat > conftest.$ac_ext <<EOF
23504 #line 23505 "configure"
23505 #include "confdefs.h"
23506
23507 int main() {
23508
23509 /* Ultrix mips cc rejects this.  */
23510 typedef int charset[2]; const charset x;
23511 /* SunOS 4.1.1 cc rejects this.  */
23512 char const *const *ccp;
23513 char **p;
23514 /* NEC SVR4.0.2 mips cc rejects this.  */
23515 struct point {int x, y;};
23516 static struct point const zero = {0,0};
23517 /* AIX XL C 1.02.0.0 rejects this.
23518    It does not let you subtract one const X* pointer from another in an arm
23519    of an if-expression whose if-part is not a constant expression */
23520 const char *g = "string";
23521 ccp = &g + (g ? g-g : 0);
23522 /* HPUX 7.0 cc rejects these. */
23523 ++ccp;
23524 p = (char**) ccp;
23525 ccp = (char const *const *) p;
23526 { /* SCO 3.2v4 cc rejects this.  */
23527   char *t;
23528   char const *s = 0 ? (char *) 0 : (char const *) 0;
23529
23530   *t++ = 0;
23531 }
23532 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23533   int x[] = {25, 17};
23534   const int *foo = &x[0];
23535   ++foo;
23536 }
23537 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23538   typedef const int *iptr;
23539   iptr p = 0;
23540   ++p;
23541 }
23542 { /* AIX XL C 1.02.0.0 rejects this saying
23543      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23544   struct s { int j; const int *ap[3]; };
23545   struct s *b; b->j = 5;
23546 }
23547 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23548   const int foo = 10;
23549 }
23550
23551 ; return 0; }
23552 EOF
23553 if { (eval echo configure:23554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23554   rm -rf conftest*
23555   ac_cv_c_const=yes
23556 else
23557   echo "configure: failed program was:" >&5
23558   cat conftest.$ac_ext >&5
23559   rm -rf conftest*
23560   ac_cv_c_const=no
23561 fi
23562 rm -f conftest*
23563 fi
23564
23565 echo "$ac_t""$ac_cv_c_const" 1>&6
23566 if test $ac_cv_c_const = no; then
23567   cat >> confdefs.h <<\EOF
23568 #define const 
23569 EOF
23570
23571 fi
23572
23573 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23574 echo "configure:23575: checking if compiler understands volatile" >&5
23575 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23576   echo $ac_n "(cached) $ac_c" 1>&6
23577 else
23578   cat > conftest.$ac_ext <<EOF
23579 #line 23580 "configure"
23580 #include "confdefs.h"
23581 int x, y, z;
23582 int main() {
23583 volatile int a; int * volatile b = x ? &y : &z;
23584       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23585       *b = 0;
23586 ; return 0; }
23587 EOF
23588 if { (eval echo configure:23589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23589   rm -rf conftest*
23590   ol_cv_c_volatile=yes
23591 else
23592   echo "configure: failed program was:" >&5
23593   cat conftest.$ac_ext >&5
23594   rm -rf conftest*
23595   ol_cv_c_volatile=no
23596 fi
23597 rm -f conftest*
23598 fi
23599
23600 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23601   if test $ol_cv_c_volatile = yes; then
23602     : 
23603   else
23604     cat >> confdefs.h <<\EOF
23605 #define volatile 
23606 EOF
23607
23608   fi
23609  
23610
23611 if test $cross_compiling = yes ; then
23612         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23613         cat >> confdefs.h <<\EOF
23614 #define CROSS_COMPILING 1
23615 EOF
23616
23617 else
23618         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23619 echo "configure:23620: checking whether byte ordering is bigendian" >&5
23620 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23621   echo $ac_n "(cached) $ac_c" 1>&6
23622 else
23623   ac_cv_c_bigendian=unknown
23624 # See if sys/param.h defines the BYTE_ORDER macro.
23625 cat > conftest.$ac_ext <<EOF
23626 #line 23627 "configure"
23627 #include "confdefs.h"
23628 #include <sys/types.h>
23629 #include <sys/param.h>
23630 int main() {
23631
23632 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23633  bogus endian macros
23634 #endif
23635 ; return 0; }
23636 EOF
23637 if { (eval echo configure:23638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23638   rm -rf conftest*
23639   # It does; now see whether it defined to BIG_ENDIAN or not.
23640 cat > conftest.$ac_ext <<EOF
23641 #line 23642 "configure"
23642 #include "confdefs.h"
23643 #include <sys/types.h>
23644 #include <sys/param.h>
23645 int main() {
23646
23647 #if BYTE_ORDER != BIG_ENDIAN
23648  not big endian
23649 #endif
23650 ; return 0; }
23651 EOF
23652 if { (eval echo configure:23653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23653   rm -rf conftest*
23654   ac_cv_c_bigendian=yes
23655 else
23656   echo "configure: failed program was:" >&5
23657   cat conftest.$ac_ext >&5
23658   rm -rf conftest*
23659   ac_cv_c_bigendian=no
23660 fi
23661 rm -f conftest*
23662 else
23663   echo "configure: failed program was:" >&5
23664   cat conftest.$ac_ext >&5
23665 fi
23666 rm -f conftest*
23667 if test $ac_cv_c_bigendian = unknown; then
23668 if test "$cross_compiling" = yes; then
23669     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23670 else
23671   cat > conftest.$ac_ext <<EOF
23672 #line 23673 "configure"
23673 #include "confdefs.h"
23674 main () {
23675   /* Are we little or big endian?  From Harbison&Steele.  */
23676   union
23677   {
23678     long l;
23679     char c[sizeof (long)];
23680   } u;
23681   u.l = 1;
23682   exit (u.c[sizeof (long) - 1] == 1);
23683 }
23684 EOF
23685 if { (eval echo configure:23686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23686 then
23687   ac_cv_c_bigendian=no
23688 else
23689   echo "configure: failed program was:" >&5
23690   cat conftest.$ac_ext >&5
23691   rm -fr conftest*
23692   ac_cv_c_bigendian=yes
23693 fi
23694 rm -fr conftest*
23695 fi
23696
23697 fi
23698 fi
23699
23700 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23701 if test $ac_cv_c_bigendian = yes; then
23702   cat >> confdefs.h <<\EOF
23703 #define WORDS_BIGENDIAN 1
23704 EOF
23705
23706 fi
23707
23708 fi
23709
23710 echo $ac_n "checking size of short""... $ac_c" 1>&6
23711 echo "configure:23712: checking size of short" >&5 
23712 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23713   echo $ac_n "(cached) $ac_c" 1>&6
23714 else
23715   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23716   cat > conftest.$ac_ext <<EOF
23717 #line 23718 "configure"
23718 #include "confdefs.h"
23719 #include "confdefs.h" 
23720 #include <stdlib.h>
23721 #include <sys/types.h> 
23722  
23723
23724 int main() {
23725 switch (0) case 0: case (sizeof (short) == $ac_size):;
23726 ; return 0; }
23727 EOF
23728 if { (eval echo configure:23729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23729   rm -rf conftest*
23730   ac_cv_sizeof_short=$ac_size
23731 else
23732   echo "configure: failed program was:" >&5
23733   cat conftest.$ac_ext >&5
23734 fi
23735 rm -f conftest* 
23736   if test x$ac_cv_sizeof_short != x ; then break; fi 
23737 done 
23738
23739 fi
23740  
23741 if test x$ac_cv_sizeof_short = x ; then 
23742   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23743 fi 
23744 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23745 cat >> confdefs.h <<EOF
23746 #define SIZEOF_SHORT $ac_cv_sizeof_short
23747 EOF
23748  
23749  
23750 echo $ac_n "checking size of int""... $ac_c" 1>&6
23751 echo "configure:23752: checking size of int" >&5 
23752 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23753   echo $ac_n "(cached) $ac_c" 1>&6
23754 else
23755   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23756   cat > conftest.$ac_ext <<EOF
23757 #line 23758 "configure"
23758 #include "confdefs.h"
23759 #include "confdefs.h" 
23760 #include <stdlib.h>
23761 #include <sys/types.h> 
23762  
23763
23764 int main() {
23765 switch (0) case 0: case (sizeof (int) == $ac_size):;
23766 ; return 0; }
23767 EOF
23768 if { (eval echo configure:23769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23769   rm -rf conftest*
23770   ac_cv_sizeof_int=$ac_size
23771 else
23772   echo "configure: failed program was:" >&5
23773   cat conftest.$ac_ext >&5
23774 fi
23775 rm -f conftest* 
23776   if test x$ac_cv_sizeof_int != x ; then break; fi 
23777 done 
23778
23779 fi
23780  
23781 if test x$ac_cv_sizeof_int = x ; then 
23782   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23783 fi 
23784 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23785 cat >> confdefs.h <<EOF
23786 #define SIZEOF_INT $ac_cv_sizeof_int
23787 EOF
23788  
23789  
23790 echo $ac_n "checking size of long""... $ac_c" 1>&6
23791 echo "configure:23792: checking size of long" >&5 
23792 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23793   echo $ac_n "(cached) $ac_c" 1>&6
23794 else
23795   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23796   cat > conftest.$ac_ext <<EOF
23797 #line 23798 "configure"
23798 #include "confdefs.h"
23799 #include "confdefs.h" 
23800 #include <stdlib.h>
23801 #include <sys/types.h> 
23802  
23803
23804 int main() {
23805 switch (0) case 0: case (sizeof (long) == $ac_size):;
23806 ; return 0; }
23807 EOF
23808 if { (eval echo configure:23809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23809   rm -rf conftest*
23810   ac_cv_sizeof_long=$ac_size
23811 else
23812   echo "configure: failed program was:" >&5
23813   cat conftest.$ac_ext >&5
23814 fi
23815 rm -f conftest* 
23816   if test x$ac_cv_sizeof_long != x ; then break; fi 
23817 done 
23818
23819 fi
23820  
23821 if test x$ac_cv_sizeof_long = x ; then 
23822   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23823 fi 
23824 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23825 cat >> confdefs.h <<EOF
23826 #define SIZEOF_LONG $ac_cv_sizeof_long
23827 EOF
23828  
23829
23830 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23831 echo "configure:23832: checking size of wchar_t" >&5 
23832 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23833   echo $ac_n "(cached) $ac_c" 1>&6
23834 else
23835   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23836   cat > conftest.$ac_ext <<EOF
23837 #line 23838 "configure"
23838 #include "confdefs.h"
23839 #include "confdefs.h" 
23840 #include <stdlib.h>
23841 #include <sys/types.h> 
23842  
23843
23844 int main() {
23845 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23846 ; return 0; }
23847 EOF
23848 if { (eval echo configure:23849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23849   rm -rf conftest*
23850   ac_cv_sizeof_wchar_t=$ac_size
23851 else
23852   echo "configure: failed program was:" >&5
23853   cat conftest.$ac_ext >&5
23854 fi
23855 rm -f conftest* 
23856   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23857 done 
23858
23859 fi
23860  
23861 if test x$ac_cv_sizeof_wchar_t = x ; then 
23862   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23863 fi 
23864 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23865 cat >> confdefs.h <<EOF
23866 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23867 EOF
23868  
23869
23870
23871 if test "$ac_cv_sizeof_int" -lt 4 ; then
23872         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23873
23874         cat >> confdefs.h <<\EOF
23875 #define LBER_INT_T long
23876 EOF
23877
23878 else
23879         cat >> confdefs.h <<\EOF
23880 #define LBER_INT_T int
23881 EOF
23882
23883 fi
23884
23885 cat >> confdefs.h <<\EOF
23886 #define LBER_LEN_T long
23887 EOF
23888
23889 cat >> confdefs.h <<\EOF
23890 #define LBER_SOCKET_T int
23891 EOF
23892
23893 cat >> confdefs.h <<\EOF
23894 #define LBER_TAG_T long
23895 EOF
23896
23897
23898 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23899 echo "configure:23900: checking for 8-bit clean memcmp" >&5
23900 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23901   echo $ac_n "(cached) $ac_c" 1>&6
23902 else
23903   if test "$cross_compiling" = yes; then
23904   ac_cv_func_memcmp_clean=no
23905 else
23906   cat > conftest.$ac_ext <<EOF
23907 #line 23908 "configure"
23908 #include "confdefs.h"
23909
23910 main()
23911 {
23912   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23913   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23914 }
23915
23916 EOF
23917 if { (eval echo configure:23918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23918 then
23919   ac_cv_func_memcmp_clean=yes
23920 else
23921   echo "configure: failed program was:" >&5
23922   cat conftest.$ac_ext >&5
23923   rm -fr conftest*
23924   ac_cv_func_memcmp_clean=no
23925 fi
23926 rm -fr conftest*
23927 fi
23928
23929 fi
23930
23931 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23932 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23933
23934 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23935 echo "configure:23936: checking for strftime" >&5
23936 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23937   echo $ac_n "(cached) $ac_c" 1>&6
23938 else
23939   cat > conftest.$ac_ext <<EOF
23940 #line 23941 "configure"
23941 #include "confdefs.h"
23942 /* System header to define __stub macros and hopefully few prototypes,
23943     which can conflict with char strftime(); below.  */
23944 #include <assert.h>
23945 /* Override any gcc2 internal prototype to avoid an error.  */
23946 /* We use char because int might match the return type of a gcc2
23947     builtin and then its argument prototype would still apply.  */
23948 char strftime();
23949 char (*f)();
23950
23951 int main() {
23952
23953 /* The GNU C library defines this for functions which it implements
23954     to always fail with ENOSYS.  Some functions are actually named
23955     something starting with __ and the normal name is an alias.  */
23956 #if defined (__stub_strftime) || defined (__stub___strftime)
23957 choke me
23958 #else
23959 f = strftime;
23960 #endif
23961
23962 ; return 0; }
23963 EOF
23964 if { (eval echo configure:23965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23965   rm -rf conftest*
23966   eval "ac_cv_func_strftime=yes"
23967 else
23968   echo "configure: failed program was:" >&5
23969   cat conftest.$ac_ext >&5
23970   rm -rf conftest*
23971   eval "ac_cv_func_strftime=no"
23972 fi
23973 rm -f conftest*
23974 fi
23975
23976 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23977   echo "$ac_t""yes" 1>&6
23978   cat >> confdefs.h <<\EOF
23979 #define HAVE_STRFTIME 1
23980 EOF
23981
23982 else
23983   echo "$ac_t""no" 1>&6
23984 # strftime is in -lintl on SCO UNIX.
23985 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23986 echo "configure:23987: checking for strftime in -lintl" >&5
23987 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23989   echo $ac_n "(cached) $ac_c" 1>&6
23990 else
23991   ac_save_LIBS="$LIBS"
23992 LIBS="-lintl  $LIBS"
23993 cat > conftest.$ac_ext <<EOF
23994 #line 23995 "configure"
23995 #include "confdefs.h"
23996 /* Override any gcc2 internal prototype to avoid an error.  */
23997 /* We use char because int might match the return type of a gcc2
23998     builtin and then its argument prototype would still apply.  */
23999 char strftime();
24000
24001 int main() {
24002 strftime()
24003 ; return 0; }
24004 EOF
24005 if { (eval echo configure:24006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24006   rm -rf conftest*
24007   eval "ac_cv_lib_$ac_lib_var=yes"
24008 else
24009   echo "configure: failed program was:" >&5
24010   cat conftest.$ac_ext >&5
24011   rm -rf conftest*
24012   eval "ac_cv_lib_$ac_lib_var=no"
24013 fi
24014 rm -f conftest*
24015 LIBS="$ac_save_LIBS"
24016
24017 fi
24018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24019   echo "$ac_t""yes" 1>&6
24020   cat >> confdefs.h <<\EOF
24021 #define HAVE_STRFTIME 1
24022 EOF
24023
24024 LIBS="-lintl $LIBS"
24025 else
24026   echo "$ac_t""no" 1>&6
24027 fi
24028
24029 fi
24030
24031
24032 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24033 echo "configure:24034: checking for inet_aton()" >&5
24034 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24035   echo $ac_n "(cached) $ac_c" 1>&6
24036 else
24037   cat > conftest.$ac_ext <<EOF
24038 #line 24039 "configure"
24039 #include "confdefs.h"
24040
24041 #ifdef HAVE_SYS_TYPES_H
24042 #       include <sys/types.h>
24043 #endif
24044 #ifdef HAVE_SYS_SOCKET_H
24045 #       include <sys/socket.h>
24046 #       ifdef HAVE_SYS_SELECT_H
24047 #               include <sys/select.h>
24048 #       endif
24049 #       include <netinet/in.h>
24050 #       ifdef HAVE_ARPA_INET_H
24051 #               include <arpa/inet.h>
24052 #       endif
24053 #endif
24054
24055 int main() {
24056 struct in_addr in;
24057 int rc = inet_aton( "255.255.255.255", &in );
24058 ; return 0; }
24059 EOF
24060 if { (eval echo configure:24061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24061   rm -rf conftest*
24062   ol_cv_func_inet_aton=yes
24063 else
24064   echo "configure: failed program was:" >&5
24065   cat conftest.$ac_ext >&5
24066   rm -rf conftest*
24067   ol_cv_func_inet_aton=no
24068 fi
24069 rm -f conftest*
24070 fi
24071
24072 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24073   if test $ol_cv_func_inet_aton != no; then
24074     cat >> confdefs.h <<\EOF
24075 #define HAVE_INET_ATON 1
24076 EOF
24077
24078   fi
24079  
24080
24081 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24082 echo "configure:24083: checking for _spawnlp" >&5
24083 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24084   echo $ac_n "(cached) $ac_c" 1>&6
24085 else
24086   cat > conftest.$ac_ext <<EOF
24087 #line 24088 "configure"
24088 #include "confdefs.h"
24089 /* System header to define __stub macros and hopefully few prototypes,
24090     which can conflict with char _spawnlp(); below.  */
24091 #include <assert.h>
24092 /* Override any gcc2 internal prototype to avoid an error.  */
24093 /* We use char because int might match the return type of a gcc2
24094     builtin and then its argument prototype would still apply.  */
24095 char _spawnlp();
24096 char (*f)();
24097
24098 int main() {
24099
24100 /* The GNU C library defines this for functions which it implements
24101     to always fail with ENOSYS.  Some functions are actually named
24102     something starting with __ and the normal name is an alias.  */
24103 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24104 choke me
24105 #else
24106 f = _spawnlp;
24107 #endif
24108
24109 ; return 0; }
24110 EOF
24111 if { (eval echo configure:24112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24112   rm -rf conftest*
24113   eval "ac_cv_func__spawnlp=yes"
24114 else
24115   echo "configure: failed program was:" >&5
24116   cat conftest.$ac_ext >&5
24117   rm -rf conftest*
24118   eval "ac_cv_func__spawnlp=no"
24119 fi
24120 rm -f conftest*
24121 fi
24122
24123 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24124   echo "$ac_t""yes" 1>&6
24125   cat >> confdefs.h <<\EOF
24126 #define HAVE_SPAWNLP 1
24127 EOF
24128
24129 else
24130   echo "$ac_t""no" 1>&6
24131 fi
24132
24133
24134 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24135 echo "configure:24136: checking for _snprintf" >&5
24136 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24137   echo $ac_n "(cached) $ac_c" 1>&6
24138 else
24139   cat > conftest.$ac_ext <<EOF
24140 #line 24141 "configure"
24141 #include "confdefs.h"
24142 /* System header to define __stub macros and hopefully few prototypes,
24143     which can conflict with char _snprintf(); below.  */
24144 #include <assert.h>
24145 /* Override any gcc2 internal prototype to avoid an error.  */
24146 /* We use char because int might match the return type of a gcc2
24147     builtin and then its argument prototype would still apply.  */
24148 char _snprintf();
24149 char (*f)();
24150
24151 int main() {
24152
24153 /* The GNU C library defines this for functions which it implements
24154     to always fail with ENOSYS.  Some functions are actually named
24155     something starting with __ and the normal name is an alias.  */
24156 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24157 choke me
24158 #else
24159 f = _snprintf;
24160 #endif
24161
24162 ; return 0; }
24163 EOF
24164 if { (eval echo configure:24165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24165   rm -rf conftest*
24166   eval "ac_cv_func__snprintf=yes"
24167 else
24168   echo "configure: failed program was:" >&5
24169   cat conftest.$ac_ext >&5
24170   rm -rf conftest*
24171   eval "ac_cv_func__snprintf=no"
24172 fi
24173 rm -f conftest*
24174 fi
24175
24176 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24177   echo "$ac_t""yes" 1>&6
24178   ac_cv_func_snprintf=yes
24179         cat >> confdefs.h <<\EOF
24180 #define snprintf _snprintf
24181 EOF
24182
24183
24184 else
24185   echo "$ac_t""no" 1>&6
24186 fi
24187
24188
24189 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24190 echo "configure:24191: checking for _vsnprintf" >&5
24191 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24192   echo $ac_n "(cached) $ac_c" 1>&6
24193 else
24194   cat > conftest.$ac_ext <<EOF
24195 #line 24196 "configure"
24196 #include "confdefs.h"
24197 /* System header to define __stub macros and hopefully few prototypes,
24198     which can conflict with char _vsnprintf(); below.  */
24199 #include <assert.h>
24200 /* Override any gcc2 internal prototype to avoid an error.  */
24201 /* We use char because int might match the return type of a gcc2
24202     builtin and then its argument prototype would still apply.  */
24203 char _vsnprintf();
24204 char (*f)();
24205
24206 int main() {
24207
24208 /* The GNU C library defines this for functions which it implements
24209     to always fail with ENOSYS.  Some functions are actually named
24210     something starting with __ and the normal name is an alias.  */
24211 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24212 choke me
24213 #else
24214 f = _vsnprintf;
24215 #endif
24216
24217 ; return 0; }
24218 EOF
24219 if { (eval echo configure:24220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24220   rm -rf conftest*
24221   eval "ac_cv_func__vsnprintf=yes"
24222 else
24223   echo "configure: failed program was:" >&5
24224   cat conftest.$ac_ext >&5
24225   rm -rf conftest*
24226   eval "ac_cv_func__vsnprintf=no"
24227 fi
24228 rm -f conftest*
24229 fi
24230
24231 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24232   echo "$ac_t""yes" 1>&6
24233   ac_cv_func_vsnprintf=yes
24234         cat >> confdefs.h <<\EOF
24235 #define vsnprintf _vsnprintf
24236 EOF
24237
24238
24239 else
24240   echo "$ac_t""no" 1>&6
24241 fi
24242
24243
24244 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24245 echo "configure:24246: checking for vprintf" >&5
24246 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24247   echo $ac_n "(cached) $ac_c" 1>&6
24248 else
24249   cat > conftest.$ac_ext <<EOF
24250 #line 24251 "configure"
24251 #include "confdefs.h"
24252 /* System header to define __stub macros and hopefully few prototypes,
24253     which can conflict with char vprintf(); below.  */
24254 #include <assert.h>
24255 /* Override any gcc2 internal prototype to avoid an error.  */
24256 /* We use char because int might match the return type of a gcc2
24257     builtin and then its argument prototype would still apply.  */
24258 char vprintf();
24259 char (*f)();
24260
24261 int main() {
24262
24263 /* The GNU C library defines this for functions which it implements
24264     to always fail with ENOSYS.  Some functions are actually named
24265     something starting with __ and the normal name is an alias.  */
24266 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24267 choke me
24268 #else
24269 f = vprintf;
24270 #endif
24271
24272 ; return 0; }
24273 EOF
24274 if { (eval echo configure:24275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24275   rm -rf conftest*
24276   eval "ac_cv_func_vprintf=yes"
24277 else
24278   echo "configure: failed program was:" >&5
24279   cat conftest.$ac_ext >&5
24280   rm -rf conftest*
24281   eval "ac_cv_func_vprintf=no"
24282 fi
24283 rm -f conftest*
24284 fi
24285
24286 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24287   echo "$ac_t""yes" 1>&6
24288   cat >> confdefs.h <<\EOF
24289 #define HAVE_VPRINTF 1
24290 EOF
24291
24292 else
24293   echo "$ac_t""no" 1>&6
24294 fi
24295
24296 if test "$ac_cv_func_vprintf" != yes; then
24297 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24298 echo "configure:24299: checking for _doprnt" >&5
24299 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24300   echo $ac_n "(cached) $ac_c" 1>&6
24301 else
24302   cat > conftest.$ac_ext <<EOF
24303 #line 24304 "configure"
24304 #include "confdefs.h"
24305 /* System header to define __stub macros and hopefully few prototypes,
24306     which can conflict with char _doprnt(); below.  */
24307 #include <assert.h>
24308 /* Override any gcc2 internal prototype to avoid an error.  */
24309 /* We use char because int might match the return type of a gcc2
24310     builtin and then its argument prototype would still apply.  */
24311 char _doprnt();
24312 char (*f)();
24313
24314 int main() {
24315
24316 /* The GNU C library defines this for functions which it implements
24317     to always fail with ENOSYS.  Some functions are actually named
24318     something starting with __ and the normal name is an alias.  */
24319 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24320 choke me
24321 #else
24322 f = _doprnt;
24323 #endif
24324
24325 ; return 0; }
24326 EOF
24327 if { (eval echo configure:24328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24328   rm -rf conftest*
24329   eval "ac_cv_func__doprnt=yes"
24330 else
24331   echo "configure: failed program was:" >&5
24332   cat conftest.$ac_ext >&5
24333   rm -rf conftest*
24334   eval "ac_cv_func__doprnt=no"
24335 fi
24336 rm -f conftest*
24337 fi
24338
24339 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24340   echo "$ac_t""yes" 1>&6
24341   cat >> confdefs.h <<\EOF
24342 #define HAVE_DOPRNT 1
24343 EOF
24344
24345 else
24346   echo "$ac_t""no" 1>&6
24347 fi
24348
24349 fi
24350
24351
24352 if test $ac_cv_func_vprintf = yes ; then
24353                 for ac_func in snprintf vsnprintf
24354 do
24355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24356 echo "configure:24357: checking for $ac_func" >&5
24357 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24358   echo $ac_n "(cached) $ac_c" 1>&6
24359 else
24360   cat > conftest.$ac_ext <<EOF
24361 #line 24362 "configure"
24362 #include "confdefs.h"
24363 /* System header to define __stub macros and hopefully few prototypes,
24364     which can conflict with char $ac_func(); below.  */
24365 #include <assert.h>
24366 /* Override any gcc2 internal prototype to avoid an error.  */
24367 /* We use char because int might match the return type of a gcc2
24368     builtin and then its argument prototype would still apply.  */
24369 char $ac_func();
24370 char (*f)();
24371
24372 int main() {
24373
24374 /* The GNU C library defines this for functions which it implements
24375     to always fail with ENOSYS.  Some functions are actually named
24376     something starting with __ and the normal name is an alias.  */
24377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24378 choke me
24379 #else
24380 f = $ac_func;
24381 #endif
24382
24383 ; return 0; }
24384 EOF
24385 if { (eval echo configure:24386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24386   rm -rf conftest*
24387   eval "ac_cv_func_$ac_func=yes"
24388 else
24389   echo "configure: failed program was:" >&5
24390   cat conftest.$ac_ext >&5
24391   rm -rf conftest*
24392   eval "ac_cv_func_$ac_func=no"
24393 fi
24394 rm -f conftest*
24395 fi
24396
24397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24398   echo "$ac_t""yes" 1>&6
24399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24400   cat >> confdefs.h <<EOF
24401 #define $ac_tr_func 1
24402 EOF
24403  
24404 else
24405   echo "$ac_t""no" 1>&6
24406 fi
24407 done
24408
24409 fi
24410
24411 for ac_func in \
24412         bcopy                   \
24413         closesocket             \
24414         chroot                  \
24415         endgrent                \
24416         endpwent                \
24417         fcntl                   \
24418         flock                   \
24419         fstat                   \
24420         getdtablesize   \
24421         getgrgid                \
24422         gethostname             \
24423         getpass                 \
24424         getpassphrase   \
24425         getpwuid                \
24426         getpwnam                \
24427         getspnam                \
24428         gettimeofday    \
24429         initgroups              \
24430         lockf                   \
24431         memcpy                  \
24432         memmove                 \
24433         mkstemp                 \
24434         mktemp                  \
24435         pipe                    \
24436         read                    \
24437         recv                    \
24438         recvfrom                \
24439         setpwfile               \
24440         setgid                  \
24441         setegid                 \
24442         setsid                  \
24443         setuid                  \
24444         seteuid                 \
24445         sigaction               \
24446         signal                  \
24447         sigset                  \
24448         strdup                  \
24449         strpbrk                 \
24450         strrchr                 \
24451         strsep                  \
24452         strstr                  \
24453         strtol                  \
24454         strtoul                 \
24455         strtoq                  \
24456         strtouq                 \
24457         strtoll                 \
24458         strspn                  \
24459         sysconf                 \
24460         usleep                  \
24461         waitpid                 \
24462         wait4                   \
24463         write                   \
24464         send                    \
24465         sendmsg                 \
24466         sendto                  \
24467
24468 do
24469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24470 echo "configure:24471: checking for $ac_func" >&5
24471 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24472   echo $ac_n "(cached) $ac_c" 1>&6
24473 else
24474   cat > conftest.$ac_ext <<EOF
24475 #line 24476 "configure"
24476 #include "confdefs.h"
24477 /* System header to define __stub macros and hopefully few prototypes,
24478     which can conflict with char $ac_func(); below.  */
24479 #include <assert.h>
24480 /* Override any gcc2 internal prototype to avoid an error.  */
24481 /* We use char because int might match the return type of a gcc2
24482     builtin and then its argument prototype would still apply.  */
24483 char $ac_func();
24484 char (*f)();
24485
24486 int main() {
24487
24488 /* The GNU C library defines this for functions which it implements
24489     to always fail with ENOSYS.  Some functions are actually named
24490     something starting with __ and the normal name is an alias.  */
24491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24492 choke me
24493 #else
24494 f = $ac_func;
24495 #endif
24496
24497 ; return 0; }
24498 EOF
24499 if { (eval echo configure:24500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24500   rm -rf conftest*
24501   eval "ac_cv_func_$ac_func=yes"
24502 else
24503   echo "configure: failed program was:" >&5
24504   cat conftest.$ac_ext >&5
24505   rm -rf conftest*
24506   eval "ac_cv_func_$ac_func=no"
24507 fi
24508 rm -f conftest*
24509 fi
24510
24511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24512   echo "$ac_t""yes" 1>&6
24513     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24514   cat >> confdefs.h <<EOF
24515 #define $ac_tr_func 1
24516 EOF
24517  
24518 else
24519   echo "$ac_t""no" 1>&6
24520 fi
24521 done
24522
24523
24524 for ac_func in getopt getpeereid
24525 do
24526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24527 echo "configure:24528: checking for $ac_func" >&5
24528 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24529   echo $ac_n "(cached) $ac_c" 1>&6
24530 else
24531   cat > conftest.$ac_ext <<EOF
24532 #line 24533 "configure"
24533 #include "confdefs.h"
24534 /* System header to define __stub macros and hopefully few prototypes,
24535     which can conflict with char $ac_func(); below.  */
24536 #include <assert.h>
24537 /* Override any gcc2 internal prototype to avoid an error.  */
24538 /* We use char because int might match the return type of a gcc2
24539     builtin and then its argument prototype would still apply.  */
24540 char $ac_func();
24541 char (*f)();
24542
24543 int main() {
24544
24545 /* The GNU C library defines this for functions which it implements
24546     to always fail with ENOSYS.  Some functions are actually named
24547     something starting with __ and the normal name is an alias.  */
24548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24549 choke me
24550 #else
24551 f = $ac_func;
24552 #endif
24553
24554 ; return 0; }
24555 EOF
24556 if { (eval echo configure:24557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24557   rm -rf conftest*
24558   eval "ac_cv_func_$ac_func=yes"
24559 else
24560   echo "configure: failed program was:" >&5
24561   cat conftest.$ac_ext >&5
24562   rm -rf conftest*
24563   eval "ac_cv_func_$ac_func=no"
24564 fi
24565 rm -f conftest*
24566 fi
24567
24568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24569   echo "$ac_t""yes" 1>&6
24570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24571   cat >> confdefs.h <<EOF
24572 #define $ac_tr_func 1
24573 EOF
24574  
24575 else
24576   echo "$ac_t""no" 1>&6
24577 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24578 fi
24579 done
24580
24581
24582
24583 if test "$ac_cv_func_getopt" != yes; then
24584         LIBSRCS="$LIBSRCS getopt.c"
24585 fi
24586 if test "$ac_cv_func_getpeereid" != yes; then
24587         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24588 echo "configure:24589: checking for msg_accrights in msghdr" >&5
24589 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24590   echo $ac_n "(cached) $ac_c" 1>&6
24591 else
24592   cat > conftest.$ac_ext <<EOF
24593 #line 24594 "configure"
24594 #include "confdefs.h"
24595 #include <sys/socket.h>
24596 int main() {
24597 struct msghdr m; m.msg_accrightslen=0
24598 ; return 0; }
24599 EOF
24600 if { (eval echo configure:24601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24601   rm -rf conftest*
24602   ol_cv_msghdr_msg_accrights=yes
24603 else
24604   echo "configure: failed program was:" >&5
24605   cat conftest.$ac_ext >&5
24606   rm -rf conftest*
24607   ol_cv_msghdr_msg_accrights=no
24608 fi
24609 rm -f conftest*
24610         
24611 fi
24612
24613 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24614   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24615         cat >> confdefs.h <<\EOF
24616 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24617 EOF
24618
24619   fi
24620
24621         LIBSRCS="$LIBSRCS getpeereid.c"
24622 fi
24623 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24624         if test "$ac_cv_func_snprintf" != yes; then
24625                 cat >> confdefs.h <<\EOF
24626 #define snprintf ber_pvt_snprintf
24627 EOF
24628
24629         fi
24630         if test "$ac_cv_func_vsnprintf" != yes; then
24631                 cat >> confdefs.h <<\EOF
24632 #define vsnprintf ber_pvt_vsnprintf
24633 EOF
24634
24635         fi
24636 fi
24637
24638
24639 if test "$ol_enable_slapi" != no ; then
24640                         for ac_hdr in ltdl.h
24641 do
24642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24644 echo "configure:24645: checking for $ac_hdr" >&5
24645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24646   echo $ac_n "(cached) $ac_c" 1>&6
24647 else
24648   cat > conftest.$ac_ext <<EOF
24649 #line 24650 "configure"
24650 #include "confdefs.h"
24651 #include <$ac_hdr>
24652 EOF
24653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24654 { (eval echo configure:24655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24656 if test -z "$ac_err"; then
24657   rm -rf conftest*
24658   eval "ac_cv_header_$ac_safe=yes"
24659 else
24660   echo "$ac_err" >&5
24661   echo "configure: failed program was:" >&5
24662   cat conftest.$ac_ext >&5
24663   rm -rf conftest*
24664   eval "ac_cv_header_$ac_safe=no"
24665 fi
24666 rm -f conftest*
24667 fi
24668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24669   echo "$ac_t""yes" 1>&6
24670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24671   cat >> confdefs.h <<EOF
24672 #define $ac_tr_hdr 1
24673 EOF
24674  
24675 else
24676   echo "$ac_t""no" 1>&6
24677 fi
24678 done
24679
24680
24681         if test $ac_cv_header_ltdl_h != yes ; then
24682                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24683         fi
24684         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24685 echo "configure:24686: checking for lt_dlinit in -lltdl" >&5
24686 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24687 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24688   echo $ac_n "(cached) $ac_c" 1>&6
24689 else
24690   ac_save_LIBS="$LIBS"
24691 LIBS="-lltdl  $LIBS"
24692 cat > conftest.$ac_ext <<EOF
24693 #line 24694 "configure"
24694 #include "confdefs.h"
24695 /* Override any gcc2 internal prototype to avoid an error.  */
24696 /* We use char because int might match the return type of a gcc2
24697     builtin and then its argument prototype would still apply.  */
24698 char lt_dlinit();
24699
24700 int main() {
24701 lt_dlinit()
24702 ; return 0; }
24703 EOF
24704 if { (eval echo configure:24705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24705   rm -rf conftest*
24706   eval "ac_cv_lib_$ac_lib_var=yes"
24707 else
24708   echo "configure: failed program was:" >&5
24709   cat conftest.$ac_ext >&5
24710   rm -rf conftest*
24711   eval "ac_cv_lib_$ac_lib_var=no"
24712 fi
24713 rm -f conftest*
24714 LIBS="$ac_save_LIBS"
24715
24716 fi
24717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24718   echo "$ac_t""yes" 1>&6
24719   
24720                 SLAPI_LIBS=-lltdl
24721                 LIBSLAPI=libslapi.a
24722                 LIBSLAPITOOLS=../libslapi.a
24723                 cat >> confdefs.h <<\EOF
24724 #define HAVE_LIBLTDL 1
24725 EOF
24726
24727         
24728 else
24729   echo "$ac_t""no" 1>&6
24730 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24731 fi
24732
24733
24734         cat >> confdefs.h <<\EOF
24735 #define LDAP_SLAPI 1
24736 EOF
24737
24738 fi
24739
24740 if test "$ol_enable_debug" != no ; then
24741         cat >> confdefs.h <<\EOF
24742 #define LDAP_DEBUG 1
24743 EOF
24744
24745 fi
24746 if test "$ol_enable_syslog" = yes ; then
24747         cat >> confdefs.h <<\EOF
24748 #define LDAP_SYSLOG 1
24749 EOF
24750
24751 fi
24752 if test "$ol_link_kbind" != no ; then
24753         cat >> confdefs.h <<\EOF
24754 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24755 EOF
24756
24757 fi
24758 if test "$ol_enable_proctitle" != no ; then
24759         cat >> confdefs.h <<\EOF
24760 #define LDAP_PROCTITLE 1
24761 EOF
24762
24763 fi
24764 if test "$ol_enable_referrals" != no ; then
24765         cat >> confdefs.h <<\EOF
24766 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24767 EOF
24768
24769 fi
24770 if test "$ol_enable_local" != no; then
24771         cat >> confdefs.h <<\EOF
24772 #define LDAP_PF_LOCAL 1
24773 EOF
24774
24775 fi
24776 if test "$ol_link_ipv6" != no; then
24777         cat >> confdefs.h <<\EOF
24778 #define LDAP_PF_INET6 1
24779 EOF
24780
24781 fi
24782 if test "$ol_enable_cleartext" != no ; then
24783         cat >> confdefs.h <<\EOF
24784 #define SLAPD_CLEARTEXT 1
24785 EOF
24786
24787 fi
24788 if test "$ol_enable_crypt" != no ; then
24789         cat >> confdefs.h <<\EOF
24790 #define SLAPD_CRYPT 1
24791 EOF
24792
24793 fi
24794 if test "$ol_link_spasswd" != no ; then
24795         cat >> confdefs.h <<\EOF
24796 #define SLAPD_SPASSWD 1
24797 EOF
24798
24799 fi
24800 if test "$ol_enable_multimaster" != no ; then
24801         cat >> confdefs.h <<\EOF
24802 #define SLAPD_MULTIMASTER 1
24803 EOF
24804
24805 fi
24806 if test "$ol_enable_rlookups" != no ; then
24807         cat >> confdefs.h <<\EOF
24808 #define SLAPD_RLOOKUPS 1
24809 EOF
24810
24811 fi
24812 if test "$ol_enable_aci" != no ; then
24813         cat >> confdefs.h <<\EOF
24814 #define SLAPD_ACI_ENABLED 1
24815 EOF
24816
24817 fi
24818
24819 if test "$ol_link_modules" != no ; then
24820         cat >> confdefs.h <<\EOF
24821 #define SLAPD_MODULES 1
24822 EOF
24823
24824         BUILD_SLAPD=yes
24825         SLAPD_MODULES_LDFLAGS="-dlopen self"
24826 fi
24827
24828 cat >> confdefs.h <<\EOF
24829 #define SLAPD_MOD_STATIC 1
24830 EOF
24831
24832 cat >> confdefs.h <<\EOF
24833 #define SLAPD_MOD_DYNAMIC 2
24834 EOF
24835
24836
24837 if test "$ol_enable_bdb" != no ; then
24838         BUILD_SLAPD=yes
24839         BUILD_BDB=$ol_enable_bdb
24840         if test "$ol_enable_bdb" = mod ; then
24841                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24842                 MFLAG=SLAPD_MOD_DYNAMIC
24843         else
24844                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24845                 MFLAG=SLAPD_MOD_STATIC
24846         fi
24847         cat >> confdefs.h <<EOF
24848 #define SLAPD_BDB $MFLAG
24849 EOF
24850
24851 fi
24852
24853 if test "$ol_enable_dnssrv" != no ; then
24854         BUILD_SLAPD=yes
24855         BUILD_DNSSRV=$ol_enable_dnssrv
24856         if test "$ol_enable_dnssrv" = mod ; then
24857                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24858                 MFLAG=SLAPD_MOD_DYNAMIC
24859         else
24860                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24861                 MFLAG=SLAPD_MOD_STATIC
24862         fi
24863         cat >> confdefs.h <<EOF
24864 #define SLAPD_DNSSRV $MFLAG
24865 EOF
24866
24867 fi
24868
24869 if test "$ol_enable_hdb" != no ; then
24870         BUILD_SLAPD=yes
24871         BUILD_HDB=$ol_enable_hdb
24872         if test "$ol_enable_hdb" = mod ; then
24873                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24874                 MFLAG=SLAPD_MOD_DYNAMIC
24875         else
24876                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24877                 MFLAG=SLAPD_MOD_STATIC
24878         fi
24879         cat >> confdefs.h <<EOF
24880 #define SLAPD_HDB $MFLAG
24881 EOF
24882
24883 fi
24884
24885 if test "$ol_enable_ldap" != no ; then
24886         BUILD_SLAPD=yes
24887         BUILD_LDAP=$ol_enable_ldap
24888         if test "$ol_enable_ldap" = mod ; then
24889                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24890                 MFLAG=SLAPD_MOD_DYNAMIC
24891         else
24892                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24893                 MFLAG=SLAPD_MOD_STATIC
24894         fi
24895         cat >> confdefs.h <<EOF
24896 #define SLAPD_LDAP $MFLAG
24897 EOF
24898
24899 fi
24900
24901 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24902         BUILD_SLAPD=yes
24903         BUILD_LDBM=$ol_enable_ldbm
24904         if test "$ol_enable_ldbm" = mod ; then
24905                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24906                 MFLAG=SLAPD_MOD_DYNAMIC
24907         else
24908                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24909                 MFLAG=SLAPD_MOD_STATIC
24910         fi
24911         cat >> confdefs.h <<EOF
24912 #define SLAPD_LDBM $MFLAG
24913 EOF
24914
24915 fi
24916
24917 if test "$ol_enable_meta" != no ; then
24918         BUILD_SLAPD=yes
24919         BUILD_META=$ol_enable_meta
24920         BUILD_REWRITE=yes
24921         if test "$ol_enable_meta" = mod ; then
24922                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24923                 MFLAG=SLAPD_MOD_DYNAMIC
24924         else
24925                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24926                 MFLAG=SLAPD_MOD_STATIC
24927         fi
24928         cat >> confdefs.h <<EOF
24929 #define SLAPD_META $MFLAG
24930 EOF
24931
24932 fi
24933
24934 if test "$ol_enable_monitor" != no ; then
24935         BUILD_SLAPD=yes
24936         BUILD_MONITOR=$ol_enable_monitor
24937         if test "$ol_enable_monitor" = mod ; then
24938                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24939                 MFLAG=SLAPD_MOD_DYNAMIC
24940         else
24941                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24942                 MFLAG=SLAPD_MOD_STATIC
24943         fi
24944         cat >> confdefs.h <<EOF
24945 #define SLAPD_MONITOR $MFLAG
24946 EOF
24947
24948 fi
24949
24950 if test "$ol_enable_null" != no ; then
24951         BUILD_SLAPD=yes
24952         BUILD_NULL=$ol_enable_null
24953         if test "$ol_enable_null" = mod ; then
24954                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24955                 MFLAG=SLAPD_MOD_DYNAMIC
24956         else
24957                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24958                 MFLAG=SLAPD_MOD_STATIC
24959         fi
24960         cat >> confdefs.h <<EOF
24961 #define SLAPD_NULL $MFLAG
24962 EOF
24963
24964 fi
24965
24966 if test "$ol_enable_passwd" != no ; then
24967         BUILD_SLAPD=yes
24968         BUILD_PASSWD=$ol_enable_passwd
24969         if test "$ol_enable_passwd" = mod ; then
24970                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24971                 MFLAG=SLAPD_MOD_DYNAMIC
24972         else
24973                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24974                 MFLAG=SLAPD_MOD_STATIC
24975         fi
24976         cat >> confdefs.h <<EOF
24977 #define SLAPD_PASSWD $MFLAG
24978 EOF
24979
24980 fi
24981
24982 if test "$ol_link_perl" != no ; then
24983         BUILD_SLAPD=yes
24984         BUILD_PERL=$ol_enable_perl
24985         if test "$ol_enable_perl" = mod ; then
24986                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24987                 MFLAG=SLAPD_MOD_DYNAMIC
24988         else
24989                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24990                 MFLAG=SLAPD_MOD_STATIC
24991         fi
24992         cat >> confdefs.h <<EOF
24993 #define SLAPD_PERL $MFLAG
24994 EOF
24995
24996 fi
24997
24998 if test "$ol_enable_relay" != no ; then
24999         BUILD_SLAPD=yes
25000         BUILD_RELAY=$ol_enable_relay
25001         if test "$ol_enable_relay" = mod ; then
25002                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25003                 MFLAG=SLAPD_MOD_DYNAMIC
25004         else
25005                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25006                 MFLAG=SLAPD_MOD_STATIC
25007         fi
25008         cat >> confdefs.h <<EOF
25009 #define SLAPD_RELAY $MFLAG
25010 EOF
25011
25012 fi
25013
25014 if test "$ol_enable_shell" != no ; then
25015         if test "$ol_link_thread" != no ; then
25016                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25017         fi
25018         BUILD_SLAPD=yes
25019         BUILD_SHELL=$ol_enable_shell
25020         if test "$ol_enable_shell" = mod ; then
25021                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25022                 MFLAG=SLAPD_MOD_DYNAMIC
25023         else
25024                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25025                 MFLAG=SLAPD_MOD_STATIC
25026         fi
25027         cat >> confdefs.h <<EOF
25028 #define SLAPD_SHELL $MFLAG
25029 EOF
25030
25031 fi
25032
25033 if test "$ol_link_sql" != no ; then
25034         BUILD_SLAPD=yes
25035         BUILD_SQL=$ol_enable_sql
25036         if test "$ol_enable_sql" = mod; then
25037                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25038                 MFLAG=SLAPD_MOD_DYNAMIC
25039         else
25040                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25041                 MFLAG=SLAPD_MOD_STATIC
25042         fi
25043         cat >> confdefs.h <<EOF
25044 #define SLAPD_SQL $MFLAG
25045 EOF
25046
25047 fi
25048
25049 if test "$ol_enable_chain" != no ; then
25050         BUILD_CHAIN=$ol_enable_chain
25051         if test "$ol_enable_chain" = mod ; then
25052                 MFLAG=SLAPD_MOD_DYNAMIC
25053                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
25054         else
25055                 MFLAG=SLAPD_MOD_STATIC
25056         fi
25057         cat >> confdefs.h <<EOF
25058 #define SLAPD_OVER_CHAIN $MFLAG
25059 EOF
25060
25061 fi
25062
25063 if test "$ol_enable_denyop" != no ; then
25064         BUILD_DENYOP=$ol_enable_denyop
25065         if test "$ol_enable_denyop" = mod ; then
25066                 MFLAG=SLAPD_MOD_DYNAMIC
25067                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25068         else
25069                 MFLAG=SLAPD_MOD_STATIC
25070         fi
25071         cat >> confdefs.h <<EOF
25072 #define SLAPD_OVER_DENYOP $MFLAG
25073 EOF
25074
25075 fi
25076
25077 if test "$ol_enable_dyngroup" != no ; then
25078         BUILD_DYNGROUP=$ol_enable_dyngroup
25079         if test "$ol_enable_dyngroup" = mod ; then
25080                 MFLAG=SLAPD_MOD_DYNAMIC
25081                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25082         else
25083                 MFLAG=SLAPD_MOD_STATIC
25084         fi
25085         cat >> confdefs.h <<EOF
25086 #define SLAPD_OVER_DYNGROUP $MFLAG
25087 EOF
25088
25089 fi
25090
25091 if test "$ol_enable_lastmod" != no ; then
25092         BUILD_LASTMOD=$ol_enable_lastmod
25093         if test "$ol_enable_lastmod" = mod ; then
25094                 MFLAG=SLAPD_MOD_DYNAMIC
25095                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25096         else
25097                 MFLAG=SLAPD_MOD_STATIC
25098         fi
25099         cat >> confdefs.h <<EOF
25100 #define SLAPD_OVER_LASTMOD $MFLAG
25101 EOF
25102
25103 fi
25104
25105 if test "$ol_enable_ppolicy" != no ; then
25106         BUILD_PPOLICY=$ol_enable_ppolicy
25107         if test "$ol_enable_ppolicy" = mod ; then
25108                 MFLAG=SLAPD_MOD_DYNAMIC
25109                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25110         else
25111                 MFLAG=SLAPD_MOD_STATIC
25112         fi
25113         cat >> confdefs.h <<EOF
25114 #define SLAPD_OVER_PPOLICY $MFLAG
25115 EOF
25116
25117 fi
25118
25119 if test "$ol_enable_proxycache" != no ; then
25120         BUILD_PROXYCACHE=$ol_enable_proxycache
25121         if test "$ol_enable_proxycache" = mod ; then
25122                 MFLAG=SLAPD_MOD_DYNAMIC
25123                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25124         else
25125                 MFLAG=SLAPD_MOD_STATIC
25126         fi
25127         cat >> confdefs.h <<EOF
25128 #define SLAPD_OVER_PROXYCACHE $MFLAG
25129 EOF
25130
25131 fi
25132
25133 if test "$ol_enable_refint" != no ; then
25134         BUILD_REFINT=$ol_enable_refint
25135         if test "$ol_enable_refint" = mod ; then
25136                 MFLAG=SLAPD_MOD_DYNAMIC
25137                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25138         else
25139                 MFLAG=SLAPD_MOD_STATIC
25140         fi
25141         cat >> confdefs.h <<EOF
25142 #define SLAPD_OVER_REFINT $MFLAG
25143 EOF
25144
25145 fi
25146
25147 if test "$ol_enable_rwm" != no ; then
25148         BUILD_REWRITE=yes
25149         BUILD_RWM=$ol_enable_rwm
25150         if test "$ol_enable_rwm" = mod ; then
25151                 MFLAG=SLAPD_MOD_DYNAMIC
25152                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25153         else
25154                 MFLAG=SLAPD_MOD_STATIC
25155         fi
25156         cat >> confdefs.h <<EOF
25157 #define SLAPD_OVER_RWM $MFLAG
25158 EOF
25159
25160 fi
25161
25162 if test "$ol_enable_unique" != no ; then
25163         BUILD_UNIQUE=$ol_enable_unique
25164         if test "$ol_enable_unique" = mod ; then
25165                 MFLAG=SLAPD_MOD_DYNAMIC
25166                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25167         else
25168                 MFLAG=SLAPD_MOD_STATIC
25169         fi
25170         cat >> confdefs.h <<EOF
25171 #define SLAPD_OVER_UNIQUE $MFLAG
25172 EOF
25173
25174 fi
25175
25176 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25177         $BUILD_SLAPD = yes ; then
25178         BUILD_SLURPD=yes
25179 fi
25180
25181 if test "$ol_enable_rewrite" != no ; then
25182         cat >> confdefs.h <<\EOF
25183 #define ENABLE_REWRITE 1
25184 EOF
25185
25186         BUILD_REWRITE=yes
25187 fi
25188
25189 if test "$ol_enable_slapi" != no ; then
25190         cat >> confdefs.h <<\EOF
25191 #define ENABLE_SLAPI 1
25192 EOF
25193
25194         BUILD_SLAPI=yes
25195         SLAPD_SLAPI_DEPEND=libslapi.a
25196 fi
25197
25198
25199
25200 if test "$ac_cv_mingw32" = yes ; then
25201         PLAT=NT
25202         SLAPD_MODULES_LDFLAGS=
25203 else
25204         PLAT=UNIX
25205 fi
25206
25207 if test -z "$SLAPD_STATIC_BACKENDS"; then
25208         SLAPD_NO_STATIC='#'
25209 else
25210         SLAPD_NO_STATIC=
25211 fi
25212
25213 BACKEND_HEADER=servers/slapd/backend.h
25214 cat > $BACKEND_HEADER << EOF
25215 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25216  *
25217  * Copyright 1998-2004 The OpenLDAP Foundation.
25218  * All rights reserved.
25219  *
25220  * Redistribution and use in source and binary forms, with or without
25221  * modification, are permitted only as authorized by the OpenLDAP
25222  * Public License.
25223  *
25224  * A copy of this license is available in the file LICENSE in the
25225  * top-level directory of the distribution or, alternatively, at
25226  * <http://www.OpenLDAP.org/license.html>.
25227  */
25228 /* This file is automatically generated by configure; please do not edit.
25229  */
25230
25231 EOF
25232
25233 for b in $SLAPD_STATIC_BACKENDS; do
25234         bb=`echo "$b" | sed -e 's;back-;;'`
25235         
25236         cat >> $BACKEND_HEADER << EOF
25237 extern BI_init ${bb}_back_initialize;
25238 EOF
25239 done
25240
25241 cat >> $BACKEND_HEADER << EOF
25242
25243 static BackendInfo binfo[] = {
25244 EOF
25245
25246 for b in $SLAPD_STATIC_BACKENDS; do
25247         bb=`echo "$b" | sed -e 's;back-;;'`
25248         
25249         cat >> $BACKEND_HEADER << EOF
25250         { "$bb", ${bb}_back_initialize },
25251 EOF
25252 done
25253
25254 cat >> $BACKEND_HEADER << EOF
25255         { NULL, NULL }
25256 };
25257
25258 /* end of generated file */
25259 EOF
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269   
25270   
25271   
25272   
25273   
25274   
25275   
25276   
25277   
25278   
25279   
25280   
25281   
25282   
25283   
25284   
25285   
25286   
25287   
25288   
25289   
25290   
25291   
25292   
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332 # Check whether --with-xxinstall or --without-xxinstall was given.
25333 if test "${with_xxinstall+set}" = set; then
25334   withval="$with_xxinstall"
25335   :
25336 fi
25337
25338
25339
25340 trap '' 1 2 15
25341
25342 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25343
25344 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25345 # Let make expand exec_prefix.
25346 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25347
25348 # Any assignment to VPATH causes Sun make to only execute
25349 # the first set of double-colon rules, so remove it if not needed.
25350 # If there is a colon in the path, we need to keep it.
25351 if test "x$srcdir" = x.; then
25352   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25353 fi
25354
25355 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25356
25357 DEFS=-DHAVE_CONFIG_H
25358
25359 # Without the "./", some shells look in PATH for config.status.
25360 : ${CONFIG_STATUS=./config.status}
25361
25362 echo creating $CONFIG_STATUS
25363 rm -f $CONFIG_STATUS
25364 cat > $CONFIG_STATUS <<EOF
25365 #! /bin/sh
25366 # Generated automatically by configure.
25367 # Run this file to recreate the current configuration.
25368 # This directory was configured as follows,
25369 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25370 #
25371 # $0 $ac_configure_args
25372 #
25373 # Compiler output produced by configure, useful for debugging
25374 # configure, is in ./config.log if it exists.
25375
25376 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25377 for ac_option
25378 do
25379   case "\$ac_option" in
25380   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25381     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25382     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25383   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25384     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25385     exit 0 ;;
25386   -help | --help | --hel | --he | --h)
25387     echo "\$ac_cs_usage"; exit 0 ;;
25388   *) echo "\$ac_cs_usage"; exit 1 ;;
25389   esac
25390 done
25391
25392 ac_given_srcdir=$srcdir
25393 ac_given_INSTALL="$INSTALL"
25394
25395 trap 'rm -fr `echo "\
25396 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25397 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25398 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25399 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25400 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25401 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25402 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25403 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25404 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25405 include/Makefile:build/top.mk:include/Makefile.in \
25406 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25407 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25408 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25409 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25410 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25411 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25412 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25413 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25414 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25415 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25416 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25417 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25418 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25419 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25420 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25421 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25422 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25423 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25424 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25425 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25426 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25427 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25428 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25429 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25430 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25431 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25432 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25433 tests/run \
25434 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25435  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25436 EOF
25437 cat >> $CONFIG_STATUS <<EOF
25438
25439 # Protect against being on the right side of a sed subst in config.status.
25440 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25441  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25442 $ac_vpsub
25443 $extrasub
25444 s%@SHELL@%$SHELL%g
25445 s%@CFLAGS@%$CFLAGS%g
25446 s%@CPPFLAGS@%$CPPFLAGS%g
25447 s%@CXXFLAGS@%$CXXFLAGS%g
25448 s%@FFLAGS@%$FFLAGS%g
25449 s%@DEFS@%$DEFS%g
25450 s%@LDFLAGS@%$LDFLAGS%g
25451 s%@LIBS@%$LIBS%g
25452 s%@exec_prefix@%$exec_prefix%g
25453 s%@prefix@%$prefix%g
25454 s%@program_transform_name@%$program_transform_name%g
25455 s%@bindir@%$bindir%g
25456 s%@sbindir@%$sbindir%g
25457 s%@libexecdir@%$libexecdir%g
25458 s%@datadir@%$datadir%g
25459 s%@sysconfdir@%$sysconfdir%g
25460 s%@sharedstatedir@%$sharedstatedir%g
25461 s%@localstatedir@%$localstatedir%g
25462 s%@libdir@%$libdir%g
25463 s%@includedir@%$includedir%g
25464 s%@oldincludedir@%$oldincludedir%g
25465 s%@infodir@%$infodir%g
25466 s%@mandir@%$mandir%g
25467 s%@host@%$host%g
25468 s%@host_alias@%$host_alias%g
25469 s%@host_cpu@%$host_cpu%g
25470 s%@host_vendor@%$host_vendor%g
25471 s%@host_os@%$host_os%g
25472 s%@target@%$target%g
25473 s%@target_alias@%$target_alias%g
25474 s%@target_cpu@%$target_cpu%g
25475 s%@target_vendor@%$target_vendor%g
25476 s%@target_os@%$target_os%g
25477 s%@build@%$build%g
25478 s%@build_alias@%$build_alias%g
25479 s%@build_cpu@%$build_cpu%g
25480 s%@build_vendor@%$build_vendor%g
25481 s%@build_os@%$build_os%g
25482 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25483 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25484 s%@INSTALL_DATA@%$INSTALL_DATA%g
25485 s%@PACKAGE@%$PACKAGE%g
25486 s%@VERSION@%$VERSION%g
25487 s%@ACLOCAL@%$ACLOCAL%g
25488 s%@AUTOCONF@%$AUTOCONF%g
25489 s%@AUTOMAKE@%$AUTOMAKE%g
25490 s%@AUTOHEADER@%$AUTOHEADER%g
25491 s%@MAKEINFO@%$MAKEINFO%g
25492 s%@install_sh@%$install_sh%g
25493 s%@AMTAR@%$AMTAR%g
25494 s%@AWK@%$AWK%g
25495 s%@AMTARFLAGS@%$AMTARFLAGS%g
25496 s%@SET_MAKE@%$SET_MAKE%g
25497 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25498 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25499 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25500 s%@top_builddir@%$top_builddir%g
25501 s%@ldap_subdir@%$ldap_subdir%g
25502 s%@CC@%$CC%g
25503 s%@AR@%$AR%g
25504 s%@LN_S@%$LN_S%g
25505 s%@OBJEXT@%$OBJEXT%g
25506 s%@EXEEXT@%$EXEEXT%g
25507 s%@ECHO@%$ECHO%g
25508 s%@RANLIB@%$RANLIB%g
25509 s%@STRIP@%$STRIP%g
25510 s%@DLLTOOL@%$DLLTOOL%g
25511 s%@AS@%$AS%g
25512 s%@OBJDUMP@%$OBJDUMP%g
25513 s%@CPP@%$CPP%g
25514 s%@LIBTOOL@%$LIBTOOL%g
25515 s%@PERLBIN@%$PERLBIN%g
25516 s%@OL_MKDEP@%$OL_MKDEP%g
25517 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25518 s%@LTSTATIC@%$LTSTATIC%g
25519 s%@LIBOBJS@%$LIBOBJS%g
25520 s%@LIBSRCS@%$LIBSRCS%g
25521 s%@PLAT@%$PLAT%g
25522 s%@WITH_SASL@%$WITH_SASL%g
25523 s%@WITH_TLS@%$WITH_TLS%g
25524 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25525 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25526 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25527 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25528 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25529 s%@BUILD_BDB@%$BUILD_BDB%g
25530 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25531 s%@BUILD_HDB@%$BUILD_HDB%g
25532 s%@BUILD_LDAP@%$BUILD_LDAP%g
25533 s%@BUILD_LDBM@%$BUILD_LDBM%g
25534 s%@BUILD_META@%$BUILD_META%g
25535 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25536 s%@BUILD_NULL@%$BUILD_NULL%g
25537 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25538 s%@BUILD_RELAY@%$BUILD_RELAY%g
25539 s%@BUILD_PERL@%$BUILD_PERL%g
25540 s%@BUILD_SHELL@%$BUILD_SHELL%g
25541 s%@BUILD_SQL@%$BUILD_SQL%g
25542 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25543 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25544 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25545 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25546 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25547 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25548 s%@BUILD_REFINT@%$BUILD_REFINT%g
25549 s%@BUILD_RWM@%$BUILD_RWM%g
25550 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25551 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25552 s%@LDAP_LIBS@%$LDAP_LIBS%g
25553 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25554 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25555 s%@LDBM_LIBS@%$LDBM_LIBS%g
25556 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25557 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25558 s%@WRAP_LIBS@%$WRAP_LIBS%g
25559 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25560 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25561 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25562 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25563 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25564 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25565 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25566 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25567 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25568 s%@KRB4_LIBS@%$KRB4_LIBS%g
25569 s%@KRB5_LIBS@%$KRB5_LIBS%g
25570 s%@SASL_LIBS@%$SASL_LIBS%g
25571 s%@TLS_LIBS@%$TLS_LIBS%g
25572 s%@MODULES_LIBS@%$MODULES_LIBS%g
25573 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25574 s%@LIBSLAPI@%$LIBSLAPI%g
25575 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25576 s%@AUTH_LIBS@%$AUTH_LIBS%g
25577 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25578 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25579 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25580 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25581 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25582
25583 CEOF
25584 EOF
25585
25586 cat >> $CONFIG_STATUS <<\EOF
25587
25588 # Split the substitutions into bite-sized pieces for seds with
25589 # small command number limits, like on Digital OSF/1 and HP-UX.
25590 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25591 ac_file=1 # Number of current file.
25592 ac_beg=1 # First line for current file.
25593 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25594 ac_more_lines=:
25595 ac_sed_cmds=""
25596 while $ac_more_lines; do
25597   if test $ac_beg -gt 1; then
25598     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25599   else
25600     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25601   fi
25602   if test ! -s conftest.s$ac_file; then
25603     ac_more_lines=false
25604     rm -f conftest.s$ac_file
25605   else
25606     if test -z "$ac_sed_cmds"; then
25607       ac_sed_cmds="sed -f conftest.s$ac_file"
25608     else
25609       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25610     fi
25611     ac_file=`expr $ac_file + 1`
25612     ac_beg=$ac_end
25613     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25614   fi
25615 done
25616 if test -z "$ac_sed_cmds"; then
25617   ac_sed_cmds=cat
25618 fi
25619 EOF
25620
25621 cat >> $CONFIG_STATUS <<EOF
25622
25623 CONFIG_FILES=\${CONFIG_FILES-"\
25624 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25625 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25626 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25627 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25628 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25629 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25630 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25631 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25632 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25633 include/Makefile:build/top.mk:include/Makefile.in \
25634 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25635 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25636 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25637 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25638 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25639 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25640 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25641 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25642 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25643 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25644 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25645 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25646 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25647 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25648 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25649 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25650 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25651 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25652 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25653 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25654 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25655 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25656 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25657 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25658 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25659 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25660 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25661 tests/run \
25662 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25663 "}
25664 EOF
25665 cat >> $CONFIG_STATUS <<\EOF
25666 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25667   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25668   case "$ac_file" in
25669   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25670        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25671   *) ac_file_in="${ac_file}.in" ;;
25672   esac
25673
25674   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25675
25676   # Remove last slash and all that follows it.  Not all systems have dirname.
25677   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25678   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25679     # The file is in a subdirectory.
25680     test ! -d "$ac_dir" && mkdir "$ac_dir"
25681     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25682     # A "../" for each directory in $ac_dir_suffix.
25683     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25684   else
25685     ac_dir_suffix= ac_dots=
25686   fi
25687
25688   case "$ac_given_srcdir" in
25689   .)  srcdir=.
25690       if test -z "$ac_dots"; then top_srcdir=.
25691       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25692   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25693   *) # Relative path.
25694     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25695     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25696   esac
25697
25698   case "$ac_given_INSTALL" in
25699   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25700   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25701   esac
25702
25703   echo creating "$ac_file"
25704   rm -f "$ac_file"
25705   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25706   case "$ac_file" in
25707   *[Mm]akefile*) ac_comsub="1i\\
25708 # $configure_input" ;;
25709   *) ac_comsub= ;;
25710   esac
25711
25712   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25713   sed -e "$ac_comsub
25714 s%@configure_input@%$configure_input%g
25715 s%@srcdir@%$srcdir%g
25716 s%@top_srcdir@%$top_srcdir%g
25717 s%@INSTALL@%$INSTALL%g
25718 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25719 fi; done
25720 rm -f conftest.s*
25721
25722 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25723 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25724 #
25725 # ac_d sets the value in "#define NAME VALUE" lines.
25726 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25727 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25728 ac_dC='\3'
25729 ac_dD='%g'
25730 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25731 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25732 ac_uB='\([      ]\)%\1#\2define\3'
25733 ac_uC=' '
25734 ac_uD='\4%g'
25735 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25736 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25737 ac_eB='$%\1#\2define\3'
25738 ac_eC=' '
25739 ac_eD='%g'
25740
25741 if test "${CONFIG_HEADERS+set}" != set; then
25742 EOF
25743 cat >> $CONFIG_STATUS <<EOF
25744   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25745 EOF
25746 cat >> $CONFIG_STATUS <<\EOF
25747 fi
25748 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25749   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25750   case "$ac_file" in
25751   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25752        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25753   *) ac_file_in="${ac_file}.in" ;;
25754   esac
25755
25756   echo creating $ac_file
25757
25758   rm -f conftest.frag conftest.in conftest.out
25759   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25760   cat $ac_file_inputs > conftest.in
25761
25762 EOF
25763
25764 # Transform confdefs.h into a sed script conftest.vals that substitutes
25765 # the proper values into config.h.in to produce config.h.  And first:
25766 # Protect against being on the right side of a sed subst in config.status.
25767 # Protect against being in an unquoted here document in config.status.
25768 rm -f conftest.vals
25769 cat > conftest.hdr <<\EOF
25770 s/[\\&%]/\\&/g
25771 s%[\\$`]%\\&%g
25772 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25773 s%ac_d%ac_u%gp
25774 s%ac_u%ac_e%gp
25775 EOF
25776 sed -n -f conftest.hdr confdefs.h > conftest.vals
25777 rm -f conftest.hdr
25778
25779 # This sed command replaces #undef with comments.  This is necessary, for
25780 # example, in the case of _POSIX_SOURCE, which is predefined and required
25781 # on some systems where configure will not decide to define it.
25782 cat >> conftest.vals <<\EOF
25783 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25784 EOF
25785
25786 # Break up conftest.vals because some shells have a limit on
25787 # the size of here documents, and old seds have small limits too.
25788
25789 rm -f conftest.tail
25790 while :
25791 do
25792   ac_lines=`grep -c . conftest.vals`
25793   # grep -c gives empty output for an empty file on some AIX systems.
25794   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25795   # Write a limited-size here document to conftest.frag.
25796   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25797   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25798   echo 'CEOF
25799   sed -f conftest.frag conftest.in > conftest.out
25800   rm -f conftest.in
25801   mv conftest.out conftest.in
25802 ' >> $CONFIG_STATUS
25803   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25804   rm -f conftest.vals
25805   mv conftest.tail conftest.vals
25806 done
25807 rm -f conftest.vals
25808
25809 cat >> $CONFIG_STATUS <<\EOF
25810   rm -f conftest.frag conftest.h
25811   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25812   cat conftest.in >> conftest.h
25813   rm -f conftest.in
25814   if cmp -s $ac_file conftest.h 2>/dev/null; then
25815     echo "$ac_file is unchanged"
25816     rm -f conftest.h
25817   else
25818     # Remove last slash and all that follows it.  Not all systems have dirname.
25819       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25820       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25821       # The file is in a subdirectory.
25822       test ! -d "$ac_dir" && mkdir "$ac_dir"
25823     fi
25824     rm -f $ac_file
25825     mv conftest.h $ac_file
25826   fi
25827 fi; done
25828
25829 EOF
25830 cat >> $CONFIG_STATUS <<EOF
25831
25832 EOF
25833 cat >> $CONFIG_STATUS <<\EOF
25834
25835 chmod +x tests/run
25836 date > stamp-h
25837 echo Please run \"make depend\" to build dependencies
25838
25839 exit 0
25840 EOF
25841 chmod +x $CONFIG_STATUS
25842 rm -fr confdefs* $ac_clean_files
25843 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25844