]> git.sur5r.net Git - openldap/blob - configure
089564a4b67370d2bc6c123f2008352e9b5e72ac
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.586 2005/08/07 16:08:02 hallvard Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and 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"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [${ol_dflt_backends-yes}]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [${ol_dflt_backends-no}]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [${ol_dflt_backends-yes}]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [${ol_dflt_backends-no}]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [${ol_dflt_backends-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 [${ol_dflt_backends-no}]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [${ol_dflt_backends-yes}]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [${ol_dflt_backends-no}]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [${ol_dflt_backends-no}]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [${ol_dflt_backends-no}]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [${ol_dflt_backends-yes}]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [${ol_dflt_backends-no}]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [${ol_dflt_backends-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"
128 ac_help="$ac_help
129     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [${ol_dflt_overlays-no}]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [${ol_dflt_overlays-no}]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [${ol_dflt_overlays-no}]"
134 ac_help="$ac_help
135     --enable-dynlist      Dynamic List overlay no|yes|mod [${ol_dflt_overlays-no}]"
136 ac_help="$ac_help
137     --enable-glue         Backend Glue overlay no|yes|mod [${ol_dflt_overlays-yes}]"
138 ac_help="$ac_help
139     --enable-lastmod      Last Modification overlay no|yes|mod [${ol_dflt_overlays-no}]"
140 ac_help="$ac_help
141     --enable-ppolicy      Password Policy overlay no|yes|mod [${ol_dflt_overlays-no}]"
142 ac_help="$ac_help
143     --enable-proxycache   Proxy Cache overlay no|yes|mod [${ol_dflt_overlays-no}]"
144 ac_help="$ac_help
145     --enable-refint       Referential Integrity overlay no|yes|mod [${ol_dflt_overlays-no}]"
146 ac_help="$ac_help
147     --enable-retcode      Return Code testing overlay no|yes|mod [${ol_dflt_overlays-no}]"
148 ac_help="$ac_help
149     --enable-rwm          Rewrite/Remap overlay no|yes|mod [${ol_dflt_overlays-no}]"
150 ac_help="$ac_help
151     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [${ol_dflt_overlays-yes}]"
152 ac_help="$ac_help
153     --enable-translucent  Translucent Proxy overlay no|yes|mod [${ol_dflt_overlays-no}]"
154 ac_help="$ac_help
155     --enable-unique       Attribute Uniqueness overlay no|yes|mod [${ol_dflt_overlays-no}]"
156 ac_help="$ac_help
157
158 SLURPD (Replication Daemon) Options:"
159 ac_help="$ac_help
160   --enable-slurpd         enable building slurpd [auto]"
161 ac_help="$ac_help
162
163 Library Generation & Linking Options"
164 ac_help="$ac_help
165   --enable-static[=PKGS]  build static libraries [default=yes]"
166 ac_help="$ac_help
167   --enable-shared[=PKGS]  build shared libraries [default=yes]"
168 ac_help="$ac_help
169   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
170 ac_help="$ac_help
171   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
172
173 # Find the correct PATH separator.  Usually this is `:', but
174 # DJGPP uses `;' like DOS.
175 if test "X${PATH_SEPARATOR+set}" != Xset; then
176   UNAME=${UNAME-`uname 2>/dev/null`}
177   case X$UNAME in
178     *-DOS) lt_cv_sys_path_separator=';' ;;
179     *)     lt_cv_sys_path_separator=':' ;;
180   esac
181   PATH_SEPARATOR=$lt_cv_sys_path_separator
182 fi
183
184
185 # Check that we are running under the correct shell.
186 SHELL=${CONFIG_SHELL-/bin/sh}
187
188 case X$ECHO in
189 X*--fallback-echo)
190   # Remove one level of quotation (which was required for Make).
191   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
192   ;;
193 esac
194
195 echo=${ECHO-echo}
196 if test "X$1" = X--no-reexec; then
197   # Discard the --no-reexec flag, and continue.
198   shift
199 elif test "X$1" = X--fallback-echo; then
200   # Avoid inline document here, it may be left over
201   :
202 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
203   # Yippee, $echo works!
204   :
205 else
206   # Restart under the correct shell.
207   exec $SHELL "$0" --no-reexec ${1+"$@"}
208 fi
209
210 if test "X$1" = X--fallback-echo; then
211   # used as fallback echo
212   shift
213   cat <<EOF
214
215 EOF
216   exit 0
217 fi
218
219 # The HP-UX ksh and POSIX shell print the target directory to stdout
220 # if CDPATH is set.
221 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
222
223 if test -z "$ECHO"; then
224 if test "X${echo_test_string+set}" != Xset; then
225 # find a string as large as possible, as long as the shell can cope with it
226   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
227     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
228     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
229        echo_test_string="`eval $cmd`" &&
230        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
231     then
232       break
233     fi
234   done
235 fi
236
237 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
238    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
239    test "X$echo_testing_string" = "X$echo_test_string"; then
240   :
241 else
242   # The Solaris, AIX, and Digital Unix default echo programs unquote
243   # backslashes.  This makes it impossible to quote backslashes using
244   #   echo "$something" | sed 's/\\/\\\\/g'
245   #
246   # So, first we look for a working echo in the user's PATH.
247
248   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
249   for dir in $PATH /usr/ucb; do
250     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
251        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       echo="$dir/echo"
255       break
256     fi
257   done
258   IFS="$save_ifs"
259
260   if test "X$echo" = Xecho; then
261     # We didn't find a better echo, so look for alternatives.
262     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
263        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
264        test "X$echo_testing_string" = "X$echo_test_string"; then
265       # This shell has a builtin print -r that does the trick.
266       echo='print -r'
267     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
268          test "X$CONFIG_SHELL" != X/bin/ksh; then
269       # If we have ksh, try running configure again with it.
270       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
271       export ORIGINAL_CONFIG_SHELL
272       CONFIG_SHELL=/bin/ksh
273       export CONFIG_SHELL
274       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
275     else
276       # Try using printf.
277       echo='printf %s\n'
278       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
279          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
280          test "X$echo_testing_string" = "X$echo_test_string"; then
281         # Cool, printf works
282         :
283       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
288         export CONFIG_SHELL
289         SHELL="$CONFIG_SHELL"
290         export SHELL
291         echo="$CONFIG_SHELL $0 --fallback-echo"
292       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
293            test "X$echo_testing_string" = 'X\t' &&
294            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
295            test "X$echo_testing_string" = "X$echo_test_string"; then
296         echo="$CONFIG_SHELL $0 --fallback-echo"
297       else
298         # maybe with a smaller string...
299         prev=:
300
301         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
302           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
303           then
304             break
305           fi
306           prev="$cmd"
307         done
308
309         if test "$prev" != 'sed 50q "$0"'; then
310           echo_test_string=`eval $prev`
311           export echo_test_string
312           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
313         else
314           # Oops.  We lost completely, so just stick with echo.
315           echo=echo
316         fi
317       fi
318     fi
319   fi
320 fi
321 fi
322
323 # Copy echo and quote the copy suitably for passing to libtool from
324 # the Makefile, instead of quoting the original, which is used later.
325 ECHO=$echo
326 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
327    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
328 fi
329
330
331 ac_help="$ac_help
332   --disable-libtool-lock  avoid locking (might break parallel builds)"
333 ac_help="$ac_help
334   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
335 ac_help="$ac_help
336
337 See INSTALL file for further details."
338
339 # Initialize some variables set by options.
340 # The variables have the same names as the options, with
341 # dashes changed to underlines.
342 build=NONE
343 cache_file=./config.cache
344 exec_prefix=NONE
345 host=NONE
346 no_create=
347 nonopt=NONE
348 no_recursion=
349 prefix=NONE
350 program_prefix=NONE
351 program_suffix=NONE
352 program_transform_name=s,x,x,
353 silent=
354 site=
355 srcdir=
356 target=NONE
357 verbose=
358 x_includes=NONE
359 x_libraries=NONE
360 bindir='${exec_prefix}/bin'
361 sbindir='${exec_prefix}/sbin'
362 libexecdir='${exec_prefix}/libexec'
363 datadir='${prefix}/share'
364 sysconfdir='${prefix}/etc'
365 sharedstatedir='${prefix}/com'
366 localstatedir='${prefix}/var'
367 libdir='${exec_prefix}/lib'
368 includedir='${prefix}/include'
369 oldincludedir='/usr/include'
370 infodir='${prefix}/info'
371 mandir='${prefix}/man'
372
373 # Initialize some other variables.
374 subdirs=
375 MFLAGS= MAKEFLAGS=
376 SHELL=${CONFIG_SHELL-/bin/sh}
377 # Maximum number of lines to put in a shell here document.
378 ac_max_here_lines=12
379
380 ac_prev=
381 for ac_option
382 do
383
384   # If the previous option needs an argument, assign it.
385   if test -n "$ac_prev"; then
386     eval "$ac_prev=\$ac_option"
387     ac_prev=
388     continue
389   fi
390
391   case "$ac_option" in
392   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
393   *) ac_optarg= ;;
394   esac
395
396   # Accept the important Cygnus configure options, so we can diagnose typos.
397
398   case "$ac_option" in
399
400   -bindir | --bindir | --bindi | --bind | --bin | --bi)
401     ac_prev=bindir ;;
402   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
403     bindir="$ac_optarg" ;;
404
405   -build | --build | --buil | --bui | --bu)
406     ac_prev=build ;;
407   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
408     build="$ac_optarg" ;;
409
410   -cache-file | --cache-file | --cache-fil | --cache-fi \
411   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
412     ac_prev=cache_file ;;
413   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
414   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
415     cache_file="$ac_optarg" ;;
416
417   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
418     ac_prev=datadir ;;
419   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
420   | --da=*)
421     datadir="$ac_optarg" ;;
422
423   -disable-* | --disable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     eval "enable_${ac_feature}=no" ;;
431
432   -enable-* | --enable-*)
433     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
434     # Reject names that are not valid shell variable names.
435     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
436       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
437     fi
438     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
439     case "$ac_option" in
440       *=*) ;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "enable_${ac_feature}='$ac_optarg'" ;;
444
445   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
446   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
447   | --exec | --exe | --ex)
448     ac_prev=exec_prefix ;;
449   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
450   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
451   | --exec=* | --exe=* | --ex=*)
452     exec_prefix="$ac_optarg" ;;
453
454   -gas | --gas | --ga | --g)
455     # Obsolete; use --with-gas.
456     with_gas=yes ;;
457
458   -help | --help | --hel | --he)
459     # Omit some internal or obsolete options to make the list less imposing.
460     # This message is too long to be a string in the A/UX 3.1 sh.
461     cat << EOF
462 Usage: configure [options] [host]
463 Options: [defaults in brackets after descriptions]
464 Configuration:
465   --cache-file=FILE       cache test results in FILE
466   --help                  print this message
467   --no-create             do not create output files
468   --quiet, --silent       do not print \`checking...' messages
469   --version               print the version of autoconf that created configure
470 Directory and file names:
471   --prefix=PREFIX         install architecture-independent files in PREFIX
472                           [$ac_default_prefix]
473   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
474                           [same as prefix]
475   --bindir=DIR            user executables in DIR [EPREFIX/bin]
476   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
477   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
478   --datadir=DIR           read-only architecture-independent data in DIR
479                           [PREFIX/share]
480   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
481   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
482                           [PREFIX/com]
483   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
484   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
485   --includedir=DIR        C header files in DIR [PREFIX/include]
486   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
487   --infodir=DIR           info documentation in DIR [PREFIX/info]
488   --mandir=DIR            man documentation in DIR [PREFIX/man]
489   --srcdir=DIR            find the sources in DIR [configure dir or ..]
490   --program-prefix=PREFIX prepend PREFIX to installed program names
491   --program-suffix=SUFFIX append SUFFIX to installed program names
492   --program-transform-name=PROGRAM
493                           run sed PROGRAM on installed program names
494 EOF
495     cat << EOF
496 Host type:
497   --build=BUILD           configure for building on BUILD [BUILD=HOST]
498   --host=HOST             configure for HOST [guessed]
499   --target=TARGET         configure for TARGET [TARGET=HOST]
500 Features and packages:
501   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
502   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
503   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
504   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
505   --x-includes=DIR        X include files are in DIR
506   --x-libraries=DIR       X library files are in DIR
507 EOF
508     if test -n "$ac_help"; then
509       echo "--enable and --with options recognized:$ac_help"
510     fi
511     exit 0 ;;
512
513   -host | --host | --hos | --ho)
514     ac_prev=host ;;
515   -host=* | --host=* | --hos=* | --ho=*)
516     host="$ac_optarg" ;;
517
518   -includedir | --includedir | --includedi | --included | --include \
519   | --includ | --inclu | --incl | --inc)
520     ac_prev=includedir ;;
521   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
522   | --includ=* | --inclu=* | --incl=* | --inc=*)
523     includedir="$ac_optarg" ;;
524
525   -infodir | --infodir | --infodi | --infod | --info | --inf)
526     ac_prev=infodir ;;
527   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
528     infodir="$ac_optarg" ;;
529
530   -libdir | --libdir | --libdi | --libd)
531     ac_prev=libdir ;;
532   -libdir=* | --libdir=* | --libdi=* | --libd=*)
533     libdir="$ac_optarg" ;;
534
535   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
536   | --libexe | --libex | --libe)
537     ac_prev=libexecdir ;;
538   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
539   | --libexe=* | --libex=* | --libe=*)
540     libexecdir="$ac_optarg" ;;
541
542   -localstatedir | --localstatedir | --localstatedi | --localstated \
543   | --localstate | --localstat | --localsta | --localst \
544   | --locals | --local | --loca | --loc | --lo)
545     ac_prev=localstatedir ;;
546   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
547   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
548   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
549     localstatedir="$ac_optarg" ;;
550
551   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
552     ac_prev=mandir ;;
553   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
554     mandir="$ac_optarg" ;;
555
556   -nfp | --nfp | --nf)
557     # Obsolete; use --without-fp.
558     with_fp=no ;;
559
560   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
561   | --no-cr | --no-c)
562     no_create=yes ;;
563
564   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
565   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
566     no_recursion=yes ;;
567
568   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
569   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
570   | --oldin | --oldi | --old | --ol | --o)
571     ac_prev=oldincludedir ;;
572   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
573   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
574   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
575     oldincludedir="$ac_optarg" ;;
576
577   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
578     ac_prev=prefix ;;
579   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
580     prefix="$ac_optarg" ;;
581
582   -program-prefix | --program-prefix | --program-prefi | --program-pref \
583   | --program-pre | --program-pr | --program-p)
584     ac_prev=program_prefix ;;
585   -program-prefix=* | --program-prefix=* | --program-prefi=* \
586   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
587     program_prefix="$ac_optarg" ;;
588
589   -program-suffix | --program-suffix | --program-suffi | --program-suff \
590   | --program-suf | --program-su | --program-s)
591     ac_prev=program_suffix ;;
592   -program-suffix=* | --program-suffix=* | --program-suffi=* \
593   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
594     program_suffix="$ac_optarg" ;;
595
596   -program-transform-name | --program-transform-name \
597   | --program-transform-nam | --program-transform-na \
598   | --program-transform-n | --program-transform- \
599   | --program-transform | --program-transfor \
600   | --program-transfo | --program-transf \
601   | --program-trans | --program-tran \
602   | --progr-tra | --program-tr | --program-t)
603     ac_prev=program_transform_name ;;
604   -program-transform-name=* | --program-transform-name=* \
605   | --program-transform-nam=* | --program-transform-na=* \
606   | --program-transform-n=* | --program-transform-=* \
607   | --program-transform=* | --program-transfor=* \
608   | --program-transfo=* | --program-transf=* \
609   | --program-trans=* | --program-tran=* \
610   | --progr-tra=* | --program-tr=* | --program-t=*)
611     program_transform_name="$ac_optarg" ;;
612
613   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
614   | -silent | --silent | --silen | --sile | --sil)
615     silent=yes ;;
616
617   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
618     ac_prev=sbindir ;;
619   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
620   | --sbi=* | --sb=*)
621     sbindir="$ac_optarg" ;;
622
623   -sharedstatedir | --sharedstatedir | --sharedstatedi \
624   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
625   | --sharedst | --shareds | --shared | --share | --shar \
626   | --sha | --sh)
627     ac_prev=sharedstatedir ;;
628   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
629   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
630   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
631   | --sha=* | --sh=*)
632     sharedstatedir="$ac_optarg" ;;
633
634   -site | --site | --sit)
635     ac_prev=site ;;
636   -site=* | --site=* | --sit=*)
637     site="$ac_optarg" ;;
638
639   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
640     ac_prev=srcdir ;;
641   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
642     srcdir="$ac_optarg" ;;
643
644   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
645   | --syscon | --sysco | --sysc | --sys | --sy)
646     ac_prev=sysconfdir ;;
647   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
648   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
649     sysconfdir="$ac_optarg" ;;
650
651   -target | --target | --targe | --targ | --tar | --ta | --t)
652     ac_prev=target ;;
653   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
654     target="$ac_optarg" ;;
655
656   -v | -verbose | --verbose | --verbos | --verbo | --verb)
657     verbose=yes ;;
658
659   -version | --version | --versio | --versi | --vers)
660     echo "configure generated by autoconf version 2.13.1"
661     exit 0 ;;
662
663   -with-* | --with-*)
664     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     case "$ac_option" in
671       *=*) ;;
672       *) ac_optarg=yes ;;
673     esac
674     eval "with_${ac_package}='$ac_optarg'" ;;
675
676   -without-* | --without-*)
677     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
678     # Reject names that are not valid shell variable names.
679     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
680       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
681     fi
682     ac_package=`echo $ac_package| sed 's/-/_/g'`
683     eval "with_${ac_package}=no" ;;
684
685   --x)
686     # Obsolete; use --with-x.
687     with_x=yes ;;
688
689   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
690   | --x-incl | --x-inc | --x-in | --x-i)
691     ac_prev=x_includes ;;
692   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
693   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
694     x_includes="$ac_optarg" ;;
695
696   -x-libraries | --x-libraries | --x-librarie | --x-librari \
697   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
698     ac_prev=x_libraries ;;
699   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
700   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
701     x_libraries="$ac_optarg" ;;
702
703   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
704     ;;
705
706   *)
707     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
708       echo "configure: warning: $ac_option: invalid host type" 1>&2
709     fi
710     if test "x$nonopt" != xNONE; then
711       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
712     fi
713     nonopt="$ac_option"
714     ;;
715
716   esac
717 done
718
719 if test -n "$ac_prev"; then
720   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
721 fi
722
723 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
724
725 # File descriptor usage:
726 # 0 standard input
727 # 1 file creation
728 # 2 errors and warnings
729 # 3 some systems may open it to /dev/tty
730 # 4 used on the Kubota Titan
731 # 6 checking for... messages and results
732 # 5 compiler messages saved in config.log
733 if test "$silent" = yes; then
734   exec 6>/dev/null
735 else
736   exec 6>&1
737 fi
738 exec 5>./config.log
739
740 echo "\
741 This file contains any messages produced by compilers while
742 running configure, to aid debugging if configure makes a mistake.
743 " 1>&5
744
745 # Strip out --no-create and --no-recursion so they do not pile up.
746 # Also quote any args containing shell metacharacters.
747 ac_configure_args=
748 for ac_arg
749 do
750   case "$ac_arg" in
751   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
752   | --no-cr | --no-c) ;;
753   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
754   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
755   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
756   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
757   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
758   esac
759 done
760
761 # NLS nuisances.
762 # Only set these to C if already set.  These must not be set unconditionally
763 # because not all systems understand e.g. LANG=C (notably SCO).
764 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
765 # Non-C LC_CTYPE values break the ctype check.
766 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
767 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
768 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
769 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
770
771 # confdefs.h avoids OS command line length limits that DEFS can exceed.
772 rm -rf conftest* confdefs.h
773 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
774 echo > confdefs.h
775
776 # A filename unique to this package, relative to the directory that
777 # configure is in, which we can look for to find out if srcdir is correct.
778 ac_unique_file=build/version.sh
779
780 # Find the source files, if location was not specified.
781 if test -z "$srcdir"; then
782   ac_srcdir_defaulted=yes
783   # Try the directory containing this script, then its parent.
784   ac_prog=$0
785   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
786   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
787   srcdir=$ac_confdir
788   if test ! -r $srcdir/$ac_unique_file; then
789     srcdir=..
790   fi
791 else
792   ac_srcdir_defaulted=no
793 fi
794 if test ! -r $srcdir/$ac_unique_file; then
795   if test "$ac_srcdir_defaulted" = yes; then
796     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
797   else
798     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
799   fi
800 fi
801 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
802
803 # Prefer explicitly selected file to automatically selected ones.
804 if test -z "$CONFIG_SITE"; then
805   if test "x$prefix" != xNONE; then
806     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
807   else
808     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
809   fi
810 fi
811 for ac_site_file in $CONFIG_SITE; do
812   if test -r "$ac_site_file"; then
813     echo "loading site script $ac_site_file"
814     . "$ac_site_file"
815   fi
816 done
817
818
819 ac_ext=c
820 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
821 ac_cpp='$CPP $CPPFLAGS'
822 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
823 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
824 cross_compiling=$ac_cv_prog_cc_cross
825
826 ac_exeext=
827 ac_objext=o
828 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
829   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
830   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
831     ac_n= ac_c='
832 ' ac_t='        '
833   else
834     ac_n=-n ac_c= ac_t=
835   fi
836 else
837   ac_n= ac_c='\c' ac_t=
838 fi
839
840
841 # set unset (borrowed from autoconf 2.49c)
842 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
843   ol_unset=unset
844 else
845   ol_unset=false
846 fi
847 # unset CDPATH
848 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
849
850 ac_aux_dir=
851 for ac_dir in build $srcdir/build; do
852   if test -f $ac_dir/install-sh; then
853     ac_aux_dir=$ac_dir
854     ac_install_sh="$ac_aux_dir/install-sh -c"
855     break
856   elif test -f $ac_dir/install.sh; then
857     ac_aux_dir=$ac_dir
858     ac_install_sh="$ac_aux_dir/install.sh -c"
859     break
860   elif test -f $ac_dir/shtool; then
861     ac_aux_dir=$ac_dir
862     ac_install_sh="$ac_aux_dir/shtool install -c"
863     break
864   fi
865 done
866 if test -z "$ac_aux_dir"; then
867   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
868 fi
869 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
870 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
871 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
872
873 eval `$ac_aux_dir/version.sh`
874 if test -z "$OL_STRING"; then
875         { echo "configure: error: could not determine version" 1>&2; exit 1; }
876 fi
877
878 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
879         ac_cv_shtool="$ac_aux_dir/shtool"
880 else
881         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
882 fi
883
884 SHTOOL="$ac_cv_shtool"
885
886 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
887 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
888
889 OPENLDAP_CVS=""
890 if test -d $ac_aux_dir/CVS; then
891         OPENLDAP_CVS="(from CVS sources) "
892 fi
893
894 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
895
896
897 echo $ac_n "checking host system type""... $ac_c" 1>&6
898 echo "configure:899: checking host system type" >&5
899 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
900
901 # Make sure we can run config.sub.
902   if $ac_config_sub sun4 >/dev/null 2>&1; then :
903     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
904   fi
905
906   ac_cv_host_alias=$host
907   case "$ac_cv_host_alias" in
908   NONE)
909     case $nonopt in
910     NONE)
911       if ac_cv_host_alias=`$ac_config_guess`; then :
912       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
913       fi ;;
914     *) ac_cv_host_alias=$nonopt ;;
915     esac ;;
916   esac
917
918   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
919   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
920   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
921   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
922 else
923   echo $ac_n "(cached) $ac_c" 1>&6
924 fi
925
926 echo "$ac_t""$ac_cv_host" 1>&6
927
928 host=$ac_cv_host
929 host_alias=$ac_cv_host_alias
930 host_cpu=$ac_cv_host_cpu
931 host_vendor=$ac_cv_host_vendor
932 host_os=$ac_cv_host_os
933
934
935
936
937
938 echo $ac_n "checking target system type""... $ac_c" 1>&6
939 echo "configure:940: checking target system type" >&5
940 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
941
942 # Make sure we can run config.sub.
943   if $ac_config_sub sun4 >/dev/null 2>&1; then :
944     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
945   fi
946
947   ac_cv_target_alias=$target
948   case "$ac_cv_target_alias" in
949   NONE)
950     case $nonopt in
951     NONE)
952       ac_cv_target_alias=$host_alias ;;
953
954     *) ac_cv_target_alias=$nonopt ;;
955     esac ;;
956   esac
957
958   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
959   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
960   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
961   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
962 else
963   echo $ac_n "(cached) $ac_c" 1>&6
964 fi
965
966 echo "$ac_t""$ac_cv_target" 1>&6
967
968 target=$ac_cv_target
969 target_alias=$ac_cv_target_alias
970 target_cpu=$ac_cv_target_cpu
971 target_vendor=$ac_cv_target_vendor
972 target_os=$ac_cv_target_os
973
974
975
976
977
978 echo $ac_n "checking build system type""... $ac_c" 1>&6
979 echo "configure:980: checking build system type" >&5
980 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
981
982 # Make sure we can run config.sub.
983   if $ac_config_sub sun4 >/dev/null 2>&1; then :
984     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
985   fi
986
987   ac_cv_build_alias=$build
988   case "$ac_cv_build_alias" in
989   NONE)
990     case $nonopt in
991     NONE)
992       ac_cv_build_alias=$host_alias ;;
993
994     *) ac_cv_build_alias=$nonopt ;;
995     esac ;;
996   esac
997
998   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
999   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1000   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1001   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1002 else
1003   echo $ac_n "(cached) $ac_c" 1>&6
1004 fi
1005
1006 echo "$ac_t""$ac_cv_build" 1>&6
1007
1008 build=$ac_cv_build
1009 build_alias=$ac_cv_build_alias
1010 build_cpu=$ac_cv_build_cpu
1011 build_vendor=$ac_cv_build_vendor
1012 build_os=$ac_cv_build_os
1013
1014
1015
1016
1017
1018 # Do some error checking and defaulting for the host and target type.
1019 # The inputs are:
1020 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1021 #
1022 # The rules are:
1023 # 1. You are not allowed to specify --host, --target, and nonopt at the
1024 #    same time.
1025 # 2. Host defaults to nonopt.
1026 # 3. If nonopt is not specified, then host defaults to the current host,
1027 #    as determined by config.guess.
1028 # 4. Target and build default to nonopt.
1029 # 5. If nonopt is not specified, then target and build default to host.
1030
1031 # The aliases save the names the user supplied, while $host etc.
1032 # will get canonicalized.
1033 case $host---$target---$nonopt in
1034 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1035 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1036 esac
1037
1038 test "$host_alias" != "$target_alias" &&
1039   test "$program_prefix$program_suffix$program_transform_name" = \
1040     NONENONEs,x,x, &&
1041   program_prefix=${target_alias}-
1042
1043
1044 # Find a good install program.  We prefer a C program (faster),
1045 # so one script is as good as another.  But avoid the broken or
1046 # incompatible versions:
1047 # SysV /etc/install, /usr/sbin/install
1048 # SunOS /usr/etc/install
1049 # IRIX /sbin/install
1050 # AIX /bin/install
1051 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1052 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1053 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1054 # ./install, which can be erroneously created by make from ./install.sh.
1055 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1056 echo "configure:1057: checking for a BSD compatible install" >&5
1057 if test -z "$INSTALL"; then
1058 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1059   echo $ac_n "(cached) $ac_c" 1>&6
1060 else
1061     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1062   for ac_dir in $PATH; do
1063     # Account for people who put trailing slashes in PATH elements.
1064     case "$ac_dir/" in
1065     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1066     *)
1067       # OSF1 and SCO ODT 3.0 have their own names for install.
1068       # Don't use installbsd from OSF since it installs stuff as root
1069       # by default.
1070       for ac_prog in ginstall scoinst install; do
1071         if test -f $ac_dir/$ac_prog; then
1072           if test $ac_prog = install &&
1073             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1074             # AIX install.  It has an incompatible calling convention.
1075             :
1076           elif test $ac_prog = install &&
1077             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1078             # program-specific install script used by HP pwplus--don't use.
1079             :
1080           else
1081             ac_cv_path_install="$ac_dir/$ac_prog -c"
1082             break 2
1083           fi
1084         fi
1085       done
1086       ;;
1087     esac
1088   done
1089   IFS="$ac_save_IFS"
1090
1091 fi
1092   if test "${ac_cv_path_install+set}" = set; then
1093     INSTALL="$ac_cv_path_install"
1094   else
1095     # As a last resort, use the slow shell script.  We don't cache a
1096     # path for INSTALL within a source directory, because that will
1097     # break other packages using the cache if that directory is
1098     # removed, or if the path is relative.
1099     INSTALL="$ac_install_sh"
1100   fi
1101 fi
1102 echo "$ac_t""$INSTALL" 1>&6
1103
1104 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1105 # It thinks the first close brace ends the variable substitution.
1106 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1107
1108 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1109
1110 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1111
1112 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1113 echo "configure:1114: checking whether build environment is sane" >&5
1114 # Just in case
1115 sleep 1
1116 echo timestamp > conftestfile
1117 # Do `set' in a subshell so we don't clobber the current shell's
1118 # arguments.  Must try -L first in case configure is actually a
1119 # symlink; some systems play weird games with the mod time of symlinks
1120 # (eg FreeBSD returns the mod time of the symlink's containing
1121 # directory).
1122 if (
1123    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1124    if test "$*" = "X"; then
1125       # -L didn't work.
1126       set X `ls -t $srcdir/configure conftestfile`
1127    fi
1128    if test "$*" != "X $srcdir/configure conftestfile" \
1129       && test "$*" != "X conftestfile $srcdir/configure"; then
1130
1131       # If neither matched, then we have a broken ls.  This can happen
1132       # if, for instance, CONFIG_SHELL is bash and it inherits a
1133       # broken ls alias from the environment.  This has actually
1134       # happened.  Such a system could not be considered "sane".
1135       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1136 alias in your environment" 1>&2; exit 1; }
1137    fi
1138
1139    test "$2" = conftestfile
1140    )
1141 then
1142    # Ok.
1143    :
1144 else
1145    { echo "configure: error: newly created file is older than distributed files!
1146 Check your system clock" 1>&2; exit 1; }
1147 fi
1148 rm -f conftest*
1149 echo "$ac_t""yes" 1>&6
1150 if test "$program_transform_name" = s,x,x,; then
1151   program_transform_name=
1152 else
1153   # Double any \ or $.  echo might interpret backslashes.
1154   cat <<\EOF_SED > conftestsed
1155 s,\\,\\\\,g; s,\$,$$,g
1156 EOF_SED
1157   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1158   rm -f conftestsed
1159 fi
1160 test "$program_prefix" != NONE &&
1161   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1162 # Use a double $ so make ignores it.
1163 test "$program_suffix" != NONE &&
1164   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1165
1166 # sed with no file args requires a program.
1167 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1168
1169 for ac_prog in mawk gawk nawk awk
1170 do
1171 # Extract the first word of "$ac_prog", so it can be a program name with args.
1172 set dummy $ac_prog; ac_word=$2
1173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1174 echo "configure:1175: checking for $ac_word" >&5
1175 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   if test -n "$AWK"; then
1179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1180 else
1181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1182   ac_dummy="$PATH"
1183   for ac_dir in $ac_dummy; do
1184     test -z "$ac_dir" && ac_dir=.
1185     if test -f $ac_dir/$ac_word; then
1186       ac_cv_prog_AWK="$ac_prog"
1187       break
1188     fi
1189   done
1190   IFS="$ac_save_ifs"
1191 fi
1192 fi
1193 AWK="$ac_cv_prog_AWK"
1194 if test -n "$AWK"; then
1195   echo "$ac_t""$AWK" 1>&6
1196 else
1197   echo "$ac_t""no" 1>&6
1198 fi
1199
1200 test -n "$AWK" && break
1201 done
1202
1203 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1204 echo "configure:1205: checking whether ${MAKE-make} sets \${MAKE}" >&5
1205 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1206 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1207   echo $ac_n "(cached) $ac_c" 1>&6
1208 else
1209   cat > conftestmake <<\EOF
1210 all:
1211         @echo 'ac_maketemp="${MAKE}"'
1212 EOF
1213 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1214 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1215 if test -n "$ac_maketemp"; then
1216   eval ac_cv_prog_make_${ac_make}_set=yes
1217 else
1218   eval ac_cv_prog_make_${ac_make}_set=no
1219 fi
1220 rm -f conftestmake
1221 fi
1222 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1223   echo "$ac_t""yes" 1>&6
1224   SET_MAKE=
1225 else
1226   echo "$ac_t""no" 1>&6
1227   SET_MAKE="MAKE=${MAKE-make}"
1228 fi
1229
1230
1231
1232 PACKAGE=$OL_PACKAGE
1233
1234 VERSION=$OL_VERSION
1235
1236 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1237   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1238 fi
1239
1240
1241
1242 missing_dir=`cd $ac_aux_dir && pwd`
1243 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working aclocal" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1249    ACLOCAL=aclocal
1250    echo "$ac_t""found" 1>&6
1251 else
1252    ACLOCAL="$missing_dir/missing aclocal"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working autoconf" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOCONF=autoconf
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOCONF="$missing_dir/missing autoconf"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working automake" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (automake --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOMAKE=automake
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOMAKE="$missing_dir/missing automake"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working autoheader" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1288    AUTOHEADER=autoheader
1289    echo "$ac_t""found" 1>&6
1290 else
1291    AUTOHEADER="$missing_dir/missing autoheader"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1296 echo "configure:1297: checking for working makeinfo" >&5
1297 # Run test in a subshell; some versions of sh will print an error if
1298 # an executable is not found, even if stderr is redirected.
1299 # Redirect stdin to placate older versions of autoconf.  Sigh.
1300 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1301    MAKEINFO=makeinfo
1302    echo "$ac_t""found" 1>&6
1303 else
1304    MAKEINFO="$missing_dir/missing makeinfo"
1305    echo "$ac_t""missing" 1>&6
1306 fi
1307
1308 install_sh="$missing_dir/install-sh"
1309 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1310
1311 for ac_prog in gnutar gtar tar
1312 do
1313 # Extract the first word of "$ac_prog", so it can be a program name with args.
1314 set dummy $ac_prog; ac_word=$2
1315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1316 echo "configure:1317: checking for $ac_word" >&5
1317 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1318   echo $ac_n "(cached) $ac_c" 1>&6
1319 else
1320   if test -n "$AMTAR"; then
1321   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1322 else
1323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1324   ac_dummy="$PATH"
1325   for ac_dir in $ac_dummy; do
1326     test -z "$ac_dir" && ac_dir=.
1327     if test -f $ac_dir/$ac_word; then
1328       ac_cv_prog_AMTAR="$ac_prog"
1329       break
1330     fi
1331   done
1332   IFS="$ac_save_ifs"
1333 fi
1334 fi
1335 AMTAR="$ac_cv_prog_AMTAR"
1336 if test -n "$AMTAR"; then
1337   echo "$ac_t""$AMTAR" 1>&6
1338 else
1339   echo "$ac_t""no" 1>&6
1340 fi
1341
1342 test -n "$AMTAR" && break
1343 done
1344
1345
1346 AMTARFLAGS=
1347 if test -n "$AMTAR"; then
1348   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1349         AMTARFLAGS=o
1350   fi
1351 fi
1352
1353 cat >> confdefs.h <<EOF
1354 #define OPENLDAP_PACKAGE "$PACKAGE"
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define OPENLDAP_VERSION "$VERSION"
1359 EOF
1360
1361
1362 cat >> confdefs.h <<EOF
1363 #define LDAP_VENDOR_VERSION $OL_API_INC
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1368 EOF
1369
1370 cat >> confdefs.h <<EOF
1371 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1372 EOF
1373
1374 cat >> confdefs.h <<EOF
1375 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1376 EOF
1377
1378
1379 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1380
1381 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1382
1383 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1384
1385
1386
1387 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1388 echo "configure:1389: checking configure arguments" >&5
1389
1390
1391 top_builddir=`pwd`
1392
1393 ldap_subdir="/openldap"
1394
1395 # Check whether --with-subdir or --without-subdir was given.
1396 if test "${with_subdir+set}" = set; then
1397   withval="$with_subdir"
1398   case "$withval" in
1399         no) ldap_subdir=""
1400                 ;;
1401         yes)
1402                 ;;
1403         /*|\\*)
1404                 ldap_subdir="$withval"
1405                 ;;
1406         *)
1407                 ldap_subdir="/$withval"
1408                 ;;
1409 esac
1410
1411 fi
1412
1413
1414 # OpenLDAP --enable-debug
1415         # Check whether --enable-debug or --disable-debug was given.
1416 if test "${enable_debug+set}" = set; then
1417   enableval="$enable_debug"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1427         fi
1428         ol_enable_debug="$ol_arg"
1429
1430 else
1431         ol_enable_debug="yes"
1432 fi
1433 # end --enable-debug
1434 # OpenLDAP --enable-dynamic
1435         # Check whether --enable-dynamic or --disable-dynamic was given.
1436 if test "${enable_dynamic+set}" = set; then
1437   enableval="$enable_dynamic"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1447         fi
1448         ol_enable_dynamic="$ol_arg"
1449
1450 else
1451         ol_enable_dynamic="no"
1452 fi
1453 # end --enable-dynamic
1454 # OpenLDAP --enable-syslog
1455         # Check whether --enable-syslog or --disable-syslog was given.
1456 if test "${enable_syslog+set}" = set; then
1457   enableval="$enable_syslog"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1467         fi
1468         ol_enable_syslog="$ol_arg"
1469
1470 else
1471         ol_enable_syslog="auto"
1472 fi
1473 # end --enable-syslog
1474 # OpenLDAP --enable-proctitle
1475         # Check whether --enable-proctitle or --disable-proctitle was given.
1476 if test "${enable_proctitle+set}" = set; then
1477   enableval="$enable_proctitle"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1487         fi
1488         ol_enable_proctitle="$ol_arg"
1489
1490 else
1491         ol_enable_proctitle="yes"
1492 fi
1493 # end --enable-proctitle
1494 ol_enable_referrals=${ol_enable_referrals-no}
1495 ol_enable_kbind=${ol_enable_kbind-no}
1496 # OpenLDAP --enable-ipv6
1497         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1498 if test "${enable_ipv6+set}" = set; then
1499   enableval="$enable_ipv6"
1500   
1501         ol_arg=invalid
1502         for ol_val in auto yes no ; do
1503                 if test "$enableval" = "$ol_val" ; then
1504                         ol_arg="$ol_val"
1505                 fi
1506         done
1507         if test "$ol_arg" = "invalid" ; then
1508                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1509         fi
1510         ol_enable_ipv6="$ol_arg"
1511
1512 else
1513         ol_enable_ipv6="auto"
1514 fi
1515 # end --enable-ipv6
1516 # OpenLDAP --enable-local
1517         # Check whether --enable-local or --disable-local was given.
1518 if test "${enable_local+set}" = set; then
1519   enableval="$enable_local"
1520   
1521         ol_arg=invalid
1522         for ol_val in auto yes no ; do
1523                 if test "$enableval" = "$ol_val" ; then
1524                         ol_arg="$ol_val"
1525                 fi
1526         done
1527         if test "$ol_arg" = "invalid" ; then
1528                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1529         fi
1530         ol_enable_local="$ol_arg"
1531
1532 else
1533         ol_enable_local="auto"
1534 fi
1535 # end --enable-local
1536
1537
1538 # OpenLDAP --with-cyrus_sasl
1539         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1540 if test "${with_cyrus_sasl+set}" = set; then
1541   withval="$with_cyrus_sasl"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no  ; do
1545                 if test "$withval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1551         fi
1552         ol_with_cyrus_sasl="$ol_arg"
1553
1554 else
1555         ol_with_cyrus_sasl="auto"
1556 fi
1557 # end --with-cyrus_sasl
1558
1559 # OpenLDAP --with-fetch
1560         # Check whether --with-fetch or --without-fetch was given.
1561 if test "${with_fetch+set}" = set; then
1562   withval="$with_fetch"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto yes no  ; do
1566                 if test "$withval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1572         fi
1573         ol_with_fetch="$ol_arg"
1574
1575 else
1576         ol_with_fetch="auto"
1577 fi
1578 # end --with-fetch
1579
1580 ol_with_kerberos=${ol_with_kerberos-auto}
1581 # OpenLDAP --with-threads
1582         # Check whether --with-threads or --without-threads was given.
1583 if test "${with_threads+set}" = set; then
1584   withval="$with_threads"
1585   
1586         ol_arg=invalid
1587         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1588                 if test "$withval" = "$ol_val" ; then
1589                         ol_arg="$ol_val"
1590                 fi
1591         done
1592         if test "$ol_arg" = "invalid" ; then
1593                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1594         fi
1595         ol_with_threads="$ol_arg"
1596
1597 else
1598         ol_with_threads="auto"
1599 fi
1600 # end --with-threads
1601
1602 # OpenLDAP --with-tls
1603         # Check whether --with-tls or --without-tls was given.
1604 if test "${with_tls+set}" = set; then
1605   withval="$with_tls"
1606   
1607         ol_arg=invalid
1608         for ol_val in auto ssleay openssl yes no  ; do
1609                 if test "$withval" = "$ol_val" ; then
1610                         ol_arg="$ol_val"
1611                 fi
1612         done
1613         if test "$ol_arg" = "invalid" ; then
1614                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1615         fi
1616         ol_with_tls="$ol_arg"
1617
1618 else
1619         ol_with_tls="auto"
1620 fi
1621 # end --with-tls
1622
1623 # OpenLDAP --with-yielding_select
1624         # Check whether --with-yielding_select or --without-yielding_select was given.
1625 if test "${with_yielding_select+set}" = set; then
1626   withval="$with_yielding_select"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no manual  ; do
1630                 if test "$withval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1636         fi
1637         ol_with_yielding_select="$ol_arg"
1638
1639 else
1640         ol_with_yielding_select="auto"
1641 fi
1642 # end --with-yielding_select
1643
1644 # OpenLDAP --with-multiple_precision
1645         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1646 if test "${with_multiple_precision+set}" = set; then
1647   withval="$with_multiple_precision"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto bignum gmp yes no  ; do
1651                 if test "$withval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1657         fi
1658         ol_with_multiple_precision="$ol_arg"
1659
1660 else
1661         ol_with_multiple_precision="auto"
1662 fi
1663 # end --with-multiple_precision
1664
1665
1666
1667 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1668 if test "${with_xxslapdoptions+set}" = set; then
1669   withval="$with_xxslapdoptions"
1670   :
1671 fi
1672
1673 # OpenLDAP --enable-slapd
1674         # Check whether --enable-slapd or --disable-slapd was given.
1675 if test "${enable_slapd+set}" = set; then
1676   enableval="$enable_slapd"
1677   
1678         ol_arg=invalid
1679         for ol_val in auto yes no ; do
1680                 if test "$enableval" = "$ol_val" ; then
1681                         ol_arg="$ol_val"
1682                 fi
1683         done
1684         if test "$ol_arg" = "invalid" ; then
1685                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1686         fi
1687         ol_enable_slapd="$ol_arg"
1688
1689 else
1690         ol_enable_slapd="yes"
1691 fi
1692 # end --enable-slapd
1693 # OpenLDAP --enable-aci
1694         # Check whether --enable-aci or --disable-aci was given.
1695 if test "${enable_aci+set}" = set; then
1696   enableval="$enable_aci"
1697   
1698         ol_arg=invalid
1699         for ol_val in auto yes no ; do
1700                 if test "$enableval" = "$ol_val" ; then
1701                         ol_arg="$ol_val"
1702                 fi
1703         done
1704         if test "$ol_arg" = "invalid" ; then
1705                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1706         fi
1707         ol_enable_aci="$ol_arg"
1708
1709 else
1710         ol_enable_aci="no"
1711 fi
1712 # end --enable-aci
1713 # OpenLDAP --enable-cleartext
1714         # Check whether --enable-cleartext or --disable-cleartext was given.
1715 if test "${enable_cleartext+set}" = set; then
1716   enableval="$enable_cleartext"
1717   
1718         ol_arg=invalid
1719         for ol_val in auto yes no ; do
1720                 if test "$enableval" = "$ol_val" ; then
1721                         ol_arg="$ol_val"
1722                 fi
1723         done
1724         if test "$ol_arg" = "invalid" ; then
1725                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1726         fi
1727         ol_enable_cleartext="$ol_arg"
1728
1729 else
1730         ol_enable_cleartext="yes"
1731 fi
1732 # end --enable-cleartext
1733 # OpenLDAP --enable-crypt
1734         # Check whether --enable-crypt or --disable-crypt was given.
1735 if test "${enable_crypt+set}" = set; then
1736   enableval="$enable_crypt"
1737   
1738         ol_arg=invalid
1739         for ol_val in auto yes no ; do
1740                 if test "$enableval" = "$ol_val" ; then
1741                         ol_arg="$ol_val"
1742                 fi
1743         done
1744         if test "$ol_arg" = "invalid" ; then
1745                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1746         fi
1747         ol_enable_crypt="$ol_arg"
1748
1749 else
1750         ol_enable_crypt="no"
1751 fi
1752 # end --enable-crypt
1753 # OpenLDAP --enable-lmpasswd
1754         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1755 if test "${enable_lmpasswd+set}" = set; then
1756   enableval="$enable_lmpasswd"
1757   
1758         ol_arg=invalid
1759         for ol_val in auto yes no ; do
1760                 if test "$enableval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1766         fi
1767         ol_enable_lmpasswd="$ol_arg"
1768
1769 else
1770         ol_enable_lmpasswd="no"
1771 fi
1772 # end --enable-lmpasswd
1773 # OpenLDAP --enable-spasswd
1774         # Check whether --enable-spasswd or --disable-spasswd was given.
1775 if test "${enable_spasswd+set}" = set; then
1776   enableval="$enable_spasswd"
1777   
1778         ol_arg=invalid
1779         for ol_val in auto yes no ; do
1780                 if test "$enableval" = "$ol_val" ; then
1781                         ol_arg="$ol_val"
1782                 fi
1783         done
1784         if test "$ol_arg" = "invalid" ; then
1785                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1786         fi
1787         ol_enable_spasswd="$ol_arg"
1788
1789 else
1790         ol_enable_spasswd="no"
1791 fi
1792 # end --enable-spasswd
1793 # OpenLDAP --enable-modules
1794         # Check whether --enable-modules or --disable-modules was given.
1795 if test "${enable_modules+set}" = set; then
1796   enableval="$enable_modules"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1806         fi
1807         ol_enable_modules="$ol_arg"
1808
1809 else
1810         ol_enable_modules="no"
1811 fi
1812 # end --enable-modules
1813 ol_enable_multimaster=${ol_enable_multimaster-no}
1814 # OpenLDAP --enable-rewrite
1815         # Check whether --enable-rewrite or --disable-rewrite was given.
1816 if test "${enable_rewrite+set}" = set; then
1817   enableval="$enable_rewrite"
1818   
1819         ol_arg=invalid
1820         for ol_val in auto yes no ; do
1821                 if test "$enableval" = "$ol_val" ; then
1822                         ol_arg="$ol_val"
1823                 fi
1824         done
1825         if test "$ol_arg" = "invalid" ; then
1826                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1827         fi
1828         ol_enable_rewrite="$ol_arg"
1829
1830 else
1831         ol_enable_rewrite="auto"
1832 fi
1833 # end --enable-rewrite
1834 # OpenLDAP --enable-rlookups
1835         # Check whether --enable-rlookups or --disable-rlookups was given.
1836 if test "${enable_rlookups+set}" = set; then
1837   enableval="$enable_rlookups"
1838   
1839         ol_arg=invalid
1840         for ol_val in auto yes no ; do
1841                 if test "$enableval" = "$ol_val" ; then
1842                         ol_arg="$ol_val"
1843                 fi
1844         done
1845         if test "$ol_arg" = "invalid" ; then
1846                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1847         fi
1848         ol_enable_rlookups="$ol_arg"
1849
1850 else
1851         ol_enable_rlookups="no"
1852 fi
1853 # end --enable-rlookups
1854 # OpenLDAP --enable-slapi
1855         # Check whether --enable-slapi or --disable-slapi was given.
1856 if test "${enable_slapi+set}" = set; then
1857   enableval="$enable_slapi"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1867         fi
1868         ol_enable_slapi="$ol_arg"
1869
1870 else
1871         ol_enable_slapi="no"
1872 fi
1873 # end --enable-slapi
1874 # OpenLDAP --enable-slp
1875         # Check whether --enable-slp or --disable-slp was given.
1876 if test "${enable_slp+set}" = set; then
1877   enableval="$enable_slp"
1878   
1879         ol_arg=invalid
1880         for ol_val in auto yes no ; do
1881                 if test "$enableval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1887         fi
1888         ol_enable_slp="$ol_arg"
1889
1890 else
1891         ol_enable_slp="no"
1892 fi
1893 # end --enable-slp
1894 # OpenLDAP --enable-wrappers
1895         # Check whether --enable-wrappers or --disable-wrappers was given.
1896 if test "${enable_wrappers+set}" = set; then
1897   enableval="$enable_wrappers"
1898   
1899         ol_arg=invalid
1900         for ol_val in auto yes no ; do
1901                 if test "$enableval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1907         fi
1908         ol_enable_wrappers="$ol_arg"
1909
1910 else
1911         ol_enable_wrappers="no"
1912 fi
1913 # end --enable-wrappers
1914
1915 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1916         passwd perl relay shell sql"
1917
1918 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1919 if test "${with_xxslapbackends+set}" = set; then
1920   withval="$with_xxslapbackends"
1921   :
1922 fi
1923
1924
1925 # OpenLDAP --enable-backends
1926         # Check whether --enable-backends or --disable-backends was given.
1927 if test "${enable_backends+set}" = set; then
1928   enableval="$enable_backends"
1929   
1930         ol_arg=invalid
1931         for ol_val in no yes mod ; do
1932                 if test "$enableval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1938         fi
1939         ol_enable_backends="$ol_arg"
1940
1941 fi
1942 # end --enable-backends
1943 test -n "$ol_enable_backends" && ol_dflt_backends="$ol_enable_backends"
1944 # OpenLDAP --enable-bdb
1945         # Check whether --enable-bdb or --disable-bdb was given.
1946 if test "${enable_bdb+set}" = set; then
1947   enableval="$enable_bdb"
1948   
1949         ol_arg=invalid
1950         for ol_val in no yes mod ; do
1951                 if test "$enableval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1957         fi
1958         ol_enable_bdb="$ol_arg"
1959
1960 else
1961         ol_enable_bdb="${ol_dflt_backends-yes}"
1962 fi
1963 # end --enable-bdb
1964 # OpenLDAP --enable-dnssrv
1965         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1966 if test "${enable_dnssrv+set}" = set; then
1967   enableval="$enable_dnssrv"
1968   
1969         ol_arg=invalid
1970         for ol_val in no yes mod ; do
1971                 if test "$enableval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1977         fi
1978         ol_enable_dnssrv="$ol_arg"
1979
1980 else
1981         ol_enable_dnssrv="${ol_dflt_backends-no}"
1982 fi
1983 # end --enable-dnssrv
1984 # OpenLDAP --enable-hdb
1985         # Check whether --enable-hdb or --disable-hdb was given.
1986 if test "${enable_hdb+set}" = set; then
1987   enableval="$enable_hdb"
1988   
1989         ol_arg=invalid
1990         for ol_val in no yes mod ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1997         fi
1998         ol_enable_hdb="$ol_arg"
1999
2000 else
2001         ol_enable_hdb="${ol_dflt_backends-yes}"
2002 fi
2003 # end --enable-hdb
2004 # OpenLDAP --enable-ldap
2005         # Check whether --enable-ldap or --disable-ldap was given.
2006 if test "${enable_ldap+set}" = set; then
2007   enableval="$enable_ldap"
2008   
2009         ol_arg=invalid
2010         for ol_val in no yes mod ; do
2011                 if test "$enableval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2017         fi
2018         ol_enable_ldap="$ol_arg"
2019
2020 else
2021         ol_enable_ldap="${ol_dflt_backends-no}"
2022 fi
2023 # end --enable-ldap
2024 # OpenLDAP --enable-ldbm
2025         # Check whether --enable-ldbm or --disable-ldbm was given.
2026 if test "${enable_ldbm+set}" = set; then
2027   enableval="$enable_ldbm"
2028   
2029         ol_arg=invalid
2030         for ol_val in no yes mod ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2037         fi
2038         ol_enable_ldbm="$ol_arg"
2039
2040 else
2041         ol_enable_ldbm="${ol_dflt_backends-no}"
2042 fi
2043 # end --enable-ldbm
2044 # OpenLDAP --with-ldbm_api
2045         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2046 if test "${with_ldbm_api+set}" = set; then
2047   withval="$with_ldbm_api"
2048   
2049         ol_arg=invalid
2050         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2051                 if test "$withval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2057         fi
2058         ol_with_ldbm_api="$ol_arg"
2059
2060 else
2061         ol_with_ldbm_api="auto"
2062 fi
2063 # end --with-ldbm_api
2064
2065 # OpenLDAP --with-ldbm_type
2066         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2067 if test "${with_ldbm_type+set}" = set; then
2068   withval="$with_ldbm_type"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto btree hash ; do
2072                 if test "$withval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2078         fi
2079         ol_with_ldbm_type="$ol_arg"
2080
2081 else
2082         ol_with_ldbm_type="auto"
2083 fi
2084 # end --with-ldbm_type
2085
2086 # OpenLDAP --enable-meta
2087         # Check whether --enable-meta or --disable-meta was given.
2088 if test "${enable_meta+set}" = set; then
2089   enableval="$enable_meta"
2090   
2091         ol_arg=invalid
2092         for ol_val in no yes mod ; do
2093                 if test "$enableval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2099         fi
2100         ol_enable_meta="$ol_arg"
2101
2102 else
2103         ol_enable_meta="${ol_dflt_backends-no}"
2104 fi
2105 # end --enable-meta
2106 # OpenLDAP --enable-monitor
2107         # Check whether --enable-monitor or --disable-monitor was given.
2108 if test "${enable_monitor+set}" = set; then
2109   enableval="$enable_monitor"
2110   
2111         ol_arg=invalid
2112         for ol_val in no yes mod ; do
2113                 if test "$enableval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2119         fi
2120         ol_enable_monitor="$ol_arg"
2121
2122 else
2123         ol_enable_monitor="${ol_dflt_backends-yes}"
2124 fi
2125 # end --enable-monitor
2126 # OpenLDAP --enable-null
2127         # Check whether --enable-null or --disable-null was given.
2128 if test "${enable_null+set}" = set; then
2129   enableval="$enable_null"
2130   
2131         ol_arg=invalid
2132         for ol_val in no yes mod ; do
2133                 if test "$enableval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2139         fi
2140         ol_enable_null="$ol_arg"
2141
2142 else
2143         ol_enable_null="${ol_dflt_backends-no}"
2144 fi
2145 # end --enable-null
2146 # OpenLDAP --enable-passwd
2147         # Check whether --enable-passwd or --disable-passwd was given.
2148 if test "${enable_passwd+set}" = set; then
2149   enableval="$enable_passwd"
2150   
2151         ol_arg=invalid
2152         for ol_val in no yes mod ; do
2153                 if test "$enableval" = "$ol_val" ; then
2154                         ol_arg="$ol_val"
2155                 fi
2156         done
2157         if test "$ol_arg" = "invalid" ; then
2158                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2159         fi
2160         ol_enable_passwd="$ol_arg"
2161
2162 else
2163         ol_enable_passwd="${ol_dflt_backends-no}"
2164 fi
2165 # end --enable-passwd
2166 # OpenLDAP --enable-perl
2167         # Check whether --enable-perl or --disable-perl was given.
2168 if test "${enable_perl+set}" = set; then
2169   enableval="$enable_perl"
2170   
2171         ol_arg=invalid
2172         for ol_val in no yes mod ; do
2173                 if test "$enableval" = "$ol_val" ; then
2174                         ol_arg="$ol_val"
2175                 fi
2176         done
2177         if test "$ol_arg" = "invalid" ; then
2178                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2179         fi
2180         ol_enable_perl="$ol_arg"
2181
2182 else
2183         ol_enable_perl="${ol_dflt_backends-no}"
2184 fi
2185 # end --enable-perl
2186 # OpenLDAP --enable-relay
2187         # Check whether --enable-relay or --disable-relay was given.
2188 if test "${enable_relay+set}" = set; then
2189   enableval="$enable_relay"
2190   
2191         ol_arg=invalid
2192         for ol_val in no yes mod ; do
2193                 if test "$enableval" = "$ol_val" ; then
2194                         ol_arg="$ol_val"
2195                 fi
2196         done
2197         if test "$ol_arg" = "invalid" ; then
2198                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2199         fi
2200         ol_enable_relay="$ol_arg"
2201
2202 else
2203         ol_enable_relay="${ol_dflt_backends-yes}"
2204 fi
2205 # end --enable-relay
2206 # OpenLDAP --enable-shell
2207         # Check whether --enable-shell or --disable-shell was given.
2208 if test "${enable_shell+set}" = set; then
2209   enableval="$enable_shell"
2210   
2211         ol_arg=invalid
2212         for ol_val in no yes mod ; do
2213                 if test "$enableval" = "$ol_val" ; then
2214                         ol_arg="$ol_val"
2215                 fi
2216         done
2217         if test "$ol_arg" = "invalid" ; then
2218                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2219         fi
2220         ol_enable_shell="$ol_arg"
2221
2222 else
2223         ol_enable_shell="${ol_dflt_backends-no}"
2224 fi
2225 # end --enable-shell
2226 # OpenLDAP --enable-sql
2227         # Check whether --enable-sql or --disable-sql was given.
2228 if test "${enable_sql+set}" = set; then
2229   enableval="$enable_sql"
2230   
2231         ol_arg=invalid
2232         for ol_val in no yes mod ; do
2233                 if test "$enableval" = "$ol_val" ; then
2234                         ol_arg="$ol_val"
2235                 fi
2236         done
2237         if test "$ol_arg" = "invalid" ; then
2238                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2239         fi
2240         ol_enable_sql="$ol_arg"
2241
2242 else
2243         ol_enable_sql="${ol_dflt_backends-no}"
2244 fi
2245 # end --enable-sql
2246
2247 Overlays="accesslog denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2248         refint retcode rwm syncprov translucent unique"
2249
2250 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2251 if test "${with_xxslapoverlays+set}" = set; then
2252   withval="$with_xxslapoverlays"
2253   :
2254 fi
2255
2256
2257 # OpenLDAP --enable-overlays
2258         # Check whether --enable-overlays or --disable-overlays was given.
2259 if test "${enable_overlays+set}" = set; then
2260   enableval="$enable_overlays"
2261   
2262         ol_arg=invalid
2263         for ol_val in no yes mod ; do
2264                 if test "$enableval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2270         fi
2271         ol_enable_overlays="$ol_arg"
2272
2273 fi
2274 # end --enable-overlays
2275 test -n "$ol_enable_overlays" && ol_dflt_overlays="$ol_enable_overlays"
2276 # OpenLDAP --enable-accesslog
2277         # Check whether --enable-accesslog or --disable-accesslog was given.
2278 if test "${enable_accesslog+set}" = set; then
2279   enableval="$enable_accesslog"
2280   
2281         ol_arg=invalid
2282         for ol_val in no yes mod ; do
2283                 if test "$enableval" = "$ol_val" ; then
2284                         ol_arg="$ol_val"
2285                 fi
2286         done
2287         if test "$ol_arg" = "invalid" ; then
2288                 { echo "configure: error: bad value $enableval for --enable-accesslog" 1>&2; exit 1; }
2289         fi
2290         ol_enable_accesslog="$ol_arg"
2291
2292 else
2293         ol_enable_accesslog="${ol_dflt_overlays-no}"
2294 fi
2295 # end --enable-accesslog
2296
2297 # OpenLDAP --enable-denyop
2298         # Check whether --enable-denyop or --disable-denyop was given.
2299 if test "${enable_denyop+set}" = set; then
2300   enableval="$enable_denyop"
2301   
2302         ol_arg=invalid
2303         for ol_val in no yes mod ; do
2304                 if test "$enableval" = "$ol_val" ; then
2305                         ol_arg="$ol_val"
2306                 fi
2307         done
2308         if test "$ol_arg" = "invalid" ; then
2309                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2310         fi
2311         ol_enable_denyop="$ol_arg"
2312
2313 else
2314         ol_enable_denyop="${ol_dflt_overlays-no}"
2315 fi
2316 # end --enable-denyop
2317
2318 # OpenLDAP --enable-dyngroup
2319         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2320 if test "${enable_dyngroup+set}" = set; then
2321   enableval="$enable_dyngroup"
2322   
2323         ol_arg=invalid
2324         for ol_val in no yes mod ; do
2325                 if test "$enableval" = "$ol_val" ; then
2326                         ol_arg="$ol_val"
2327                 fi
2328         done
2329         if test "$ol_arg" = "invalid" ; then
2330                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2331         fi
2332         ol_enable_dyngroup="$ol_arg"
2333
2334 else
2335         ol_enable_dyngroup="${ol_dflt_overlays-no}"
2336 fi
2337 # end --enable-dyngroup
2338
2339 # OpenLDAP --enable-dynlist
2340         # Check whether --enable-dynlist or --disable-dynlist was given.
2341 if test "${enable_dynlist+set}" = set; then
2342   enableval="$enable_dynlist"
2343   
2344         ol_arg=invalid
2345         for ol_val in no yes mod ; do
2346                 if test "$enableval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2352         fi
2353         ol_enable_dynlist="$ol_arg"
2354
2355 else
2356         ol_enable_dynlist="${ol_dflt_overlays-no}"
2357 fi
2358 # end --enable-dynlist
2359
2360 # OpenLDAP --enable-glue
2361         # Check whether --enable-glue or --disable-glue was given.
2362 if test "${enable_glue+set}" = set; then
2363   enableval="$enable_glue"
2364   
2365         ol_arg=invalid
2366         for ol_val in no yes mod ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2373         fi
2374         ol_enable_glue="$ol_arg"
2375
2376 else
2377         ol_enable_glue="${ol_dflt_overlays-yes}"
2378 fi
2379 # end --enable-glue
2380
2381 # OpenLDAP --enable-lastmod
2382         # Check whether --enable-lastmod or --disable-lastmod was given.
2383 if test "${enable_lastmod+set}" = set; then
2384   enableval="$enable_lastmod"
2385   
2386         ol_arg=invalid
2387         for ol_val in no yes mod ; do
2388                 if test "$enableval" = "$ol_val" ; then
2389                         ol_arg="$ol_val"
2390                 fi
2391         done
2392         if test "$ol_arg" = "invalid" ; then
2393                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2394         fi
2395         ol_enable_lastmod="$ol_arg"
2396
2397 else
2398         ol_enable_lastmod="${ol_dflt_overlays-no}"
2399 fi
2400 # end --enable-lastmod
2401
2402 # OpenLDAP --enable-ppolicy
2403         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2404 if test "${enable_ppolicy+set}" = set; then
2405   enableval="$enable_ppolicy"
2406   
2407         ol_arg=invalid
2408         for ol_val in no yes mod ; do
2409                 if test "$enableval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2415         fi
2416         ol_enable_ppolicy="$ol_arg"
2417
2418 else
2419         ol_enable_ppolicy="${ol_dflt_overlays-no}"
2420 fi
2421 # end --enable-ppolicy
2422
2423 # OpenLDAP --enable-proxycache
2424         # Check whether --enable-proxycache or --disable-proxycache was given.
2425 if test "${enable_proxycache+set}" = set; then
2426   enableval="$enable_proxycache"
2427   
2428         ol_arg=invalid
2429         for ol_val in no yes mod ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2436         fi
2437         ol_enable_proxycache="$ol_arg"
2438
2439 else
2440         ol_enable_proxycache="${ol_dflt_overlays-no}"
2441 fi
2442 # end --enable-proxycache
2443
2444 # OpenLDAP --enable-refint
2445         # Check whether --enable-refint or --disable-refint was given.
2446 if test "${enable_refint+set}" = set; then
2447   enableval="$enable_refint"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$enableval" = "$ol_val" ; then
2452                         ol_arg="$ol_val"
2453                 fi
2454         done
2455         if test "$ol_arg" = "invalid" ; then
2456                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2457         fi
2458         ol_enable_refint="$ol_arg"
2459
2460 else
2461         ol_enable_refint="${ol_dflt_overlays-no}"
2462 fi
2463 # end --enable-refint
2464
2465 # OpenLDAP --enable-retcode
2466         # Check whether --enable-retcode or --disable-retcode was given.
2467 if test "${enable_retcode+set}" = set; then
2468   enableval="$enable_retcode"
2469   
2470         ol_arg=invalid
2471         for ol_val in no yes mod ; do
2472                 if test "$enableval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $enableval for --enable-retcode" 1>&2; exit 1; }
2478         fi
2479         ol_enable_retcode="$ol_arg"
2480
2481 else
2482         ol_enable_retcode="${ol_dflt_overlays-no}"
2483 fi
2484 # end --enable-retcode
2485
2486 # OpenLDAP --enable-rwm
2487         # Check whether --enable-rwm or --disable-rwm was given.
2488 if test "${enable_rwm+set}" = set; then
2489   enableval="$enable_rwm"
2490   
2491         ol_arg=invalid
2492         for ol_val in no yes mod ; do
2493                 if test "$enableval" = "$ol_val" ; then
2494                         ol_arg="$ol_val"
2495                 fi
2496         done
2497         if test "$ol_arg" = "invalid" ; then
2498                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2499         fi
2500         ol_enable_rwm="$ol_arg"
2501
2502 else
2503         ol_enable_rwm="${ol_dflt_overlays-no}"
2504 fi
2505 # end --enable-rwm
2506
2507 # OpenLDAP --enable-syncprov
2508         # Check whether --enable-syncprov or --disable-syncprov was given.
2509 if test "${enable_syncprov+set}" = set; then
2510   enableval="$enable_syncprov"
2511   
2512         ol_arg=invalid
2513         for ol_val in no yes mod ; do
2514                 if test "$enableval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2520         fi
2521         ol_enable_syncprov="$ol_arg"
2522
2523 else
2524         ol_enable_syncprov="${ol_dflt_overlays-yes}"
2525 fi
2526 # end --enable-syncprov
2527
2528 # OpenLDAP --enable-translucent
2529         # Check whether --enable-translucent or --disable-translucent was given.
2530 if test "${enable_translucent+set}" = set; then
2531   enableval="$enable_translucent"
2532   
2533         ol_arg=invalid
2534         for ol_val in no yes mod ; do
2535                 if test "$enableval" = "$ol_val" ; then
2536                         ol_arg="$ol_val"
2537                 fi
2538         done
2539         if test "$ol_arg" = "invalid" ; then
2540                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2541         fi
2542         ol_enable_translucent="$ol_arg"
2543
2544 else
2545         ol_enable_translucent="${ol_dflt_overlays-no}"
2546 fi
2547 # end --enable-translucent
2548
2549 # OpenLDAP --enable-unique
2550         # Check whether --enable-unique or --disable-unique was given.
2551 if test "${enable_unique+set}" = set; then
2552   enableval="$enable_unique"
2553   
2554         ol_arg=invalid
2555         for ol_val in no yes mod ; do
2556                 if test "$enableval" = "$ol_val" ; then
2557                         ol_arg="$ol_val"
2558                 fi
2559         done
2560         if test "$ol_arg" = "invalid" ; then
2561                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2562         fi
2563         ol_enable_unique="$ol_arg"
2564
2565 else
2566         ol_enable_unique="${ol_dflt_overlays-no}"
2567 fi
2568 # end --enable-unique
2569
2570
2571
2572 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2573 if test "${with_xxslurpdoptions+set}" = set; then
2574   withval="$with_xxslurpdoptions"
2575   :
2576 fi
2577
2578 # OpenLDAP --enable-slurpd
2579         # Check whether --enable-slurpd or --disable-slurpd was given.
2580 if test "${enable_slurpd+set}" = set; then
2581   enableval="$enable_slurpd"
2582   
2583         ol_arg=invalid
2584         for ol_val in auto yes no ; do
2585                 if test "$enableval" = "$ol_val" ; then
2586                         ol_arg="$ol_val"
2587                 fi
2588         done
2589         if test "$ol_arg" = "invalid" ; then
2590                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2591         fi
2592         ol_enable_slurpd="$ol_arg"
2593
2594 else
2595         ol_enable_slurpd="auto"
2596 fi
2597 # end --enable-slurpd
2598
2599 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2600 if test "${with_xxliboptions+set}" = set; then
2601   withval="$with_xxliboptions"
2602   :
2603 fi
2604
2605 # Check whether --enable-static or --disable-static was given.
2606 if test "${enable_static+set}" = set; then
2607   enableval="$enable_static"
2608   p=${PACKAGE-default}
2609 case $enableval in
2610 yes) enable_static=yes ;;
2611 no) enable_static=no ;;
2612 *)
2613   enable_static=no
2614   # Look at the argument we got.  We use all the common list separators.
2615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2616   for pkg in $enableval; do
2617     if test "X$pkg" = "X$p"; then
2618       enable_static=yes
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622   ;;
2623 esac
2624 else
2625   enable_static=yes
2626 fi
2627
2628 # Check whether --enable-shared or --disable-shared was given.
2629 if test "${enable_shared+set}" = set; then
2630   enableval="$enable_shared"
2631   p=${PACKAGE-default}
2632 case $enableval in
2633 yes) enable_shared=yes ;;
2634 no) enable_shared=no ;;
2635 *)
2636   enable_shared=no
2637   # Look at the argument we got.  We use all the common list separators.
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2639   for pkg in $enableval; do
2640     if test "X$pkg" = "X$p"; then
2641       enable_shared=yes
2642     fi
2643   done
2644   IFS="$ac_save_ifs"
2645   ;;
2646 esac
2647 else
2648   enable_shared=yes
2649 fi
2650
2651
2652
2653 # validate options
2654 if test $ol_enable_slapd = no ; then
2655                 if test $ol_enable_slapi = yes ; then
2656                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2657         fi
2658         case "$ol_enable_backends" in yes | mod)
2659                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2660         esac
2661         for i in $Backends; do
2662                 eval "ol_tmp=\$ol_enable_$i"
2663                 if test $ol_tmp != no ; then
2664                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2665                         eval "ol_enable_$i=no"
2666                 fi
2667         done
2668         if test $ol_enable_modules = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2670         fi
2671         if test $ol_enable_multimaster = yes ; then
2672                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2673         fi
2674         if test $ol_enable_wrappers = yes ; then
2675                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2676         fi
2677         if test $ol_enable_rlookups = yes ; then
2678                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2679         fi
2680         if test $ol_enable_aci = yes ; then
2681                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2682         fi
2683         if test $ol_with_ldbm_api != auto ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2685         fi
2686         if test $ol_with_ldbm_type != auto ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695                 case "$ol_enable_overlays" in yes | mod)
2696                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2697         esac
2698         for i in $Overlays; do
2699                 eval "ol_tmp=\$ol_enable_$i"
2700                 if test $ol_tmp != no ; then
2701                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2702                         eval "ol_enable_$i=no"
2703                 fi
2704         done
2705
2706         # force settings to no
2707         ol_enable_slapi=no
2708
2709         ol_enable_backends=
2710         ol_enable_overlays=
2711         ol_enable_modules=no
2712         ol_enable_multimaster=no
2713         ol_enable_rlookups=no
2714         ol_enable_aci=no
2715         ol_enable_wrappers=no
2716
2717         ol_with_ldbm_api=no
2718         ol_with_ldbm_type=no
2719
2720         ol_enable_slurpd=no
2721
2722         ol_enable_rewrite=no
2723
2724 elif test $ol_enable_ldbm = no ; then
2725         
2726         if test $ol_with_ldbm_api != auto ; then
2727                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2728         fi
2729
2730         if test $ol_with_ldbm_type != auto ; then
2731                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2732         fi
2733
2734         if test $ol_enable_modules != yes -a \
2735                 $ol_enable_bdb = no -a \
2736                 $ol_enable_dnssrv = no -a \
2737                 $ol_enable_hdb = no -a \
2738                 $ol_enable_ldap = no -a \
2739                 $ol_enable_meta = no -a \
2740                 $ol_enable_monitor = no -a \
2741                 $ol_enable_null = no -a \
2742                 $ol_enable_passwd = no -a \
2743                 $ol_enable_perl = no -a \
2744                 $ol_enable_relay = no -a \
2745                 $ol_enable_shell = no -a \
2746                 $ol_enable_sql = no ; then
2747
2748                 if test $ol_enable_slapd = yes ; then
2749                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2750                 else
2751                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2752                         ol_enable_slapd=no
2753                 fi
2754         fi
2755
2756         ol_with_ldbm_api=no
2757         ol_with_ldbm_type=no
2758
2759         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2760                 ol_with_ldbm_api=berkeley
2761         fi
2762
2763 else
2764                 if test $ol_with_ldbm_api = gdbm -a \
2765                 $ol_with_ldbm_type = btree ; then
2766                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2767         fi
2768         if test $ol_with_ldbm_api = mdbm -a \
2769                 $ol_with_ldbm_type = btree ; then
2770                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2771         fi
2772         if test $ol_with_ldbm_api = ndbm -a \
2773                 $ol_with_ldbm_type = btree ; then
2774                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2775         fi
2776
2777         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2778                 if test $ol_with_ldbm_api = auto ; then
2779                         ol_with_ldbm_api=berkeley
2780                 elif test $ol_with_ldbm_api != berkeley ; then
2781                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2782                 fi
2783         fi
2784 fi
2785
2786 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2787         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2788 fi
2789
2790 if test $ol_enable_slurpd = yes ; then
2791                 if test $ol_with_threads = no ; then
2792                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2793         fi
2794 fi
2795
2796 if test $ol_enable_lmpasswd = yes ; then
2797         if test $ol_with_tls = no ; then
2798                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2799         fi
2800 fi
2801
2802 if test $ol_enable_kbind = yes ; then
2803         if test $ol_with_kerberos = no ; then
2804                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2805         elif test $ol_with_kerberos = auto ; then
2806                 ol_with_kerberos=yes
2807         fi
2808
2809 elif test $ol_enable_kbind = no ; then
2810         if test $ol_with_kerberos = auto ; then
2811                 ol_with_kerberos=no
2812         elif test $ol_with_kerberos != no ; then
2813                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2814                 ol_with_kerberos=no
2815         fi
2816 fi
2817
2818 if test $ol_enable_spasswd = yes ; then
2819         if test $ol_with_cyrus_sasl = no ; then
2820                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2821         fi
2822         ol_with_cyrus_sasl=yes
2823 fi
2824
2825 echo "$ac_t""done" 1>&6
2826
2827 LDAP_LIBS=
2828 LDBM_LIBS=
2829 LTHREAD_LIBS=
2830 LUTIL_LIBS=
2831
2832 SLAPD_LIBS=
2833 SLURPD_LIBS=
2834
2835 BUILD_SLAPD=no
2836 BUILD_SLURPD=no
2837
2838 BUILD_THREAD=no
2839
2840 BUILD_SLAPI=no
2841 SLAPD_SLAPI_DEPEND=
2842
2843 BUILD_BDB=no
2844 BUILD_DNSSRV=no
2845 BUILD_HDB=no
2846 BUILD_LDAP=no
2847 BUILD_LDBM=no
2848 BUILD_META=no
2849 BUILD_MONITOR=no
2850 BUILD_NULL=no
2851 BUILD_PASSWD=no
2852 BUILD_PERL=no
2853 BUILD_RELAY=no
2854 BUILD_SHELL=no
2855 BUILD_SQL=no
2856
2857 BUILD_ACCESSLOG=no
2858 BUILD_DENYOP=no
2859 BUILD_DYNGROUP=no
2860 BUILD_DYNLIST=no
2861 BUILD_GLUE=no
2862 BUILD_LASTMOD=no
2863 BUILD_PPOLICY=no
2864 BUILD_PROXYCACHE=no
2865 BUILD_REFINT=no
2866 BUILD_RETCODE=no
2867 BUILD_RWM=no
2868 BUILD_SYNCPROV=no
2869 BUILD_TRANSLUCENT=no
2870 BUILD_UNIQUE=no
2871
2872 SLAPD_STATIC_OVERLAYS=
2873 SLAPD_DYNAMIC_OVERLAYS=
2874
2875 SLAPD_MODULES_LDFLAGS=
2876 SLAPD_MODULES_CPPFLAGS=
2877
2878 SLAPD_STATIC_BACKENDS=back-ldif
2879 SLAPD_DYNAMIC_BACKENDS=
2880
2881 SLAPD_PERL_LDFLAGS=
2882 MOD_PERL_LDFLAGS=
2883 PERL_CPPFLAGS=
2884
2885 SLAPD_SQL_LDFLAGS=
2886 SLAPD_SQL_LIBS=
2887 SLAPD_SQL_INCLUDES=
2888
2889 KRB4_LIBS=
2890 KRB5_LIBS=
2891 SASL_LIBS=
2892 TLS_LIBS=
2893 MODULES_LIBS=
2894 SLAPI_LIBS=
2895 LIBSLAPI=
2896 LIBSLAPITOOLS=
2897 AUTH_LIBS=
2898
2899 SLAPD_SLP_LIBS=
2900 SLAPD_GMP_LIBS=
2901
2902
2903 cat >> confdefs.h <<\EOF
2904 #define HAVE_MKVERSION 1
2905 EOF
2906
2907
2908
2909
2910 ol_aix_threads=no
2911 case "$target" in
2912 *-*-aix*)       if test -z "$CC" ; then
2913                 case "$ol_with_threads" in
2914                 auto | yes |  posix) ol_aix_threads=yes ;;
2915                 esac
2916         fi
2917 ;;
2918 esac
2919
2920 if test $ol_aix_threads = yes ; then
2921         if test -z "${CC}" ; then
2922                 for ac_prog in cc_r xlc_r cc
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$CC"; then
2932   ac_cv_prog_CC="$CC" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_CC="$ac_prog"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 CC="$ac_cv_prog_CC"
2947 if test -n "$CC"; then
2948   echo "$ac_t""$CC" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 test -n "$CC" && break
2954 done
2955
2956
2957                 if test "$CC" = cc ; then
2958                                                 if test $ol_with_threads != auto ; then
2959                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2960                         else
2961                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2962                         fi
2963                         ol_with_threads=no
2964                 fi
2965         fi
2966
2967         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2968                 ol_with_threads=posix
2969                 ol_cv_pthread_create=yes
2970         fi
2971 fi
2972
2973 if test -z "${CC}"; then
2974         for ac_prog in cc gcc
2975 do
2976 # Extract the first word of "$ac_prog", so it can be a program name with args.
2977 set dummy $ac_prog; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$CC"; then
2984   ac_cv_prog_CC="$CC" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_dummy="$PATH"
2988   for ac_dir in $ac_dummy; do
2989     test -z "$ac_dir" && ac_dir=.
2990     if test -f $ac_dir/$ac_word; then
2991       ac_cv_prog_CC="$ac_prog"
2992       break
2993     fi
2994   done
2995   IFS="$ac_save_ifs"
2996 fi
2997 fi
2998 CC="$ac_cv_prog_CC"
2999 if test -n "$CC"; then
3000   echo "$ac_t""$CC" 1>&6
3001 else
3002   echo "$ac_t""no" 1>&6
3003 fi
3004
3005 test -n "$CC" && break
3006 done
3007 test -n "$CC" || CC="missing"
3008
3009
3010         if test "${CC}" = "missing" ; then
3011                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3012         fi
3013 fi
3014
3015 if test -z "${AR}"; then
3016         for ac_prog in ar gar
3017 do
3018 # Extract the first word of "$ac_prog", so it can be a program name with args.
3019 set dummy $ac_prog; ac_word=$2
3020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3021 echo "configure:3022: checking for $ac_word" >&5
3022 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   if test -n "$AR"; then
3026   ac_cv_prog_AR="$AR" # Let the user override the test.
3027 else
3028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3029   ac_dummy="$PATH"
3030   for ac_dir in $ac_dummy; do
3031     test -z "$ac_dir" && ac_dir=.
3032     if test -f $ac_dir/$ac_word; then
3033       ac_cv_prog_AR="$ac_prog"
3034       break
3035     fi
3036   done
3037   IFS="$ac_save_ifs"
3038 fi
3039 fi
3040 AR="$ac_cv_prog_AR"
3041 if test -n "$AR"; then
3042   echo "$ac_t""$AR" 1>&6
3043 else
3044   echo "$ac_t""no" 1>&6
3045 fi
3046
3047 test -n "$AR" && break
3048 done
3049 test -n "$AR" || AR="missing"
3050
3051
3052         if test "${AR}" = "missing" ; then
3053                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3054         fi
3055 fi
3056
3057
3058
3059 # Find the correct PATH separator.  Usually this is `:', but
3060 # DJGPP uses `;' like DOS.
3061 if test "X${PATH_SEPARATOR+set}" != Xset; then
3062   UNAME=${UNAME-`uname 2>/dev/null`}
3063   case X$UNAME in
3064     *-DOS) lt_cv_sys_path_separator=';' ;;
3065     *)     lt_cv_sys_path_separator=':' ;;
3066   esac
3067   PATH_SEPARATOR=$lt_cv_sys_path_separator
3068 fi
3069
3070 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3071 echo "configure:3072: checking for Cygwin environment" >&5
3072 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078
3079 int main() {
3080
3081 #ifndef __CYGWIN__
3082 #define __CYGWIN__ __CYGWIN32__
3083 #endif
3084 return __CYGWIN__;
3085 ; return 0; }
3086 EOF
3087 if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3088   rm -rf conftest*
3089   ac_cv_cygwin=yes
3090 else
3091   echo "configure: failed program was:" >&5
3092   cat conftest.$ac_ext >&5
3093   rm -rf conftest*
3094   ac_cv_cygwin=no
3095 fi
3096 rm -f conftest*
3097 fi
3098
3099 echo "$ac_t""$ac_cv_cygwin" 1>&6
3100 CYGWIN=
3101 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3102 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3103 echo "configure:3104: checking for mingw32 environment" >&5
3104 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110
3111 int main() {
3112 return __MINGW32__;
3113 ; return 0; }
3114 EOF
3115 if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3116   rm -rf conftest*
3117   ac_cv_mingw32=yes
3118 else
3119   echo "configure: failed program was:" >&5
3120   cat conftest.$ac_ext >&5
3121   rm -rf conftest*
3122   ac_cv_mingw32=no
3123 fi
3124 rm -f conftest*
3125 fi
3126
3127 echo "$ac_t""$ac_cv_mingw32" 1>&6
3128 MINGW32=
3129 test "$ac_cv_mingw32" = yes && MINGW32=yes
3130 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3131 echo "configure:3132: checking for EMX OS/2 environment" >&5
3132 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138
3139 int main() {
3140 return __EMX__;
3141 ; return 0; }
3142 EOF
3143 if { (eval echo configure:3144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3144   rm -rf conftest*
3145   ac_cv_emxos2=yes
3146 else
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   ac_cv_emxos2=no
3151 fi
3152 rm -f conftest*
3153 fi
3154
3155 echo "$ac_t""$ac_cv_emxos2" 1>&6
3156 EMXOS2=
3157 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3158 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3159 echo "configure:3160: checking how to run the C preprocessor" >&5
3160 # On Suns, sometimes $CPP names a directory.
3161 if test -n "$CPP" && test -d "$CPP"; then
3162   CPP=
3163 fi
3164 if test -z "$CPP"; then
3165 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168     # This must be in double quotes, not single quotes, because CPP may get
3169   # substituted into the Makefile and "${CC-cc}" will confuse make.
3170   CPP="${CC-cc} -E"
3171   # On the NeXT, cc -E runs the code through the compiler's parser,
3172   # not just through cpp.
3173   cat > conftest.$ac_ext <<EOF
3174 #line 3175 "configure"
3175 #include "confdefs.h"
3176 #include <assert.h>
3177 Syntax Error
3178 EOF
3179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3180 { (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3182 if test -z "$ac_err"; then
3183   :
3184 else
3185   echo "$ac_err" >&5
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -rf conftest*
3189   CPP="${CC-cc} -E -traditional-cpp"
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <assert.h>
3194 Syntax Error
3195 EOF
3196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3197 { (eval echo configure:3198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3199 if test -z "$ac_err"; then
3200   :
3201 else
3202   echo "$ac_err" >&5
3203   echo "configure: failed program was:" >&5
3204   cat conftest.$ac_ext >&5
3205   rm -rf conftest*
3206   CPP="${CC-cc} -nologo -E"
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 #include <assert.h>
3211 Syntax Error
3212 EOF
3213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3214 { (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3216 if test -z "$ac_err"; then
3217   :
3218 else
3219   echo "$ac_err" >&5
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   CPP=/lib/cpp
3224 fi
3225 rm -f conftest*
3226 fi
3227 rm -f conftest*
3228 fi
3229 rm -f conftest*
3230   ac_cv_prog_CPP="$CPP"
3231 fi
3232   CPP="$ac_cv_prog_CPP"
3233 else
3234   ac_cv_prog_CPP="$CPP"
3235 fi
3236 echo "$ac_t""$CPP" 1>&6
3237
3238 # Check whether --enable-fast-install or --disable-fast-install was given.
3239 if test "${enable_fast_install+set}" = set; then
3240   enableval="$enable_fast_install"
3241   p=${PACKAGE-default}
3242 case $enableval in
3243 yes) enable_fast_install=yes ;;
3244 no) enable_fast_install=no ;;
3245 *)
3246   enable_fast_install=no
3247   # Look at the argument we got.  We use all the common list separators.
3248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3249   for pkg in $enableval; do
3250     if test "X$pkg" = "X$p"; then
3251       enable_fast_install=yes
3252     fi
3253   done
3254   IFS="$ac_save_ifs"
3255   ;;
3256 esac
3257 else
3258   enable_fast_install=yes
3259 fi
3260
3261 # Extract the first word of "gcc", so it can be a program name with args.
3262 set dummy gcc; ac_word=$2
3263 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3264 echo "configure:3265: checking for $ac_word" >&5
3265 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   if test -n "$CC"; then
3269   ac_cv_prog_CC="$CC" # Let the user override the test.
3270 else
3271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3272   ac_dummy="$PATH"
3273   for ac_dir in $ac_dummy; do
3274     test -z "$ac_dir" && ac_dir=.
3275     if test -f $ac_dir/$ac_word; then
3276       ac_cv_prog_CC="gcc"
3277       break
3278     fi
3279   done
3280   IFS="$ac_save_ifs"
3281 fi
3282 fi
3283 CC="$ac_cv_prog_CC"
3284 if test -n "$CC"; then
3285   echo "$ac_t""$CC" 1>&6
3286 else
3287   echo "$ac_t""no" 1>&6
3288 fi
3289
3290 if test -z "$CC"; then
3291   # Extract the first word of "cc", so it can be a program name with args.
3292 set dummy cc; ac_word=$2
3293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3294 echo "configure:3295: checking for $ac_word" >&5
3295 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   if test -n "$CC"; then
3299   ac_cv_prog_CC="$CC" # Let the user override the test.
3300 else
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_prog_rejected=no
3303   ac_dummy="$PATH"
3304   for ac_dir in $ac_dummy; do
3305     test -z "$ac_dir" && ac_dir=.
3306     if test -f $ac_dir/$ac_word; then
3307       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3308         ac_prog_rejected=yes
3309         continue
3310       fi
3311       ac_cv_prog_CC="cc"
3312       break
3313     fi
3314   done
3315   IFS="$ac_save_ifs"
3316 if test $ac_prog_rejected = yes; then
3317   # We found a bogon in the path, so make sure we never use it.
3318   set dummy $ac_cv_prog_CC
3319   shift
3320   if test $# -gt 0; then
3321     # We chose a different compiler from the bogus one.
3322     # However, it has the same basename, so the bogon will be chosen
3323     # first if we set CC to just the basename; use the full file name.
3324     shift
3325     set dummy "$ac_dir/$ac_word" "$@"
3326     shift
3327     ac_cv_prog_CC="$@"
3328   fi
3329 fi
3330 fi
3331 fi
3332 CC="$ac_cv_prog_CC"
3333 if test -n "$CC"; then
3334   echo "$ac_t""$CC" 1>&6
3335 else
3336   echo "$ac_t""no" 1>&6
3337 fi
3338
3339   if test -z "$CC"; then
3340     case "`uname -s`" in
3341     *win32* | *WIN32* | *CYGWIN*)
3342       # Extract the first word of "cl", so it can be a program name with args.
3343 set dummy cl; ac_word=$2
3344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3345 echo "configure:3346: checking for $ac_word" >&5
3346 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   if test -n "$CC"; then
3350   ac_cv_prog_CC="$CC" # Let the user override the test.
3351 else
3352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3353   ac_dummy="$PATH"
3354   for ac_dir in $ac_dummy; do
3355     test -z "$ac_dir" && ac_dir=.
3356     if test -f $ac_dir/$ac_word; then
3357       ac_cv_prog_CC="cl"
3358       break
3359     fi
3360   done
3361   IFS="$ac_save_ifs"
3362 fi
3363 fi
3364 CC="$ac_cv_prog_CC"
3365 if test -n "$CC"; then
3366   echo "$ac_t""$CC" 1>&6
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370  ;;
3371     esac
3372   fi
3373   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3374 fi
3375
3376 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3377 echo "configure:3378: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3378
3379 ac_ext=c
3380 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3381 ac_cpp='$CPP $CPPFLAGS'
3382 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3383 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3384 cross_compiling=$ac_cv_prog_cc_cross
3385
3386 cat > conftest.$ac_ext << EOF
3387
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390
3391 main(){return(0);}
3392 EOF
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3394   ac_cv_prog_cc_works=yes
3395   # If we can't run a trivial program, we are probably using a cross compiler.
3396   if (./conftest; exit) 2>/dev/null; then
3397     ac_cv_prog_cc_cross=no
3398   else
3399     ac_cv_prog_cc_cross=yes
3400   fi
3401 else
3402   echo "configure: failed program was:" >&5
3403   cat conftest.$ac_ext >&5
3404   ac_cv_prog_cc_works=no
3405 fi
3406 rm -fr conftest*
3407 ac_ext=c
3408 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3409 ac_cpp='$CPP $CPPFLAGS'
3410 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3411 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3412 cross_compiling=$ac_cv_prog_cc_cross
3413
3414 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3415 if test $ac_cv_prog_cc_works = no; then
3416   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3417 fi
3418 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3419 echo "configure:3420: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3420 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3421 cross_compiling=$ac_cv_prog_cc_cross
3422
3423 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether we are using GNU C" >&5
3425 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3426   echo $ac_n "(cached) $ac_c" 1>&6
3427 else
3428   cat > conftest.c <<EOF
3429 #ifdef __GNUC__
3430   yes;
3431 #endif
3432 EOF
3433 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3434   ac_cv_prog_gcc=yes
3435 else
3436   ac_cv_prog_gcc=no
3437 fi
3438 fi
3439
3440 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3441
3442 if test $ac_cv_prog_gcc = yes; then
3443   GCC=yes
3444 else
3445   GCC=
3446 fi
3447
3448 ac_test_CFLAGS="${CFLAGS+set}"
3449 ac_save_CFLAGS="$CFLAGS"
3450 CFLAGS=
3451 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3452 echo "configure:3453: checking whether ${CC-cc} accepts -g" >&5
3453 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3454   echo $ac_n "(cached) $ac_c" 1>&6
3455 else
3456   echo 'void f(){}' > conftest.c
3457 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3458   ac_cv_prog_cc_g=yes
3459 else
3460   ac_cv_prog_cc_g=no
3461 fi
3462 rm -f conftest*
3463
3464 fi
3465
3466 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3467 if test "$ac_test_CFLAGS" = set; then
3468   CFLAGS="$ac_save_CFLAGS"
3469 elif test $ac_cv_prog_cc_g = yes; then
3470   if test "$GCC" = yes; then
3471     CFLAGS="-g -O2"
3472   else
3473     CFLAGS="-g"
3474   fi
3475 else
3476   if test "$GCC" = yes; then
3477     CFLAGS="-O2"
3478   else
3479     CFLAGS=
3480   fi
3481 fi
3482
3483 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3484 if test "${with_gnu_ld+set}" = set; then
3485   withval="$with_gnu_ld"
3486   test "$withval" = no || with_gnu_ld=yes
3487 else
3488   with_gnu_ld=no
3489 fi
3490
3491 ac_prog=ld
3492 if test "$GCC" = yes; then
3493   # Check if gcc -print-prog-name=ld gives a path.
3494   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3495 echo "configure:3496: checking for ld used by GCC" >&5
3496   case $host in
3497   *-*-mingw*)
3498     # gcc leaves a trailing carriage return which upsets mingw
3499     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3500   *)
3501     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3502   esac
3503   case $ac_prog in
3504     # Accept absolute paths.
3505     [\\/]* | [A-Za-z]:[\\/]*)
3506       re_direlt='/[^/][^/]*/\.\./'
3507       # Canonicalize the path of ld
3508       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3509       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3510         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3511       done
3512       test -z "$LD" && LD="$ac_prog"
3513       ;;
3514   "")
3515     # If it fails, then pretend we aren't using GCC.
3516     ac_prog=ld
3517     ;;
3518   *)
3519     # If it is relative, then search for the first ld in PATH.
3520     with_gnu_ld=unknown
3521     ;;
3522   esac
3523 elif test "$with_gnu_ld" = yes; then
3524   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3525 echo "configure:3526: checking for GNU ld" >&5
3526 else
3527   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3528 echo "configure:3529: checking for non-GNU ld" >&5
3529 fi
3530 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   if test -z "$LD"; then
3534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3535   for ac_dir in $PATH; do
3536     test -z "$ac_dir" && ac_dir=.
3537     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3538       lt_cv_path_LD="$ac_dir/$ac_prog"
3539       # Check to see if the program is GNU ld.  I'd rather use --version,
3540       # but apparently some GNU ld's only accept -v.
3541       # Break only if it was the GNU/non-GNU ld that we prefer.
3542       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3543         test "$with_gnu_ld" != no && break
3544       else
3545         test "$with_gnu_ld" != yes && break
3546       fi
3547     fi
3548   done
3549   IFS="$ac_save_ifs"
3550 else
3551   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3552 fi
3553 fi
3554
3555 LD="$lt_cv_path_LD"
3556 if test -n "$LD"; then
3557   echo "$ac_t""$LD" 1>&6
3558 else
3559   echo "$ac_t""no" 1>&6
3560 fi
3561 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3562 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3563 echo "configure:3564: checking if the linker ($LD) is GNU ld" >&5
3564 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3568 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3569   lt_cv_prog_gnu_ld=yes
3570 else
3571   lt_cv_prog_gnu_ld=no
3572 fi
3573 fi
3574
3575 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3576 with_gnu_ld=$lt_cv_prog_gnu_ld
3577
3578
3579 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3580 echo "configure:3581: checking for $LD option to reload object files" >&5
3581 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   lt_cv_ld_reload_flag='-r'
3585 fi
3586
3587 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3588 reload_flag=$lt_cv_ld_reload_flag
3589 test -n "$reload_flag" && reload_flag=" $reload_flag"
3590
3591 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3592 echo "configure:3593: checking for BSD-compatible nm" >&5
3593 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   if test -n "$NM"; then
3597   # Let the user override the test.
3598   lt_cv_path_NM="$NM"
3599 else
3600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3601   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3602     test -z "$ac_dir" && ac_dir=.
3603     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3604     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3605       # Check to see if the nm accepts a BSD-compat flag.
3606       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3607       #   nm: unknown option "B" ignored
3608       # Tru64's nm complains that /dev/null is an invalid object file
3609       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3610         lt_cv_path_NM="$tmp_nm -B"
3611         break
3612       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3613         lt_cv_path_NM="$tmp_nm -p"
3614         break
3615       else
3616         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3617         continue # so that we can try to find one that supports BSD flags
3618       fi
3619     fi
3620   done
3621   IFS="$ac_save_ifs"
3622   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3623 fi
3624 fi
3625
3626 NM="$lt_cv_path_NM"
3627 echo "$ac_t""$NM" 1>&6
3628
3629 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3630 echo "configure:3631: checking for a sed that does not truncate output" >&5
3631 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   # Loop through the user's path and test for sed and gsed.
3635 # Then use that list of sed's as ones to test for truncation.
3636 as_executable_p="test -f"
3637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638 for as_dir in $PATH
3639 do
3640   IFS=$as_save_IFS
3641   test -z "$as_dir" && as_dir=.
3642   for ac_prog in sed gsed; do
3643     for ac_exec_ext in '' $ac_executable_extensions; do
3644       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3645         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3646       fi
3647     done
3648   done
3649 done
3650
3651   # Create a temporary directory, and hook for its removal unless debugging.
3652 $debug ||
3653 {
3654   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3655   trap '{ (exit 1); exit 1; }' 1 2 13 15
3656 }
3657
3658 # Create a (secure) tmp directory for tmp files.
3659 : ${TMPDIR=/tmp}
3660 {
3661   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3662   test -n "$tmp" && test -d "$tmp"
3663 }  ||
3664 {
3665   tmp=$TMPDIR/sed$$-$RANDOM
3666   (umask 077 && mkdir $tmp)
3667 } ||
3668 {
3669    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3670    { (exit 1); exit 1; }
3671 }
3672   _max=0
3673   _count=0
3674   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3675   # along with /bin/sed that truncates output.
3676   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3677     test ! -f ${_sed} && break
3678     cat /dev/null > "$tmp/sed.in"
3679     _count=0
3680     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3681     # Check for GNU sed and select it if it is found.
3682     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3683       lt_cv_path_SED=${_sed}
3684       break
3685     fi
3686     while true; do
3687       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3688       mv "$tmp/sed.tmp" "$tmp/sed.in"
3689       cp "$tmp/sed.in" "$tmp/sed.nl"
3690       echo >>"$tmp/sed.nl"
3691       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3692       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3693       # 40000 chars as input seems more than enough
3694       test $_count -gt 10 && break
3695       _count=`expr $_count + 1`
3696       if test $_count -gt $_max; then
3697         _max=$_count
3698         lt_cv_path_SED=$_sed
3699       fi
3700     done
3701   done
3702   rm -rf "$tmp"
3703
3704 fi
3705
3706 if test "X$SED" != "X"; then
3707   lt_cv_path_SED=$SED
3708 else
3709   SED=$lt_cv_path_SED
3710 fi
3711 echo "$ac_t""$SED" 1>&6
3712
3713 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3714 echo "configure:3715: checking whether ln -s works" >&5
3715 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   rm -f conftestdata
3719 if ln -s X conftestdata 2>/dev/null
3720 then
3721   rm -f conftestdata
3722   ac_cv_prog_LN_S="ln -s"
3723 else
3724   ac_cv_prog_LN_S=ln
3725 fi
3726 fi
3727 LN_S="$ac_cv_prog_LN_S"
3728 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3729   echo "$ac_t""yes" 1>&6
3730 else
3731   echo "$ac_t""no" 1>&6
3732 fi
3733
3734 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3735 echo "configure:3736: checking how to recognise dependent libraries" >&5
3736 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   lt_cv_file_magic_cmd='$MAGIC_CMD'
3740 lt_cv_file_magic_test_file=
3741 lt_cv_deplibs_check_method='unknown'
3742 # Need to set the preceding variable on all platforms that support
3743 # interlibrary dependencies.
3744 # 'none' -- dependencies not supported.
3745 # `unknown' -- same as none, but documents that we really don't know.
3746 # 'pass_all' -- all dependencies passed with no checks.
3747 # 'test_compile' -- check by making test program.
3748 # 'file_magic [[regex]]' -- check by looking for files in library path
3749 # which responds to the $file_magic_cmd with a given egrep regex.
3750 # If you have `file' or equivalent on your system and you're not sure
3751 # whether `pass_all' will *always* work, you probably want this one.
3752
3753 case $host_os in
3754 aix4* | aix5*)
3755   lt_cv_deplibs_check_method=pass_all
3756   ;;
3757
3758 beos*)
3759   lt_cv_deplibs_check_method=pass_all
3760   ;;
3761
3762 bsdi4*)
3763   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3764   lt_cv_file_magic_cmd='/usr/bin/file -L'
3765   lt_cv_file_magic_test_file=/shlib/libc.so
3766   ;;
3767
3768 cygwin* | mingw* | pw32*)
3769   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3770   lt_cv_file_magic_cmd='$OBJDUMP -f'
3771   ;;
3772
3773 darwin* | rhapsody*)
3774   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3775   lt_cv_file_magic_cmd='/usr/bin/file -L'
3776   case "$host_os" in
3777   rhapsody* | darwin1.[012])
3778     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3779     ;;
3780   *) # Darwin 1.3 on
3781     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3782     ;;
3783   esac
3784   ;;
3785
3786 freebsd*)
3787   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3788     case $host_cpu in
3789     i*86 )
3790       # Not sure whether the presence of OpenBSD here was a mistake.
3791       # Let's accept both of them until this is cleared up.
3792       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3793       lt_cv_file_magic_cmd=/usr/bin/file
3794       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3795       ;;
3796     esac
3797   else
3798     lt_cv_deplibs_check_method=pass_all
3799   fi
3800   ;;
3801
3802 gnu*)
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805
3806 hpux10.20*|hpux11*)
3807   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3810   ;;
3811
3812 irix5* | irix6* | nonstopux*)
3813   case $host_os in
3814   irix5* | nonstopux*)
3815     # this will be overridden with pass_all, but let us keep it just in case
3816     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3817     ;;
3818   *)
3819     case $LD in
3820     *-32|*"-32 ") libmagic=32-bit;;
3821     *-n32|*"-n32 ") libmagic=N32;;
3822     *-64|*"-64 ") libmagic=64-bit;;
3823     *) libmagic=never-match;;
3824     esac
3825     # this will be overridden with pass_all, but let us keep it just in case
3826     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3827     ;;
3828   esac
3829   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 # This must be Linux ELF.
3834 linux-gnu*)
3835   case $host_cpu in
3836   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3837     lt_cv_deplibs_check_method=pass_all ;;
3838   *)
3839     # glibc up to 2.1.1 does not perform some relocations on ARM
3840     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3841   esac
3842   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3843   ;;
3844
3845 netbsd*)
3846   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3847     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3848   else
3849     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3850   fi
3851   ;;
3852
3853 newos6*)
3854   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3855   lt_cv_file_magic_cmd=/usr/bin/file
3856   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3857   ;;
3858
3859 openbsd*)
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3862   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3863     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3864   else
3865     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3866   fi
3867   ;;
3868
3869 osf3* | osf4* | osf5*)
3870   # this will be overridden with pass_all, but let us keep it just in case
3871   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3872   lt_cv_file_magic_test_file=/shlib/libc.so
3873   lt_cv_deplibs_check_method=pass_all
3874   ;;
3875
3876 sco3.2v5*)
3877   lt_cv_deplibs_check_method=pass_all
3878   ;;
3879
3880 solaris*)
3881   lt_cv_deplibs_check_method=pass_all
3882   lt_cv_file_magic_test_file=/lib/libc.so
3883   ;;
3884
3885 sysv5uw[78]* | sysv4*uw2*)
3886   lt_cv_deplibs_check_method=pass_all
3887   ;;
3888
3889 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3890   case $host_vendor in
3891   motorola)
3892     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]'
3893     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3894     ;;
3895   ncr)
3896     lt_cv_deplibs_check_method=pass_all
3897     ;;
3898   sequent)
3899     lt_cv_file_magic_cmd='/bin/file'
3900     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3901     ;;
3902   sni)
3903     lt_cv_file_magic_cmd='/bin/file'
3904     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3905     lt_cv_file_magic_test_file=/lib/libc.so
3906     ;;
3907   siemens)
3908     lt_cv_deplibs_check_method=pass_all
3909     ;;
3910   esac
3911   ;;
3912 esac
3913
3914 fi
3915
3916 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3917 file_magic_cmd=$lt_cv_file_magic_cmd
3918 deplibs_check_method=$lt_cv_deplibs_check_method
3919
3920 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3921 echo "configure:3922: checking for object suffix" >&5
3922 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   rm -f conftest*
3926 echo 'int i = 1;' > conftest.$ac_ext
3927 if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3928   for ac_file in conftest.*; do
3929     case $ac_file in
3930     *.c) ;;
3931     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3932     esac
3933   done
3934 else
3935   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3936 fi
3937 rm -f conftest*
3938 fi
3939
3940 echo "$ac_t""$ac_cv_objext" 1>&6
3941 OBJEXT=$ac_cv_objext
3942 ac_objext=$ac_cv_objext
3943
3944
3945
3946
3947 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3948 echo "configure:3949: checking for executable suffix" >&5
3949 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3953   ac_cv_exeext=.exe
3954 else
3955   rm -f conftest*
3956   echo 'int main () { return 0; }' > conftest.$ac_ext
3957   ac_cv_exeext=
3958   if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3959     for file in conftest.*; do
3960       case $file in
3961       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3962       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3963       esac
3964     done
3965   else
3966     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3967   fi
3968   rm -f conftest*
3969   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3970 fi
3971 fi
3972
3973 EXEEXT=""
3974 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3975 echo "$ac_t""${ac_cv_exeext}" 1>&6
3976 ac_exeext=$EXEEXT
3977
3978 if test $host != $build; then
3979   ac_tool_prefix=${host_alias}-
3980 else
3981   ac_tool_prefix=
3982 fi
3983
3984
3985
3986
3987 # Check for command to grab the raw symbol name followed by C symbol from nm.
3988 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3989 echo "configure:3990: checking command to parse $NM output" >&5
3990 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   
3994 # These are sane defaults that work on at least a few old systems.
3995 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3996
3997 # Character class describing NM global symbol codes.
3998 symcode='[BCDEGRST]'
3999
4000 # Regexp to match symbols that can be accessed directly from C.
4001 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4002
4003 # Transform the above into a raw symbol and a C symbol.
4004 symxfrm='\1 \2\3 \3'
4005
4006 # Transform an extracted symbol line into a proper C declaration
4007 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4008
4009 # Transform an extracted symbol line into symbol name and symbol address
4010 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'"
4011
4012 # Define system-specific variables.
4013 case $host_os in
4014 aix*)
4015   symcode='[BCDT]'
4016   ;;
4017 cygwin* | mingw* | pw32*)
4018   symcode='[ABCDGISTW]'
4019   ;;
4020 hpux*) # Its linker distinguishes data from code symbols
4021   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4022   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'"
4023   ;;
4024 irix* | nonstopux*)
4025   symcode='[BCDEGRST]'
4026   ;;
4027 osf*)
4028   symcode='[BCDEGQRST]'
4029   ;;
4030 solaris* | sysv5*)
4031   symcode='[BDT]'
4032   ;;
4033 sysv4)
4034   symcode='[DFNSTU]'
4035   ;;
4036 esac
4037
4038 # Handle CRLF in mingw tool chain
4039 opt_cr=
4040 case $host_os in
4041 mingw*)
4042   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4043   ;;
4044 esac
4045
4046 # If we're using GNU nm, then use its standard symbol codes.
4047 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4048   symcode='[ABCDGISTW]'
4049 fi
4050
4051 # Try without a prefix undercore, then with it.
4052 for ac_symprfx in "" "_"; do
4053
4054   # Write the raw and C identifiers.
4055 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4056
4057   # Check to see that the pipe works correctly.
4058   pipe_works=no
4059   rm -f conftest*
4060   cat > conftest.$ac_ext <<EOF
4061 #ifdef __cplusplus
4062 extern "C" {
4063 #endif
4064 char nm_test_var;
4065 void nm_test_func(){}
4066 #ifdef __cplusplus
4067 }
4068 #endif
4069 int main(){nm_test_var='a';nm_test_func();return(0);}
4070 EOF
4071
4072   if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073     # Now try to grab the symbols.
4074     nlist=conftest.nm
4075     if { (eval echo configure:4076: \"$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
4076       # Try sorting and uniquifying the output.
4077       if sort "$nlist" | uniq > "$nlist"T; then
4078         mv -f "$nlist"T "$nlist"
4079       else
4080         rm -f "$nlist"T
4081       fi
4082
4083       # Make sure that we snagged all the symbols we need.
4084       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4085         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4086           cat <<EOF > conftest.$ac_ext
4087 #ifdef __cplusplus
4088 extern "C" {
4089 #endif
4090
4091 EOF
4092           # Now generate the symbol file.
4093           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4094
4095           cat <<EOF >> conftest.$ac_ext
4096 #if defined (__STDC__) && __STDC__
4097 # define lt_ptr void *
4098 #else
4099 # define lt_ptr char *
4100 # define const
4101 #endif
4102
4103 /* The mapping between symbol names and symbols. */
4104 const struct {
4105   const char *name;
4106   lt_ptr address;
4107 }
4108 lt_preloaded_symbols[] =
4109 {
4110 EOF
4111           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4112           cat <<\EOF >> conftest.$ac_ext
4113   {0, (lt_ptr) 0}
4114 };
4115
4116 #ifdef __cplusplus
4117 }
4118 #endif
4119 EOF
4120           # Now try linking the two files.
4121           mv conftest.$ac_objext conftstm.$ac_objext
4122           save_LIBS="$LIBS"
4123           save_CFLAGS="$CFLAGS"
4124           LIBS="conftstm.$ac_objext"
4125           CFLAGS="$CFLAGS$no_builtin_flag"
4126           if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4127             pipe_works=yes
4128           fi
4129           LIBS="$save_LIBS"
4130           CFLAGS="$save_CFLAGS"
4131         else
4132           echo "cannot find nm_test_func in $nlist" >&5
4133         fi
4134       else
4135         echo "cannot find nm_test_var in $nlist" >&5
4136       fi
4137     else
4138       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4139     fi
4140   else
4141     echo "$progname: failed program was:" >&5
4142     cat conftest.$ac_ext >&5
4143   fi
4144   rm -f conftest* conftst*
4145
4146   # Do not use the global_symbol_pipe unless it works.
4147   if test "$pipe_works" = yes; then
4148     break
4149   else
4150     lt_cv_sys_global_symbol_pipe=
4151   fi
4152 done
4153
4154 fi
4155
4156 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4157 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4158   global_symbol_to_cdecl=
4159   global_symbol_to_c_name_address=
4160 else
4161   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4162   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4163 fi
4164 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4165 then
4166   echo "$ac_t""failed" 1>&6
4167 else
4168   echo "$ac_t""ok" 1>&6
4169 fi
4170
4171 for ac_hdr in dlfcn.h
4172 do
4173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4175 echo "configure:4176: checking for $ac_hdr" >&5
4176 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4177   echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179   cat > conftest.$ac_ext <<EOF
4180 #line 4181 "configure"
4181 #include "confdefs.h"
4182 #include <$ac_hdr>
4183 EOF
4184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4185 { (eval echo configure:4186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4187 if test -z "$ac_err"; then
4188   rm -rf conftest*
4189   eval "ac_cv_header_$ac_safe=yes"
4190 else
4191   echo "$ac_err" >&5
4192   echo "configure: failed program was:" >&5
4193   cat conftest.$ac_ext >&5
4194   rm -rf conftest*
4195   eval "ac_cv_header_$ac_safe=no"
4196 fi
4197 rm -f conftest*
4198 fi
4199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4200   echo "$ac_t""yes" 1>&6
4201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4202   cat >> confdefs.h <<EOF
4203 #define $ac_tr_hdr 1
4204 EOF
4205  
4206 else
4207   echo "$ac_t""no" 1>&6
4208 fi
4209 done
4210
4211
4212
4213
4214
4215
4216 # Only perform the check for file, if the check method requires it
4217 case $deplibs_check_method in
4218 file_magic*)
4219   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4220     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4221 echo "configure:4222: checking for ${ac_tool_prefix}file" >&5
4222 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   case $MAGIC_CMD in
4226   /*)
4227   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4228   ;;
4229   ?:/*)
4230   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4231   ;;
4232   *)
4233   ac_save_MAGIC_CMD="$MAGIC_CMD"
4234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4235   ac_dummy="/usr/bin:$PATH"
4236   for ac_dir in $ac_dummy; do
4237     test -z "$ac_dir" && ac_dir=.
4238     if test -f $ac_dir/${ac_tool_prefix}file; then
4239       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4240       if test -n "$file_magic_test_file"; then
4241         case $deplibs_check_method in
4242         "file_magic "*)
4243           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4244           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4245           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4246             egrep "$file_magic_regex" > /dev/null; then
4247             :
4248           else
4249             cat <<EOF 1>&2
4250
4251 *** Warning: the command libtool uses to detect shared libraries,
4252 *** $file_magic_cmd, produces output that libtool cannot recognize.
4253 *** The result is that libtool may fail to recognize shared libraries
4254 *** as such.  This will affect the creation of libtool libraries that
4255 *** depend on shared libraries, but programs linked with such libtool
4256 *** libraries will work regardless of this problem.  Nevertheless, you
4257 *** may want to report the problem to your system manager and/or to
4258 *** bug-libtool@gnu.org
4259
4260 EOF
4261           fi ;;
4262         esac
4263       fi
4264       break
4265     fi
4266   done
4267   IFS="$ac_save_ifs"
4268   MAGIC_CMD="$ac_save_MAGIC_CMD"
4269   ;;
4270 esac
4271 fi
4272
4273 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4274 if test -n "$MAGIC_CMD"; then
4275   echo "$ac_t""$MAGIC_CMD" 1>&6
4276 else
4277   echo "$ac_t""no" 1>&6
4278 fi
4279
4280 if test -z "$lt_cv_path_MAGIC_CMD"; then
4281   if test -n "$ac_tool_prefix"; then
4282     echo $ac_n "checking for file""... $ac_c" 1>&6
4283 echo "configure:4284: checking for file" >&5
4284 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4285   echo $ac_n "(cached) $ac_c" 1>&6
4286 else
4287   case $MAGIC_CMD in
4288   /*)
4289   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4290   ;;
4291   ?:/*)
4292   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4293   ;;
4294   *)
4295   ac_save_MAGIC_CMD="$MAGIC_CMD"
4296   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4297   ac_dummy="/usr/bin:$PATH"
4298   for ac_dir in $ac_dummy; do
4299     test -z "$ac_dir" && ac_dir=.
4300     if test -f $ac_dir/file; then
4301       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4302       if test -n "$file_magic_test_file"; then
4303         case $deplibs_check_method in
4304         "file_magic "*)
4305           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4306           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4307           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4308             egrep "$file_magic_regex" > /dev/null; then
4309             :
4310           else
4311             cat <<EOF 1>&2
4312
4313 *** Warning: the command libtool uses to detect shared libraries,
4314 *** $file_magic_cmd, produces output that libtool cannot recognize.
4315 *** The result is that libtool may fail to recognize shared libraries
4316 *** as such.  This will affect the creation of libtool libraries that
4317 *** depend on shared libraries, but programs linked with such libtool
4318 *** libraries will work regardless of this problem.  Nevertheless, you
4319 *** may want to report the problem to your system manager and/or to
4320 *** bug-libtool@gnu.org
4321
4322 EOF
4323           fi ;;
4324         esac
4325       fi
4326       break
4327     fi
4328   done
4329   IFS="$ac_save_ifs"
4330   MAGIC_CMD="$ac_save_MAGIC_CMD"
4331   ;;
4332 esac
4333 fi
4334
4335 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4336 if test -n "$MAGIC_CMD"; then
4337   echo "$ac_t""$MAGIC_CMD" 1>&6
4338 else
4339   echo "$ac_t""no" 1>&6
4340 fi
4341
4342   else
4343     MAGIC_CMD=:
4344   fi
4345 fi
4346
4347   fi
4348   ;;
4349 esac
4350
4351 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4352 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4354 echo "configure:4355: checking for $ac_word" >&5
4355 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4356   echo $ac_n "(cached) $ac_c" 1>&6
4357 else
4358   if test -n "$RANLIB"; then
4359   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4360 else
4361   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4362   ac_dummy="$PATH"
4363   for ac_dir in $ac_dummy; do
4364     test -z "$ac_dir" && ac_dir=.
4365     if test -f $ac_dir/$ac_word; then
4366       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4367       break
4368     fi
4369   done
4370   IFS="$ac_save_ifs"
4371 fi
4372 fi
4373 RANLIB="$ac_cv_prog_RANLIB"
4374 if test -n "$RANLIB"; then
4375   echo "$ac_t""$RANLIB" 1>&6
4376 else
4377   echo "$ac_t""no" 1>&6
4378 fi
4379
4380
4381 if test -z "$ac_cv_prog_RANLIB"; then
4382 if test -n "$ac_tool_prefix"; then
4383   # Extract the first word of "ranlib", so it can be a program name with args.
4384 set dummy ranlib; ac_word=$2
4385 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4386 echo "configure:4387: checking for $ac_word" >&5
4387 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4388   echo $ac_n "(cached) $ac_c" 1>&6
4389 else
4390   if test -n "$RANLIB"; then
4391   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4392 else
4393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4394   ac_dummy="$PATH"
4395   for ac_dir in $ac_dummy; do
4396     test -z "$ac_dir" && ac_dir=.
4397     if test -f $ac_dir/$ac_word; then
4398       ac_cv_prog_RANLIB="ranlib"
4399       break
4400     fi
4401   done
4402   IFS="$ac_save_ifs"
4403   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4404 fi
4405 fi
4406 RANLIB="$ac_cv_prog_RANLIB"
4407 if test -n "$RANLIB"; then
4408   echo "$ac_t""$RANLIB" 1>&6
4409 else
4410   echo "$ac_t""no" 1>&6
4411 fi
4412
4413 else
4414   RANLIB=":"
4415 fi
4416 fi
4417
4418 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4419 set dummy ${ac_tool_prefix}strip; ac_word=$2
4420 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4421 echo "configure:4422: checking for $ac_word" >&5
4422 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   if test -n "$STRIP"; then
4426   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4427 else
4428   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4429   ac_dummy="$PATH"
4430   for ac_dir in $ac_dummy; do
4431     test -z "$ac_dir" && ac_dir=.
4432     if test -f $ac_dir/$ac_word; then
4433       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4434       break
4435     fi
4436   done
4437   IFS="$ac_save_ifs"
4438 fi
4439 fi
4440 STRIP="$ac_cv_prog_STRIP"
4441 if test -n "$STRIP"; then
4442   echo "$ac_t""$STRIP" 1>&6
4443 else
4444   echo "$ac_t""no" 1>&6
4445 fi
4446
4447
4448 if test -z "$ac_cv_prog_STRIP"; then
4449 if test -n "$ac_tool_prefix"; then
4450   # Extract the first word of "strip", so it can be a program name with args.
4451 set dummy strip; ac_word=$2
4452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4453 echo "configure:4454: checking for $ac_word" >&5
4454 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4455   echo $ac_n "(cached) $ac_c" 1>&6
4456 else
4457   if test -n "$STRIP"; then
4458   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4459 else
4460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4461   ac_dummy="$PATH"
4462   for ac_dir in $ac_dummy; do
4463     test -z "$ac_dir" && ac_dir=.
4464     if test -f $ac_dir/$ac_word; then
4465       ac_cv_prog_STRIP="strip"
4466       break
4467     fi
4468   done
4469   IFS="$ac_save_ifs"
4470   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4471 fi
4472 fi
4473 STRIP="$ac_cv_prog_STRIP"
4474 if test -n "$STRIP"; then
4475   echo "$ac_t""$STRIP" 1>&6
4476 else
4477   echo "$ac_t""no" 1>&6
4478 fi
4479
4480 else
4481   STRIP=":"
4482 fi
4483 fi
4484
4485
4486 enable_dlopen=yes
4487 enable_win32_dll=yes
4488
4489 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4490 if test "${enable_libtool_lock+set}" = set; then
4491   enableval="$enable_libtool_lock"
4492   :
4493 fi
4494
4495 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4496
4497 # Some flags need to be propagated to the compiler or linker for good
4498 # libtool support.
4499 case $host in
4500 *-*-irix6*)
4501   # Find out which ABI we are using.
4502   echo '#line 4503 "configure"' > conftest.$ac_ext
4503   if { (eval echo configure:4504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4504     case `/usr/bin/file conftest.$ac_objext` in
4505     *32-bit*)
4506       LD="${LD-ld} -32"
4507       ;;
4508     *N32*)
4509       LD="${LD-ld} -n32"
4510       ;;
4511     *64-bit*)
4512       LD="${LD-ld} -64"
4513       ;;
4514     esac
4515   fi
4516   rm -rf conftest*
4517   ;;
4518
4519 *-*-sco3.2v5*)
4520   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4521   SAVE_CFLAGS="$CFLAGS"
4522   CFLAGS="$CFLAGS -belf"
4523   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4524 echo "configure:4525: checking whether the C compiler needs -belf" >&5
4525 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4526   echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528   
4529      ac_ext=c
4530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4531 ac_cpp='$CPP $CPPFLAGS'
4532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4534 cross_compiling=$ac_cv_prog_cc_cross
4535
4536      cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539
4540 int main() {
4541
4542 ; return 0; }
4543 EOF
4544 if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4545   rm -rf conftest*
4546   lt_cv_cc_needs_belf=yes
4547 else
4548   echo "configure: failed program was:" >&5
4549   cat conftest.$ac_ext >&5
4550   rm -rf conftest*
4551   lt_cv_cc_needs_belf=no
4552 fi
4553 rm -f conftest*
4554      ac_ext=c
4555 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4556 ac_cpp='$CPP $CPPFLAGS'
4557 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4558 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4559 cross_compiling=$ac_cv_prog_cc_cross
4560
4561 fi
4562
4563 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4564   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4565     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4566     CFLAGS="$SAVE_CFLAGS"
4567   fi
4568   ;;
4569
4570 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4571   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4572 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4574 echo "configure:4575: checking for $ac_word" >&5
4575 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4576   echo $ac_n "(cached) $ac_c" 1>&6
4577 else
4578   if test -n "$DLLTOOL"; then
4579   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4580 else
4581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4582   ac_dummy="$PATH"
4583   for ac_dir in $ac_dummy; do
4584     test -z "$ac_dir" && ac_dir=.
4585     if test -f $ac_dir/$ac_word; then
4586       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4587       break
4588     fi
4589   done
4590   IFS="$ac_save_ifs"
4591 fi
4592 fi
4593 DLLTOOL="$ac_cv_prog_DLLTOOL"
4594 if test -n "$DLLTOOL"; then
4595   echo "$ac_t""$DLLTOOL" 1>&6
4596 else
4597   echo "$ac_t""no" 1>&6
4598 fi
4599
4600
4601 if test -z "$ac_cv_prog_DLLTOOL"; then
4602 if test -n "$ac_tool_prefix"; then
4603   # Extract the first word of "dlltool", so it can be a program name with args.
4604 set dummy dlltool; ac_word=$2
4605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4606 echo "configure:4607: checking for $ac_word" >&5
4607 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4608   echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610   if test -n "$DLLTOOL"; then
4611   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4612 else
4613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4614   ac_dummy="$PATH"
4615   for ac_dir in $ac_dummy; do
4616     test -z "$ac_dir" && ac_dir=.
4617     if test -f $ac_dir/$ac_word; then
4618       ac_cv_prog_DLLTOOL="dlltool"
4619       break
4620     fi
4621   done
4622   IFS="$ac_save_ifs"
4623   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4624 fi
4625 fi
4626 DLLTOOL="$ac_cv_prog_DLLTOOL"
4627 if test -n "$DLLTOOL"; then
4628   echo "$ac_t""$DLLTOOL" 1>&6
4629 else
4630   echo "$ac_t""no" 1>&6
4631 fi
4632
4633 else
4634   DLLTOOL="false"
4635 fi
4636 fi
4637
4638   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4639 set dummy ${ac_tool_prefix}as; ac_word=$2
4640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4641 echo "configure:4642: checking for $ac_word" >&5
4642 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4643   echo $ac_n "(cached) $ac_c" 1>&6
4644 else
4645   if test -n "$AS"; then
4646   ac_cv_prog_AS="$AS" # Let the user override the test.
4647 else
4648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4649   ac_dummy="$PATH"
4650   for ac_dir in $ac_dummy; do
4651     test -z "$ac_dir" && ac_dir=.
4652     if test -f $ac_dir/$ac_word; then
4653       ac_cv_prog_AS="${ac_tool_prefix}as"
4654       break
4655     fi
4656   done
4657   IFS="$ac_save_ifs"
4658 fi
4659 fi
4660 AS="$ac_cv_prog_AS"
4661 if test -n "$AS"; then
4662   echo "$ac_t""$AS" 1>&6
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666
4667
4668 if test -z "$ac_cv_prog_AS"; then
4669 if test -n "$ac_tool_prefix"; then
4670   # Extract the first word of "as", so it can be a program name with args.
4671 set dummy as; ac_word=$2
4672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4673 echo "configure:4674: checking for $ac_word" >&5
4674 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   if test -n "$AS"; then
4678   ac_cv_prog_AS="$AS" # Let the user override the test.
4679 else
4680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4681   ac_dummy="$PATH"
4682   for ac_dir in $ac_dummy; do
4683     test -z "$ac_dir" && ac_dir=.
4684     if test -f $ac_dir/$ac_word; then
4685       ac_cv_prog_AS="as"
4686       break
4687     fi
4688   done
4689   IFS="$ac_save_ifs"
4690   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4691 fi
4692 fi
4693 AS="$ac_cv_prog_AS"
4694 if test -n "$AS"; then
4695   echo "$ac_t""$AS" 1>&6
4696 else
4697   echo "$ac_t""no" 1>&6
4698 fi
4699
4700 else
4701   AS="false"
4702 fi
4703 fi
4704
4705   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4706 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4708 echo "configure:4709: checking for $ac_word" >&5
4709 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4710   echo $ac_n "(cached) $ac_c" 1>&6
4711 else
4712   if test -n "$OBJDUMP"; then
4713   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4714 else
4715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4716   ac_dummy="$PATH"
4717   for ac_dir in $ac_dummy; do
4718     test -z "$ac_dir" && ac_dir=.
4719     if test -f $ac_dir/$ac_word; then
4720       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4721       break
4722     fi
4723   done
4724   IFS="$ac_save_ifs"
4725 fi
4726 fi
4727 OBJDUMP="$ac_cv_prog_OBJDUMP"
4728 if test -n "$OBJDUMP"; then
4729   echo "$ac_t""$OBJDUMP" 1>&6
4730 else
4731   echo "$ac_t""no" 1>&6
4732 fi
4733
4734
4735 if test -z "$ac_cv_prog_OBJDUMP"; then
4736 if test -n "$ac_tool_prefix"; then
4737   # Extract the first word of "objdump", so it can be a program name with args.
4738 set dummy objdump; ac_word=$2
4739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4740 echo "configure:4741: checking for $ac_word" >&5
4741 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   if test -n "$OBJDUMP"; then
4745   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4746 else
4747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4748   ac_dummy="$PATH"
4749   for ac_dir in $ac_dummy; do
4750     test -z "$ac_dir" && ac_dir=.
4751     if test -f $ac_dir/$ac_word; then
4752       ac_cv_prog_OBJDUMP="objdump"
4753       break
4754     fi
4755   done
4756   IFS="$ac_save_ifs"
4757   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4758 fi
4759 fi
4760 OBJDUMP="$ac_cv_prog_OBJDUMP"
4761 if test -n "$OBJDUMP"; then
4762   echo "$ac_t""$OBJDUMP" 1>&6
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766
4767 else
4768   OBJDUMP="false"
4769 fi
4770 fi
4771
4772
4773   # recent cygwin and mingw systems supply a stub DllMain which the user
4774   # can override, but on older systems we have to supply one
4775   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4776 echo "configure:4777: checking if libtool should supply DllMain function" >&5
4777 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4778   echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780   cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783
4784 int main() {
4785 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4786       DllMain (0, 0, 0);
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   lt_cv_need_dllmain=no
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   lt_cv_need_dllmain=yes
4797 fi
4798 rm -f conftest*
4799 fi
4800
4801 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4802
4803   case $host/$CC in
4804   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4805     # old mingw systems require "-dll" to link a DLL, while more recent ones
4806     # require "-mdll"
4807     SAVE_CFLAGS="$CFLAGS"
4808     CFLAGS="$CFLAGS -mdll"
4809     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4810 echo "configure:4811: checking how to link DLLs" >&5
4811 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4812   echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814   cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817
4818 int main() {
4819
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   lt_cv_cc_dll_switch=-mdll
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   lt_cv_cc_dll_switch=-dll
4830 fi
4831 rm -f conftest*
4832 fi
4833
4834 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4835     CFLAGS="$SAVE_CFLAGS" ;;
4836   *-*-cygwin* | *-*-pw32*)
4837     # cygwin systems need to pass --dll to the linker, and not link
4838     # crt.o which will require a WinMain@16 definition.
4839     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4840   esac
4841   ;;
4842   
4843 esac
4844
4845 # Sed substitution that helps us do robust quoting.  It backslashifies
4846 # metacharacters that are still active within double-quoted strings.
4847 Xsed='sed -e s/^X//'
4848 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4849
4850 # Same as above, but do not quote variable references.
4851 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4852
4853 # Sed substitution to delay expansion of an escaped shell variable in a
4854 # double_quote_subst'ed string.
4855 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4856
4857 # Constants:
4858 rm="rm -f"
4859
4860 # Global variables:
4861 default_ofile=libtool
4862 can_build_shared=yes
4863
4864 # All known linkers require a `.a' archive for static linking (except M$VC,
4865 # which needs '.lib').
4866 libext=a
4867 ltmain="$ac_aux_dir/ltmain.sh"
4868 ofile="$default_ofile"
4869 with_gnu_ld="$lt_cv_prog_gnu_ld"
4870 need_locks="$enable_libtool_lock"
4871
4872 old_CC="$CC"
4873 old_CFLAGS="$CFLAGS"
4874
4875 # Set sane defaults for various variables
4876 test -z "$AR" && AR=ar
4877 test -z "$AR_FLAGS" && AR_FLAGS=cru
4878 test -z "$AS" && AS=as
4879 test -z "$CC" && CC=cc
4880 test -z "$DLLTOOL" && DLLTOOL=dlltool
4881 test -z "$LD" && LD=ld
4882 test -z "$LN_S" && LN_S="ln -s"
4883 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4884 test -z "$NM" && NM=nm
4885 test -z "$OBJDUMP" && OBJDUMP=objdump
4886 test -z "$RANLIB" && RANLIB=:
4887 test -z "$STRIP" && STRIP=:
4888 test -z "$ac_objext" && ac_objext=o
4889
4890 if test x"$host" != x"$build"; then
4891   ac_tool_prefix=${host_alias}-
4892 else
4893   ac_tool_prefix=
4894 fi
4895
4896 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4897 case $host_os in
4898 linux-gnu*) ;;
4899 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4900 esac
4901
4902 case $host_os in
4903 aix3*)
4904   # AIX sometimes has problems with the GCC collect2 program.  For some
4905   # reason, if we set the COLLECT_NAMES environment variable, the problems
4906   # vanish in a puff of smoke.
4907   if test "X${COLLECT_NAMES+set}" != Xset; then
4908     COLLECT_NAMES=
4909     export COLLECT_NAMES
4910   fi
4911   ;;
4912 esac
4913
4914 # Determine commands to create old-style static archives.
4915 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4916 old_postinstall_cmds='chmod 644 $oldlib'
4917 old_postuninstall_cmds=
4918
4919 if test -n "$RANLIB"; then
4920   case $host_os in
4921   openbsd*)
4922     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4923     ;;
4924   *)
4925     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4926     ;;
4927   esac
4928   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4929 fi
4930
4931 # Allow CC to be a program name with arguments.
4932 set dummy $CC
4933 compiler="$2"
4934
4935 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4936 echo "configure:4937: checking for objdir" >&5
4937 rm -f .libs 2>/dev/null
4938 mkdir .libs 2>/dev/null
4939 if test -d .libs; then
4940   objdir=.libs
4941 else
4942   # MS-DOS does not allow filenames that begin with a dot.
4943   objdir=_libs
4944 fi
4945 rmdir .libs 2>/dev/null
4946 echo "$ac_t""$objdir" 1>&6
4947
4948
4949 # Check whether --with-pic or --without-pic was given.
4950 if test "${with_pic+set}" = set; then
4951   withval="$with_pic"
4952   pic_mode="$withval"
4953 else
4954   pic_mode=default
4955 fi
4956
4957 test -z "$pic_mode" && pic_mode=default
4958
4959 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4960 # in isolation, and that seeing it set (from the cache) indicates that
4961 # the associated values are set (in the cache) correctly too.
4962 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4963 echo "configure:4964: checking for $compiler option to produce PIC" >&5
4964 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4965   echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967    lt_cv_prog_cc_pic=
4968   lt_cv_prog_cc_shlib=
4969   lt_cv_prog_cc_wl=
4970   lt_cv_prog_cc_static=
4971   lt_cv_prog_cc_no_builtin=
4972   lt_cv_prog_cc_can_build_shared=$can_build_shared
4973
4974   if test "$GCC" = yes; then
4975     lt_cv_prog_cc_wl='-Wl,'
4976     lt_cv_prog_cc_static='-static'
4977
4978     case $host_os in
4979     aix*)
4980       # Below there is a dirty hack to force normal static linking with -ldl
4981       # The problem is because libdl dynamically linked with both libc and
4982       # libC (AIX C++ library), which obviously doesn't included in libraries
4983       # list by gcc. This cause undefined symbols with -static flags.
4984       # This hack allows C programs to be linked with "-static -ldl", but
4985       # not sure about C++ programs.
4986       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4987       ;;
4988     amigaos*)
4989       # FIXME: we need at least 68020 code to build shared libraries, but
4990       # adding the `-m68020' flag to GCC prevents building anything better,
4991       # like `-m68040'.
4992       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4993       ;;
4994     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4995       # PIC is the default for these OSes.
4996       ;;
4997     darwin* | rhapsody*)
4998       # PIC is the default on this platform
4999       # Common symbols not allowed in MH_DYLIB files
5000       lt_cv_prog_cc_pic='-fno-common'
5001       ;;
5002     cygwin* | mingw* | pw32* | os2*)
5003       # This hack is so that the source file can tell whether it is being
5004       # built for inclusion in a dll (and should export symbols for example).
5005       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5006       ;;
5007     sysv4*MP*)
5008       if test -d /usr/nec; then
5009          lt_cv_prog_cc_pic=-Kconform_pic
5010       fi
5011       ;;
5012     *)
5013       lt_cv_prog_cc_pic='-fPIC'
5014       ;;
5015     esac
5016   else
5017     # PORTME Check for PIC flags for the system compiler.
5018     case $host_os in
5019     aix3* | aix4* | aix5*)
5020       lt_cv_prog_cc_wl='-Wl,'
5021       # All AIX code is PIC.
5022       if test "$host_cpu" = ia64; then
5023         # AIX 5 now supports IA64 processor
5024         lt_cv_prog_cc_static='-Bstatic'
5025       else
5026         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5027       fi
5028       ;;
5029
5030     hpux9* | hpux10* | hpux11*)
5031       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5032       lt_cv_prog_cc_wl='-Wl,'
5033       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5034       lt_cv_prog_cc_pic='+Z'
5035       ;;
5036
5037     irix5* | irix6* | nonstopux*)
5038       lt_cv_prog_cc_wl='-Wl,'
5039       lt_cv_prog_cc_static='-non_shared'
5040       # PIC (with -KPIC) is the default.
5041       ;;
5042
5043     cygwin* | mingw* | pw32* | os2*)
5044       # This hack is so that the source file can tell whether it is being
5045       # built for inclusion in a dll (and should export symbols for example).
5046       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5047       ;;
5048
5049     newsos6)
5050       lt_cv_prog_cc_pic='-KPIC'
5051       lt_cv_prog_cc_static='-Bstatic'
5052       ;;
5053
5054     osf3* | osf4* | osf5*)
5055       # All OSF/1 code is PIC.
5056       lt_cv_prog_cc_wl='-Wl,'
5057       lt_cv_prog_cc_static='-non_shared'
5058       ;;
5059
5060     sco3.2v5*)
5061       lt_cv_prog_cc_pic='-Kpic'
5062       lt_cv_prog_cc_static='-dn'
5063       lt_cv_prog_cc_shlib='-belf'
5064       ;;
5065
5066     solaris*)
5067       lt_cv_prog_cc_pic='-KPIC'
5068       lt_cv_prog_cc_static='-Bstatic'
5069       lt_cv_prog_cc_wl='-Wl,'
5070       ;;
5071
5072     sunos4*)
5073       lt_cv_prog_cc_pic='-PIC'
5074       lt_cv_prog_cc_static='-Bstatic'
5075       lt_cv_prog_cc_wl='-Qoption ld '
5076       ;;
5077
5078     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5079       lt_cv_prog_cc_pic='-KPIC'
5080       lt_cv_prog_cc_static='-Bstatic'
5081       lt_cv_prog_cc_wl='-Wl,'
5082       ;;
5083
5084     uts4*)
5085       lt_cv_prog_cc_pic='-pic'
5086       lt_cv_prog_cc_static='-Bstatic'
5087       ;;
5088
5089     sysv4*MP*)
5090       if test -d /usr/nec ;then
5091         lt_cv_prog_cc_pic='-Kconform_pic'
5092         lt_cv_prog_cc_static='-Bstatic'
5093       fi
5094       ;;
5095
5096     *)
5097       lt_cv_prog_cc_can_build_shared=no
5098       ;;
5099     esac
5100   fi
5101
5102 fi
5103
5104 if test -z "$lt_cv_prog_cc_pic"; then
5105   echo "$ac_t""none" 1>&6
5106 else
5107   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5108
5109   # Check to make sure the pic_flag actually works.
5110   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5111 echo "configure:5112: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5112   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5113   echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115       save_CFLAGS="$CFLAGS"
5116     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5117     cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120
5121 int main() {
5122
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5126   rm -rf conftest*
5127         case $host_os in
5128       hpux9* | hpux10* | hpux11*)
5129         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5130         # they create non-PIC objects.  So, if there were any warnings, we
5131         # assume that PIC is not supported.
5132         if test -s conftest.err; then
5133           lt_cv_prog_cc_pic_works=no
5134         else
5135           lt_cv_prog_cc_pic_works=yes
5136         fi
5137         ;;
5138       *)
5139         lt_cv_prog_cc_pic_works=yes
5140         ;;
5141       esac
5142     
5143 else
5144   echo "configure: failed program was:" >&5
5145   cat conftest.$ac_ext >&5
5146   rm -rf conftest*
5147         lt_cv_prog_cc_pic_works=no
5148     
5149 fi
5150 rm -f conftest*
5151     CFLAGS="$save_CFLAGS"
5152   
5153 fi
5154
5155
5156   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5157     lt_cv_prog_cc_pic=
5158     lt_cv_prog_cc_can_build_shared=no
5159   else
5160     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5161   fi
5162
5163   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5164 fi
5165
5166 # Check for any special shared library compilation flags.
5167 if test -n "$lt_cv_prog_cc_shlib"; then
5168   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5169   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5170   else
5171    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5172     lt_cv_prog_cc_can_build_shared=no
5173   fi
5174 fi
5175
5176 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5177 echo "configure:5178: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5178 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181     lt_cv_prog_cc_static_works=no
5182   save_LDFLAGS="$LDFLAGS"
5183   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5184   cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187
5188 int main() {
5189
5190 ; return 0; }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193   rm -rf conftest*
5194   lt_cv_prog_cc_static_works=yes
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198 fi
5199 rm -f conftest*
5200   LDFLAGS="$save_LDFLAGS"
5201
5202 fi
5203
5204
5205 # Belt *and* braces to stop my trousers falling down:
5206 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5207 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5208
5209 pic_flag="$lt_cv_prog_cc_pic"
5210 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5211 wl="$lt_cv_prog_cc_wl"
5212 link_static_flag="$lt_cv_prog_cc_static"
5213 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5214 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5215
5216
5217 # Check to see if options -o and -c are simultaneously supported by compiler
5218 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5219 echo "configure:5220: checking if $compiler supports -c -o file.$ac_objext" >&5
5220 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223   
5224 $rm -r conftest 2>/dev/null
5225 mkdir conftest
5226 cd conftest
5227 echo "int some_variable = 0;" > conftest.$ac_ext
5228 mkdir out
5229 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5230 # that will create temporary files in the current directory regardless of
5231 # the output directory.  Thus, making CWD read-only will cause this test
5232 # to fail, enabling locking or at least warning the user not to do parallel
5233 # builds.
5234 chmod -w .
5235 save_CFLAGS="$CFLAGS"
5236 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5237 compiler_c_o=no
5238 if { (eval echo configure:5239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5239   # The compiler can only warn and ignore the option if not recognized
5240   # So say no if there are warnings
5241   if test -s out/conftest.err; then
5242     lt_cv_compiler_c_o=no
5243   else
5244     lt_cv_compiler_c_o=yes
5245   fi
5246 else
5247   # Append any errors to the config.log.
5248   cat out/conftest.err 1>&5
5249   lt_cv_compiler_c_o=no
5250 fi
5251 CFLAGS="$save_CFLAGS"
5252 chmod u+w .
5253 $rm conftest* out/*
5254 rmdir out
5255 cd ..
5256 rmdir conftest
5257 $rm -r conftest 2>/dev/null
5258
5259 fi
5260
5261 compiler_c_o=$lt_cv_compiler_c_o
5262 echo "$ac_t""$compiler_c_o" 1>&6
5263
5264 if test x"$compiler_c_o" = x"yes"; then
5265   # Check to see if we can write to a .lo
5266   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5267 echo "configure:5268: checking if $compiler supports -c -o file.lo" >&5
5268   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5269   echo $ac_n "(cached) $ac_c" 1>&6
5270 else
5271   
5272   lt_cv_compiler_o_lo=no
5273   save_CFLAGS="$CFLAGS"
5274   CFLAGS="$CFLAGS -c -o conftest.lo"
5275   save_objext="$ac_objext"
5276   ac_objext=lo
5277   cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280
5281 int main() {
5282 int some_variable = 0;
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5286   rm -rf conftest*
5287       # The compiler can only warn and ignore the option if not recognized
5288     # So say no if there are warnings
5289     if test -s conftest.err; then
5290       lt_cv_compiler_o_lo=no
5291     else
5292       lt_cv_compiler_o_lo=yes
5293     fi
5294   
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298 fi
5299 rm -f conftest*
5300   ac_objext="$save_objext"
5301   CFLAGS="$save_CFLAGS"
5302   
5303 fi
5304
5305   compiler_o_lo=$lt_cv_compiler_o_lo
5306   echo "$ac_t""$compiler_o_lo" 1>&6
5307 else
5308   compiler_o_lo=no
5309 fi
5310
5311 # Check to see if we can do hard links to lock some files if needed
5312 hard_links="nottested"
5313 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5314   # do not overwrite the value of need_locks provided by the user
5315   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5316 echo "configure:5317: checking if we can lock with hard links" >&5
5317   hard_links=yes
5318   $rm conftest*
5319   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5320   touch conftest.a
5321   ln conftest.a conftest.b 2>&5 || hard_links=no
5322   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5323   echo "$ac_t""$hard_links" 1>&6
5324   if test "$hard_links" = no; then
5325     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5326     need_locks=warn
5327   fi
5328 else
5329   need_locks=no
5330 fi
5331
5332 if test "$GCC" = yes; then
5333   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5334   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5335 echo "configure:5336: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5336   echo "int some_variable = 0;" > conftest.$ac_ext
5337   save_CFLAGS="$CFLAGS"
5338   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5339   compiler_rtti_exceptions=no
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343
5344 int main() {
5345 int some_variable = 0;
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5349   rm -rf conftest*
5350       # The compiler can only warn and ignore the option if not recognized
5351     # So say no if there are warnings
5352     if test -s conftest.err; then
5353       compiler_rtti_exceptions=no
5354     else
5355       compiler_rtti_exceptions=yes
5356     fi
5357   
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361 fi
5362 rm -f conftest*
5363   CFLAGS="$save_CFLAGS"
5364   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5365
5366   if test "$compiler_rtti_exceptions" = "yes"; then
5367     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5368   else
5369     no_builtin_flag=' -fno-builtin'
5370   fi
5371 fi
5372
5373 # See if the linker supports building shared libraries.
5374 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5375 echo "configure:5376: checking whether the linker ($LD) supports shared libraries" >&5
5376
5377 allow_undefined_flag=
5378 no_undefined_flag=
5379 need_lib_prefix=unknown
5380 need_version=unknown
5381 # when you set need_version to no, make sure it does not cause -set_version
5382 # flags to be left without arguments
5383 archive_cmds=
5384 archive_expsym_cmds=
5385 old_archive_from_new_cmds=
5386 old_archive_from_expsyms_cmds=
5387 export_dynamic_flag_spec=
5388 whole_archive_flag_spec=
5389 thread_safe_flag_spec=
5390 hardcode_into_libs=no
5391 hardcode_libdir_flag_spec=
5392 hardcode_libdir_separator=
5393 hardcode_direct=no
5394 hardcode_minus_L=no
5395 hardcode_shlibpath_var=unsupported
5396 runpath_var=
5397 link_all_deplibs=unknown
5398 always_export_symbols=no
5399 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5400 # include_expsyms should be a list of space-separated symbols to be *always*
5401 # included in the symbol list
5402 include_expsyms=
5403 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5404 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5405 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5406 # as well as any symbol that contains `d'.
5407 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5408 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5409 # platforms (ab)use it in PIC code, but their linkers get confused if
5410 # the symbol is explicitly referenced.  Since portable code cannot
5411 # rely on this symbol name, it's probably fine to never include it in
5412 # preloaded symbol tables.
5413 extract_expsyms_cmds=
5414
5415 case $host_os in
5416 cygwin* | mingw* | pw32*)
5417   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5418   # When not using gcc, we currently assume that we are using
5419   # Microsoft Visual C++.
5420   if test "$GCC" != yes; then
5421     with_gnu_ld=no
5422   fi
5423   ;;
5424 openbsd*)
5425   with_gnu_ld=no
5426   ;;
5427 esac
5428
5429 ld_shlibs=yes
5430 if test "$with_gnu_ld" = yes; then
5431   # If archive_cmds runs LD, not CC, wlarc should be empty
5432   wlarc='${wl}'
5433
5434   # See if GNU ld supports shared libraries.
5435   case $host_os in
5436   aix3* | aix4* | aix5*)
5437     # On AIX, the GNU linker is very broken
5438     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5439     ld_shlibs=no
5440     cat <<EOF 1>&2
5441
5442 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5443 *** to be unable to reliably create shared libraries on AIX.
5444 *** Therefore, libtool is disabling shared libraries support.  If you
5445 *** really care for shared libraries, you may want to modify your PATH
5446 *** so that a non-GNU linker is found, and then restart.
5447
5448 EOF
5449     ;;
5450
5451   amigaos*)
5452     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)'
5453     hardcode_libdir_flag_spec='-L$libdir'
5454     hardcode_minus_L=yes
5455
5456     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5457     # that the semantics of dynamic libraries on AmigaOS, at least up
5458     # to version 4, is to share data among multiple programs linked
5459     # with the same dynamic library.  Since this doesn't match the
5460     # behavior of shared libraries on other platforms, we can use
5461     # them.
5462     ld_shlibs=no
5463     ;;
5464
5465   beos*)
5466     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5467       allow_undefined_flag=unsupported
5468       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5469       # support --undefined.  This deserves some investigation.  FIXME
5470       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5471     else
5472       ld_shlibs=no
5473     fi
5474     ;;
5475
5476   cygwin* | mingw* | pw32*)
5477     # hardcode_libdir_flag_spec is actually meaningless, as there is
5478     # no search path for DLLs.
5479     hardcode_libdir_flag_spec='-L$libdir'
5480     allow_undefined_flag=unsupported
5481     always_export_symbols=yes
5482
5483     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5484       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5485       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5486       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5487       else $CC -o impgen impgen.c ; fi)~
5488       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5489
5490     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5491
5492     # cygwin and mingw dlls have different entry points and sets of symbols
5493     # to exclude.
5494     # FIXME: what about values for MSVC?
5495     dll_entry=__cygwin_dll_entry@12
5496     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5497     case $host_os in
5498     mingw*)
5499       # mingw values
5500       dll_entry=_DllMainCRTStartup@12
5501       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5502       ;;
5503     esac
5504
5505     # mingw and cygwin differ, and it's simplest to just exclude the union
5506     # of the two symbol sets.
5507     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5508
5509     # recent cygwin and mingw systems supply a stub DllMain which the user
5510     # can override, but on older systems we have to supply one (in ltdll.c)
5511     if test "x$lt_cv_need_dllmain" = "xyes"; then
5512       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5513       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~
5514         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5515     else
5516       ltdll_obj=
5517       ltdll_cmds=
5518     fi
5519
5520     # Extract the symbol export list from an `--export-all' def file,
5521     # then regenerate the def file from the symbol export list, so that
5522     # the compiled dll only exports the symbol export list.
5523     # Be careful not to strip the DATA tag left be newer dlltools.
5524     export_symbols_cmds="$ltdll_cmds"'
5525       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5526       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5527
5528     # If the export-symbols file already is a .def file (1st line
5529     # is EXPORTS), use it as is.
5530     # If DATA tags from a recent dlltool are present, honour them!
5531     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5532         cp $export_symbols $output_objdir/$soname-def;
5533       else
5534         echo EXPORTS > $output_objdir/$soname-def;
5535         _lt_hint=1;
5536         cat $export_symbols | while read symbol; do
5537          set dummy \$symbol;
5538          case \$# in
5539            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5540            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5541            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5542          esac;
5543          _lt_hint=`expr 1 + \$_lt_hint`;
5544         done;
5545       fi~
5546       '"$ltdll_cmds"'
5547       $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~
5548       $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~
5549       $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~
5550       $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~
5551       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5552     ;;
5553
5554   netbsd*)
5555     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5556       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5557       wlarc=
5558     else
5559       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5560       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5561     fi
5562     ;;
5563
5564   solaris* | sysv5*)
5565     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5566       ld_shlibs=no
5567       cat <<EOF 1>&2
5568
5569 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5570 *** create shared libraries on Solaris systems.  Therefore, libtool
5571 *** is disabling shared libraries support.  We urge you to upgrade GNU
5572 *** binutils to release 2.9.1 or newer.  Another option is to modify
5573 *** your PATH or compiler configuration so that the native linker is
5574 *** used, and then restart.
5575
5576 EOF
5577     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5578       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5579       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5580     else
5581       ld_shlibs=no
5582     fi
5583     ;;
5584
5585   sunos4*)
5586     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5587     wlarc=
5588     hardcode_direct=yes
5589     hardcode_shlibpath_var=no
5590     ;;
5591
5592   *)
5593     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5594       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5595       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5596     else
5597       ld_shlibs=no
5598     fi
5599     ;;
5600   esac
5601
5602   if test "$ld_shlibs" = yes; then
5603     runpath_var=LD_RUN_PATH
5604     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5605     export_dynamic_flag_spec='${wl}--export-dynamic'
5606     case $host_os in
5607     cygwin* | mingw* | pw32*)
5608       # dlltool doesn't understand --whole-archive et. al.
5609       whole_archive_flag_spec=
5610       ;;
5611     *)
5612       # ancient GNU ld didn't support --whole-archive et. al.
5613       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5614         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5615       else
5616         whole_archive_flag_spec=
5617       fi
5618       ;;
5619     esac
5620   fi
5621 else
5622   # PORTME fill in a description of your system's linker (not GNU ld)
5623   case $host_os in
5624   aix3*)
5625     allow_undefined_flag=unsupported
5626     always_export_symbols=yes
5627     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'
5628     # Note: this linker hardcodes the directories in LIBPATH if there
5629     # are no directories specified by -L.
5630     hardcode_minus_L=yes
5631     if test "$GCC" = yes && test -z "$link_static_flag"; then
5632       # Neither direct hardcoding nor static linking is supported with a
5633       # broken collect2.
5634       hardcode_direct=unsupported
5635     fi
5636     ;;
5637
5638   aix4* | aix5*)
5639     if test "$host_cpu" = ia64; then
5640       # On IA64, the linker does run time linking by default, so we don't
5641       # have to do anything special.
5642       aix_use_runtimelinking=no
5643       exp_sym_flag='-Bexport'
5644       no_entry_flag=""
5645     else
5646       aix_use_runtimelinking=no
5647
5648       # Test if we are trying to use run time linking or normal
5649       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5650       # need to do runtime linking.
5651       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5652         for ld_flag in $LDFLAGS; do
5653           case $ld_flag in
5654           *-brtl*)
5655             aix_use_runtimelinking=yes
5656             break
5657           ;;
5658           esac
5659         done
5660       esac
5661
5662       exp_sym_flag='-bexport'
5663       no_entry_flag='-bnoentry'
5664     fi
5665
5666     # When large executables or shared objects are built, AIX ld can
5667     # have problems creating the table of contents.  If linking a library
5668     # or program results in "error TOC overflow" add -mminimal-toc to
5669     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5670     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5671
5672     hardcode_direct=yes
5673     archive_cmds=''
5674     hardcode_libdir_separator=':'
5675     if test "$GCC" = yes; then
5676       case $host_os in aix4.[012]|aix4.[012].*)
5677         collect2name=`${CC} -print-prog-name=collect2`
5678         if test -f "$collect2name" && \
5679           strings "$collect2name" | grep resolve_lib_name >/dev/null
5680         then
5681           # We have reworked collect2
5682           hardcode_direct=yes
5683         else
5684           # We have old collect2
5685           hardcode_direct=unsupported
5686           # It fails to find uninstalled libraries when the uninstalled
5687           # path is not listed in the libpath.  Setting hardcode_minus_L
5688           # to unsupported forces relinking
5689           hardcode_minus_L=yes
5690           hardcode_libdir_flag_spec='-L$libdir'
5691           hardcode_libdir_separator=
5692         fi
5693       esac
5694
5695       shared_flag='-shared'
5696     else
5697       # not using gcc
5698       if test "$host_cpu" = ia64; then
5699         shared_flag='${wl}-G'
5700       else
5701         if test "$aix_use_runtimelinking" = yes; then
5702           shared_flag='${wl}-G'
5703         else
5704           shared_flag='${wl}-bM:SRE'
5705         fi
5706       fi
5707     fi
5708
5709     # It seems that -bexpall can do strange things, so it is better to
5710     # generate a list of symbols to export.
5711     always_export_symbols=yes
5712     if test "$aix_use_runtimelinking" = yes; then
5713       # Warning - without using the other runtime loading flags (-brtl),
5714       # -berok will link without error, but may produce a broken library.
5715       allow_undefined_flag='-berok'
5716       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5717       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"
5718     else
5719       if test "$host_cpu" = ia64; then
5720         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5721         allow_undefined_flag="-z nodefs"
5722         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"
5723       else
5724         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5725         # Warning - without using the other run time loading flags,
5726         # -berok will link without error, but may produce a broken library.
5727         allow_undefined_flag='${wl}-berok'
5728         # This is a bit strange, but is similar to how AIX traditionally builds
5729         # it's shared libraries.
5730         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'
5731       fi
5732     fi
5733     ;;
5734
5735   amigaos*)
5736     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)'
5737     hardcode_libdir_flag_spec='-L$libdir'
5738     hardcode_minus_L=yes
5739     # see comment about different semantics on the GNU ld section
5740     ld_shlibs=no
5741     ;;
5742
5743   cygwin* | mingw* | pw32*)
5744     # When not using gcc, we currently assume that we are using
5745     # Microsoft Visual C++.
5746     # hardcode_libdir_flag_spec is actually meaningless, as there is
5747     # no search path for DLLs.
5748     hardcode_libdir_flag_spec=' '
5749     allow_undefined_flag=unsupported
5750     # Tell ltmain to make .lib files, not .a files.
5751     libext=lib
5752     # FIXME: Setting linknames here is a bad hack.
5753     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5754     # The linker will automatically build a .lib file if we build a DLL.
5755     old_archive_from_new_cmds='true'
5756     # FIXME: Should let the user specify the lib program.
5757     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5758     fix_srcfile_path='`cygpath -w "$srcfile"`'
5759     ;;
5760
5761   darwin* | rhapsody*)
5762     case "$host_os" in
5763     rhapsody* | darwin1.[012])
5764       allow_undefined_flag='-undefined suppress'
5765       ;;
5766     *) # Darwin 1.3 on
5767       allow_undefined_flag='-flat_namespace -undefined suppress'
5768       ;;
5769     esac
5770     # FIXME: Relying on posixy $() will cause problems for
5771     #        cross-compilation, but unfortunately the echo tests do not
5772     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5773     #        `"' quotes if we put them in here... so don't!
5774     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)'
5775     # We need to add '_' to the symbols in $export_symbols first
5776     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5777     hardcode_direct=yes
5778     hardcode_shlibpath_var=no
5779     whole_archive_flag_spec='-all_load $convenience'
5780     ;;
5781
5782   freebsd1*)
5783     ld_shlibs=no
5784     ;;
5785
5786   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5787   # support.  Future versions do this automatically, but an explicit c++rt0.o
5788   # does not break anything, and helps significantly (at the cost of a little
5789   # extra space).
5790   freebsd2.2*)
5791     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5792     hardcode_libdir_flag_spec='-R$libdir'
5793     hardcode_direct=yes
5794     hardcode_shlibpath_var=no
5795     ;;
5796
5797   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5798   freebsd2*)
5799     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5800     hardcode_direct=yes
5801     hardcode_minus_L=yes
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5806   freebsd*)
5807     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5808     hardcode_libdir_flag_spec='-R$libdir'
5809     hardcode_direct=yes
5810     hardcode_shlibpath_var=no
5811     ;;
5812
5813   hpux9* | hpux10* | hpux11*)
5814     case $host_os in
5815     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' ;;
5816     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5817     esac
5818     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5819     hardcode_libdir_separator=:
5820     hardcode_direct=yes
5821     hardcode_minus_L=yes # Not in the search PATH, but as the default
5822                          # location of the library.
5823     export_dynamic_flag_spec='${wl}-E'
5824     ;;
5825
5826   irix5* | irix6* | nonstopux*)
5827     if test "$GCC" = yes; then
5828       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'
5829       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5830     else
5831       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'
5832       hardcode_libdir_flag_spec='-rpath $libdir'
5833     fi
5834     hardcode_libdir_separator=:
5835     link_all_deplibs=yes
5836     ;;
5837
5838   netbsd*)
5839     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5840       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5841     else
5842       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5843     fi
5844     hardcode_libdir_flag_spec='-R$libdir'
5845     hardcode_direct=yes
5846     hardcode_shlibpath_var=no
5847     ;;
5848
5849   newsos6)
5850     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5851     hardcode_direct=yes
5852     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5853     hardcode_libdir_separator=:
5854     hardcode_shlibpath_var=no
5855     ;;
5856
5857   openbsd*)
5858     hardcode_direct=yes
5859     hardcode_shlibpath_var=no
5860     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5861       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5862       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5863       export_dynamic_flag_spec='${wl}-E'
5864     else
5865       case "$host_os" in
5866       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5867         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5868         hardcode_libdir_flag_spec='-R$libdir'
5869         ;;
5870       *)
5871         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5872         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5873         ;;
5874       esac
5875     fi
5876     ;;
5877
5878   os2*)
5879     hardcode_libdir_flag_spec='-L$libdir'
5880     hardcode_minus_L=yes
5881     allow_undefined_flag=unsupported
5882     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'
5883     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5884     ;;
5885
5886   osf3*)
5887     if test "$GCC" = yes; then
5888       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5889       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'
5890     else
5891       allow_undefined_flag=' -expect_unresolved \*'
5892       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'
5893     fi
5894     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5895     hardcode_libdir_separator=:
5896     ;;
5897
5898   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5899     if test "$GCC" = yes; then
5900       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5901       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5902       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5903     else
5904       allow_undefined_flag=' -expect_unresolved \*'
5905       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'
5906       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5907       $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'
5908
5909       #Both c and cxx compiler support -rpath directly
5910       hardcode_libdir_flag_spec='-rpath $libdir'
5911     fi
5912     hardcode_libdir_separator=:
5913     ;;
5914
5915   sco3.2v5*)
5916     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5917     hardcode_shlibpath_var=no
5918     runpath_var=LD_RUN_PATH
5919     hardcode_runpath_var=yes
5920     export_dynamic_flag_spec='${wl}-Bexport'
5921     ;;
5922
5923   solaris*)
5924     # gcc --version < 3.0 without binutils cannot create self contained
5925     # shared libraries reliably, requiring libgcc.a to resolve some of
5926     # the object symbols generated in some cases.  Libraries that use
5927     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5928     # a copy of libgcc.a into every shared library to guarantee resolving
5929     # such symbols causes other problems:  According to Tim Van Holder
5930     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5931     # (to the application) exception stack for one thing.
5932     no_undefined_flag=' -z defs'
5933     if test "$GCC" = yes; then
5934       case `$CC --version 2>/dev/null` in
5935       [12].*)
5936         cat <<EOF 1>&2
5937
5938 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5939 *** create self contained shared libraries on Solaris systems, without
5940 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5941 *** -no-undefined support, which will at least allow you to build shared
5942 *** libraries.  However, you may find that when you link such libraries
5943 *** into an application without using GCC, you have to manually add
5944 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5945 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5946 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5947
5948 EOF
5949         no_undefined_flag=
5950         ;;
5951       esac
5952     fi
5953     # $CC -shared without GNU ld will not create a library from C++
5954     # object files and a static libstdc++, better avoid it by now
5955     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5956     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5957                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5958     hardcode_libdir_flag_spec='-R$libdir'
5959     hardcode_shlibpath_var=no
5960     case $host_os in
5961     solaris2.[0-5] | solaris2.[0-5].*) ;;
5962     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5963       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5964     esac
5965     link_all_deplibs=yes
5966     ;;
5967
5968   sunos4*)
5969     if test "x$host_vendor" = xsequent; then
5970       # Use $CC to link under sequent, because it throws in some extra .o
5971       # files that make .init and .fini sections work.
5972       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5973     else
5974       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5975     fi
5976     hardcode_libdir_flag_spec='-L$libdir'
5977     hardcode_direct=yes
5978     hardcode_minus_L=yes
5979     hardcode_shlibpath_var=no
5980     ;;
5981
5982   sysv4)
5983     case $host_vendor in
5984       sni)
5985         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986         hardcode_direct=yes # is this really true???
5987         ;;
5988       siemens)
5989         ## LD is ld it makes a PLAMLIB
5990         ## CC just makes a GrossModule.
5991         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5992         reload_cmds='$CC -r -o $output$reload_objs'
5993         hardcode_direct=no
5994         ;;
5995       motorola)
5996         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5997         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5998         ;;
5999     esac
6000     runpath_var='LD_RUN_PATH'
6001     hardcode_shlibpath_var=no
6002     ;;
6003
6004   sysv4.3*)
6005     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6006     hardcode_shlibpath_var=no
6007     export_dynamic_flag_spec='-Bexport'
6008     ;;
6009
6010   sysv5*)
6011     no_undefined_flag=' -z text'
6012     # $CC -shared without GNU ld will not create a library from C++
6013     # object files and a static libstdc++, better avoid it by now
6014     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6016                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6017     hardcode_libdir_flag_spec=
6018     hardcode_shlibpath_var=no
6019     runpath_var='LD_RUN_PATH'
6020     ;;
6021
6022   uts4*)
6023     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6024     hardcode_libdir_flag_spec='-L$libdir'
6025     hardcode_shlibpath_var=no
6026     ;;
6027
6028   dgux*)
6029     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6030     hardcode_libdir_flag_spec='-L$libdir'
6031     hardcode_shlibpath_var=no
6032     ;;
6033
6034   sysv4*MP*)
6035     if test -d /usr/nec; then
6036       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6037       hardcode_shlibpath_var=no
6038       runpath_var=LD_RUN_PATH
6039       hardcode_runpath_var=yes
6040       ld_shlibs=yes
6041     fi
6042     ;;
6043
6044   sysv4.2uw2*)
6045     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6046     hardcode_direct=yes
6047     hardcode_minus_L=no
6048     hardcode_shlibpath_var=no
6049     hardcode_runpath_var=yes
6050     runpath_var=LD_RUN_PATH
6051     ;;
6052
6053   sysv5uw7* | unixware7*)
6054     no_undefined_flag='${wl}-z ${wl}text'
6055     if test "$GCC" = yes; then
6056       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6057     else
6058       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6059     fi
6060     runpath_var='LD_RUN_PATH'
6061     hardcode_shlibpath_var=no
6062     ;;
6063
6064   *)
6065     ld_shlibs=no
6066     ;;
6067   esac
6068 fi
6069 echo "$ac_t""$ld_shlibs" 1>&6
6070 test "$ld_shlibs" = no && can_build_shared=no
6071
6072 # Check hardcoding attributes.
6073 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6074 echo "configure:6075: checking how to hardcode library paths into programs" >&5
6075 hardcode_action=
6076 if test -n "$hardcode_libdir_flag_spec" || \
6077    test -n "$runpath_var"; then
6078
6079   # We can hardcode non-existant directories.
6080   if test "$hardcode_direct" != no &&
6081      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6082      # have to relink, otherwise we might link with an installed library
6083      # when we should be linking with a yet-to-be-installed one
6084      ## test "$hardcode_shlibpath_var" != no &&
6085      test "$hardcode_minus_L" != no; then
6086     # Linking always hardcodes the temporary library directory.
6087     hardcode_action=relink
6088   else
6089     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6090     hardcode_action=immediate
6091   fi
6092 else
6093   # We cannot hardcode anything, or else we can only hardcode existing
6094   # directories.
6095   hardcode_action=unsupported
6096 fi
6097 echo "$ac_t""$hardcode_action" 1>&6
6098
6099 striplib=
6100 old_striplib=
6101 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6102 echo "configure:6103: checking whether stripping libraries is possible" >&5
6103 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6104   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6105   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6106   echo "$ac_t""yes" 1>&6
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110
6111 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6112 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6113
6114 # PORTME Fill in your ld.so characteristics
6115 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6116 echo "configure:6117: checking dynamic linker characteristics" >&5
6117 library_names_spec=
6118 libname_spec='lib$name'
6119 soname_spec=
6120 postinstall_cmds=
6121 postuninstall_cmds=
6122 finish_cmds=
6123 finish_eval=
6124 shlibpath_var=
6125 shlibpath_overrides_runpath=unknown
6126 version_type=none
6127 dynamic_linker="$host_os ld.so"
6128 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6129 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6130
6131 case $host_os in
6132 aix3*)
6133   version_type=linux
6134   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6135   shlibpath_var=LIBPATH
6136
6137   # AIX has no versioning support, so we append a major version to the name.
6138   soname_spec='${libname}${release}.so$major'
6139   ;;
6140
6141 aix4* | aix5*)
6142   version_type=linux
6143   need_lib_prefix=no
6144   need_version=no
6145   hardcode_into_libs=yes
6146   if test "$host_cpu" = ia64; then
6147     # AIX 5 supports IA64
6148     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6149     shlibpath_var=LD_LIBRARY_PATH
6150   else
6151     # With GCC up to 2.95.x, collect2 would create an import file
6152     # for dependence libraries.  The import file would start with
6153     # the line `#! .'.  This would cause the generated library to
6154     # depend on `.', always an invalid library.  This was fixed in
6155     # development snapshots of GCC prior to 3.0.
6156     case $host_os in
6157       aix4 | aix4.[01] | aix4.[01].*)
6158         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6159              echo ' yes '
6160              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6161           :
6162         else
6163           can_build_shared=no
6164         fi
6165         ;;
6166     esac
6167     # AIX (on Power*) has no versioning support, so currently we can
6168     # not hardcode correct soname into executable. Probably we can
6169     # add versioning support to collect2, so additional links can
6170     # be useful in future.
6171     if test "$aix_use_runtimelinking" = yes; then
6172       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6173       # instead of lib<name>.a to let people know that these are not
6174       # typical AIX shared libraries.
6175       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6176     else
6177       # We preserve .a as extension for shared libraries through AIX4.2
6178       # and later when we are not doing run time linking.
6179       library_names_spec='${libname}${release}.a $libname.a'
6180       soname_spec='${libname}${release}.so$major'
6181     fi
6182     shlibpath_var=LIBPATH
6183   fi
6184   hardcode_into_libs=yes
6185   ;;
6186
6187 amigaos*)
6188   library_names_spec='$libname.ixlibrary $libname.a'
6189   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6190   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'
6191   ;;
6192
6193 beos*)
6194   library_names_spec='${libname}.so'
6195   dynamic_linker="$host_os ld.so"
6196   shlibpath_var=LIBRARY_PATH
6197   ;;
6198
6199 bsdi4*)
6200   version_type=linux
6201   need_version=no
6202   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6203   soname_spec='${libname}${release}.so$major'
6204   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6205   shlibpath_var=LD_LIBRARY_PATH
6206   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6207   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6208   export_dynamic_flag_spec=-rdynamic
6209   # the default ld.so.conf also contains /usr/contrib/lib and
6210   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6211   # libtool to hard-code these into programs
6212   ;;
6213
6214 cygwin* | mingw* | pw32*)
6215   version_type=windows
6216   need_version=no
6217   need_lib_prefix=no
6218   case $GCC,$host_os in
6219   yes,cygwin*)
6220     library_names_spec='$libname.dll.a'
6221     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6222     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6223       dldir=$destdir/`dirname \$dlpath`~
6224       test -d \$dldir || mkdir -p \$dldir~
6225       $install_prog .libs/$dlname \$dldir/$dlname'
6226     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6227       dlpath=$dir/\$dldll~
6228        $rm \$dlpath'
6229     ;;
6230   yes,mingw*)
6231     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6232     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6233     ;;
6234   yes,pw32*)
6235     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6236     ;;
6237   *)
6238     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6239     ;;
6240   esac
6241   dynamic_linker='Win32 ld.exe'
6242   # FIXME: first we should search . and the directory the executable is in
6243   shlibpath_var=PATH
6244   ;;
6245
6246 darwin* | rhapsody*)
6247   dynamic_linker="$host_os dyld"
6248   version_type=darwin
6249   need_lib_prefix=no
6250   need_version=no
6251   # FIXME: Relying on posixy $() will cause problems for
6252   #        cross-compilation, but unfortunately the echo tests do not
6253   #        yet detect zsh echo's removal of \ escapes.
6254   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)'
6255   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6256   shlibpath_overrides_runpath=yes
6257   shlibpath_var=DYLD_LIBRARY_PATH
6258   ;;
6259
6260 freebsd1*)
6261   dynamic_linker=no
6262   ;;
6263
6264 freebsd*)
6265   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6266   version_type=freebsd-$objformat
6267   case $version_type in
6268     freebsd-elf*)
6269       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6270       need_version=no
6271       need_lib_prefix=no
6272       ;;
6273     freebsd-*)
6274       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6275       need_version=yes
6276       ;;
6277   esac
6278   shlibpath_var=LD_LIBRARY_PATH
6279   case $host_os in
6280   freebsd2*)
6281     shlibpath_overrides_runpath=yes
6282     ;;
6283   *)
6284     shlibpath_overrides_runpath=no
6285     hardcode_into_libs=yes
6286     ;;
6287   esac
6288   ;;
6289
6290 gnu*)
6291   version_type=linux
6292   need_lib_prefix=no
6293   need_version=no
6294   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6295   soname_spec='${libname}${release}.so$major'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   hardcode_into_libs=yes
6298   ;;
6299
6300 hpux9* | hpux10* | hpux11*)
6301   # Give a soname corresponding to the major version so that dld.sl refuses to
6302   # link against other versions.
6303   dynamic_linker="$host_os dld.sl"
6304   version_type=sunos
6305   need_lib_prefix=no
6306   need_version=no
6307   shlibpath_var=SHLIB_PATH
6308   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6309   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6310   soname_spec='${libname}${release}.sl$major'
6311   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6312   postinstall_cmds='chmod 555 $lib'
6313   ;;
6314
6315 irix5* | irix6* | nonstopux*)
6316   case $host_os in
6317     nonstopux*) version_type=nonstopux ;;
6318     *)          version_type=irix ;;
6319   esac
6320   need_lib_prefix=no
6321   need_version=no
6322   soname_spec='${libname}${release}.so$major'
6323   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6324   case $host_os in
6325   irix5* | nonstopux*)
6326     libsuff= shlibsuff=
6327     ;;
6328   *)
6329     case $LD in # libtool.m4 will add one of these switches to LD
6330     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6331     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6332     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6333     *) libsuff= shlibsuff= libmagic=never-match;;
6334     esac
6335     ;;
6336   esac
6337   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6338   shlibpath_overrides_runpath=no
6339   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6340   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6341   ;;
6342
6343 # No shared lib support for Linux oldld, aout, or coff.
6344 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6345   dynamic_linker=no
6346   ;;
6347
6348 # This must be Linux ELF.
6349 linux-gnu*)
6350   version_type=linux
6351   need_lib_prefix=no
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6354   soname_spec='${libname}${release}.so$major'
6355   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6356   shlibpath_var=LD_LIBRARY_PATH
6357   shlibpath_overrides_runpath=no
6358   # This implies no fast_install, which is unacceptable.
6359   # Some rework will be needed to allow for fast_install
6360   # before this can be enabled.
6361   hardcode_into_libs=yes
6362
6363   # We used to test for /lib/ld.so.1 and disable shared libraries on
6364   # powerpc, because MkLinux only supported shared libraries with the
6365   # GNU dynamic linker.  Since this was broken with cross compilers,
6366   # most powerpc-linux boxes support dynamic linking these days and
6367   # people can always --disable-shared, the test was removed, and we
6368   # assume the GNU/Linux dynamic linker is in use.
6369   dynamic_linker='GNU/Linux ld.so'
6370   ;;
6371
6372 netbsd*)
6373   version_type=sunos
6374   need_lib_prefix=no
6375   need_version=no
6376   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6377     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6378     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6379     dynamic_linker='NetBSD (a.out) ld.so'
6380   else
6381     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6382     soname_spec='${libname}${release}.so$major'
6383     dynamic_linker='NetBSD ld.elf_so'
6384   fi
6385   shlibpath_var=LD_LIBRARY_PATH
6386   shlibpath_overrides_runpath=yes
6387   hardcode_into_libs=yes
6388   ;;
6389
6390 newsos6)
6391   version_type=linux
6392   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6393   shlibpath_var=LD_LIBRARY_PATH
6394   shlibpath_overrides_runpath=yes
6395   ;;
6396
6397 openbsd*)
6398   version_type=sunos
6399   need_lib_prefix=no
6400   need_version=no
6401   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6402     case "$host_os" in
6403     openbsd2.[89] | openbsd2.[89].*)
6404       shlibpath_overrides_runpath=no
6405       ;;
6406     *)
6407       shlibpath_overrides_runpath=yes
6408       ;;
6409     esac
6410   else
6411     shlibpath_overrides_runpath=yes
6412   fi
6413   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6414   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   ;;
6417
6418 os2*)
6419   libname_spec='$name'
6420   need_lib_prefix=no
6421   library_names_spec='$libname.dll $libname.a'
6422   dynamic_linker='OS/2 ld.exe'
6423   shlibpath_var=LIBPATH
6424   ;;
6425
6426 osf3* | osf4* | osf5*)
6427   version_type=osf
6428   need_version=no
6429   soname_spec='${libname}${release}.so$major'
6430   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6433   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6434   hardcode_into_libs=yes
6435   ;;
6436
6437 sco3.2v5*)
6438   version_type=osf
6439   soname_spec='${libname}${release}.so$major'
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6441   shlibpath_var=LD_LIBRARY_PATH
6442   ;;
6443
6444 solaris*)
6445   version_type=linux
6446   need_lib_prefix=no
6447   need_version=no
6448   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6449   soname_spec='${libname}${release}.so$major'
6450   shlibpath_var=LD_LIBRARY_PATH
6451   shlibpath_overrides_runpath=yes
6452   hardcode_into_libs=yes
6453   # ldd complains unless libraries are executable
6454   postinstall_cmds='chmod +x $lib'
6455   ;;
6456
6457 sunos4*)
6458   version_type=sunos
6459   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6460   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6461   shlibpath_var=LD_LIBRARY_PATH
6462   shlibpath_overrides_runpath=yes
6463   if test "$with_gnu_ld" = yes; then
6464     need_lib_prefix=no
6465   fi
6466   need_version=yes
6467   ;;
6468
6469 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6470   version_type=linux
6471   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472   soname_spec='${libname}${release}.so$major'
6473   shlibpath_var=LD_LIBRARY_PATH
6474   case $host_vendor in
6475     sni)
6476       shlibpath_overrides_runpath=no
6477       need_lib_prefix=no
6478       export_dynamic_flag_spec='${wl}-Blargedynsym'
6479       runpath_var=LD_RUN_PATH
6480       ;;
6481     siemens)
6482       need_lib_prefix=no
6483       ;;
6484     motorola)
6485       need_lib_prefix=no
6486       need_version=no
6487       shlibpath_overrides_runpath=no
6488       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6489       ;;
6490   esac
6491   ;;
6492
6493 uts4*)
6494   version_type=linux
6495   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6496   soname_spec='${libname}${release}.so$major'
6497   shlibpath_var=LD_LIBRARY_PATH
6498   ;;
6499
6500 dgux*)
6501   version_type=linux
6502   need_lib_prefix=no
6503   need_version=no
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6505   soname_spec='${libname}${release}.so$major'
6506   shlibpath_var=LD_LIBRARY_PATH
6507   ;;
6508
6509 sysv4*MP*)
6510   if test -d /usr/nec ;then
6511     version_type=linux
6512     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6513     soname_spec='$libname.so.$major'
6514     shlibpath_var=LD_LIBRARY_PATH
6515   fi
6516   ;;
6517
6518 *)
6519   dynamic_linker=no
6520   ;;
6521 esac
6522 echo "$ac_t""$dynamic_linker" 1>&6
6523 test "$dynamic_linker" = no && can_build_shared=no
6524
6525 # Report the final consequences.
6526 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking if libtool supports shared libraries" >&5
6528 echo "$ac_t""$can_build_shared" 1>&6
6529
6530 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6531 echo "configure:6532: checking whether to build shared libraries" >&5
6532 test "$can_build_shared" = "no" && enable_shared=no
6533
6534 # On AIX, shared libraries and static libraries use the same namespace, and
6535 # are all built from PIC.
6536 case "$host_os" in
6537 aix3*)
6538   test "$enable_shared" = yes && enable_static=no
6539   if test -n "$RANLIB"; then
6540     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6541     postinstall_cmds='$RANLIB $lib'
6542   fi
6543   ;;
6544
6545 aix4*)
6546   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6547     test "$enable_shared" = yes && enable_static=no
6548   fi
6549   ;;
6550 esac
6551 echo "$ac_t""$enable_shared" 1>&6
6552
6553 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6554 echo "configure:6555: checking whether to build static libraries" >&5
6555 # Make sure either enable_shared or enable_static is yes.
6556 test "$enable_shared" = yes || enable_static=yes
6557 echo "$ac_t""$enable_static" 1>&6
6558
6559 if test "$hardcode_action" = relink; then
6560   # Fast installation is not supported
6561   enable_fast_install=no
6562 elif test "$shlibpath_overrides_runpath" = yes ||
6563      test "$enable_shared" = no; then
6564   # Fast installation is not necessary
6565   enable_fast_install=needless
6566 fi
6567
6568 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6569 if test "$GCC" = yes; then
6570   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6571 fi
6572
6573 if test "x$enable_dlopen" != xyes; then
6574   enable_dlopen=unknown
6575   enable_dlopen_self=unknown
6576   enable_dlopen_self_static=unknown
6577 else
6578   lt_cv_dlopen=no
6579   lt_cv_dlopen_libs=
6580
6581   case $host_os in
6582   beos*)
6583     lt_cv_dlopen="load_add_on"
6584     lt_cv_dlopen_libs=
6585     lt_cv_dlopen_self=yes
6586     ;;
6587
6588   cygwin* | mingw* | pw32*)
6589     lt_cv_dlopen="LoadLibrary"
6590     lt_cv_dlopen_libs=
6591    ;;
6592
6593   *)
6594     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6595 echo "configure:6596: checking for shl_load" >&5
6596 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* System header to define __stub macros and hopefully few prototypes,
6603     which can conflict with char shl_load(); below.  */
6604 #include <assert.h>
6605 /* Override any gcc2 internal prototype to avoid an error.  */
6606 /* We use char because int might match the return type of a gcc2
6607     builtin and then its argument prototype would still apply.  */
6608 char shl_load();
6609 char (*f)();
6610
6611 int main() {
6612
6613 /* The GNU C library defines this for functions which it implements
6614     to always fail with ENOSYS.  Some functions are actually named
6615     something starting with __ and the normal name is an alias.  */
6616 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6617 choke me
6618 #else
6619 f = shl_load;
6620 #endif
6621
6622 ; return 0; }
6623 EOF
6624 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6625   rm -rf conftest*
6626   eval "ac_cv_func_shl_load=yes"
6627 else
6628   echo "configure: failed program was:" >&5
6629   cat conftest.$ac_ext >&5
6630   rm -rf conftest*
6631   eval "ac_cv_func_shl_load=no"
6632 fi
6633 rm -f conftest*
6634 fi
6635
6636 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6637   echo "$ac_t""yes" 1>&6
6638   lt_cv_dlopen="shl_load"
6639 else
6640   echo "$ac_t""no" 1>&6
6641 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6642 echo "configure:6643: checking for shl_load in -ldld" >&5
6643 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6645   echo $ac_n "(cached) $ac_c" 1>&6
6646 else
6647   ac_save_LIBS="$LIBS"
6648 LIBS="-ldld  $LIBS"
6649 cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char shl_load();
6656
6657 int main() {
6658 shl_load()
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=no"
6669 fi
6670 rm -f conftest*
6671 LIBS="$ac_save_LIBS"
6672
6673 fi
6674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6675   echo "$ac_t""yes" 1>&6
6676   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6677 else
6678   echo "$ac_t""no" 1>&6
6679 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6680 echo "configure:6681: checking for dlopen" >&5
6681 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 /* System header to define __stub macros and hopefully few prototypes,
6688     which can conflict with char dlopen(); below.  */
6689 #include <assert.h>
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 /* We use char because int might match the return type of a gcc2
6692     builtin and then its argument prototype would still apply.  */
6693 char dlopen();
6694 char (*f)();
6695
6696 int main() {
6697
6698 /* The GNU C library defines this for functions which it implements
6699     to always fail with ENOSYS.  Some functions are actually named
6700     something starting with __ and the normal name is an alias.  */
6701 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6702 choke me
6703 #else
6704 f = dlopen;
6705 #endif
6706
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_func_dlopen=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_func_dlopen=no"
6717 fi
6718 rm -f conftest*
6719 fi
6720
6721 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   lt_cv_dlopen="dlopen"
6724 else
6725   echo "$ac_t""no" 1>&6
6726 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6727 echo "configure:6728: checking for dlopen in -ldl" >&5
6728 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6730   echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732   ac_save_LIBS="$LIBS"
6733 LIBS="-ldl  $LIBS"
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char dlopen();
6741
6742 int main() {
6743 dlopen()
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=no"
6754 fi
6755 rm -f conftest*
6756 LIBS="$ac_save_LIBS"
6757
6758 fi
6759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6760   echo "$ac_t""yes" 1>&6
6761   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6762 else
6763   echo "$ac_t""no" 1>&6
6764 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6765 echo "configure:6766: checking for dlopen in -lsvld" >&5
6766 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   ac_save_LIBS="$LIBS"
6771 LIBS="-lsvld  $LIBS"
6772 cat > conftest.$ac_ext <<EOF
6773 #line 6774 "configure"
6774 #include "confdefs.h"
6775 /* Override any gcc2 internal prototype to avoid an error.  */
6776 /* We use char because int might match the return type of a gcc2
6777     builtin and then its argument prototype would still apply.  */
6778 char dlopen();
6779
6780 int main() {
6781 dlopen()
6782 ; return 0; }
6783 EOF
6784 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6785   rm -rf conftest*
6786   eval "ac_cv_lib_$ac_lib_var=yes"
6787 else
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   eval "ac_cv_lib_$ac_lib_var=no"
6792 fi
6793 rm -f conftest*
6794 LIBS="$ac_save_LIBS"
6795
6796 fi
6797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6798   echo "$ac_t""yes" 1>&6
6799   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6800 else
6801   echo "$ac_t""no" 1>&6
6802 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6803 echo "configure:6804: checking for dld_link in -ldld" >&5
6804 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6806   echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808   ac_save_LIBS="$LIBS"
6809 LIBS="-ldld  $LIBS"
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 /* We use char because int might match the return type of a gcc2
6815     builtin and then its argument prototype would still apply.  */
6816 char dld_link();
6817
6818 int main() {
6819 dld_link()
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=yes"
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   eval "ac_cv_lib_$ac_lib_var=no"
6830 fi
6831 rm -f conftest*
6832 LIBS="$ac_save_LIBS"
6833
6834 fi
6835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6836   echo "$ac_t""yes" 1>&6
6837   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6838 else
6839   echo "$ac_t""no" 1>&6
6840 fi
6841
6842               
6843 fi
6844
6845             
6846 fi
6847
6848           
6849 fi
6850
6851         
6852 fi
6853
6854       
6855 fi
6856
6857     ;;
6858   esac
6859
6860   if test "x$lt_cv_dlopen" != xno; then
6861     enable_dlopen=yes
6862   else
6863     enable_dlopen=no
6864   fi
6865
6866   case $lt_cv_dlopen in
6867   dlopen)
6868     save_CPPFLAGS="$CPPFLAGS"
6869         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6870
6871     save_LDFLAGS="$LDFLAGS"
6872     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6873
6874     save_LIBS="$LIBS"
6875     LIBS="$lt_cv_dlopen_libs $LIBS"
6876
6877     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6878 echo "configure:6879: checking whether a program can dlopen itself" >&5
6879 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6880   echo $ac_n "(cached) $ac_c" 1>&6
6881 else
6882           if test "$cross_compiling" = yes; then :
6883   lt_cv_dlopen_self=cross
6884 else
6885     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6886   lt_status=$lt_dlunknown
6887   cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890
6891 #if HAVE_DLFCN_H
6892 #include <dlfcn.h>
6893 #endif
6894
6895 #include <stdio.h>
6896
6897 #ifdef RTLD_GLOBAL
6898 #  define LT_DLGLOBAL           RTLD_GLOBAL
6899 #else
6900 #  ifdef DL_GLOBAL
6901 #    define LT_DLGLOBAL         DL_GLOBAL
6902 #  else
6903 #    define LT_DLGLOBAL         0
6904 #  endif
6905 #endif
6906
6907 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6908    find out it does not work in some platform. */
6909 #ifndef LT_DLLAZY_OR_NOW
6910 #  ifdef RTLD_LAZY
6911 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6912 #  else
6913 #    ifdef DL_LAZY
6914 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6915 #    else
6916 #      ifdef RTLD_NOW
6917 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6918 #      else
6919 #        ifdef DL_NOW
6920 #          define LT_DLLAZY_OR_NOW      DL_NOW
6921 #        else
6922 #          define LT_DLLAZY_OR_NOW      0
6923 #        endif
6924 #      endif
6925 #    endif
6926 #  endif
6927 #endif
6928
6929 #ifdef __cplusplus
6930 extern "C" void exit (int);
6931 #endif
6932
6933 void fnord() { int i=42;}
6934 int main ()
6935 {
6936   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6937   int status = $lt_dlunknown;
6938
6939   if (self)
6940     {
6941       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6942       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6943       /* dlclose (self); */
6944     }
6945
6946     exit (status);
6947 }
6948 EOF
6949   if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6950     (./conftest; exit; ) 2>/dev/null
6951     lt_status=$?
6952     case x$lt_status in
6953       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6954       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6955       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6956     esac
6957   else :
6958     # compilation failed
6959     lt_cv_dlopen_self=no
6960   fi
6961 fi
6962 rm -fr conftest*
6963
6964     
6965 fi
6966
6967 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6968
6969     if test "x$lt_cv_dlopen_self" = xyes; then
6970       LDFLAGS="$LDFLAGS $link_static_flag"
6971       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6972 echo "configure:6973: checking whether a statically linked program can dlopen itself" >&5
6973 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6974   echo $ac_n "(cached) $ac_c" 1>&6
6975 else
6976           if test "$cross_compiling" = yes; then :
6977   lt_cv_dlopen_self_static=cross
6978 else
6979     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6980   lt_status=$lt_dlunknown
6981   cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984
6985 #if HAVE_DLFCN_H
6986 #include <dlfcn.h>
6987 #endif
6988
6989 #include <stdio.h>
6990
6991 #ifdef RTLD_GLOBAL
6992 #  define LT_DLGLOBAL           RTLD_GLOBAL
6993 #else
6994 #  ifdef DL_GLOBAL
6995 #    define LT_DLGLOBAL         DL_GLOBAL
6996 #  else
6997 #    define LT_DLGLOBAL         0
6998 #  endif
6999 #endif
7000
7001 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7002    find out it does not work in some platform. */
7003 #ifndef LT_DLLAZY_OR_NOW
7004 #  ifdef RTLD_LAZY
7005 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7006 #  else
7007 #    ifdef DL_LAZY
7008 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7009 #    else
7010 #      ifdef RTLD_NOW
7011 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7012 #      else
7013 #        ifdef DL_NOW
7014 #          define LT_DLLAZY_OR_NOW      DL_NOW
7015 #        else
7016 #          define LT_DLLAZY_OR_NOW      0
7017 #        endif
7018 #      endif
7019 #    endif
7020 #  endif
7021 #endif
7022
7023 #ifdef __cplusplus
7024 extern "C" void exit (int);
7025 #endif
7026
7027 void fnord() { int i=42;}
7028 int main ()
7029 {
7030   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7031   int status = $lt_dlunknown;
7032
7033   if (self)
7034     {
7035       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7036       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7037       /* dlclose (self); */
7038     }
7039
7040     exit (status);
7041 }
7042 EOF
7043   if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7044     (./conftest; exit; ) 2>/dev/null
7045     lt_status=$?
7046     case x$lt_status in
7047       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7048       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7049       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7050     esac
7051   else :
7052     # compilation failed
7053     lt_cv_dlopen_self_static=no
7054   fi
7055 fi
7056 rm -fr conftest*
7057
7058       
7059 fi
7060
7061 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7062     fi
7063
7064     CPPFLAGS="$save_CPPFLAGS"
7065     LDFLAGS="$save_LDFLAGS"
7066     LIBS="$save_LIBS"
7067     ;;
7068   esac
7069
7070   case $lt_cv_dlopen_self in
7071   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7072   *) enable_dlopen_self=unknown ;;
7073   esac
7074
7075   case $lt_cv_dlopen_self_static in
7076   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7077   *) enable_dlopen_self_static=unknown ;;
7078   esac
7079 fi
7080
7081
7082 if test "$enable_shared" = yes && test "$GCC" = yes; then
7083   case $archive_cmds in
7084   *'~'*)
7085     # FIXME: we may have to deal with multi-command sequences.
7086     ;;
7087   '$CC '*)
7088     # Test whether the compiler implicitly links with -lc since on some
7089     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7090     # to ld, don't add -lc before -lgcc.
7091     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7092 echo "configure:7093: checking whether -lc should be explicitly linked in" >&5
7093     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   $rm conftest*
7097     echo 'static int dummy;' > conftest.$ac_ext
7098
7099     if { (eval echo configure:7100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7100       soname=conftest
7101       lib=conftest
7102       libobjs=conftest.$ac_objext
7103       deplibs=
7104       wl=$lt_cv_prog_cc_wl
7105       compiler_flags=-v
7106       linker_flags=-v
7107       verstring=
7108       output_objdir=.
7109       libname=conftest
7110       save_allow_undefined_flag=$allow_undefined_flag
7111       allow_undefined_flag=
7112       if { (eval echo configure:7113: \"$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; }
7113       then
7114         lt_cv_archive_cmds_need_lc=no
7115       else
7116         lt_cv_archive_cmds_need_lc=yes
7117       fi
7118       allow_undefined_flag=$save_allow_undefined_flag
7119     else
7120       cat conftest.err 1>&5
7121     fi
7122 fi
7123
7124     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7125     ;;
7126   esac
7127 fi
7128 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7129
7130 # The second clause should only fire when bootstrapping the
7131 # libtool distribution, otherwise you forgot to ship ltmain.sh
7132 # with your package, and you will get complaints that there are
7133 # no rules to generate ltmain.sh.
7134 if test -f "$ltmain"; then
7135   :
7136 else
7137   # If there is no Makefile yet, we rely on a make rule to execute
7138   # `config.status --recheck' to rerun these tests and create the
7139   # libtool script then.
7140   test -f Makefile && make "$ltmain"
7141 fi
7142
7143 if test -f "$ltmain"; then
7144   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7145   $rm -f "${ofile}T"
7146
7147   echo creating $ofile
7148
7149   # Now quote all the things that may contain metacharacters while being
7150   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7151   # variables and quote the copies for generation of the libtool script.
7152   for var in echo old_CC old_CFLAGS SED \
7153     AR AR_FLAGS CC LD LN_S NM SHELL \
7154     reload_flag reload_cmds wl \
7155     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7156     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7157     library_names_spec soname_spec \
7158     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7159     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7160     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7161     old_striplib striplib file_magic_cmd export_symbols_cmds \
7162     deplibs_check_method allow_undefined_flag no_undefined_flag \
7163     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7164     global_symbol_to_c_name_address \
7165     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7166     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7167     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7168
7169     case $var in
7170     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7171     old_postinstall_cmds | old_postuninstall_cmds | \
7172     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7173     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7174     postinstall_cmds | postuninstall_cmds | \
7175     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7176       # Double-quote double-evaled strings.
7177       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7178       ;;
7179     *)
7180       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7181       ;;
7182     esac
7183   done
7184
7185   cat <<__EOF__ > "${ofile}T"
7186 #! $SHELL
7187
7188 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7189 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7190 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7191 #
7192 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7193 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7194 #
7195 # This program is free software; you can redistribute it and/or modify
7196 # it under the terms of the GNU General Public License as published by
7197 # the Free Software Foundation; either version 2 of the License, or
7198 # (at your option) any later version.
7199 #
7200 # This program is distributed in the hope that it will be useful, but
7201 # WITHOUT ANY WARRANTY; without even the implied warranty of
7202 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7203 # General Public License for more details.
7204 #
7205 # You should have received a copy of the GNU General Public License
7206 # along with this program; if not, write to the Free Software
7207 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7208 #
7209 # As a special exception to the GNU General Public License, if you
7210 # distribute this file as part of a program that contains a
7211 # configuration script generated by Autoconf, you may include it under
7212 # the same distribution terms that you use for the rest of that program.
7213
7214 # A sed that does not truncate output.
7215 SED=$lt_SED
7216
7217 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7218 Xsed="${SED} -e s/^X//"
7219
7220 # The HP-UX ksh and POSIX shell print the target directory to stdout
7221 # if CDPATH is set.
7222 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7223
7224 # ### BEGIN LIBTOOL CONFIG
7225
7226 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7227
7228 # Shell to use when invoking shell scripts.
7229 SHELL=$lt_SHELL
7230
7231 # Whether or not to build shared libraries.
7232 build_libtool_libs=$enable_shared
7233
7234 # Whether or not to build static libraries.
7235 build_old_libs=$enable_static
7236
7237 # Whether or not to add -lc for building shared libraries.
7238 build_libtool_need_lc=$need_lc
7239
7240 # Whether or not to optimize for fast installation.
7241 fast_install=$enable_fast_install
7242
7243 # The host system.
7244 host_alias=$host_alias
7245 host=$host
7246
7247 # An echo program that does not interpret backslashes.
7248 echo=$lt_echo
7249
7250 # The archiver.
7251 AR=$lt_AR
7252 AR_FLAGS=$lt_AR_FLAGS
7253
7254 # The default C compiler.
7255 CC=$lt_CC
7256
7257 # Is the compiler the GNU C compiler?
7258 with_gcc=$GCC
7259
7260 # The linker used to build libraries.
7261 LD=$lt_LD
7262
7263 # Whether we need hard or soft links.
7264 LN_S=$lt_LN_S
7265
7266 # A BSD-compatible nm program.
7267 NM=$lt_NM
7268
7269 # A symbol stripping program
7270 STRIP=$STRIP
7271
7272 # Used to examine libraries when file_magic_cmd begins "file"
7273 MAGIC_CMD=$MAGIC_CMD
7274
7275 # Used on cygwin: DLL creation program.
7276 DLLTOOL="$DLLTOOL"
7277
7278 # Used on cygwin: object dumper.
7279 OBJDUMP="$OBJDUMP"
7280
7281 # Used on cygwin: assembler.
7282 AS="$AS"
7283
7284 # The name of the directory that contains temporary libtool files.
7285 objdir=$objdir
7286
7287 # How to create reloadable object files.
7288 reload_flag=$lt_reload_flag
7289 reload_cmds=$lt_reload_cmds
7290
7291 # How to pass a linker flag through the compiler.
7292 wl=$lt_wl
7293
7294 # Object file suffix (normally "o").
7295 objext="$ac_objext"
7296
7297 # Old archive suffix (normally "a").
7298 libext="$libext"
7299
7300 # Executable file suffix (normally "").
7301 exeext="$exeext"
7302
7303 # Additional compiler flags for building library objects.
7304 pic_flag=$lt_pic_flag
7305 pic_mode=$pic_mode
7306
7307 # Does compiler simultaneously support -c and -o options?
7308 compiler_c_o=$lt_compiler_c_o
7309
7310 # Can we write directly to a .lo ?
7311 compiler_o_lo=$lt_compiler_o_lo
7312
7313 # Must we lock files when doing compilation ?
7314 need_locks=$lt_need_locks
7315
7316 # Do we need the lib prefix for modules?
7317 need_lib_prefix=$need_lib_prefix
7318
7319 # Do we need a version for libraries?
7320 need_version=$need_version
7321
7322 # Whether dlopen is supported.
7323 dlopen_support=$enable_dlopen
7324
7325 # Whether dlopen of programs is supported.
7326 dlopen_self=$enable_dlopen_self
7327
7328 # Whether dlopen of statically linked programs is supported.
7329 dlopen_self_static=$enable_dlopen_self_static
7330
7331 # Compiler flag to prevent dynamic linking.
7332 link_static_flag=$lt_link_static_flag
7333
7334 # Compiler flag to turn off builtin functions.
7335 no_builtin_flag=$lt_no_builtin_flag
7336
7337 # Compiler flag to allow reflexive dlopens.
7338 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7339
7340 # Compiler flag to generate shared objects directly from archives.
7341 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7342
7343 # Compiler flag to generate thread-safe objects.
7344 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7345
7346 # Library versioning type.
7347 version_type=$version_type
7348
7349 # Format of library name prefix.
7350 libname_spec=$lt_libname_spec
7351
7352 # List of archive names.  First name is the real one, the rest are links.
7353 # The last name is the one that the linker finds with -lNAME.
7354 library_names_spec=$lt_library_names_spec
7355
7356 # The coded name of the library, if different from the real name.
7357 soname_spec=$lt_soname_spec
7358
7359 # Commands used to build and install an old-style archive.
7360 RANLIB=$lt_RANLIB
7361 old_archive_cmds=$lt_old_archive_cmds
7362 old_postinstall_cmds=$lt_old_postinstall_cmds
7363 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7364
7365 # Create an old-style archive from a shared archive.
7366 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7367
7368 # Create a temporary old-style archive to link instead of a shared archive.
7369 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7370
7371 # Commands used to build and install a shared archive.
7372 archive_cmds=$lt_archive_cmds
7373 archive_expsym_cmds=$lt_archive_expsym_cmds
7374 postinstall_cmds=$lt_postinstall_cmds
7375 postuninstall_cmds=$lt_postuninstall_cmds
7376
7377 # Commands to strip libraries.
7378 old_striplib=$lt_old_striplib
7379 striplib=$lt_striplib
7380
7381 # Method to check whether dependent libraries are shared objects.
7382 deplibs_check_method=$lt_deplibs_check_method
7383
7384 # Command to use when deplibs_check_method == file_magic.
7385 file_magic_cmd=$lt_file_magic_cmd
7386
7387 # Flag that allows shared libraries with undefined symbols to be built.
7388 allow_undefined_flag=$lt_allow_undefined_flag
7389
7390 # Flag that forces no undefined symbols.
7391 no_undefined_flag=$lt_no_undefined_flag
7392
7393 # Commands used to finish a libtool library installation in a directory.
7394 finish_cmds=$lt_finish_cmds
7395
7396 # Same as above, but a single script fragment to be evaled but not shown.
7397 finish_eval=$lt_finish_eval
7398
7399 # Take the output of nm and produce a listing of raw symbols and C names.
7400 global_symbol_pipe=$lt_global_symbol_pipe
7401
7402 # Transform the output of nm in a proper C declaration
7403 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7404
7405 # Transform the output of nm in a C name address pair
7406 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7407
7408 # This is the shared library runtime path variable.
7409 runpath_var=$runpath_var
7410
7411 # This is the shared library path variable.
7412 shlibpath_var=$shlibpath_var
7413
7414 # Is shlibpath searched before the hard-coded library search path?
7415 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7416
7417 # How to hardcode a shared library path into an executable.
7418 hardcode_action=$hardcode_action
7419
7420 # Whether we should hardcode library paths into libraries.
7421 hardcode_into_libs=$hardcode_into_libs
7422
7423 # Flag to hardcode \$libdir into a binary during linking.
7424 # This must work even if \$libdir does not exist.
7425 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7426
7427 # Whether we need a single -rpath flag with a separated argument.
7428 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7429
7430 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7431 # resulting binary.
7432 hardcode_direct=$hardcode_direct
7433
7434 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7435 # resulting binary.
7436 hardcode_minus_L=$hardcode_minus_L
7437
7438 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7439 # the resulting binary.
7440 hardcode_shlibpath_var=$hardcode_shlibpath_var
7441
7442 # Variables whose values should be saved in libtool wrapper scripts and
7443 # restored at relink time.
7444 variables_saved_for_relink="$variables_saved_for_relink"
7445
7446 # Whether libtool must link a program against all its dependency libraries.
7447 link_all_deplibs=$link_all_deplibs
7448
7449 # Compile-time system search path for libraries
7450 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7451
7452 # Run-time system search path for libraries
7453 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7454
7455 # Fix the shell variable \$srcfile for the compiler.
7456 fix_srcfile_path="$fix_srcfile_path"
7457
7458 # Set to yes if exported symbols are required.
7459 always_export_symbols=$always_export_symbols
7460
7461 # The commands to list exported symbols.
7462 export_symbols_cmds=$lt_export_symbols_cmds
7463
7464 # The commands to extract the exported symbol list from a shared archive.
7465 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7466
7467 # Symbols that should not be listed in the preloaded symbols.
7468 exclude_expsyms=$lt_exclude_expsyms
7469
7470 # Symbols that must always be exported.
7471 include_expsyms=$lt_include_expsyms
7472
7473 # ### END LIBTOOL CONFIG
7474
7475 __EOF__
7476
7477   case $host_os in
7478   aix3*)
7479     cat <<\EOF >> "${ofile}T"
7480
7481 # AIX sometimes has problems with the GCC collect2 program.  For some
7482 # reason, if we set the COLLECT_NAMES environment variable, the problems
7483 # vanish in a puff of smoke.
7484 if test "X${COLLECT_NAMES+set}" != Xset; then
7485   COLLECT_NAMES=
7486   export COLLECT_NAMES
7487 fi
7488 EOF
7489     ;;
7490   esac
7491
7492   case $host_os in
7493   cygwin* | mingw* | pw32* | os2*)
7494     cat <<'EOF' >> "${ofile}T"
7495       # This is a source program that is used to create dlls on Windows
7496       # Don't remove nor modify the starting and closing comments
7497 # /* ltdll.c starts here */
7498 # #define WIN32_LEAN_AND_MEAN
7499 # #include <windows.h>
7500 # #undef WIN32_LEAN_AND_MEAN
7501 # #include <stdio.h>
7502 #
7503 # #ifndef __CYGWIN__
7504 # #  ifdef __CYGWIN32__
7505 # #    define __CYGWIN__ __CYGWIN32__
7506 # #  endif
7507 # #endif
7508 #
7509 # #ifdef __cplusplus
7510 # extern "C" {
7511 # #endif
7512 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7513 # #ifdef __cplusplus
7514 # }
7515 # #endif
7516 #
7517 # #ifdef __CYGWIN__
7518 # #include <cygwin/cygwin_dll.h>
7519 # DECLARE_CYGWIN_DLL( DllMain );
7520 # #endif
7521 # HINSTANCE __hDllInstance_base;
7522 #
7523 # BOOL APIENTRY
7524 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7525 # {
7526 #   __hDllInstance_base = hInst;
7527 #   return TRUE;
7528 # }
7529 # /* ltdll.c ends here */
7530         # This is a source program that is used to create import libraries
7531         # on Windows for dlls which lack them. Don't remove nor modify the
7532         # starting and closing comments
7533 # /* impgen.c starts here */
7534 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7535 #
7536 #  This file is part of GNU libtool.
7537 #
7538 #  This program is free software; you can redistribute it and/or modify
7539 #  it under the terms of the GNU General Public License as published by
7540 #  the Free Software Foundation; either version 2 of the License, or
7541 #  (at your option) any later version.
7542 #
7543 #  This program is distributed in the hope that it will be useful,
7544 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7545 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7546 #  GNU General Public License for more details.
7547 #
7548 #  You should have received a copy of the GNU General Public License
7549 #  along with this program; if not, write to the Free Software
7550 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7551 #  */
7552 #
7553 # #include <stdio.h>            /* for printf() */
7554 # #include <unistd.h>           /* for open(), lseek(), read() */
7555 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7556 # #include <string.h>           /* for strdup() */
7557 #
7558 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7559 # #ifndef O_BINARY
7560 # #define O_BINARY 0
7561 # #endif
7562 #
7563 # static unsigned int
7564 # pe_get16 (fd, offset)
7565 #      int fd;
7566 #      int offset;
7567 # {
7568 #   unsigned char b[2];
7569 #   lseek (fd, offset, SEEK_SET);
7570 #   read (fd, b, 2);
7571 #   return b[0] + (b[1]<<8);
7572 # }
7573 #
7574 # static unsigned int
7575 # pe_get32 (fd, offset)
7576 #     int fd;
7577 #     int offset;
7578 # {
7579 #   unsigned char b[4];
7580 #   lseek (fd, offset, SEEK_SET);
7581 #   read (fd, b, 4);
7582 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7583 # }
7584 #
7585 # static unsigned int
7586 # pe_as32 (ptr)
7587 #      void *ptr;
7588 # {
7589 #   unsigned char *b = ptr;
7590 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7591 # }
7592 #
7593 # int
7594 # main (argc, argv)
7595 #     int argc;
7596 #     char *argv[];
7597 # {
7598 #     int dll;
7599 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7600 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7601 #     unsigned long name_rvas, nexp;
7602 #     unsigned char *expdata, *erva;
7603 #     char *filename, *dll_name;
7604 #
7605 #     filename = argv[1];
7606 #
7607 #     dll = open(filename, O_RDONLY|O_BINARY);
7608 #     if (dll < 1)
7609 #       return 1;
7610 #
7611 #     dll_name = filename;
7612 #
7613 #     for (i=0; filename[i]; i++)
7614 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7615 #           dll_name = filename + i +1;
7616 #
7617 #     pe_header_offset = pe_get32 (dll, 0x3c);
7618 #     opthdr_ofs = pe_header_offset + 4 + 20;
7619 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7620 #
7621 #     if (num_entries < 1) /* no exports */
7622 #       return 1;
7623 #
7624 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7625 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7626 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7627 #     secptr = (pe_header_offset + 4 + 20 +
7628 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7629 #
7630 #     expptr = 0;
7631 #     for (i = 0; i < nsections; i++)
7632 #     {
7633 #       char sname[8];
7634 #       unsigned long secptr1 = secptr + 40 * i;
7635 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7636 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7637 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7638 #       lseek(dll, secptr1, SEEK_SET);
7639 #       read(dll, sname, 8);
7640 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7641 #       {
7642 #           expptr = fptr + (export_rva - vaddr);
7643 #           if (export_rva + export_size > vaddr + vsize)
7644 #               export_size = vsize - (export_rva - vaddr);
7645 #           break;
7646 #       }
7647 #     }
7648 #
7649 #     expdata = (unsigned char*)malloc(export_size);
7650 #     lseek (dll, expptr, SEEK_SET);
7651 #     read (dll, expdata, export_size);
7652 #     erva = expdata - export_rva;
7653 #
7654 #     nexp = pe_as32 (expdata+24);
7655 #     name_rvas = pe_as32 (expdata+32);
7656 #
7657 #     printf ("EXPORTS\n");
7658 #     for (i = 0; i<nexp; i++)
7659 #     {
7660 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7661 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7662 #     }
7663 #
7664 #     return 0;
7665 # }
7666 # /* impgen.c ends here */
7667
7668 EOF
7669     ;;
7670   esac
7671
7672   # We use sed instead of cat because bash on DJGPP gets confused if
7673   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7674   # text mode, it properly converts lines to CR/LF.  This bash problem
7675   # is reportedly fixed, but why not run on old versions too?
7676   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7677
7678   mv -f "${ofile}T" "$ofile" || \
7679     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7680   chmod +x "$ofile"
7681 fi
7682
7683
7684
7685
7686
7687 # This can be used to rebuild libtool when needed
7688 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7689
7690 # Always use our own libtool.
7691 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7692
7693 # Prevent multiple expansion
7694
7695
7696
7697 ol_link_perl=no
7698 if test $ol_enable_perl != no ; then
7699         # Extract the first word of "perl", so it can be a program name with args.
7700 set dummy perl; ac_word=$2
7701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7702 echo "configure:7703: checking for $ac_word" >&5
7703 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7704   echo $ac_n "(cached) $ac_c" 1>&6
7705 else
7706   case "$PERLBIN" in
7707   /*)
7708   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7709   ;;
7710   ?:/*)
7711   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7712   ;;
7713   *)
7714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7715   ac_dummy="$PATH"
7716   for ac_dir in $ac_dummy; do 
7717     test -z "$ac_dir" && ac_dir=.
7718     if test -f $ac_dir/$ac_word; then
7719       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7720       break
7721     fi
7722   done
7723   IFS="$ac_save_ifs"
7724   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7725   ;;
7726 esac
7727 fi
7728 PERLBIN="$ac_cv_path_PERLBIN"
7729 if test -n "$PERLBIN"; then
7730   echo "$ac_t""$PERLBIN" 1>&6
7731 else
7732   echo "$ac_t""no" 1>&6
7733 fi
7734
7735
7736         if test "no$PERLBIN" = "no" ; then
7737                 if test $ol_enable_perl = yes ; then
7738                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7739                 fi
7740
7741         else
7742                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7743                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7744
7745                 if test x"$ol_enable_perl" = "xyes" ; then
7746                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7747                 else
7748                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7749                 fi
7750                                 ol_link_perl=yes
7751         fi
7752 fi
7753
7754 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7755 echo "configure:7756: checking how to run the C preprocessor" >&5
7756 # On Suns, sometimes $CPP names a directory.
7757 if test -n "$CPP" && test -d "$CPP"; then
7758   CPP=
7759 fi
7760 if test -z "$CPP"; then
7761 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7762   echo $ac_n "(cached) $ac_c" 1>&6
7763 else
7764     # This must be in double quotes, not single quotes, because CPP may get
7765   # substituted into the Makefile and "${CC-cc}" will confuse make.
7766   CPP="${CC-cc} -E"
7767   # On the NeXT, cc -E runs the code through the compiler's parser,
7768   # not just through cpp.
7769   cat > conftest.$ac_ext <<EOF
7770 #line 7771 "configure"
7771 #include "confdefs.h"
7772 #include <assert.h>
7773 Syntax Error
7774 EOF
7775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7776 { (eval echo configure:7777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7778 if test -z "$ac_err"; then
7779   :
7780 else
7781   echo "$ac_err" >&5
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   CPP="${CC-cc} -E -traditional-cpp"
7786   cat > conftest.$ac_ext <<EOF
7787 #line 7788 "configure"
7788 #include "confdefs.h"
7789 #include <assert.h>
7790 Syntax Error
7791 EOF
7792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7793 { (eval echo configure:7794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7795 if test -z "$ac_err"; then
7796   :
7797 else
7798   echo "$ac_err" >&5
7799   echo "configure: failed program was:" >&5
7800   cat conftest.$ac_ext >&5
7801   rm -rf conftest*
7802   CPP="${CC-cc} -nologo -E"
7803   cat > conftest.$ac_ext <<EOF
7804 #line 7805 "configure"
7805 #include "confdefs.h"
7806 #include <assert.h>
7807 Syntax Error
7808 EOF
7809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7810 { (eval echo configure:7811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7812 if test -z "$ac_err"; then
7813   :
7814 else
7815   echo "$ac_err" >&5
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -rf conftest*
7819   CPP=/lib/cpp
7820 fi
7821 rm -f conftest*
7822 fi
7823 rm -f conftest*
7824 fi
7825 rm -f conftest*
7826   ac_cv_prog_CPP="$CPP"
7827 fi
7828   CPP="$ac_cv_prog_CPP"
7829 else
7830   ac_cv_prog_CPP="$CPP"
7831 fi
7832 echo "$ac_t""$CPP" 1>&6
7833
7834
7835
7836 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7837 echo "configure:7838: checking for Cygwin environment" >&5
7838 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844
7845 int main() {
7846
7847 #ifndef __CYGWIN__
7848 #define __CYGWIN__ __CYGWIN32__
7849 #endif
7850 return __CYGWIN__;
7851 ; return 0; }
7852 EOF
7853 if { (eval echo configure:7854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7854   rm -rf conftest*
7855   ac_cv_cygwin=yes
7856 else
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   ac_cv_cygwin=no
7861 fi
7862 rm -f conftest*
7863 fi
7864
7865 echo "$ac_t""$ac_cv_cygwin" 1>&6
7866 CYGWIN=
7867 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7868 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7869 echo "configure:7870: checking for mingw32 environment" >&5
7870 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876
7877 int main() {
7878 return __MINGW32__;
7879 ; return 0; }
7880 EOF
7881 if { (eval echo configure:7882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7882   rm -rf conftest*
7883   ac_cv_mingw32=yes
7884 else
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   ac_cv_mingw32=no
7889 fi
7890 rm -f conftest*
7891 fi
7892
7893 echo "$ac_t""$ac_cv_mingw32" 1>&6
7894 MINGW32=
7895 test "$ac_cv_mingw32" = yes && MINGW32=yes
7896
7897
7898
7899 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7900 echo "configure:7901: checking for executable suffix" >&5
7901 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7905   ac_cv_exeext=.exe
7906 else
7907   rm -f conftest*
7908   echo 'int main () { return 0; }' > conftest.$ac_ext
7909   ac_cv_exeext=
7910   if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7911     for file in conftest.*; do
7912       case $file in
7913       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7914       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7915       esac
7916     done
7917   else
7918     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7919   fi
7920   rm -f conftest*
7921   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7922 fi
7923 fi
7924
7925 EXEEXT=""
7926 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7927 echo "$ac_t""${ac_cv_exeext}" 1>&6
7928 ac_exeext=$EXEEXT
7929
7930 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7931 echo "configure:7932: checking for object suffix" >&5
7932 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7933   echo $ac_n "(cached) $ac_c" 1>&6
7934 else
7935   rm -f conftest*
7936 echo 'int i = 1;' > conftest.$ac_ext
7937 if { (eval echo configure:7938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7938   for ac_file in conftest.*; do
7939     case $ac_file in
7940     *.c) ;;
7941     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7942     esac
7943   done
7944 else
7945   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7946 fi
7947 rm -f conftest*
7948 fi
7949
7950 echo "$ac_t""$ac_cv_objext" 1>&6
7951 OBJEXT=$ac_cv_objext
7952 ac_objext=$ac_cv_objext
7953
7954
7955 cat >> confdefs.h <<EOF
7956 #define EXEEXT "${EXEEXT}"
7957 EOF
7958
7959
7960 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7961 echo "configure:7962: checking for be_app in -lbe" >&5
7962 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7964   echo $ac_n "(cached) $ac_c" 1>&6
7965 else
7966   ac_save_LIBS="$LIBS"
7967 LIBS="-lbe -lroot -lnet $LIBS"
7968 cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971 /* Override any gcc2 internal prototype to avoid an error.  */
7972 /* We use char because int might match the return type of a gcc2
7973     builtin and then its argument prototype would still apply.  */
7974 char be_app();
7975
7976 int main() {
7977 be_app()
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=yes"
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   eval "ac_cv_lib_$ac_lib_var=no"
7988 fi
7989 rm -f conftest*
7990 LIBS="$ac_save_LIBS"
7991
7992 fi
7993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7994   echo "$ac_t""yes" 1>&6
7995   LIBS="$LIBS -lbe -lroot -lnet"
7996 else
7997   echo "$ac_t""no" 1>&6
7998 :
7999 fi
8000
8001
8002
8003
8004
8005 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8006 echo "configure:8007: checking for ${CC-cc} option to accept ANSI C" >&5
8007 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8008   echo $ac_n "(cached) $ac_c" 1>&6
8009 else
8010   am_cv_prog_cc_stdc=no
8011 ac_save_CC="$CC"
8012 # Don't try gcc -ansi; that turns off useful extensions and
8013 # breaks some systems' header files.
8014 # AIX                   -qlanglvl=ansi
8015 # Ultrix and OSF/1      -std1
8016 # HP-UX 10.20 and later -Ae
8017 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8018 # SVR4                  -Xc -D__EXTENSIONS__
8019 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8020 do
8021   CC="$ac_save_CC $ac_arg"
8022   cat > conftest.$ac_ext <<EOF
8023 #line 8024 "configure"
8024 #include "confdefs.h"
8025 #include <stdarg.h>
8026 #include <stdio.h>
8027 #include <sys/types.h>
8028 #include <sys/stat.h>
8029 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8030 struct buf { int x; };
8031 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8032 static char *e (p, i)
8033      char **p;
8034      int i;
8035 {
8036   return p[i];
8037 }
8038 static char *f (char * (*g) (char **, int), char **p, ...)
8039 {
8040   char *s;
8041   va_list v;
8042   va_start (v,p);
8043   s = g (p, va_arg (v,int));
8044   va_end (v);
8045   return s;
8046 }
8047 int test (int i, double x);
8048 struct s1 {int (*f) (int a);};
8049 struct s2 {int (*f) (double a);};
8050 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8051 int argc;
8052 char **argv;
8053
8054 int main() {
8055
8056 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8057
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8061   rm -rf conftest*
8062   am_cv_prog_cc_stdc="$ac_arg"; break
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066 fi
8067 rm -f conftest*
8068 done
8069 CC="$ac_save_CC"
8070
8071 fi
8072
8073 if test -z "$am_cv_prog_cc_stdc"; then
8074   echo "$ac_t""none needed" 1>&6
8075 else
8076   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8077 fi
8078 case "x$am_cv_prog_cc_stdc" in
8079   x|xno) ;;
8080   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8081 esac
8082
8083 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8084         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8085 fi
8086
8087 # test for make depend flag
8088 OL_MKDEP=
8089 OL_MKDEP_FLAGS=
8090 if test -z "${MKDEP}"; then
8091         OL_MKDEP="${CC-cc}"
8092         if test -z "${MKDEP_FLAGS}"; then
8093                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8094 echo "configure:8095: checking for ${OL_MKDEP} depend flag" >&5
8095 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8096   echo $ac_n "(cached) $ac_c" 1>&6
8097 else
8098   
8099                         ol_cv_mkdep=no
8100                         for flag in "-M" "-xM"; do
8101                                 cat > conftest.c <<EOF
8102  noCode;
8103 EOF
8104                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8105                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8106                                 then
8107                                         if test ! -f conftest."${ac_object}" ; then
8108                                                 ol_cv_mkdep=$flag
8109                                                 OL_MKDEP_FLAGS="$flag"
8110                                                 break
8111                                         fi
8112                                 fi
8113                         done
8114                         rm -f conftest*
8115                 
8116 fi
8117
8118 echo "$ac_t""$ol_cv_mkdep" 1>&6
8119         else
8120                 cc_cv_mkdep=yes
8121                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8122         fi
8123 else
8124         cc_cv_mkdep=yes
8125         OL_MKDEP="${MKDEP}"
8126         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8127 fi
8128
8129
8130
8131 if test "${ol_cv_mkdep}" = no ; then
8132         # this will soon become an error
8133         echo "configure: warning: do not know how to generate dependencies" 1>&2
8134 fi
8135
8136 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8137 echo "configure:8138: checking for afopen in -ls" >&5
8138 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8140   echo $ac_n "(cached) $ac_c" 1>&6
8141 else
8142   ac_save_LIBS="$LIBS"
8143 LIBS="-ls  $LIBS"
8144 cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147 /* Override any gcc2 internal prototype to avoid an error.  */
8148 /* We use char because int might match the return type of a gcc2
8149     builtin and then its argument prototype would still apply.  */
8150 char afopen();
8151
8152 int main() {
8153 afopen()
8154 ; return 0; }
8155 EOF
8156 if { (eval echo configure:8157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8157   rm -rf conftest*
8158   eval "ac_cv_lib_$ac_lib_var=yes"
8159 else
8160   echo "configure: failed program was:" >&5
8161   cat conftest.$ac_ext >&5
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=no"
8164 fi
8165 rm -f conftest*
8166 LIBS="$ac_save_LIBS"
8167
8168 fi
8169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8170   echo "$ac_t""yes" 1>&6
8171   
8172         AUTH_LIBS=-ls
8173         cat >> confdefs.h <<\EOF
8174 #define HAVE_AIX_SECURITY 1
8175 EOF
8176
8177
8178 else
8179   echo "$ac_t""no" 1>&6
8180 fi
8181
8182
8183 case "$target" in
8184 *-ibm-openedition)
8185         ac_cv_func_getopt=no
8186         cat >> confdefs.h <<\EOF
8187 #define BOTH_STRINGS_H 1
8188 EOF
8189
8190         ;;
8191 esac
8192
8193 ol_link_modules=no
8194 WITH_MODULES_ENABLED=no
8195 if test $ol_enable_modules != no ; then
8196         for ac_hdr in ltdl.h
8197 do
8198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8200 echo "configure:8201: checking for $ac_hdr" >&5
8201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8202   echo $ac_n "(cached) $ac_c" 1>&6
8203 else
8204   cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 #include <$ac_hdr>
8208 EOF
8209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8210 { (eval echo configure:8211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8212 if test -z "$ac_err"; then
8213   rm -rf conftest*
8214   eval "ac_cv_header_$ac_safe=yes"
8215 else
8216   echo "$ac_err" >&5
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=no"
8221 fi
8222 rm -f conftest*
8223 fi
8224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8225   echo "$ac_t""yes" 1>&6
8226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8227   cat >> confdefs.h <<EOF
8228 #define $ac_tr_hdr 1
8229 EOF
8230  
8231 else
8232   echo "$ac_t""no" 1>&6
8233 fi
8234 done
8235
8236
8237         if test $ac_cv_header_ltdl_h = no ; then
8238                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8239         fi
8240
8241         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8242 echo "configure:8243: checking for lt_dlinit in -lltdl" >&5
8243 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   ac_save_LIBS="$LIBS"
8248 LIBS="-lltdl  $LIBS"
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8251 "configure"
8251 #include "confdefs.h"
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char lt_dlinit();
8256
8257 int main() {
8258 lt_dlinit()
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=no"
8269 fi
8270 rm -f conftest*
8271 LIBS="$ac_save_LIBS"
8272
8273 fi
8274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276   
8277                 MODULES_LIBS=-lltdl
8278                 cat >> confdefs.h <<\EOF
8279 #define HAVE_LIBLTDL 1
8280 EOF
8281
8282         
8283 else
8284   echo "$ac_t""no" 1>&6
8285 fi
8286
8287
8288         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8289                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8290         fi
8291         ol_link_modules=yes
8292         WITH_MODULES_ENABLED=yes
8293
8294 else
8295         for i in $Backends; do
8296                 eval "ol_tmp=\$ol_enable_$i"
8297                 if test $ol_tmp = mod ; then
8298                         echo "configure: warning: building static $i backend" 1>&2
8299                         eval "ol_enable_$i=yes"
8300                 fi
8301         done
8302         for i in $Overlays; do
8303                 eval "ol_tmp=\$ol_enable_$i"
8304                 if test $ol_tmp = mod ; then
8305                         echo "configure: warning: building static $i overlay" 1>&2
8306                         eval "ol_enable_$i=yes"
8307                 fi
8308         done
8309 fi
8310
8311 # test for EBCDIC
8312 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8313 echo "configure:8314: checking for EBCDIC" >&5
8314 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8315   echo $ac_n "(cached) $ac_c" 1>&6
8316 else
8317   
8318         cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321
8322 #if !('M' == 0xd4)
8323 #include <__ASCII__/generate_error.h>
8324 #endif
8325
8326 EOF
8327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8328 { (eval echo configure:8329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8330 if test -z "$ac_err"; then
8331   rm -rf conftest*
8332   ol_cv_cpp_ebcdic=yes
8333 else
8334   echo "$ac_err" >&5
8335   echo "configure: failed program was:" >&5
8336   cat conftest.$ac_ext >&5
8337   rm -rf conftest*
8338   ol_cv_cpp_ebcdic=no
8339 fi
8340 rm -f conftest*
8341 fi
8342
8343 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8344 if test $ol_cv_cpp_ebcdic = yes ; then
8345         cat >> confdefs.h <<\EOF
8346 #define HAVE_EBCDIC 1
8347 EOF
8348
8349 fi
8350
8351 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8352 echo "configure:8353: checking for ANSI C header files" >&5
8353 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8354   echo $ac_n "(cached) $ac_c" 1>&6
8355 else
8356   cat > conftest.$ac_ext <<EOF
8357 #line 8358 "configure"
8358 #include "confdefs.h"
8359 #include <stdlib.h>
8360 #include <stdarg.h>
8361 #include <string.h>
8362 #include <float.h>
8363 EOF
8364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8365 { (eval echo configure:8366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8367 if test -z "$ac_err"; then
8368   rm -rf conftest*
8369   ol_cv_header_stdc=yes
8370 else
8371   echo "$ac_err" >&5
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -rf conftest*
8375   ol_cv_header_stdc=no
8376 fi
8377 rm -f conftest*
8378
8379 if test $ol_cv_header_stdc = yes; then
8380   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8381 cat > conftest.$ac_ext <<EOF
8382 #line 8383 "configure"
8383 #include "confdefs.h"
8384 #include <string.h>
8385 EOF
8386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8387   egrep "memchr" >/dev/null 2>&1; then
8388   :
8389 else
8390   rm -rf conftest*
8391   ol_cv_header_stdc=no
8392 fi
8393 rm -f conftest*
8394
8395 fi
8396
8397 if test $ol_cv_header_stdc = yes; then
8398   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8399 cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 #include <stdlib.h>
8403 EOF
8404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8405   egrep "free" >/dev/null 2>&1; then
8406   :
8407 else
8408   rm -rf conftest*
8409   ol_cv_header_stdc=no
8410 fi
8411 rm -f conftest*
8412
8413 fi
8414
8415 if test $ol_cv_header_stdc = yes; then
8416   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8417 if test "$cross_compiling" = yes; then
8418   :
8419 else
8420   cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 #include <ctype.h>
8424 #ifndef HAVE_EBCDIC
8425 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8426 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8427 #else
8428 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8429                 || ('j' <= (c) && (c) <= 'r') \
8430                 || ('s' <= (c) && (c) <= 'z'))
8431 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8432 #endif
8433 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8434 int main () { int i; for (i = 0; i < 256; i++)
8435 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8436 exit (0); }
8437
8438 EOF
8439 if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8440 then
8441   :
8442 else
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -fr conftest*
8446   ol_cv_header_stdc=no
8447 fi
8448 rm -fr conftest*
8449 fi
8450
8451 fi
8452 fi
8453
8454 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8455 if test $ol_cv_header_stdc = yes; then
8456   cat >> confdefs.h <<\EOF
8457 #define STDC_HEADERS 1
8458 EOF
8459
8460 fi
8461 ac_cv_header_stdc=disable
8462
8463
8464 if test $ol_cv_header_stdc != yes; then
8465         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8466 fi
8467
8468 ac_header_dirent=no
8469 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8470 do
8471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8472 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8473 echo "configure:8474: checking for $ac_hdr that defines DIR" >&5
8474 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8475   echo $ac_n "(cached) $ac_c" 1>&6
8476 else
8477   cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <sys/types.h>
8481 #include <$ac_hdr>
8482 int main() {
8483 DIR *dirp = 0;
8484 ; return 0; }
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8487   rm -rf conftest*
8488   eval "ac_cv_header_dirent_$ac_safe=yes"
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   eval "ac_cv_header_dirent_$ac_safe=no"
8494 fi
8495 rm -f conftest*
8496 fi
8497 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8498   echo "$ac_t""yes" 1>&6
8499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8500   cat >> confdefs.h <<EOF
8501 #define $ac_tr_hdr 1
8502 EOF
8503  ac_header_dirent=$ac_hdr; break
8504 else
8505   echo "$ac_t""no" 1>&6
8506 fi
8507 done
8508 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8509 if test $ac_header_dirent = dirent.h; then
8510 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8511 echo "configure:8512: checking for opendir in -ldir" >&5
8512 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8514   echo $ac_n "(cached) $ac_c" 1>&6
8515 else
8516   ac_save_LIBS="$LIBS"
8517 LIBS="-ldir  $LIBS"
8518 cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521 /* Override any gcc2 internal prototype to avoid an error.  */
8522 /* We use char because int might match the return type of a gcc2
8523     builtin and then its argument prototype would still apply.  */
8524 char opendir();
8525
8526 int main() {
8527 opendir()
8528 ; return 0; }
8529 EOF
8530 if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8531   rm -rf conftest*
8532   eval "ac_cv_lib_$ac_lib_var=yes"
8533 else
8534   echo "configure: failed program was:" >&5
8535   cat conftest.$ac_ext >&5
8536   rm -rf conftest*
8537   eval "ac_cv_lib_$ac_lib_var=no"
8538 fi
8539 rm -f conftest*
8540 LIBS="$ac_save_LIBS"
8541
8542 fi
8543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8544   echo "$ac_t""yes" 1>&6
8545   LIBS="$LIBS -ldir"
8546 else
8547   echo "$ac_t""no" 1>&6
8548 fi
8549
8550 else
8551 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8552 echo "configure:8553: checking for opendir in -lx" >&5
8553 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8555   echo $ac_n "(cached) $ac_c" 1>&6
8556 else
8557   ac_save_LIBS="$LIBS"
8558 LIBS="-lx  $LIBS"
8559 cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 /* Override any gcc2 internal prototype to avoid an error.  */
8563 /* We use char because int might match the return type of a gcc2
8564     builtin and then its argument prototype would still apply.  */
8565 char opendir();
8566
8567 int main() {
8568 opendir()
8569 ; return 0; }
8570 EOF
8571 if { (eval echo configure:8572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8572   rm -rf conftest*
8573   eval "ac_cv_lib_$ac_lib_var=yes"
8574 else
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   eval "ac_cv_lib_$ac_lib_var=no"
8579 fi
8580 rm -f conftest*
8581 LIBS="$ac_save_LIBS"
8582
8583 fi
8584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8585   echo "$ac_t""yes" 1>&6
8586   LIBS="$LIBS -lx"
8587 else
8588   echo "$ac_t""no" 1>&6
8589 fi
8590
8591 fi
8592
8593 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8594 echo "configure:8595: checking for sys/wait.h that is POSIX.1 compatible" >&5
8595 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8596   echo $ac_n "(cached) $ac_c" 1>&6
8597 else
8598   cat > conftest.$ac_ext <<EOF
8599 #line 8600 "configure"
8600 #include "confdefs.h"
8601 #include <sys/types.h>
8602 #include <sys/wait.h>
8603 #ifndef WEXITSTATUS
8604 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8605 #endif
8606 #ifndef WIFEXITED
8607 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8608 #endif
8609 int main() {
8610 int s;
8611 wait (&s);
8612 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8613 ; return 0; }
8614 EOF
8615 if { (eval echo configure:8616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8616   rm -rf conftest*
8617   ac_cv_header_sys_wait_h=yes
8618 else
8619   echo "configure: failed program was:" >&5
8620   cat conftest.$ac_ext >&5
8621   rm -rf conftest*
8622   ac_cv_header_sys_wait_h=no
8623 fi
8624 rm -f conftest*
8625 fi
8626
8627 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8628 if test $ac_cv_header_sys_wait_h = yes; then
8629   cat >> confdefs.h <<\EOF
8630 #define HAVE_SYS_WAIT_H 1
8631 EOF
8632
8633 fi
8634
8635 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8636 echo "configure:8637: checking POSIX termios" >&5
8637 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <sys/types.h>
8644 #include <unistd.h>
8645 #include <termios.h>
8646 int main() {
8647 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8648    tcgetattr(0, 0);
8649 ; return 0; }
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8652   rm -rf conftest*
8653   am_cv_sys_posix_termios=yes
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   am_cv_sys_posix_termios=no
8659 fi
8660 rm -f conftest*
8661 fi
8662
8663 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8664
8665
8666  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8667 echo "configure:8668: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8668 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8672
8673   gwinsz_in_termios_h=no
8674   if test $am_cv_sys_posix_termios = yes; then
8675     cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 #include <sys/types.h>
8679 #     include <termios.h>
8680 #     ifdef TIOCGWINSZ
8681         yes
8682 #     endif
8683     
8684 EOF
8685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8686   egrep "yes" >/dev/null 2>&1; then
8687   rm -rf conftest*
8688   gwinsz_in_termios_h=yes
8689 fi
8690 rm -f conftest*
8691
8692   fi
8693
8694   if test $gwinsz_in_termios_h = no; then
8695     cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 #include <sys/types.h>
8699 #     include <sys/ioctl.h>
8700 #     ifdef TIOCGWINSZ
8701         yes
8702 #     endif
8703     
8704 EOF
8705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8706   egrep "yes" >/dev/null 2>&1; then
8707   rm -rf conftest*
8708   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8709 fi
8710 rm -f conftest*
8711
8712   fi
8713   
8714 fi
8715
8716 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8717   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8718     cat >> confdefs.h <<\EOF
8719 #define GWINSZ_IN_SYS_IOCTL 1
8720 EOF
8721
8722   fi
8723
8724 if test $am_cv_sys_posix_termios = yes ; then
8725         cat >> confdefs.h <<\EOF
8726 #define HAVE_POSIX_TERMIOS 1
8727 EOF
8728
8729 fi
8730
8731 for ac_hdr in \
8732         arpa/inet.h             \
8733         arpa/nameser.h          \
8734         assert.h                \
8735         bits/types.h            \
8736         conio.h                 \
8737         crypt.h                 \
8738         direct.h                \
8739         errno.h                 \
8740         fcntl.h                 \
8741         filio.h                 \
8742         getopt.h                \
8743         grp.h                   \
8744         io.h                    \
8745         libutil.h               \
8746         limits.h                \
8747         locale.h                \
8748         netinet/tcp.h           \
8749         malloc.h                \
8750         memory.h                \
8751         psap.h                  \
8752         pwd.h                   \
8753         process.h               \
8754         resolv.h                \
8755         sgtty.h                 \
8756         shadow.h                \
8757         stddef.h                \
8758         string.h                \
8759         strings.h               \
8760         sysexits.h              \
8761         sys/file.h              \
8762         sys/filio.h             \
8763         sys/errno.h             \
8764         sys/ioctl.h             \
8765         sys/param.h             \
8766         sys/resource.h          \
8767         sys/select.h            \
8768         sys/socket.h            \
8769         sys/stat.h              \
8770         sys/syslog.h            \
8771         sys/time.h              \
8772         sys/types.h             \
8773         sys/ucred.h             \
8774         sys/uio.h               \
8775         syslog.h                \
8776         termios.h               \
8777         unistd.h                \
8778         utime.h                 \
8779         winsock.h               \
8780         winsock2.h              \
8781
8782 do
8783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8785 echo "configure:8786: checking for $ac_hdr" >&5
8786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 #include <$ac_hdr>
8793 EOF
8794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8795 { (eval echo configure:8796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8797 if test -z "$ac_err"; then
8798   rm -rf conftest*
8799   eval "ac_cv_header_$ac_safe=yes"
8800 else
8801   echo "$ac_err" >&5
8802   echo "configure: failed program was:" >&5
8803   cat conftest.$ac_ext >&5
8804   rm -rf conftest*
8805   eval "ac_cv_header_$ac_safe=no"
8806 fi
8807 rm -f conftest*
8808 fi
8809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8812   cat >> confdefs.h <<EOF
8813 #define $ac_tr_hdr 1
8814 EOF
8815  
8816 else
8817   echo "$ac_t""no" 1>&6
8818 fi
8819 done
8820
8821
8822
8823 for ac_func in sigaction sigset 
8824 do
8825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8826 echo "configure:8827: checking for $ac_func" >&5
8827 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 /* System header to define __stub macros and hopefully few prototypes,
8834     which can conflict with char $ac_func(); below.  */
8835 #include <assert.h>
8836 /* Override any gcc2 internal prototype to avoid an error.  */
8837 /* We use char because int might match the return type of a gcc2
8838     builtin and then its argument prototype would still apply.  */
8839 char $ac_func();
8840 char (*f)();
8841
8842 int main() {
8843
8844 /* The GNU C library defines this for functions which it implements
8845     to always fail with ENOSYS.  Some functions are actually named
8846     something starting with __ and the normal name is an alias.  */
8847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8848 choke me
8849 #else
8850 f = $ac_func;
8851 #endif
8852
8853 ; return 0; }
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8856   rm -rf conftest*
8857   eval "ac_cv_func_$ac_func=yes"
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -rf conftest*
8862   eval "ac_cv_func_$ac_func=no"
8863 fi
8864 rm -f conftest*
8865 fi
8866
8867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8868   echo "$ac_t""yes" 1>&6
8869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8870   cat >> confdefs.h <<EOF
8871 #define $ac_tr_func 1
8872 EOF
8873  
8874 else
8875   echo "$ac_t""no" 1>&6
8876 fi
8877 done
8878
8879
8880 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8881         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8882 echo "configure:8883: checking for sigset in -lV3" >&5
8883 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8884 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8885   echo $ac_n "(cached) $ac_c" 1>&6
8886 else
8887   ac_save_LIBS="$LIBS"
8888 LIBS="-lV3  $LIBS"
8889 cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* Override any gcc2 internal prototype to avoid an error.  */
8893 /* We use char because int might match the return type of a gcc2
8894     builtin and then its argument prototype would still apply.  */
8895 char sigset();
8896
8897 int main() {
8898 sigset()
8899 ; return 0; }
8900 EOF
8901 if { (eval echo configure:8902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=yes"
8904 else
8905   echo "configure: failed program was:" >&5
8906   cat conftest.$ac_ext >&5
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=no"
8909 fi
8910 rm -f conftest*
8911 LIBS="$ac_save_LIBS"
8912
8913 fi
8914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8915   echo "$ac_t""yes" 1>&6
8916     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8917     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8918   cat >> confdefs.h <<EOF
8919 #define $ac_tr_lib 1
8920 EOF
8921
8922   LIBS="-lV3 $LIBS"
8923
8924 else
8925   echo "$ac_t""no" 1>&6
8926 fi
8927
8928 fi
8929
8930 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
8931 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8932 echo "configure:8933: checking for winsock" >&5
8933 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8934   echo $ac_n "(cached) $ac_c" 1>&6
8935 else
8936   save_LIBS="$LIBS"
8937 for curlib in ws2_32 wsock32; do
8938         LIBS="$LIBS -l$curlib"
8939         cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 #include <winsock.h>
8943                         
8944 int main() {
8945
8946                         socket(0,0,0);
8947                         select(0,NULL,NULL,NULL,NULL);
8948                         closesocket(0);
8949                         gethostname(NULL,0);
8950                         
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8954   rm -rf conftest*
8955   ol_cv_winsock=yes
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   ol_cv_winsock=no
8961 fi
8962 rm -f conftest*
8963
8964         if test $ol_cv_winsock = yes; then
8965                 cat >> confdefs.h <<\EOF
8966 #define HAVE_WINSOCK 1
8967 EOF
8968
8969                 ac_cv_func_socket=yes
8970                 ac_cv_func_select=yes
8971                 ac_cv_func_closesocket=yes
8972                 ac_cv_func_gethostname=yes
8973                 if test $curlib = ws2_32; then
8974                         ol_cv_winsock=winsock2
8975                         cat >> confdefs.h <<\EOF
8976 #define HAVE_WINSOCK2 1
8977 EOF
8978
8979                 fi
8980                 break
8981         fi
8982         LIBS="$save_LIBS"
8983 done
8984 fi
8985
8986 echo "$ac_t""$ol_cv_winsock" 1>&6
8987 fi
8988
8989
8990 echo $ac_n "checking for socket""... $ac_c" 1>&6
8991 echo "configure:8992: checking for socket" >&5
8992 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* System header to define __stub macros and hopefully few prototypes,
8999     which can conflict with char socket(); below.  */
9000 #include <assert.h>
9001 /* Override any gcc2 internal prototype to avoid an error.  */
9002 /* We use char because int might match the return type of a gcc2
9003     builtin and then its argument prototype would still apply.  */
9004 char socket();
9005 char (*f)();
9006
9007 int main() {
9008
9009 /* The GNU C library defines this for functions which it implements
9010     to always fail with ENOSYS.  Some functions are actually named
9011     something starting with __ and the normal name is an alias.  */
9012 #if defined (__stub_socket) || defined (__stub___socket)
9013 choke me
9014 #else
9015 f = socket;
9016 #endif
9017
9018 ; return 0; }
9019 EOF
9020 if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9021   rm -rf conftest*
9022   eval "ac_cv_func_socket=yes"
9023 else
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   eval "ac_cv_func_socket=no"
9028 fi
9029 rm -f conftest*
9030 fi
9031
9032 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034   :
9035 else
9036   echo "$ac_t""no" 1>&6
9037         
9038         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9039 echo "configure:9040: checking for main in -lsocket" >&5
9040 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   ac_save_LIBS="$LIBS"
9045 LIBS="-lsocket  $LIBS"
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049
9050 int main() {
9051 main()
9052 ; return 0; }
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9055   rm -rf conftest*
9056   eval "ac_cv_lib_$ac_lib_var=yes"
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=no"
9062 fi
9063 rm -f conftest*
9064 LIBS="$ac_save_LIBS"
9065
9066 fi
9067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9071   cat >> confdefs.h <<EOF
9072 #define $ac_tr_lib 1
9073 EOF
9074
9075   LIBS="-lsocket $LIBS"
9076
9077 else
9078   echo "$ac_t""no" 1>&6
9079 fi
9080
9081         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9082 echo "configure:9083: checking for main in -lnet" >&5
9083 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   ac_save_LIBS="$LIBS"
9088 LIBS="-lnet  $LIBS"
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092
9093 int main() {
9094 main()
9095 ; return 0; }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9098   rm -rf conftest*
9099   eval "ac_cv_lib_$ac_lib_var=yes"
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=no"
9105 fi
9106 rm -f conftest*
9107 LIBS="$ac_save_LIBS"
9108
9109 fi
9110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9111   echo "$ac_t""yes" 1>&6
9112     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9114   cat >> confdefs.h <<EOF
9115 #define $ac_tr_lib 1
9116 EOF
9117
9118   LIBS="-lnet $LIBS"
9119
9120 else
9121   echo "$ac_t""no" 1>&6
9122 fi
9123
9124         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9125 echo "configure:9126: checking for main in -lnsl_s" >&5
9126 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9128   echo $ac_n "(cached) $ac_c" 1>&6
9129 else
9130   ac_save_LIBS="$LIBS"
9131 LIBS="-lnsl_s  $LIBS"
9132 cat > conftest.$ac_ext <<EOF
9133 #line 9134 "configure"
9134 #include "confdefs.h"
9135
9136 int main() {
9137 main()
9138 ; return 0; }
9139 EOF
9140 if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9141   rm -rf conftest*
9142   eval "ac_cv_lib_$ac_lib_var=yes"
9143 else
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -rf conftest*
9147   eval "ac_cv_lib_$ac_lib_var=no"
9148 fi
9149 rm -f conftest*
9150 LIBS="$ac_save_LIBS"
9151
9152 fi
9153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9154   echo "$ac_t""yes" 1>&6
9155     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9156     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9157   cat >> confdefs.h <<EOF
9158 #define $ac_tr_lib 1
9159 EOF
9160
9161   LIBS="-lnsl_s $LIBS"
9162
9163 else
9164   echo "$ac_t""no" 1>&6
9165 fi
9166
9167         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9168 echo "configure:9169: checking for main in -lnsl" >&5
9169 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9171   echo $ac_n "(cached) $ac_c" 1>&6
9172 else
9173   ac_save_LIBS="$LIBS"
9174 LIBS="-lnsl  $LIBS"
9175 cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178
9179 int main() {
9180 main()
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9184   rm -rf conftest*
9185   eval "ac_cv_lib_$ac_lib_var=yes"
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   eval "ac_cv_lib_$ac_lib_var=no"
9191 fi
9192 rm -f conftest*
9193 LIBS="$ac_save_LIBS"
9194
9195 fi
9196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9197   echo "$ac_t""yes" 1>&6
9198     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9199     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9200   cat >> confdefs.h <<EOF
9201 #define $ac_tr_lib 1
9202 EOF
9203
9204   LIBS="-lnsl $LIBS"
9205
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209
9210         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9211 echo "configure:9212: checking for socket in -linet" >&5
9212 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   ac_save_LIBS="$LIBS"
9217 LIBS="-linet  $LIBS"
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221 /* Override any gcc2 internal prototype to avoid an error.  */
9222 /* We use char because int might match the return type of a gcc2
9223     builtin and then its argument prototype would still apply.  */
9224 char socket();
9225
9226 int main() {
9227 socket()
9228 ; return 0; }
9229 EOF
9230 if { (eval echo configure:9231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9231   rm -rf conftest*
9232   eval "ac_cv_lib_$ac_lib_var=yes"
9233 else
9234   echo "configure: failed program was:" >&5
9235   cat conftest.$ac_ext >&5
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=no"
9238 fi
9239 rm -f conftest*
9240 LIBS="$ac_save_LIBS"
9241
9242 fi
9243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9244   echo "$ac_t""yes" 1>&6
9245     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9247   cat >> confdefs.h <<EOF
9248 #define $ac_tr_lib 1
9249 EOF
9250
9251   LIBS="-linet $LIBS"
9252
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256
9257         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9258 echo "configure:9259: checking for main in -lgen" >&5
9259 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9261   echo $ac_n "(cached) $ac_c" 1>&6
9262 else
9263   ac_save_LIBS="$LIBS"
9264 LIBS="-lgen  $LIBS"
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9268
9269 int main() {
9270 main()
9271 ; return 0; }
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9274   rm -rf conftest*
9275   eval "ac_cv_lib_$ac_lib_var=yes"
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=no"
9281 fi
9282 rm -f conftest*
9283 LIBS="$ac_save_LIBS"
9284
9285 fi
9286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9289     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9290   cat >> confdefs.h <<EOF
9291 #define $ac_tr_lib 1
9292 EOF
9293
9294   LIBS="-lgen $LIBS"
9295
9296 else
9297   echo "$ac_t""no" 1>&6
9298 fi
9299
9300
9301 fi
9302
9303
9304 echo $ac_n "checking for select""... $ac_c" 1>&6
9305 echo "configure:9306: checking for select" >&5
9306 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9307   echo $ac_n "(cached) $ac_c" 1>&6
9308 else
9309   cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 /* System header to define __stub macros and hopefully few prototypes,
9313     which can conflict with char select(); below.  */
9314 #include <assert.h>
9315 /* Override any gcc2 internal prototype to avoid an error.  */
9316 /* We use char because int might match the return type of a gcc2
9317     builtin and then its argument prototype would still apply.  */
9318 char select();
9319 char (*f)();
9320
9321 int main() {
9322
9323 /* The GNU C library defines this for functions which it implements
9324     to always fail with ENOSYS.  Some functions are actually named
9325     something starting with __ and the normal name is an alias.  */
9326 #if defined (__stub_select) || defined (__stub___select)
9327 choke me
9328 #else
9329 f = select;
9330 #endif
9331
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_func_select=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_func_select=no"
9342 fi
9343 rm -f conftest*
9344 fi
9345
9346 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348   :
9349 else
9350   echo "$ac_t""no" 1>&6
9351 { echo "configure: error: select() required." 1>&2; exit 1; }
9352 fi
9353
9354
9355 if test "${ac_cv_header_winsock_h}" != yes; then
9356                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9357 echo "configure:9358: checking types of arguments for select()" >&5
9358  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9362   echo $ac_n "(cached) $ac_c" 1>&6
9363 else
9364     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9368      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9369       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9370        cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 #ifdef HAVE_SYS_TYPES_H
9374 #include <sys/types.h>
9375 #endif
9376 #ifdef HAVE_SYS_TIME_H
9377 #include <sys/time.h>
9378 #endif
9379 #ifdef HAVE_SYS_SELECT_H
9380 #include <sys/select.h>
9381 #endif
9382 #ifdef HAVE_SYS_SOCKET_H
9383 #include <sys/socket.h>
9384 #endif
9385 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);
9386 int main() {
9387
9388 ; return 0; }
9389 EOF
9390 if { (eval echo configure:9391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9391   rm -rf conftest*
9392           ac_not_found=no ; break 3
9393 else
9394   echo "configure: failed program was:" >&5
9395   cat conftest.$ac_ext >&5
9396   rm -rf conftest*
9397   ac_not_found=yes
9398 fi
9399 rm -f conftest*
9400       done
9401      done
9402     done
9403    
9404 fi
9405   
9406 fi
9407  
9408 fi
9409  if test "$ac_not_found" = yes; then
9410   ac_cv_func_select_arg1=int 
9411   ac_cv_func_select_arg234='int *' 
9412   ac_cv_func_select_arg5='struct timeval *'
9413  fi
9414  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9415  cat >> confdefs.h <<EOF
9416 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9417 EOF
9418
9419  cat >> confdefs.h <<EOF
9420 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9421 EOF
9422
9423  cat >> confdefs.h <<EOF
9424 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9425 EOF
9426
9427
9428 fi
9429
9430
9431 for ac_func in poll 
9432 do
9433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9434 echo "configure:9435: checking for $ac_func" >&5
9435 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 /* System header to define __stub macros and hopefully few prototypes,
9442     which can conflict with char $ac_func(); below.  */
9443 #include <assert.h>
9444 /* Override any gcc2 internal prototype to avoid an error.  */
9445 /* We use char because int might match the return type of a gcc2
9446     builtin and then its argument prototype would still apply.  */
9447 char $ac_func();
9448 char (*f)();
9449
9450 int main() {
9451
9452 /* The GNU C library defines this for functions which it implements
9453     to always fail with ENOSYS.  Some functions are actually named
9454     something starting with __ and the normal name is an alias.  */
9455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9456 choke me
9457 #else
9458 f = $ac_func;
9459 #endif
9460
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9464   rm -rf conftest*
9465   eval "ac_cv_func_$ac_func=yes"
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_func_$ac_func=no"
9471 fi
9472 rm -f conftest*
9473 fi
9474
9475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9476   echo "$ac_t""yes" 1>&6
9477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9478   cat >> confdefs.h <<EOF
9479 #define $ac_tr_func 1
9480 EOF
9481  
9482 else
9483   echo "$ac_t""no" 1>&6
9484 fi
9485 done
9486
9487 for ac_hdr in poll.h 
9488 do
9489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9491 echo "configure:9492: checking for $ac_hdr" >&5
9492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9493   echo $ac_n "(cached) $ac_c" 1>&6
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 #include <$ac_hdr>
9499 EOF
9500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9501 { (eval echo configure:9502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9503 if test -z "$ac_err"; then
9504   rm -rf conftest*
9505   eval "ac_cv_header_$ac_safe=yes"
9506 else
9507   echo "$ac_err" >&5
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_header_$ac_safe=no"
9512 fi
9513 rm -f conftest*
9514 fi
9515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9516   echo "$ac_t""yes" 1>&6
9517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9518   cat >> confdefs.h <<EOF
9519 #define $ac_tr_hdr 1
9520 EOF
9521  
9522 else
9523   echo "$ac_t""no" 1>&6
9524 fi
9525 done
9526
9527
9528 for ac_hdr in sys/epoll.h 
9529 do
9530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9532 echo "configure:9533: checking for $ac_hdr" >&5
9533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536   cat > conftest.$ac_ext <<EOF
9537 #line 9538 "configure"
9538 #include "confdefs.h"
9539 #include <$ac_hdr>
9540 EOF
9541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9542 { (eval echo configure:9543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9544 if test -z "$ac_err"; then
9545   rm -rf conftest*
9546   eval "ac_cv_header_$ac_safe=yes"
9547 else
9548   echo "$ac_err" >&5
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -rf conftest*
9552   eval "ac_cv_header_$ac_safe=no"
9553 fi
9554 rm -f conftest*
9555 fi
9556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9557   echo "$ac_t""yes" 1>&6
9558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9559   cat >> confdefs.h <<EOF
9560 #define $ac_tr_hdr 1
9561 EOF
9562  
9563 else
9564   echo "$ac_t""no" 1>&6
9565 fi
9566 done
9567
9568 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9569 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9570 echo "configure:9571: checking for epoll system call" >&5
9571 if test "$cross_compiling" = yes; then
9572   echo "$ac_t""no" 1>&6
9573 else
9574   cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577 int main(int argc, char *argv)
9578 {
9579         int epfd = epoll_create(256);
9580         exit (epfd == -1 ? 1 : 0);
9581 }
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9584 then
9585   echo "$ac_t""yes" 1>&6
9586 cat >> confdefs.h <<\EOF
9587 #define HAVE_EPOLL 1
9588 EOF
9589
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -fr conftest*
9594   echo "$ac_t""no" 1>&6
9595 fi
9596 rm -fr conftest*
9597 fi
9598
9599 fi
9600
9601 # strerror checks
9602 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9603 echo "configure:9604: checking declaration of sys_errlist" >&5
9604 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9605   echo $ac_n "(cached) $ac_c" 1>&6
9606 else
9607   
9608         cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611
9612 #include <stdio.h>
9613 #include <sys/types.h>
9614 #include <errno.h>
9615 #ifdef WINNT
9616 #include <stdlib.h>
9617 #endif 
9618 int main() {
9619 char *c = (char *) *sys_errlist
9620 ; return 0; }
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9623   rm -rf conftest*
9624   ol_cv_dcl_sys_errlist=yes
9625         ol_cv_have_sys_errlist=yes
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629   rm -rf conftest*
9630   ol_cv_dcl_sys_errlist=no
9631 fi
9632 rm -f conftest*
9633 fi
9634
9635 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9636 #
9637 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9638 if test $ol_cv_dcl_sys_errlist = no ; then
9639         cat >> confdefs.h <<\EOF
9640 #define DECL_SYS_ERRLIST 1
9641 EOF
9642
9643
9644         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9645 echo "configure:9646: checking existence of sys_errlist" >&5
9646 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   
9650                 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 #include <errno.h>
9654 int main() {
9655 char *c = (char *) *sys_errlist
9656 ; return 0; }
9657 EOF
9658 if { (eval echo configure:9659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9659   rm -rf conftest*
9660   ol_cv_have_sys_errlist=yes
9661 else
9662   echo "configure: failed program was:" >&5
9663   cat conftest.$ac_ext >&5
9664   rm -rf conftest*
9665   ol_cv_have_sys_errlist=no
9666 fi
9667 rm -f conftest*
9668 fi
9669
9670 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9671 fi
9672 if test $ol_cv_have_sys_errlist = yes ; then
9673         cat >> confdefs.h <<\EOF
9674 #define HAVE_SYS_ERRLIST 1
9675 EOF
9676
9677 fi
9678  for ac_func in strerror strerror_r
9679 do
9680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9681 echo "configure:9682: checking for $ac_func" >&5
9682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9683   echo $ac_n "(cached) $ac_c" 1>&6
9684 else
9685   cat > conftest.$ac_ext <<EOF
9686 #line 9687 "configure"
9687 #include "confdefs.h"
9688 /* System header to define __stub macros and hopefully few prototypes,
9689     which can conflict with char $ac_func(); below.  */
9690 #include <assert.h>
9691 /* Override any gcc2 internal prototype to avoid an error.  */
9692 /* We use char because int might match the return type of a gcc2
9693     builtin and then its argument prototype would still apply.  */
9694 char $ac_func();
9695 char (*f)();
9696
9697 int main() {
9698
9699 /* The GNU C library defines this for functions which it implements
9700     to always fail with ENOSYS.  Some functions are actually named
9701     something starting with __ and the normal name is an alias.  */
9702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9703 choke me
9704 #else
9705 f = $ac_func;
9706 #endif
9707
9708 ; return 0; }
9709 EOF
9710 if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9711   rm -rf conftest*
9712   eval "ac_cv_func_$ac_func=yes"
9713 else
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716   rm -rf conftest*
9717   eval "ac_cv_func_$ac_func=no"
9718 fi
9719 rm -f conftest*
9720 fi
9721
9722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9723   echo "$ac_t""yes" 1>&6
9724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9725   cat >> confdefs.h <<EOF
9726 #define $ac_tr_func 1
9727 EOF
9728  
9729 else
9730   echo "$ac_t""no" 1>&6
9731 fi
9732 done
9733
9734 ol_cv_func_strerror_r=no
9735 if test "${ac_cv_func_strerror_r}" = yes ; then
9736         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9737 echo "configure:9738: checking non-posix strerror_r" >&5
9738 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9739   echo $ac_n "(cached) $ac_c" 1>&6
9740 else
9741   
9742         cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 #include <string.h>
9746 EOF
9747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9748   egrep "strerror_r" >/dev/null 2>&1; then
9749   rm -rf conftest*
9750   ol_decl_strerror_r=yes
9751 else
9752   rm -rf conftest*
9753   ol_decl_strerror_r=no
9754 fi
9755 rm -f conftest*
9756
9757         if test $ol_decl_strerror_r = yes ; then
9758                 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 #include <string.h>
9762 int main() {
9763    /* from autoconf 2.59 */
9764                                 char buf[100];
9765                                 char x = *strerror_r (0, buf, sizeof buf);
9766                                 char *p = strerror_r (0, buf, sizeof buf);
9767                         
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9771   rm -rf conftest*
9772   ol_cv_nonposix_strerror_r=yes
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776   rm -rf conftest*
9777   ol_cv_nonposix_strerror_r=no
9778 fi
9779 rm -f conftest*
9780         else
9781                 if test "$cross_compiling" = yes; then
9782   ol_cv_nonposix_strerror=no
9783 else
9784   cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787
9788                         main() {
9789                                 char buf[100];
9790                                 buf[0] = 0;
9791                                 strerror_r( 1, buf, sizeof buf );
9792                                 exit( buf[0] == 0 );
9793                         }
9794                         
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9797 then
9798   ol_cv_nonposix_strerror_r=yes
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802   rm -fr conftest*
9803   ol_cv_nonposix_strerror=no
9804 fi
9805 rm -fr conftest*
9806 fi
9807
9808         fi
9809         
9810 fi
9811
9812 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9813 if test $ol_cv_nonposix_strerror_r = yes ; then
9814         cat >> confdefs.h <<\EOF
9815 #define HAVE_NONPOSIX_STRERROR_R 1
9816 EOF
9817
9818 fi
9819
9820 elif test "${ac_cv_func_strerror}" = no ; then
9821         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9822 echo "configure:9823: checking declaration of sys_errlist" >&5
9823 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9824   echo $ac_n "(cached) $ac_c" 1>&6
9825 else
9826   
9827         cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830
9831 #include <stdio.h>
9832 #include <sys/types.h>
9833 #include <errno.h>
9834 #ifdef WINNT
9835 #include <stdlib.h>
9836 #endif 
9837 int main() {
9838 char *c = (char *) *sys_errlist
9839 ; return 0; }
9840 EOF
9841 if { (eval echo configure:9842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9842   rm -rf conftest*
9843   ol_cv_dcl_sys_errlist=yes
9844         ol_cv_have_sys_errlist=yes
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   ol_cv_dcl_sys_errlist=no
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9855 #
9856 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9857 if test $ol_cv_dcl_sys_errlist = no ; then
9858         cat >> confdefs.h <<\EOF
9859 #define DECL_SYS_ERRLIST 1
9860 EOF
9861
9862
9863         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9864 echo "configure:9865: checking existence of sys_errlist" >&5
9865 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869                 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 #include <errno.h>
9873 int main() {
9874 char *c = (char *) *sys_errlist
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   ol_cv_have_sys_errlist=yes
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   ol_cv_have_sys_errlist=no
9885 fi
9886 rm -f conftest*
9887 fi
9888
9889 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9890 fi
9891 if test $ol_cv_have_sys_errlist = yes ; then
9892         cat >> confdefs.h <<\EOF
9893 #define HAVE_SYS_ERRLIST 1
9894 EOF
9895
9896 fi
9897
9898 fi
9899
9900
9901 for ac_hdr in regex.h 
9902 do
9903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9905 echo "configure:9906: checking for $ac_hdr" >&5
9906 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 #include <$ac_hdr>
9913 EOF
9914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9915 { (eval echo configure:9916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9917 if test -z "$ac_err"; then
9918   rm -rf conftest*
9919   eval "ac_cv_header_$ac_safe=yes"
9920 else
9921   echo "$ac_err" >&5
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   eval "ac_cv_header_$ac_safe=no"
9926 fi
9927 rm -f conftest*
9928 fi
9929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9930   echo "$ac_t""yes" 1>&6
9931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9932   cat >> confdefs.h <<EOF
9933 #define $ac_tr_hdr 1
9934 EOF
9935  
9936 else
9937   echo "$ac_t""no" 1>&6
9938 fi
9939 done
9940
9941 if test "$ac_cv_header_regex_h" != yes ; then
9942         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9943 fi
9944
9945 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9946 echo "configure:9947: checking for library containing regfree" >&5
9947 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9948   echo $ac_n "(cached) $ac_c" 1>&6
9949 else
9950   ac_func_search_save_LIBS="$LIBS"
9951 ac_cv_search_regfree="no"
9952 cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 /* We use char because int might match the return type of a gcc2
9957     builtin and then its argument prototype would still apply.  */
9958 char regfree();
9959
9960 int main() {
9961 regfree()
9962 ; return 0; }
9963 EOF
9964 if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9965   rm -rf conftest*
9966   ac_cv_search_regfree="none required"
9967 else
9968   echo "configure: failed program was:" >&5
9969   cat conftest.$ac_ext >&5
9970 fi
9971 rm -f conftest*
9972 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9973 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9974 cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 /* Override any gcc2 internal prototype to avoid an error.  */
9978 /* We use char because int might match the return type of a gcc2
9979     builtin and then its argument prototype would still apply.  */
9980 char regfree();
9981
9982 int main() {
9983 regfree()
9984 ; return 0; }
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9987   rm -rf conftest*
9988   ac_cv_search_regfree="-l$ac_lib"
9989 break
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest*
9995 done
9996 LIBS="$ac_func_search_save_LIBS"
9997 fi
9998
9999 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10000 if test "$ac_cv_search_regfree" != "no"; then
10001   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10002   :
10003 else :
10004   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10005 fi
10006
10007
10008 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10009 echo "configure:10010: checking for compatible POSIX regex" >&5
10010 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   
10014         if test "$cross_compiling" = yes; then
10015   ol_cv_c_posix_regex=cross
10016 else
10017   cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020
10021 #include <sys/types.h>
10022 #include <regex.h>
10023 static char *pattern, *string;
10024 main()
10025 {
10026         int rc;
10027         regex_t re;
10028
10029         pattern = "^A";
10030
10031         if(regcomp(&re, pattern, 0)) {
10032                 return -1;
10033         }
10034         
10035         string = "ALL MATCH";
10036         
10037         rc = regexec(&re, string, 0, (void*)0, 0);
10038
10039         regfree(&re);
10040
10041         return rc;
10042 }
10043 EOF
10044 if { (eval echo configure:10045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10045 then
10046   ol_cv_c_posix_regex=yes
10047 else
10048   echo "configure: failed program was:" >&5
10049   cat conftest.$ac_ext >&5
10050   rm -fr conftest*
10051   ol_cv_c_posix_regex=no
10052 fi
10053 rm -fr conftest*
10054 fi
10055
10056 fi
10057
10058 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10059
10060 if test "$ol_cv_c_posix_regex" = no ; then
10061         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10062 fi
10063
10064
10065 have_uuid=no
10066 for ac_hdr in sys/uuid.h
10067 do
10068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10070 echo "configure:10071: checking for $ac_hdr" >&5
10071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <$ac_hdr>
10078 EOF
10079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10080 { (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10082 if test -z "$ac_err"; then
10083   rm -rf conftest*
10084   eval "ac_cv_header_$ac_safe=yes"
10085 else
10086   echo "$ac_err" >&5
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_header_$ac_safe=no"
10091 fi
10092 rm -f conftest*
10093 fi
10094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10097   cat >> confdefs.h <<EOF
10098 #define $ac_tr_hdr 1
10099 EOF
10100  
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104 done
10105
10106 if test $ac_cv_header_sys_uuid_h = yes ; then
10107         save_LIBS="$LIBS"
10108         
10109 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10110 echo "configure:10111: checking for library containing uuid_to_str" >&5
10111 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   ac_func_search_save_LIBS="$LIBS"
10115 ac_cv_search_uuid_to_str="no"
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char uuid_to_str();
10123
10124 int main() {
10125 uuid_to_str()
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10129   rm -rf conftest*
10130   ac_cv_search_uuid_to_str="none required"
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134 fi
10135 rm -f conftest*
10136 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10137 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10138 cat > conftest.$ac_ext <<EOF
10139 #line 10140 "configure"
10140 #include "confdefs.h"
10141 /* Override any gcc2 internal prototype to avoid an error.  */
10142 /* We use char because int might match the return type of a gcc2
10143     builtin and then its argument prototype would still apply.  */
10144 char uuid_to_str();
10145
10146 int main() {
10147 uuid_to_str()
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10151   rm -rf conftest*
10152   ac_cv_search_uuid_to_str="-l$ac_lib"
10153 break
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157 fi
10158 rm -f conftest*
10159 done
10160 LIBS="$ac_func_search_save_LIBS"
10161 fi
10162
10163 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10164 if test "$ac_cv_search_uuid_to_str" != "no"; then
10165   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10166   have_uuid=yes
10167 else :
10168   :
10169 fi
10170         LIBS="$save_LIBS"
10171
10172         if test have_uuid = yes ; then
10173                 cat >> confdefs.h <<\EOF
10174 #define HAVE_UUID_TO_STR 1
10175 EOF
10176
10177
10178                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10179                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10180         fi
10181 fi
10182
10183 if test $have_uuid = no ; then
10184         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10185 echo "configure:10186: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10186         save_LIBS="$LIBS"
10187         LIBS="$LIBS -lrpcrt4"
10188         cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191
10192                 int __stdcall UuidCreate(void *);
10193                 int __stdcall UuidToStringA(void *,void **);
10194                 
10195 int main() {
10196
10197                 UuidCreate(0);
10198                 UuidToStringA(0,0);
10199                 
10200 ; return 0; }
10201 EOF
10202 if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10203   rm -rf conftest*
10204   need_rpcrt=yes
10205 else
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   need_rpcrt=no
10210 fi
10211 rm -f conftest*
10212         if test $need_rpcrt = yes; then
10213                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10214         fi
10215         LIBS="$save_LIBS"
10216         echo "$ac_t""$need_rpcrt" 1>&6
10217 fi
10218
10219 ol_cv_lib_resolver=no
10220 if test $ol_cv_lib_resolver = no ; then
10221         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10222 echo "configure:10223: checking for resolver link (default)" >&5
10223 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   
10227         ol_RESOLVER_LIB=
10228         ol_LIBS=$LIBS
10229         LIBS="$ol_RESOLVER_LIB $LIBS"
10230
10231         cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234
10235 #ifdef HAVE_SYS_TYPES_H
10236 #       include <sys/types.h>
10237 #endif
10238 #include <netinet/in.h>
10239 #ifdef HAVE_ARPA_NAMESER_H
10240 #       include <arpa/nameser.h>
10241 #endif
10242 #ifdef HAVE_RESOLV_H
10243 #       include <resolv.h>
10244 #endif
10245
10246 int main() {
10247 {
10248         int len, status;
10249         char *request = NULL;
10250         unsigned char reply[64*1024];
10251         unsigned char host[64*1024];
10252         unsigned char *p;
10253
10254 #ifdef NS_HFIXEDSZ
10255         /* Bind 8/9 interface */
10256         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10257 #else
10258         /* Bind 4 interface */
10259 # ifndef T_SRV
10260 #  define T_SRV 33
10261 # endif
10262         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10263 #endif
10264         p = reply;
10265 #ifdef NS_HFIXEDSZ
10266         /* Bind 8/9 interface */
10267         p += NS_HFIXEDSZ;
10268 #elif defined(HFIXEDSZ)
10269         /* Bind 4 interface w/ HFIXEDSZ */
10270         p += HFIXEDSZ;
10271 #else
10272         /* Bind 4 interface w/o HFIXEDSZ */
10273         p += sizeof(HEADER);
10274 #endif
10275         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10276 }
10277 ; return 0; }
10278 EOF
10279 if { (eval echo configure:10280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10280   rm -rf conftest*
10281   ol_cv_resolver_none=yes
10282 else
10283   echo "configure: failed program was:" >&5
10284   cat conftest.$ac_ext >&5
10285   rm -rf conftest*
10286   ol_cv_resolver_none=no
10287 fi
10288 rm -f conftest*
10289
10290         LIBS="$ol_LIBS"
10291
10292 fi
10293
10294 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10295
10296         if test $ol_cv_resolver_none = yes ; then
10297                 ol_cv_lib_resolver=yes
10298         fi
10299 fi
10300
10301 if test $ol_cv_lib_resolver = no ; then
10302         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10303 echo "configure:10304: checking for resolver link (-lresolv)" >&5
10304 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10305   echo $ac_n "(cached) $ac_c" 1>&6
10306 else
10307   
10308         ol_RESOLVER_LIB=-lresolv
10309         ol_LIBS=$LIBS
10310         LIBS="$ol_RESOLVER_LIB $LIBS"
10311
10312         cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315
10316 #ifdef HAVE_SYS_TYPES_H
10317 #       include <sys/types.h>
10318 #endif
10319 #include <netinet/in.h>
10320 #ifdef HAVE_ARPA_NAMESER_H
10321 #       include <arpa/nameser.h>
10322 #endif
10323 #ifdef HAVE_RESOLV_H
10324 #       include <resolv.h>
10325 #endif
10326
10327 int main() {
10328 {
10329         int len, status;
10330         char *request = NULL;
10331         unsigned char reply[64*1024];
10332         unsigned char host[64*1024];
10333         unsigned char *p;
10334
10335 #ifdef NS_HFIXEDSZ
10336         /* Bind 8/9 interface */
10337         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10338 #else
10339         /* Bind 4 interface */
10340 # ifndef T_SRV
10341 #  define T_SRV 33
10342 # endif
10343         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10344 #endif
10345         p = reply;
10346 #ifdef NS_HFIXEDSZ
10347         /* Bind 8/9 interface */
10348         p += NS_HFIXEDSZ;
10349 #elif defined(HFIXEDSZ)
10350         /* Bind 4 interface w/ HFIXEDSZ */
10351         p += HFIXEDSZ;
10352 #else
10353         /* Bind 4 interface w/o HFIXEDSZ */
10354         p += sizeof(HEADER);
10355 #endif
10356         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10357 }
10358 ; return 0; }
10359 EOF
10360 if { (eval echo configure:10361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10361   rm -rf conftest*
10362   ol_cv_resolver_resolv=yes
10363 else
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   ol_cv_resolver_resolv=no
10368 fi
10369 rm -f conftest*
10370
10371         LIBS="$ol_LIBS"
10372
10373 fi
10374
10375 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10376
10377         if test $ol_cv_resolver_resolv = yes ; then
10378                 ol_cv_lib_resolver=-lresolv
10379         fi
10380 fi
10381
10382 if test $ol_cv_lib_resolver = no ; then
10383         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10384 echo "configure:10385: checking for resolver link (-lbind)" >&5
10385 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   
10389         ol_RESOLVER_LIB=-lbind
10390         ol_LIBS=$LIBS
10391         LIBS="$ol_RESOLVER_LIB $LIBS"
10392
10393         cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396
10397 #ifdef HAVE_SYS_TYPES_H
10398 #       include <sys/types.h>
10399 #endif
10400 #include <netinet/in.h>
10401 #ifdef HAVE_ARPA_NAMESER_H
10402 #       include <arpa/nameser.h>
10403 #endif
10404 #ifdef HAVE_RESOLV_H
10405 #       include <resolv.h>
10406 #endif
10407
10408 int main() {
10409 {
10410         int len, status;
10411         char *request = NULL;
10412         unsigned char reply[64*1024];
10413         unsigned char host[64*1024];
10414         unsigned char *p;
10415
10416 #ifdef NS_HFIXEDSZ
10417         /* Bind 8/9 interface */
10418         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10419 #else
10420         /* Bind 4 interface */
10421 # ifndef T_SRV
10422 #  define T_SRV 33
10423 # endif
10424         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10425 #endif
10426         p = reply;
10427 #ifdef NS_HFIXEDSZ
10428         /* Bind 8/9 interface */
10429         p += NS_HFIXEDSZ;
10430 #elif defined(HFIXEDSZ)
10431         /* Bind 4 interface w/ HFIXEDSZ */
10432         p += HFIXEDSZ;
10433 #else
10434         /* Bind 4 interface w/o HFIXEDSZ */
10435         p += sizeof(HEADER);
10436 #endif
10437         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10438 }
10439 ; return 0; }
10440 EOF
10441 if { (eval echo configure:10442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10442   rm -rf conftest*
10443   ol_cv_resolver_bind=yes
10444 else
10445   echo "configure: failed program was:" >&5
10446   cat conftest.$ac_ext >&5
10447   rm -rf conftest*
10448   ol_cv_resolver_bind=no
10449 fi
10450 rm -f conftest*
10451
10452         LIBS="$ol_LIBS"
10453
10454 fi
10455
10456 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10457
10458         if test $ol_cv_resolver_bind = yes ; then
10459                 ol_cv_lib_resolver=-lbind
10460         fi
10461 fi
10462
10463
10464
10465 ol_link_dnssrv=no
10466 if test "$ol_cv_lib_resolver" != no ; then
10467         cat >> confdefs.h <<\EOF
10468 #define HAVE_RES_QUERY 1
10469 EOF
10470
10471
10472         if test "$ol_enable_dnssrv" != no ; then
10473                 ol_link_dnssrv=yes
10474         fi
10475
10476         if test "$ol_cv_lib_resolver" != yes ; then
10477                 LIBS="$ol_cv_lib_resolver $LIBS"
10478         fi
10479 fi
10480
10481 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10482         if test "$ol_link_dnssrv" = no ; then
10483                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10484         fi
10485 else
10486         ol_enable_dnssrv=no
10487 fi
10488
10489 for ac_func in hstrerror 
10490 do
10491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10492 echo "configure:10493: checking for $ac_func" >&5
10493 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   cat > conftest.$ac_ext <<EOF
10497 #line 10498 "configure"
10498 #include "confdefs.h"
10499 /* System header to define __stub macros and hopefully few prototypes,
10500     which can conflict with char $ac_func(); below.  */
10501 #include <assert.h>
10502 /* Override any gcc2 internal prototype to avoid an error.  */
10503 /* We use char because int might match the return type of a gcc2
10504     builtin and then its argument prototype would still apply.  */
10505 char $ac_func();
10506 char (*f)();
10507
10508 int main() {
10509
10510 /* The GNU C library defines this for functions which it implements
10511     to always fail with ENOSYS.  Some functions are actually named
10512     something starting with __ and the normal name is an alias.  */
10513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10514 choke me
10515 #else
10516 f = $ac_func;
10517 #endif
10518
10519 ; return 0; }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10522   rm -rf conftest*
10523   eval "ac_cv_func_$ac_func=yes"
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_func_$ac_func=no"
10529 fi
10530 rm -f conftest*
10531 fi
10532
10533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10536   cat >> confdefs.h <<EOF
10537 #define $ac_tr_func 1
10538 EOF
10539  
10540 else
10541   echo "$ac_t""no" 1>&6
10542 fi
10543 done
10544
10545
10546 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10547 do
10548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10549 echo "configure:10550: checking for $ac_func" >&5
10550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 /* System header to define __stub macros and hopefully few prototypes,
10557     which can conflict with char $ac_func(); below.  */
10558 #include <assert.h>
10559 /* Override any gcc2 internal prototype to avoid an error.  */
10560 /* We use char because int might match the return type of a gcc2
10561     builtin and then its argument prototype would still apply.  */
10562 char $ac_func();
10563 char (*f)();
10564
10565 int main() {
10566
10567 /* The GNU C library defines this for functions which it implements
10568     to always fail with ENOSYS.  Some functions are actually named
10569     something starting with __ and the normal name is an alias.  */
10570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10571 choke me
10572 #else
10573 f = $ac_func;
10574 #endif
10575
10576 ; return 0; }
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10579   rm -rf conftest*
10580   eval "ac_cv_func_$ac_func=yes"
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -rf conftest*
10585   eval "ac_cv_func_$ac_func=no"
10586 fi
10587 rm -f conftest*
10588 fi
10589
10590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10593   cat >> confdefs.h <<EOF
10594 #define $ac_tr_func 1
10595 EOF
10596  
10597 else
10598   echo "$ac_t""no" 1>&6
10599 fi
10600 done
10601
10602
10603 ol_link_ipv6=no
10604 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10605         if test $ol_enable_ipv6 = yes ; then
10606                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10607         fi
10608 elif test $ol_enable_ipv6 != no ; then
10609         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10610 echo "configure:10611: checking INET6_ADDRSTRLEN" >&5
10611 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10612   echo $ac_n "(cached) $ac_c" 1>&6
10613 else
10614   
10615                 cat > conftest.$ac_ext <<EOF
10616 #line 10617 "configure"
10617 #include "confdefs.h"
10618
10619 #                       include <netinet/in.h>
10620 #                       ifdef INET6_ADDRSTRLEN
10621                                 __has_inet6_addrstrlen__;
10622 #                       endif
10623                 
10624 EOF
10625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10626   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10627   rm -rf conftest*
10628   ol_cv_inet6_addrstrlen=yes
10629 else
10630   rm -rf conftest*
10631   ol_cv_inet6_addrstrlen=no
10632 fi
10633 rm -f conftest*
10634
10635 fi
10636
10637 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10638
10639
10640         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10641 echo "configure:10642: checking struct sockaddr_storage" >&5
10642 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   
10646                 cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649
10650 #include <sys/types.h>
10651 #include <sys/socket.h>
10652
10653 int main() {
10654
10655                         struct sockaddr_storage ss;
10656
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10660   rm -rf conftest*
10661   ol_cv_struct_sockaddr_storage=yes
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   ol_cv_struct_sockaddr_storage=no
10667 fi
10668 rm -f conftest*
10669 fi
10670
10671 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10672
10673         if test $ol_cv_inet6_addrstrlen = yes \
10674                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10675                 ol_link_ipv6=yes
10676         elif test $ol_enable_ipv6 = yes \
10677                         -a $ol_cv_inet6_addrstrlen = no ; then
10678                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10679         elif test $ol_enable_ipv6 = yes \
10680                         -a $ol_cv_struct_sockaddr_storage = no ; then
10681                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10682         fi
10683 fi
10684
10685 if test $ol_enable_local != no ; then
10686         for ac_hdr in sys/un.h 
10687 do
10688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10690 echo "configure:10691: checking for $ac_hdr" >&5
10691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 #include <$ac_hdr>
10698 EOF
10699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10700 { (eval echo configure:10701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10702 if test -z "$ac_err"; then
10703   rm -rf conftest*
10704   eval "ac_cv_header_$ac_safe=yes"
10705 else
10706   echo "$ac_err" >&5
10707   echo "configure: failed program was:" >&5
10708   cat conftest.$ac_ext >&5
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=no"
10711 fi
10712 rm -f conftest*
10713 fi
10714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10717   cat >> confdefs.h <<EOF
10718 #define $ac_tr_hdr 1
10719 EOF
10720  
10721 else
10722   echo "$ac_t""no" 1>&6
10723 fi
10724 done
10725
10726
10727         if test $ol_enable_local = auto ; then
10728                 ol_enable_local=$ac_cv_header_sys_un_h
10729         elif test $ac_cv_header_sys_un_h = no ; then
10730                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10731         fi
10732 fi
10733
10734 ol_link_kbind=no
10735 ol_link_krb5=no
10736 ol_link_krb4=no
10737
10738 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10739         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10740         -o $ol_with_kerberos = k425 ; then
10741
10742         for ac_hdr in krb5.h
10743 do
10744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10746 echo "configure:10747: checking for $ac_hdr" >&5
10747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10748   echo $ac_n "(cached) $ac_c" 1>&6
10749 else
10750   cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 #include <$ac_hdr>
10754 EOF
10755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10756 { (eval echo configure:10757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10758 if test -z "$ac_err"; then
10759   rm -rf conftest*
10760   eval "ac_cv_header_$ac_safe=yes"
10761 else
10762   echo "$ac_err" >&5
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_header_$ac_safe=no"
10767 fi
10768 rm -f conftest*
10769 fi
10770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10771   echo "$ac_t""yes" 1>&6
10772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10773   cat >> confdefs.h <<EOF
10774 #define $ac_tr_hdr 1
10775 EOF
10776  
10777 else
10778   echo "$ac_t""no" 1>&6
10779 fi
10780 done
10781
10782
10783         if test $ac_cv_header_krb5_h = yes ; then
10784                                 for ac_hdr in heim_err.h
10785 do
10786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10788 echo "configure:10789: checking for $ac_hdr" >&5
10789 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10790   echo $ac_n "(cached) $ac_c" 1>&6
10791 else
10792   cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795 #include <$ac_hdr>
10796 EOF
10797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10798 { (eval echo configure:10799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10800 if test -z "$ac_err"; then
10801   rm -rf conftest*
10802   eval "ac_cv_header_$ac_safe=yes"
10803 else
10804   echo "$ac_err" >&5
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   eval "ac_cv_header_$ac_safe=no"
10809 fi
10810 rm -f conftest*
10811 fi
10812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10813   echo "$ac_t""yes" 1>&6
10814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10815   cat >> confdefs.h <<EOF
10816 #define $ac_tr_hdr 1
10817 EOF
10818  
10819 else
10820   echo "$ac_t""no" 1>&6
10821 fi
10822 done
10823
10824                 if test $ac_cv_header_heim_err_h = yes ; then
10825                         krb5_impl=heimdal
10826                 else
10827                         krb5_impl=mit
10828                 fi
10829
10830                 if test $krb5_impl = mit; then
10831                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10832 echo "configure:10833: checking for main in -lk5crypto" >&5
10833 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   ac_save_LIBS="$LIBS"
10838 LIBS="-lk5crypto  $LIBS"
10839 cat > conftest.$ac_ext <<EOF
10840 #line 10841 "configure"
10841 #include "confdefs.h"
10842
10843 int main() {
10844 main()
10845 ; return 0; }
10846 EOF
10847 if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10848   rm -rf conftest*
10849   eval "ac_cv_lib_$ac_lib_var=yes"
10850 else
10851   echo "configure: failed program was:" >&5
10852   cat conftest.$ac_ext >&5
10853   rm -rf conftest*
10854   eval "ac_cv_lib_$ac_lib_var=no"
10855 fi
10856 rm -f conftest*
10857 LIBS="$ac_save_LIBS"
10858
10859 fi
10860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10861   echo "$ac_t""yes" 1>&6
10862   krb5crypto=k5crypto
10863 else
10864   echo "$ac_t""no" 1>&6
10865 krb5crypto=crypto
10866 fi
10867
10868
10869                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10870 echo "configure:10871: checking for main in -lkrb5" >&5
10871 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   ac_save_LIBS="$LIBS"
10876 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10877 cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880
10881 int main() {
10882 main()
10883 ; return 0; }
10884 EOF
10885 if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10886   rm -rf conftest*
10887   eval "ac_cv_lib_$ac_lib_var=yes"
10888 else
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_lib_$ac_lib_var=no"
10893 fi
10894 rm -f conftest*
10895 LIBS="$ac_save_LIBS"
10896
10897 fi
10898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10899   echo "$ac_t""yes" 1>&6
10900   have_krb5=yes
10901                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10902 else
10903   echo "$ac_t""no" 1>&6
10904 have_krb5=no
10905 fi
10906
10907
10908                 elif test $krb5_impl = heimdal; then
10909                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10910 echo "configure:10911: checking for main in -ldes" >&5
10911 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10913   echo $ac_n "(cached) $ac_c" 1>&6
10914 else
10915   ac_save_LIBS="$LIBS"
10916 LIBS="-ldes  $LIBS"
10917 cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920
10921 int main() {
10922 main()
10923 ; return 0; }
10924 EOF
10925 if { (eval echo configure:10926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10926   rm -rf conftest*
10927   eval "ac_cv_lib_$ac_lib_var=yes"
10928 else
10929   echo "configure: failed program was:" >&5
10930   cat conftest.$ac_ext >&5
10931   rm -rf conftest*
10932   eval "ac_cv_lib_$ac_lib_var=no"
10933 fi
10934 rm -f conftest*
10935 LIBS="$ac_save_LIBS"
10936
10937 fi
10938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10939   echo "$ac_t""yes" 1>&6
10940   krb5crypto=des
10941 else
10942   echo "$ac_t""no" 1>&6
10943 krb5crypto=crypto
10944 fi
10945
10946
10947                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10948 echo "configure:10949: checking for main in -lkrb5" >&5
10949 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10951   echo $ac_n "(cached) $ac_c" 1>&6
10952 else
10953   ac_save_LIBS="$LIBS"
10954 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10955 cat > conftest.$ac_ext <<EOF
10956 #line 10957 "configure"
10957 #include "confdefs.h"
10958
10959 int main() {
10960 main()
10961 ; return 0; }
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10964   rm -rf conftest*
10965   eval "ac_cv_lib_$ac_lib_var=yes"
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -rf conftest*
10970   eval "ac_cv_lib_$ac_lib_var=no"
10971 fi
10972 rm -f conftest*
10973 LIBS="$ac_save_LIBS"
10974
10975 fi
10976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10977   echo "$ac_t""yes" 1>&6
10978   have_krb5=yes
10979                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10980 else
10981   echo "$ac_t""no" 1>&6
10982 have_krb5=no
10983 fi
10984
10985
10986                         cat >> confdefs.h <<\EOF
10987 #define HAVE_HEIMDAL_KERBEROS 1
10988 EOF
10989
10990
10991                 else
10992                         have_krb5=no
10993                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10994                 fi
10995
10996                 if test $have_krb5 = yes ; then
10997                         ol_link_krb5=yes
10998
10999                         cat >> confdefs.h <<\EOF
11000 #define HAVE_KRB5 1
11001 EOF
11002
11003
11004                         if test $ol_with_kerberos = k5only ; then
11005                                 ol_with_kerberos=found
11006                         fi
11007
11008                 elif test $ol_with_kerberos != auto ; then
11009                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11010                 fi
11011
11012         fi
11013 fi
11014
11015 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11016         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11017
11018         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11019 do
11020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11022 echo "configure:11023: checking for $ac_hdr" >&5
11023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 #include <$ac_hdr>
11030 EOF
11031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11032 { (eval echo configure:11033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11034 if test -z "$ac_err"; then
11035   rm -rf conftest*
11036   eval "ac_cv_header_$ac_safe=yes"
11037 else
11038   echo "$ac_err" >&5
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -rf conftest*
11042   eval "ac_cv_header_$ac_safe=no"
11043 fi
11044 rm -f conftest*
11045 fi
11046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11049   cat >> confdefs.h <<EOF
11050 #define $ac_tr_hdr 1
11051 EOF
11052  
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056 done
11057
11058
11059         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11060                 if test $krb5_impl = mit; then
11061                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11062 echo "configure:11063: checking for main in -lkrb4" >&5
11063 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   ac_save_LIBS="$LIBS"
11068 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072
11073 int main() {
11074 main()
11075 ; return 0; }
11076 EOF
11077 if { (eval echo configure:11078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11078   rm -rf conftest*
11079   eval "ac_cv_lib_$ac_lib_var=yes"
11080 else
11081   echo "configure: failed program was:" >&5
11082   cat conftest.$ac_ext >&5
11083   rm -rf conftest*
11084   eval "ac_cv_lib_$ac_lib_var=no"
11085 fi
11086 rm -f conftest*
11087 LIBS="$ac_save_LIBS"
11088
11089 fi
11090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11091   echo "$ac_t""yes" 1>&6
11092   have_k425=yes
11093                                 KRB4_LIBS="-lkrb4 -ldes425"
11094 else
11095   echo "$ac_t""no" 1>&6
11096 have_k425=no
11097 fi
11098
11099
11100                 elif test $krb5_impl = heimdal; then
11101                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11102 echo "configure:11103: checking for main in -lkrb4" >&5
11103 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11105   echo $ac_n "(cached) $ac_c" 1>&6
11106 else
11107   ac_save_LIBS="$LIBS"
11108 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11109 cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112
11113 int main() {
11114 main()
11115 ; return 0; }
11116 EOF
11117 if { (eval echo configure:11118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11118   rm -rf conftest*
11119   eval "ac_cv_lib_$ac_lib_var=yes"
11120 else
11121   echo "configure: failed program was:" >&5
11122   cat conftest.$ac_ext >&5
11123   rm -rf conftest*
11124   eval "ac_cv_lib_$ac_lib_var=no"
11125 fi
11126 rm -f conftest*
11127 LIBS="$ac_save_LIBS"
11128
11129 fi
11130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11131   echo "$ac_t""yes" 1>&6
11132   have_k425=yes
11133                                 KRB4_LIBS="-lkrb4"
11134 else
11135   echo "$ac_t""no" 1>&6
11136 have_k425=no
11137 fi
11138
11139
11140                 else
11141                         have_425=no
11142                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11143                 fi
11144
11145                 if test $have_k425 = yes ; then
11146                         ol_with_kerberos=found
11147                         ol_link_krb4=yes
11148
11149                         cat >> confdefs.h <<\EOF
11150 #define HAVE_KRB425 1
11151 EOF
11152
11153                         cat >> confdefs.h <<\EOF
11154 #define HAVE_KRB4 1
11155 EOF
11156
11157
11158                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11159 echo "configure:11160: checking for des_debug in Kerberos libraries" >&5
11160 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   
11164                                                                 save_LIBS="$LIBS"
11165                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11166                                 cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169
11170 #include <kerberosIV/krb.h>
11171 #include <kerberosIV/des.h>
11172 extern int des_debug;
11173
11174 int main() {
11175
11176 des_debug = 1;
11177
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11181   rm -rf conftest*
11182   ol_cv_var_des_debug=yes
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   ol_cv_var_des_debug=no
11188 fi
11189 rm -f conftest*
11190                                                                 LIBS="$save_LIBS"
11191                         
11192 fi
11193
11194 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11195
11196                         if test $ol_cv_var_des_debug = yes ; then
11197                                 cat >> confdefs.h <<\EOF
11198 #define HAVE_DES_DEBUG 1
11199 EOF
11200
11201                         fi
11202
11203                         LIBS="$save_LIBS"
11204                 fi
11205         fi
11206 fi
11207
11208 if test $ol_link_krb5 = yes ; then
11209         ol_with_kerberos=found
11210 fi
11211
11212 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11213         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11214
11215         for ac_hdr in krb.h des.h krb-archaeology.h 
11216 do
11217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11219 echo "configure:11220: checking for $ac_hdr" >&5
11220 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11221   echo $ac_n "(cached) $ac_c" 1>&6
11222 else
11223   cat > conftest.$ac_ext <<EOF
11224 #line 11225 "configure"
11225 #include "confdefs.h"
11226 #include <$ac_hdr>
11227 EOF
11228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11229 { (eval echo configure:11230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11231 if test -z "$ac_err"; then
11232   rm -rf conftest*
11233   eval "ac_cv_header_$ac_safe=yes"
11234 else
11235   echo "$ac_err" >&5
11236   echo "configure: failed program was:" >&5
11237   cat conftest.$ac_ext >&5
11238   rm -rf conftest*
11239   eval "ac_cv_header_$ac_safe=no"
11240 fi
11241 rm -f conftest*
11242 fi
11243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11246   cat >> confdefs.h <<EOF
11247 #define $ac_tr_hdr 1
11248 EOF
11249  
11250 else
11251   echo "$ac_t""no" 1>&6
11252 fi
11253 done
11254
11255
11256         if test $ac_cv_header_krb_h = yes ; then
11257                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11258 echo "configure:11259: checking for main in -lkrb" >&5
11259 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11261   echo $ac_n "(cached) $ac_c" 1>&6
11262 else
11263   ac_save_LIBS="$LIBS"
11264 LIBS="-lkrb -ldes $LIBS"
11265 cat > conftest.$ac_ext <<EOF
11266 #line 11267 "configure"
11267 #include "confdefs.h"
11268
11269 int main() {
11270 main()
11271 ; return 0; }
11272 EOF
11273 if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11274   rm -rf conftest*
11275   eval "ac_cv_lib_$ac_lib_var=yes"
11276 else
11277   echo "configure: failed program was:" >&5
11278   cat conftest.$ac_ext >&5
11279   rm -rf conftest*
11280   eval "ac_cv_lib_$ac_lib_var=no"
11281 fi
11282 rm -f conftest*
11283 LIBS="$ac_save_LIBS"
11284
11285 fi
11286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288   have_k4=yes
11289 else
11290   echo "$ac_t""no" 1>&6
11291 have_k4=no
11292 fi
11293
11294
11295                 if test $have_k4 = yes ; then
11296                         ol_with_kerberos=found
11297                         ol_link_krb4=yes
11298
11299                         cat >> confdefs.h <<\EOF
11300 #define HAVE_KRB4 1
11301 EOF
11302
11303
11304                         KRB4_LIBS="-lkrb -ldes"
11305
11306                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11307                                 cat >> confdefs.h <<\EOF
11308 #define HAVE_KTH_KERBEROS 1
11309 EOF
11310
11311                         fi
11312                 fi
11313         fi
11314 fi
11315
11316 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11317         ol_link_kbind=yes
11318
11319 elif test $ol_enable_kbind = yes ; then
11320         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11321 fi
11322
11323 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11324         cat >> confdefs.h <<\EOF
11325 #define HAVE_KERBEROS 1
11326 EOF
11327
11328
11329 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11330         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11331 fi
11332
11333         
11334 ol_link_tls=no
11335 if test $ol_with_tls != no ; then
11336         for ac_hdr in openssl/ssl.h ssl.h
11337 do
11338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11340 echo "configure:11341: checking for $ac_hdr" >&5
11341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11342   echo $ac_n "(cached) $ac_c" 1>&6
11343 else
11344   cat > conftest.$ac_ext <<EOF
11345 #line 11346 "configure"
11346 #include "confdefs.h"
11347 #include <$ac_hdr>
11348 EOF
11349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11350 { (eval echo configure:11351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11352 if test -z "$ac_err"; then
11353   rm -rf conftest*
11354   eval "ac_cv_header_$ac_safe=yes"
11355 else
11356   echo "$ac_err" >&5
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_header_$ac_safe=no"
11361 fi
11362 rm -f conftest*
11363 fi
11364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11365   echo "$ac_t""yes" 1>&6
11366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11367   cat >> confdefs.h <<EOF
11368 #define $ac_tr_hdr 1
11369 EOF
11370  
11371 else
11372   echo "$ac_t""no" 1>&6
11373 fi
11374 done
11375
11376
11377         if test $ac_cv_header_openssl_ssl_h = yes \
11378                 -o $ac_cv_header_ssl_h = yes ; then
11379                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11380 echo "configure:11381: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11381 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   ac_save_LIBS="$LIBS"
11386 LIBS="-lssl -lcrypto $LIBS"
11387 cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 /* Override any gcc2 internal prototype to avoid an error.  */
11391 /* We use char because int might match the return type of a gcc2
11392     builtin and then its argument prototype would still apply.  */
11393 char SSLeay_add_ssl_algorithms();
11394
11395 int main() {
11396 SSLeay_add_ssl_algorithms()
11397 ; return 0; }
11398 EOF
11399 if { (eval echo configure:11400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11400   rm -rf conftest*
11401   eval "ac_cv_lib_$ac_lib_var=yes"
11402 else
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   eval "ac_cv_lib_$ac_lib_var=no"
11407 fi
11408 rm -f conftest*
11409 LIBS="$ac_save_LIBS"
11410
11411 fi
11412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11413   echo "$ac_t""yes" 1>&6
11414   have_ssleay=yes
11415                         need_rsaref=no
11416 else
11417   echo "$ac_t""no" 1>&6
11418 have_ssleay=no
11419 fi
11420
11421                         
11422                 if test $have_ssleay = no ; then
11423                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11424 echo "configure:11425: checking for SSL_library_init in -lssl" >&5
11425 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11427   echo $ac_n "(cached) $ac_c" 1>&6
11428 else
11429   ac_save_LIBS="$LIBS"
11430 LIBS="-lssl -lcrypto $LIBS"
11431 cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 /* Override any gcc2 internal prototype to avoid an error.  */
11435 /* We use char because int might match the return type of a gcc2
11436     builtin and then its argument prototype would still apply.  */
11437 char SSL_library_init();
11438
11439 int main() {
11440 SSL_library_init()
11441 ; return 0; }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11444   rm -rf conftest*
11445   eval "ac_cv_lib_$ac_lib_var=yes"
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   eval "ac_cv_lib_$ac_lib_var=no"
11451 fi
11452 rm -f conftest*
11453 LIBS="$ac_save_LIBS"
11454
11455 fi
11456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11457   echo "$ac_t""yes" 1>&6
11458   have_ssleay=yes
11459                                 need_rsaref=no
11460 else
11461   echo "$ac_t""no" 1>&6
11462 have_ssleay=no
11463 fi
11464
11465                 fi
11466
11467                 if test $have_ssleay = no ; then
11468                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11469 echo "configure:11470: checking for ssl3_accept in -lssl" >&5
11470 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11472   echo $ac_n "(cached) $ac_c" 1>&6
11473 else
11474   ac_save_LIBS="$LIBS"
11475 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11476 cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479 /* Override any gcc2 internal prototype to avoid an error.  */
11480 /* We use char because int might match the return type of a gcc2
11481     builtin and then its argument prototype would still apply.  */
11482 char ssl3_accept();
11483
11484 int main() {
11485 ssl3_accept()
11486 ; return 0; }
11487 EOF
11488 if { (eval echo configure:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11489   rm -rf conftest*
11490   eval "ac_cv_lib_$ac_lib_var=yes"
11491 else
11492   echo "configure: failed program was:" >&5
11493   cat conftest.$ac_ext >&5
11494   rm -rf conftest*
11495   eval "ac_cv_lib_$ac_lib_var=no"
11496 fi
11497 rm -f conftest*
11498 LIBS="$ac_save_LIBS"
11499
11500 fi
11501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11502   echo "$ac_t""yes" 1>&6
11503   have_ssleay=yes
11504                                 need_rsaref=yes
11505 else
11506   echo "$ac_t""no" 1>&6
11507 have_ssleay=no
11508 fi
11509
11510                 fi
11511
11512                 if test $have_ssleay = yes ; then
11513                         ol_with_tls=found
11514                         ol_link_tls=yes
11515
11516                         cat >> confdefs.h <<\EOF
11517 #define HAVE_SSLEAY 1
11518 EOF
11519
11520
11521                         if test $need_rsaref = yes; then
11522                                 cat >> confdefs.h <<\EOF
11523 #define HAVE_RSAREF 1
11524 EOF
11525
11526
11527                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11528                         else
11529                                 TLS_LIBS="-lssl -lcrypto"
11530                         fi
11531                 fi
11532                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11533 echo "configure:11534: checking OpenSSL library version (CRL checking capability)" >&5
11534 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11535   echo $ac_n "(cached) $ac_c" 1>&6
11536 else
11537   
11538         cat > conftest.$ac_ext <<EOF
11539 #line 11540 "configure"
11540 #include "confdefs.h"
11541
11542 #ifdef HAVE_OPENSSL_SSL_H
11543 #include <openssl/ssl.h>
11544 #else
11545 #include <ssl.h>
11546 #endif
11547
11548 /* Require 0.9.7d+ */
11549 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11550         char *__ssl_compat = "0.9.7d";
11551 #endif
11552         
11553 EOF
11554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11555   egrep "__ssl_compat" >/dev/null 2>&1; then
11556   rm -rf conftest*
11557   ol_cv_ssl_crl_compat=yes
11558 else
11559   rm -rf conftest*
11560   ol_cv_ssl_crl_compat=no
11561 fi
11562 rm -f conftest*
11563
11564 fi
11565
11566 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11567
11568                 if test $ol_cv_ssl_crl_compat = no ; then
11569                         ol_link_ssl=no
11570                 else 
11571                         cat >> confdefs.h <<\EOF
11572 #define HAVE_OPENSSL_CRL 1
11573 EOF
11574
11575                 fi
11576         fi
11577
11578 else
11579         echo "configure: warning: TLS data protection not supported!" 1>&2
11580 fi
11581
11582 WITH_TLS=no
11583 if test $ol_link_tls = yes ; then
11584         cat >> confdefs.h <<\EOF
11585 #define HAVE_TLS 1
11586 EOF
11587
11588         WITH_TLS=yes
11589
11590 elif test $ol_with_tls = auto ; then
11591         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11592         echo "configure: warning: TLS data protection not supported!" 1>&2
11593
11594 elif test $ol_with_tls != no ; then
11595         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11596 fi
11597
11598 if test $ol_enable_lmpasswd != no; then
11599         if test $ol_link_tls != yes ; then
11600                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11601         fi
11602
11603         cat >> confdefs.h <<\EOF
11604 #define SLAPD_LMHASH 1
11605 EOF
11606
11607 fi
11608
11609 ol_link_threads=no
11610
11611 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11612         -o $ol_with_threads = nt ; then
11613
11614         
11615         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11616 echo "configure:11617: checking for _beginthread" >&5
11617 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11618   echo $ac_n "(cached) $ac_c" 1>&6
11619 else
11620   cat > conftest.$ac_ext <<EOF
11621 #line 11622 "configure"
11622 #include "confdefs.h"
11623 /* System header to define __stub macros and hopefully few prototypes,
11624     which can conflict with char _beginthread(); below.  */
11625 #include <assert.h>
11626 /* Override any gcc2 internal prototype to avoid an error.  */
11627 /* We use char because int might match the return type of a gcc2
11628     builtin and then its argument prototype would still apply.  */
11629 char _beginthread();
11630 char (*f)();
11631
11632 int main() {
11633
11634 /* The GNU C library defines this for functions which it implements
11635     to always fail with ENOSYS.  Some functions are actually named
11636     something starting with __ and the normal name is an alias.  */
11637 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11638 choke me
11639 #else
11640 f = _beginthread;
11641 #endif
11642
11643 ; return 0; }
11644 EOF
11645 if { (eval echo configure:11646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11646   rm -rf conftest*
11647   eval "ac_cv_func__beginthread=yes"
11648 else
11649   echo "configure: failed program was:" >&5
11650   cat conftest.$ac_ext >&5
11651   rm -rf conftest*
11652   eval "ac_cv_func__beginthread=no"
11653 fi
11654 rm -f conftest*
11655 fi
11656
11657 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11658   echo "$ac_t""yes" 1>&6
11659   :
11660 else
11661   echo "$ac_t""no" 1>&6
11662 fi
11663
11664
11665         if test $ac_cv_func__beginthread = yes ; then
11666                 cat >> confdefs.h <<\EOF
11667 #define HAVE_NT_THREADS 1
11668 EOF
11669
11670                 ol_cv_nt_threads=yes
11671         fi
11672
11673
11674         if test "$ol_cv_nt_threads" = yes ; then
11675                 ol_link_threads=nt
11676                 ol_with_threads=found
11677                 ol_with_yielding_select=yes
11678
11679                 cat >> confdefs.h <<\EOF
11680 #define HAVE_NT_SERVICE_MANAGER 1
11681 EOF
11682
11683                 cat >> confdefs.h <<\EOF
11684 #define HAVE_NT_EVENT_LOG 1
11685 EOF
11686
11687         fi
11688
11689         if test $ol_with_threads = nt ; then
11690                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11691         fi
11692 fi
11693
11694 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11695         -o $ol_with_threads = posix ; then
11696
11697         for ac_hdr in pthread.h
11698 do
11699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11701 echo "configure:11702: checking for $ac_hdr" >&5
11702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11703   echo $ac_n "(cached) $ac_c" 1>&6
11704 else
11705   cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708 #include <$ac_hdr>
11709 EOF
11710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11711 { (eval echo configure:11712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11713 if test -z "$ac_err"; then
11714   rm -rf conftest*
11715   eval "ac_cv_header_$ac_safe=yes"
11716 else
11717   echo "$ac_err" >&5
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -rf conftest*
11721   eval "ac_cv_header_$ac_safe=no"
11722 fi
11723 rm -f conftest*
11724 fi
11725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11726   echo "$ac_t""yes" 1>&6
11727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11728   cat >> confdefs.h <<EOF
11729 #define $ac_tr_hdr 1
11730 EOF
11731  
11732 else
11733   echo "$ac_t""no" 1>&6
11734 fi
11735 done
11736
11737
11738         if test $ac_cv_header_pthread_h = yes ; then
11739                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11740 echo "configure:11741: checking POSIX thread version" >&5
11741 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11742   echo $ac_n "(cached) $ac_c" 1>&6
11743 else
11744   
11745         cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748
11749 #               include <pthread.h>
11750         
11751 int main() {
11752
11753                 int i = PTHREAD_CREATE_JOINABLE;
11754         
11755 ; return 0; }
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11758   rm -rf conftest*
11759   
11760         cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763 #include <pthread.h>
11764 EOF
11765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11766   egrep "pthread_detach" >/dev/null 2>&1; then
11767   rm -rf conftest*
11768   ol_cv_pthread_version=10
11769 else
11770   rm -rf conftest*
11771   ol_cv_pthread_version=8
11772 fi
11773 rm -f conftest*
11774
11775 else
11776   echo "configure: failed program was:" >&5
11777   cat conftest.$ac_ext >&5
11778   rm -rf conftest*
11779   
11780         cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783
11784 #               include <pthread.h>
11785 #               ifdef PTHREAD_CREATE_UNDETACHED
11786                 draft7
11787 #               endif
11788         
11789 EOF
11790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11791   egrep "draft7" >/dev/null 2>&1; then
11792   rm -rf conftest*
11793   ol_cv_pthread_version=7
11794 else
11795   rm -rf conftest*
11796   
11797         cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include <pthread.h>
11801 EOF
11802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11803   egrep "pthread_attr_init" >/dev/null 2>&1; then
11804   rm -rf conftest*
11805   ol_cv_pthread_version=6
11806 else
11807   rm -rf conftest*
11808   
11809         cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812
11813 #               include <pthread.h>
11814 #ifdef          PTHREAD_MUTEX_INITIALIZER
11815                 draft5
11816 #endif
11817         
11818 EOF
11819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11820   egrep "draft5" >/dev/null 2>&1; then
11821   rm -rf conftest*
11822   ol_cv_pthread_version=5
11823 else
11824   rm -rf conftest*
11825   ol_cv_pthread_version=4
11826 fi
11827 rm -f conftest*
11828  
11829 fi
11830 rm -f conftest*
11831  
11832 fi
11833 rm -f conftest*
11834  
11835 fi
11836 rm -f conftest*
11837
11838 fi
11839
11840 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11841
11842
11843                 if test $ol_cv_pthread_version != 0 ; then
11844                         cat >> confdefs.h <<EOF
11845 #define HAVE_PTHREADS $ol_cv_pthread_version
11846 EOF
11847
11848                 else
11849                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11850                 fi
11851
11852                 # consider threads found
11853                 ol_with_threads=found
11854
11855                 
11856         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11857 echo "configure:11858: checking for LinuxThreads pthread.h" >&5
11858 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11859   echo $ac_n "(cached) $ac_c" 1>&6
11860 else
11861   cat > conftest.$ac_ext <<EOF
11862 #line 11863 "configure"
11863 #include "confdefs.h"
11864 #include <pthread.h>
11865 EOF
11866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11867   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11868   rm -rf conftest*
11869   ol_cv_header_linux_threads=yes
11870 else
11871   rm -rf conftest*
11872   ol_cv_header_linux_threads=no
11873 fi
11874 rm -f conftest*
11875
11876                 
11877 fi
11878
11879 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11880         if test $ol_cv_header_linux_threads = yes; then
11881                 cat >> confdefs.h <<\EOF
11882 #define HAVE_LINUX_THREADS 1
11883 EOF
11884
11885         fi
11886
11887                 
11888         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11889 echo "configure:11890: checking for GNU Pth pthread.h" >&5
11890 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11891   echo $ac_n "(cached) $ac_c" 1>&6
11892 else
11893   cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 #include <pthread.h>
11897 #ifdef _POSIX_THREAD_IS_GNU_PTH
11898         __gnu_pth__;
11899 #endif
11900
11901 EOF
11902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11903   egrep "__gnu_pth__" >/dev/null 2>&1; then
11904   rm -rf conftest*
11905   ol_cv_header_gnu_pth_pthread_h=yes
11906 else
11907   rm -rf conftest*
11908   ol_cv_header_gnu_pth_pthread_h=no
11909 fi
11910 rm -f conftest*
11911
11912                 
11913 fi
11914
11915 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11916
11917
11918                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11919                         for ac_hdr in sched.h
11920 do
11921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11923 echo "configure:11924: checking for $ac_hdr" >&5
11924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11925   echo $ac_n "(cached) $ac_c" 1>&6
11926 else
11927   cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930 #include <$ac_hdr>
11931 EOF
11932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11933 { (eval echo configure:11934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11935 if test -z "$ac_err"; then
11936   rm -rf conftest*
11937   eval "ac_cv_header_$ac_safe=yes"
11938 else
11939   echo "$ac_err" >&5
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   eval "ac_cv_header_$ac_safe=no"
11944 fi
11945 rm -f conftest*
11946 fi
11947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11948   echo "$ac_t""yes" 1>&6
11949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11950   cat >> confdefs.h <<EOF
11951 #define $ac_tr_hdr 1
11952 EOF
11953  
11954 else
11955   echo "$ac_t""no" 1>&6
11956 fi
11957 done
11958
11959                 fi
11960
11961                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11962                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11963 echo "configure:11964: checking for pthread_create in default libraries" >&5
11964 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11965   echo $ac_n "(cached) $ac_c" 1>&6
11966 else
11967   
11968                 if test "$cross_compiling" = yes; then
11969   cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 /* pthread test headers */
11973 #include <pthread.h>
11974 #if HAVE_PTHREADS < 7
11975 #include <errno.h>
11976 #endif
11977 #ifndef NULL
11978 #define NULL (void*)0
11979 #endif
11980
11981 static void *task(p)
11982         void *p;
11983 {
11984         return (void *) (p == NULL);
11985 }
11986
11987 int main() {
11988
11989         /* pthread test function */
11990 #ifndef PTHREAD_CREATE_DETACHED
11991 #define PTHREAD_CREATE_DETACHED 1
11992 #endif
11993         pthread_t t;
11994         int status;
11995         int detach = PTHREAD_CREATE_DETACHED;
11996
11997 #if HAVE_PTHREADS > 4
11998         /* Final pthreads */
11999         pthread_attr_t attr;
12000
12001         status = pthread_attr_init(&attr);
12002         if( status ) return status;
12003
12004 #if HAVE_PTHREADS < 7
12005         status = pthread_attr_setdetachstate(&attr, &detach);
12006         if( status < 0 ) status = errno;
12007 #else
12008         status = pthread_attr_setdetachstate(&attr, detach);
12009 #endif
12010         if( status ) return status;
12011         status = pthread_create( &t, &attr, task, NULL );
12012 #if HAVE_PTHREADS < 7
12013         if( status < 0 ) status = errno;
12014 #endif
12015         if( status ) return status;
12016 #else
12017         /* Draft 4 pthreads */
12018         status = pthread_create( &t, pthread_attr_default, task, NULL );
12019         if( status ) return errno;
12020
12021         /* give thread a chance to complete */
12022         /* it should remain joinable and hence detachable */
12023         sleep( 1 );
12024
12025         status = pthread_detach( &t );
12026         if( status ) return errno;
12027 #endif
12028
12029 #ifdef HAVE_LINUX_THREADS
12030         pthread_kill_other_threads_np();
12031 #endif
12032
12033         return 0;
12034
12035 ; return 0; }
12036 EOF
12037 if { (eval echo configure:12038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12038   rm -rf conftest*
12039   ol_cv_pthread_create=yes
12040 else
12041   echo "configure: failed program was:" >&5
12042   cat conftest.$ac_ext >&5
12043   rm -rf conftest*
12044   ol_cv_pthread_create=no
12045 fi
12046 rm -f conftest*
12047 else
12048   cat > conftest.$ac_ext <<EOF
12049 #line 12050 "configure"
12050 #include "confdefs.h"
12051 /* pthread test headers */
12052 #include <pthread.h>
12053 #if HAVE_PTHREADS < 7
12054 #include <errno.h>
12055 #endif
12056 #ifndef NULL
12057 #define NULL (void*)0
12058 #endif
12059
12060 static void *task(p)
12061         void *p;
12062 {
12063         return (void *) (p == NULL);
12064 }
12065
12066
12067 int main(argc, argv)
12068         int argc;
12069         char **argv;
12070 {
12071
12072         /* pthread test function */
12073 #ifndef PTHREAD_CREATE_DETACHED
12074 #define PTHREAD_CREATE_DETACHED 1
12075 #endif
12076         pthread_t t;
12077         int status;
12078         int detach = PTHREAD_CREATE_DETACHED;
12079
12080 #if HAVE_PTHREADS > 4
12081         /* Final pthreads */
12082         pthread_attr_t attr;
12083
12084         status = pthread_attr_init(&attr);
12085         if( status ) return status;
12086
12087 #if HAVE_PTHREADS < 7
12088         status = pthread_attr_setdetachstate(&attr, &detach);
12089         if( status < 0 ) status = errno;
12090 #else
12091         status = pthread_attr_setdetachstate(&attr, detach);
12092 #endif
12093         if( status ) return status;
12094         status = pthread_create( &t, &attr, task, NULL );
12095 #if HAVE_PTHREADS < 7
12096         if( status < 0 ) status = errno;
12097 #endif
12098         if( status ) return status;
12099 #else
12100         /* Draft 4 pthreads */
12101         status = pthread_create( &t, pthread_attr_default, task, NULL );
12102         if( status ) return errno;
12103
12104         /* give thread a chance to complete */
12105         /* it should remain joinable and hence detachable */
12106         sleep( 1 );
12107
12108         status = pthread_detach( &t );
12109         if( status ) return errno;
12110 #endif
12111
12112 #ifdef HAVE_LINUX_THREADS
12113         pthread_kill_other_threads_np();
12114 #endif
12115
12116         return 0;
12117
12118 }
12119
12120 EOF
12121 if { (eval echo configure:12122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12122 then
12123   ol_cv_pthread_create=yes
12124 else
12125   echo "configure: failed program was:" >&5
12126   cat conftest.$ac_ext >&5
12127   rm -fr conftest*
12128   ol_cv_pthread_create=no
12129 fi
12130 rm -fr conftest*
12131 fi
12132
12133 fi
12134
12135 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12136
12137                 if test $ol_cv_pthread_create != no ; then
12138                         ol_link_threads=posix
12139                         ol_link_pthreads=""
12140                 fi
12141                 
12142                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12143 if test "$ol_link_threads" = no ; then
12144         # try -kthread
12145         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12146 echo "configure:12147: checking for pthread link with -kthread" >&5
12147 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12148   echo $ac_n "(cached) $ac_c" 1>&6
12149 else
12150   
12151                 # save the flags
12152                 ol_LIBS="$LIBS"
12153                 LIBS="-kthread $LIBS"
12154
12155                 if test "$cross_compiling" = yes; then
12156   cat > conftest.$ac_ext <<EOF
12157 #line 12158 "configure"
12158 #include "confdefs.h"
12159 /* pthread test headers */
12160 #include <pthread.h>
12161 #if HAVE_PTHREADS < 7
12162 #include <errno.h>
12163 #endif
12164 #ifndef NULL
12165 #define NULL (void*)0
12166 #endif
12167
12168 static void *task(p)
12169         void *p;
12170 {
12171         return (void *) (p == NULL);
12172 }
12173
12174 int main() {
12175
12176         /* pthread test function */
12177 #ifndef PTHREAD_CREATE_DETACHED
12178 #define PTHREAD_CREATE_DETACHED 1
12179 #endif
12180         pthread_t t;
12181         int status;
12182         int detach = PTHREAD_CREATE_DETACHED;
12183
12184 #if HAVE_PTHREADS > 4
12185         /* Final pthreads */
12186         pthread_attr_t attr;
12187
12188         status = pthread_attr_init(&attr);
12189         if( status ) return status;
12190
12191 #if HAVE_PTHREADS < 7
12192         status = pthread_attr_setdetachstate(&attr, &detach);
12193         if( status < 0 ) status = errno;
12194 #else
12195         status = pthread_attr_setdetachstate(&attr, detach);
12196 #endif
12197         if( status ) return status;
12198         status = pthread_create( &t, &attr, task, NULL );
12199 #if HAVE_PTHREADS < 7
12200         if( status < 0 ) status = errno;
12201 #endif
12202         if( status ) return status;
12203 #else
12204         /* Draft 4 pthreads */
12205         status = pthread_create( &t, pthread_attr_default, task, NULL );
12206         if( status ) return errno;
12207
12208         /* give thread a chance to complete */
12209         /* it should remain joinable and hence detachable */
12210         sleep( 1 );
12211
12212         status = pthread_detach( &t );
12213         if( status ) return errno;
12214 #endif
12215
12216 #ifdef HAVE_LINUX_THREADS
12217         pthread_kill_other_threads_np();
12218 #endif
12219
12220         return 0;
12221
12222 ; return 0; }
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12225   rm -rf conftest*
12226   ol_cv_pthread_kthread=yes
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -rf conftest*
12231   ol_cv_pthread_kthread=no
12232 fi
12233 rm -f conftest*
12234 else
12235   cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238 /* pthread test headers */
12239 #include <pthread.h>
12240 #if HAVE_PTHREADS < 7
12241 #include <errno.h>
12242 #endif
12243 #ifndef NULL
12244 #define NULL (void*)0
12245 #endif
12246
12247 static void *task(p)
12248         void *p;
12249 {
12250         return (void *) (p == NULL);
12251 }
12252
12253
12254 int main(argc, argv)
12255         int argc;
12256         char **argv;
12257 {
12258
12259         /* pthread test function */
12260 #ifndef PTHREAD_CREATE_DETACHED
12261 #define PTHREAD_CREATE_DETACHED 1
12262 #endif
12263         pthread_t t;
12264         int status;
12265         int detach = PTHREAD_CREATE_DETACHED;
12266
12267 #if HAVE_PTHREADS > 4
12268         /* Final pthreads */
12269         pthread_attr_t attr;
12270
12271         status = pthread_attr_init(&attr);
12272         if( status ) return status;
12273
12274 #if HAVE_PTHREADS < 7
12275         status = pthread_attr_setdetachstate(&attr, &detach);
12276         if( status < 0 ) status = errno;
12277 #else
12278         status = pthread_attr_setdetachstate(&attr, detach);
12279 #endif
12280         if( status ) return status;
12281         status = pthread_create( &t, &attr, task, NULL );
12282 #if HAVE_PTHREADS < 7
12283         if( status < 0 ) status = errno;
12284 #endif
12285         if( status ) return status;
12286 #else
12287         /* Draft 4 pthreads */
12288         status = pthread_create( &t, pthread_attr_default, task, NULL );
12289         if( status ) return errno;
12290
12291         /* give thread a chance to complete */
12292         /* it should remain joinable and hence detachable */
12293         sleep( 1 );
12294
12295         status = pthread_detach( &t );
12296         if( status ) return errno;
12297 #endif
12298
12299 #ifdef HAVE_LINUX_THREADS
12300         pthread_kill_other_threads_np();
12301 #endif
12302
12303         return 0;
12304
12305 }
12306
12307 EOF
12308 if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12309 then
12310   ol_cv_pthread_kthread=yes
12311 else
12312   echo "configure: failed program was:" >&5
12313   cat conftest.$ac_ext >&5
12314   rm -fr conftest*
12315   ol_cv_pthread_kthread=no
12316 fi
12317 rm -fr conftest*
12318 fi
12319
12320
12321                 # restore the LIBS
12322                 LIBS="$ol_LIBS"
12323         
12324 fi
12325
12326 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12327
12328         if test $ol_cv_pthread_kthread = yes ; then
12329                 ol_link_pthreads="-kthread"
12330                 ol_link_threads=posix
12331         fi
12332 fi
12333
12334                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12335 if test "$ol_link_threads" = no ; then
12336         # try -pthread
12337         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12338 echo "configure:12339: checking for pthread link with -pthread" >&5
12339 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12340   echo $ac_n "(cached) $ac_c" 1>&6
12341 else
12342   
12343                 # save the flags
12344                 ol_LIBS="$LIBS"
12345                 LIBS="-pthread $LIBS"
12346
12347                 if test "$cross_compiling" = yes; then
12348   cat > conftest.$ac_ext <<EOF
12349 #line 12350 "configure"
12350 #include "confdefs.h"
12351 /* pthread test headers */
12352 #include <pthread.h>
12353 #if HAVE_PTHREADS < 7
12354 #include <errno.h>
12355 #endif
12356 #ifndef NULL
12357 #define NULL (void*)0
12358 #endif
12359
12360 static void *task(p)
12361         void *p;
12362 {
12363         return (void *) (p == NULL);
12364 }
12365
12366 int main() {
12367
12368         /* pthread test function */
12369 #ifndef PTHREAD_CREATE_DETACHED
12370 #define PTHREAD_CREATE_DETACHED 1
12371 #endif
12372         pthread_t t;
12373         int status;
12374         int detach = PTHREAD_CREATE_DETACHED;
12375
12376 #if HAVE_PTHREADS > 4
12377         /* Final pthreads */
12378         pthread_attr_t attr;
12379
12380         status = pthread_attr_init(&attr);
12381         if( status ) return status;
12382
12383 #if HAVE_PTHREADS < 7
12384         status = pthread_attr_setdetachstate(&attr, &detach);
12385         if( status < 0 ) status = errno;
12386 #else
12387         status = pthread_attr_setdetachstate(&attr, detach);
12388 #endif
12389         if( status ) return status;
12390         status = pthread_create( &t, &attr, task, NULL );
12391 #if HAVE_PTHREADS < 7
12392         if( status < 0 ) status = errno;
12393 #endif
12394         if( status ) return status;
12395 #else
12396         /* Draft 4 pthreads */
12397         status = pthread_create( &t, pthread_attr_default, task, NULL );
12398         if( status ) return errno;
12399
12400         /* give thread a chance to complete */
12401         /* it should remain joinable and hence detachable */
12402         sleep( 1 );
12403
12404         status = pthread_detach( &t );
12405         if( status ) return errno;
12406 #endif
12407
12408 #ifdef HAVE_LINUX_THREADS
12409         pthread_kill_other_threads_np();
12410 #endif
12411
12412         return 0;
12413
12414 ; return 0; }
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12417   rm -rf conftest*
12418   ol_cv_pthread_pthread=yes
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -rf conftest*
12423   ol_cv_pthread_pthread=no
12424 fi
12425 rm -f conftest*
12426 else
12427   cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 /* pthread test headers */
12431 #include <pthread.h>
12432 #if HAVE_PTHREADS < 7
12433 #include <errno.h>
12434 #endif
12435 #ifndef NULL
12436 #define NULL (void*)0
12437 #endif
12438
12439 static void *task(p)
12440         void *p;
12441 {
12442         return (void *) (p == NULL);
12443 }
12444
12445
12446 int main(argc, argv)
12447         int argc;
12448         char **argv;
12449 {
12450
12451         /* pthread test function */
12452 #ifndef PTHREAD_CREATE_DETACHED
12453 #define PTHREAD_CREATE_DETACHED 1
12454 #endif
12455         pthread_t t;
12456         int status;
12457         int detach = PTHREAD_CREATE_DETACHED;
12458
12459 #if HAVE_PTHREADS > 4
12460         /* Final pthreads */
12461         pthread_attr_t attr;
12462
12463         status = pthread_attr_init(&attr);
12464         if( status ) return status;
12465
12466 #if HAVE_PTHREADS < 7
12467         status = pthread_attr_setdetachstate(&attr, &detach);
12468         if( status < 0 ) status = errno;
12469 #else
12470         status = pthread_attr_setdetachstate(&attr, detach);
12471 #endif
12472         if( status ) return status;
12473         status = pthread_create( &t, &attr, task, NULL );
12474 #if HAVE_PTHREADS < 7
12475         if( status < 0 ) status = errno;
12476 #endif
12477         if( status ) return status;
12478 #else
12479         /* Draft 4 pthreads */
12480         status = pthread_create( &t, pthread_attr_default, task, NULL );
12481         if( status ) return errno;
12482
12483         /* give thread a chance to complete */
12484         /* it should remain joinable and hence detachable */
12485         sleep( 1 );
12486
12487         status = pthread_detach( &t );
12488         if( status ) return errno;
12489 #endif
12490
12491 #ifdef HAVE_LINUX_THREADS
12492         pthread_kill_other_threads_np();
12493 #endif
12494
12495         return 0;
12496
12497 }
12498
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12501 then
12502   ol_cv_pthread_pthread=yes
12503 else
12504   echo "configure: failed program was:" >&5
12505   cat conftest.$ac_ext >&5
12506   rm -fr conftest*
12507   ol_cv_pthread_pthread=no
12508 fi
12509 rm -fr conftest*
12510 fi
12511
12512
12513                 # restore the LIBS
12514                 LIBS="$ol_LIBS"
12515         
12516 fi
12517
12518 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12519
12520         if test $ol_cv_pthread_pthread = yes ; then
12521                 ol_link_pthreads="-pthread"
12522                 ol_link_threads=posix
12523         fi
12524 fi
12525
12526                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12527 if test "$ol_link_threads" = no ; then
12528         # try -pthreads
12529         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12530 echo "configure:12531: checking for pthread link with -pthreads" >&5
12531 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12532   echo $ac_n "(cached) $ac_c" 1>&6
12533 else
12534   
12535                 # save the flags
12536                 ol_LIBS="$LIBS"
12537                 LIBS="-pthreads $LIBS"
12538
12539                 if test "$cross_compiling" = yes; then
12540   cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543 /* pthread test headers */
12544 #include <pthread.h>
12545 #if HAVE_PTHREADS < 7
12546 #include <errno.h>
12547 #endif
12548 #ifndef NULL
12549 #define NULL (void*)0
12550 #endif
12551
12552 static void *task(p)
12553         void *p;
12554 {
12555         return (void *) (p == NULL);
12556 }
12557
12558 int main() {
12559
12560         /* pthread test function */
12561 #ifndef PTHREAD_CREATE_DETACHED
12562 #define PTHREAD_CREATE_DETACHED 1
12563 #endif
12564         pthread_t t;
12565         int status;
12566         int detach = PTHREAD_CREATE_DETACHED;
12567
12568 #if HAVE_PTHREADS > 4
12569         /* Final pthreads */
12570         pthread_attr_t attr;
12571
12572         status = pthread_attr_init(&attr);
12573         if( status ) return status;
12574
12575 #if HAVE_PTHREADS < 7
12576         status = pthread_attr_setdetachstate(&attr, &detach);
12577         if( status < 0 ) status = errno;
12578 #else
12579         status = pthread_attr_setdetachstate(&attr, detach);
12580 #endif
12581         if( status ) return status;
12582         status = pthread_create( &t, &attr, task, NULL );
12583 #if HAVE_PTHREADS < 7
12584         if( status < 0 ) status = errno;
12585 #endif
12586         if( status ) return status;
12587 #else
12588         /* Draft 4 pthreads */
12589         status = pthread_create( &t, pthread_attr_default, task, NULL );
12590         if( status ) return errno;
12591
12592         /* give thread a chance to complete */
12593         /* it should remain joinable and hence detachable */
12594         sleep( 1 );
12595
12596         status = pthread_detach( &t );
12597         if( status ) return errno;
12598 #endif
12599
12600 #ifdef HAVE_LINUX_THREADS
12601         pthread_kill_other_threads_np();
12602 #endif
12603
12604         return 0;
12605
12606 ; return 0; }
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12609   rm -rf conftest*
12610   ol_cv_pthread_pthreads=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   ol_cv_pthread_pthreads=no
12616 fi
12617 rm -f conftest*
12618 else
12619   cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* pthread test headers */
12623 #include <pthread.h>
12624 #if HAVE_PTHREADS < 7
12625 #include <errno.h>
12626 #endif
12627 #ifndef NULL
12628 #define NULL (void*)0
12629 #endif
12630
12631 static void *task(p)
12632         void *p;
12633 {
12634         return (void *) (p == NULL);
12635 }
12636
12637
12638 int main(argc, argv)
12639         int argc;
12640         char **argv;
12641 {
12642
12643         /* pthread test function */
12644 #ifndef PTHREAD_CREATE_DETACHED
12645 #define PTHREAD_CREATE_DETACHED 1
12646 #endif
12647         pthread_t t;
12648         int status;
12649         int detach = PTHREAD_CREATE_DETACHED;
12650
12651 #if HAVE_PTHREADS > 4
12652         /* Final pthreads */
12653         pthread_attr_t attr;
12654
12655         status = pthread_attr_init(&attr);
12656         if( status ) return status;
12657
12658 #if HAVE_PTHREADS < 7
12659         status = pthread_attr_setdetachstate(&attr, &detach);
12660         if( status < 0 ) status = errno;
12661 #else
12662         status = pthread_attr_setdetachstate(&attr, detach);
12663 #endif
12664         if( status ) return status;
12665         status = pthread_create( &t, &attr, task, NULL );
12666 #if HAVE_PTHREADS < 7
12667         if( status < 0 ) status = errno;
12668 #endif
12669         if( status ) return status;
12670 #else
12671         /* Draft 4 pthreads */
12672         status = pthread_create( &t, pthread_attr_default, task, NULL );
12673         if( status ) return errno;
12674
12675         /* give thread a chance to complete */
12676         /* it should remain joinable and hence detachable */
12677         sleep( 1 );
12678
12679         status = pthread_detach( &t );
12680         if( status ) return errno;
12681 #endif
12682
12683 #ifdef HAVE_LINUX_THREADS
12684         pthread_kill_other_threads_np();
12685 #endif
12686
12687         return 0;
12688
12689 }
12690
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12693 then
12694   ol_cv_pthread_pthreads=yes
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -fr conftest*
12699   ol_cv_pthread_pthreads=no
12700 fi
12701 rm -fr conftest*
12702 fi
12703
12704
12705                 # restore the LIBS
12706                 LIBS="$ol_LIBS"
12707         
12708 fi
12709
12710 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12711
12712         if test $ol_cv_pthread_pthreads = yes ; then
12713                 ol_link_pthreads="-pthreads"
12714                 ol_link_threads=posix
12715         fi
12716 fi
12717
12718                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12719 if test "$ol_link_threads" = no ; then
12720         # try -mthreads
12721         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12722 echo "configure:12723: checking for pthread link with -mthreads" >&5
12723 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12724   echo $ac_n "(cached) $ac_c" 1>&6
12725 else
12726   
12727                 # save the flags
12728                 ol_LIBS="$LIBS"
12729                 LIBS="-mthreads $LIBS"
12730
12731                 if test "$cross_compiling" = yes; then
12732   cat > conftest.$ac_ext <<EOF
12733 #line 12734 "configure"
12734 #include "confdefs.h"
12735 /* pthread test headers */
12736 #include <pthread.h>
12737 #if HAVE_PTHREADS < 7
12738 #include <errno.h>
12739 #endif
12740 #ifndef NULL
12741 #define NULL (void*)0
12742 #endif
12743
12744 static void *task(p)
12745         void *p;
12746 {
12747         return (void *) (p == NULL);
12748 }
12749
12750 int main() {
12751
12752         /* pthread test function */
12753 #ifndef PTHREAD_CREATE_DETACHED
12754 #define PTHREAD_CREATE_DETACHED 1
12755 #endif
12756         pthread_t t;
12757         int status;
12758         int detach = PTHREAD_CREATE_DETACHED;
12759
12760 #if HAVE_PTHREADS > 4
12761         /* Final pthreads */
12762         pthread_attr_t attr;
12763
12764         status = pthread_attr_init(&attr);
12765         if( status ) return status;
12766
12767 #if HAVE_PTHREADS < 7
12768         status = pthread_attr_setdetachstate(&attr, &detach);
12769         if( status < 0 ) status = errno;
12770 #else
12771         status = pthread_attr_setdetachstate(&attr, detach);
12772 #endif
12773         if( status ) return status;
12774         status = pthread_create( &t, &attr, task, NULL );
12775 #if HAVE_PTHREADS < 7
12776         if( status < 0 ) status = errno;
12777 #endif
12778         if( status ) return status;
12779 #else
12780         /* Draft 4 pthreads */
12781         status = pthread_create( &t, pthread_attr_default, task, NULL );
12782         if( status ) return errno;
12783
12784         /* give thread a chance to complete */
12785         /* it should remain joinable and hence detachable */
12786         sleep( 1 );
12787
12788         status = pthread_detach( &t );
12789         if( status ) return errno;
12790 #endif
12791
12792 #ifdef HAVE_LINUX_THREADS
12793         pthread_kill_other_threads_np();
12794 #endif
12795
12796         return 0;
12797
12798 ; return 0; }
12799 EOF
12800 if { (eval echo configure:12801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12801   rm -rf conftest*
12802   ol_cv_pthread_mthreads=yes
12803 else
12804   echo "configure: failed program was:" >&5
12805   cat conftest.$ac_ext >&5
12806   rm -rf conftest*
12807   ol_cv_pthread_mthreads=no
12808 fi
12809 rm -f conftest*
12810 else
12811   cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12814 /* pthread test headers */
12815 #include <pthread.h>
12816 #if HAVE_PTHREADS < 7
12817 #include <errno.h>
12818 #endif
12819 #ifndef NULL
12820 #define NULL (void*)0
12821 #endif
12822
12823 static void *task(p)
12824         void *p;
12825 {
12826         return (void *) (p == NULL);
12827 }
12828
12829
12830 int main(argc, argv)
12831         int argc;
12832         char **argv;
12833 {
12834
12835         /* pthread test function */
12836 #ifndef PTHREAD_CREATE_DETACHED
12837 #define PTHREAD_CREATE_DETACHED 1
12838 #endif
12839         pthread_t t;
12840         int status;
12841         int detach = PTHREAD_CREATE_DETACHED;
12842
12843 #if HAVE_PTHREADS > 4
12844         /* Final pthreads */
12845         pthread_attr_t attr;
12846
12847         status = pthread_attr_init(&attr);
12848         if( status ) return status;
12849
12850 #if HAVE_PTHREADS < 7
12851         status = pthread_attr_setdetachstate(&attr, &detach);
12852         if( status < 0 ) status = errno;
12853 #else
12854         status = pthread_attr_setdetachstate(&attr, detach);
12855 #endif
12856         if( status ) return status;
12857         status = pthread_create( &t, &attr, task, NULL );
12858 #if HAVE_PTHREADS < 7
12859         if( status < 0 ) status = errno;
12860 #endif
12861         if( status ) return status;
12862 #else
12863         /* Draft 4 pthreads */
12864         status = pthread_create( &t, pthread_attr_default, task, NULL );
12865         if( status ) return errno;
12866
12867         /* give thread a chance to complete */
12868         /* it should remain joinable and hence detachable */
12869         sleep( 1 );
12870
12871         status = pthread_detach( &t );
12872         if( status ) return errno;
12873 #endif
12874
12875 #ifdef HAVE_LINUX_THREADS
12876         pthread_kill_other_threads_np();
12877 #endif
12878
12879         return 0;
12880
12881 }
12882
12883 EOF
12884 if { (eval echo configure:12885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12885 then
12886   ol_cv_pthread_mthreads=yes
12887 else
12888   echo "configure: failed program was:" >&5
12889   cat conftest.$ac_ext >&5
12890   rm -fr conftest*
12891   ol_cv_pthread_mthreads=no
12892 fi
12893 rm -fr conftest*
12894 fi
12895
12896
12897                 # restore the LIBS
12898                 LIBS="$ol_LIBS"
12899         
12900 fi
12901
12902 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12903
12904         if test $ol_cv_pthread_mthreads = yes ; then
12905                 ol_link_pthreads="-mthreads"
12906                 ol_link_threads=posix
12907         fi
12908 fi
12909
12910                 # Pthread try link: -thread (ol_cv_pthread_thread)
12911 if test "$ol_link_threads" = no ; then
12912         # try -thread
12913         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12914 echo "configure:12915: checking for pthread link with -thread" >&5
12915 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12916   echo $ac_n "(cached) $ac_c" 1>&6
12917 else
12918   
12919                 # save the flags
12920                 ol_LIBS="$LIBS"
12921                 LIBS="-thread $LIBS"
12922
12923                 if test "$cross_compiling" = yes; then
12924   cat > conftest.$ac_ext <<EOF
12925 #line 12926 "configure"
12926 #include "confdefs.h"
12927 /* pthread test headers */
12928 #include <pthread.h>
12929 #if HAVE_PTHREADS < 7
12930 #include <errno.h>
12931 #endif
12932 #ifndef NULL
12933 #define NULL (void*)0
12934 #endif
12935
12936 static void *task(p)
12937         void *p;
12938 {
12939         return (void *) (p == NULL);
12940 }
12941
12942 int main() {
12943
12944         /* pthread test function */
12945 #ifndef PTHREAD_CREATE_DETACHED
12946 #define PTHREAD_CREATE_DETACHED 1
12947 #endif
12948         pthread_t t;
12949         int status;
12950         int detach = PTHREAD_CREATE_DETACHED;
12951
12952 #if HAVE_PTHREADS > 4
12953         /* Final pthreads */
12954         pthread_attr_t attr;
12955
12956         status = pthread_attr_init(&attr);
12957         if( status ) return status;
12958
12959 #if HAVE_PTHREADS < 7
12960         status = pthread_attr_setdetachstate(&attr, &detach);
12961         if( status < 0 ) status = errno;
12962 #else
12963         status = pthread_attr_setdetachstate(&attr, detach);
12964 #endif
12965         if( status ) return status;
12966         status = pthread_create( &t, &attr, task, NULL );
12967 #if HAVE_PTHREADS < 7
12968         if( status < 0 ) status = errno;
12969 #endif
12970         if( status ) return status;
12971 #else
12972         /* Draft 4 pthreads */
12973         status = pthread_create( &t, pthread_attr_default, task, NULL );
12974         if( status ) return errno;
12975
12976         /* give thread a chance to complete */
12977         /* it should remain joinable and hence detachable */
12978         sleep( 1 );
12979
12980         status = pthread_detach( &t );
12981         if( status ) return errno;
12982 #endif
12983
12984 #ifdef HAVE_LINUX_THREADS
12985         pthread_kill_other_threads_np();
12986 #endif
12987
12988         return 0;
12989
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12993   rm -rf conftest*
12994   ol_cv_pthread_thread=yes
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   ol_cv_pthread_thread=no
13000 fi
13001 rm -f conftest*
13002 else
13003   cat > conftest.$ac_ext <<EOF
13004 #line 13005 "configure"
13005 #include "confdefs.h"
13006 /* pthread test headers */
13007 #include <pthread.h>
13008 #if HAVE_PTHREADS < 7
13009 #include <errno.h>
13010 #endif
13011 #ifndef NULL
13012 #define NULL (void*)0
13013 #endif
13014
13015 static void *task(p)
13016         void *p;
13017 {
13018         return (void *) (p == NULL);
13019 }
13020
13021
13022 int main(argc, argv)
13023         int argc;
13024         char **argv;
13025 {
13026
13027         /* pthread test function */
13028 #ifndef PTHREAD_CREATE_DETACHED
13029 #define PTHREAD_CREATE_DETACHED 1
13030 #endif
13031         pthread_t t;
13032         int status;
13033         int detach = PTHREAD_CREATE_DETACHED;
13034
13035 #if HAVE_PTHREADS > 4
13036         /* Final pthreads */
13037         pthread_attr_t attr;
13038
13039         status = pthread_attr_init(&attr);
13040         if( status ) return status;
13041
13042 #if HAVE_PTHREADS < 7
13043         status = pthread_attr_setdetachstate(&attr, &detach);
13044         if( status < 0 ) status = errno;
13045 #else
13046         status = pthread_attr_setdetachstate(&attr, detach);
13047 #endif
13048         if( status ) return status;
13049         status = pthread_create( &t, &attr, task, NULL );
13050 #if HAVE_PTHREADS < 7
13051         if( status < 0 ) status = errno;
13052 #endif
13053         if( status ) return status;
13054 #else
13055         /* Draft 4 pthreads */
13056         status = pthread_create( &t, pthread_attr_default, task, NULL );
13057         if( status ) return errno;
13058
13059         /* give thread a chance to complete */
13060         /* it should remain joinable and hence detachable */
13061         sleep( 1 );
13062
13063         status = pthread_detach( &t );
13064         if( status ) return errno;
13065 #endif
13066
13067 #ifdef HAVE_LINUX_THREADS
13068         pthread_kill_other_threads_np();
13069 #endif
13070
13071         return 0;
13072
13073 }
13074
13075 EOF
13076 if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13077 then
13078   ol_cv_pthread_thread=yes
13079 else
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -fr conftest*
13083   ol_cv_pthread_thread=no
13084 fi
13085 rm -fr conftest*
13086 fi
13087
13088
13089                 # restore the LIBS
13090                 LIBS="$ol_LIBS"
13091         
13092 fi
13093
13094 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13095
13096         if test $ol_cv_pthread_thread = yes ; then
13097                 ol_link_pthreads="-thread"
13098                 ol_link_threads=posix
13099         fi
13100 fi
13101
13102
13103                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13104 if test "$ol_link_threads" = no ; then
13105         # try -lpthread -lmach -lexc -lc_r
13106         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13107 echo "configure:13108: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13108 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13109   echo $ac_n "(cached) $ac_c" 1>&6
13110 else
13111   
13112                 # save the flags
13113                 ol_LIBS="$LIBS"
13114                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13115
13116                 if test "$cross_compiling" = yes; then
13117   cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 /* pthread test headers */
13121 #include <pthread.h>
13122 #if HAVE_PTHREADS < 7
13123 #include <errno.h>
13124 #endif
13125 #ifndef NULL
13126 #define NULL (void*)0
13127 #endif
13128
13129 static void *task(p)
13130         void *p;
13131 {
13132         return (void *) (p == NULL);
13133 }
13134
13135 int main() {
13136
13137         /* pthread test function */
13138 #ifndef PTHREAD_CREATE_DETACHED
13139 #define PTHREAD_CREATE_DETACHED 1
13140 #endif
13141         pthread_t t;
13142         int status;
13143         int detach = PTHREAD_CREATE_DETACHED;
13144
13145 #if HAVE_PTHREADS > 4
13146         /* Final pthreads */
13147         pthread_attr_t attr;
13148
13149         status = pthread_attr_init(&attr);
13150         if( status ) return status;
13151
13152 #if HAVE_PTHREADS < 7
13153         status = pthread_attr_setdetachstate(&attr, &detach);
13154         if( status < 0 ) status = errno;
13155 #else
13156         status = pthread_attr_setdetachstate(&attr, detach);
13157 #endif
13158         if( status ) return status;
13159         status = pthread_create( &t, &attr, task, NULL );
13160 #if HAVE_PTHREADS < 7
13161         if( status < 0 ) status = errno;
13162 #endif
13163         if( status ) return status;
13164 #else
13165         /* Draft 4 pthreads */
13166         status = pthread_create( &t, pthread_attr_default, task, NULL );
13167         if( status ) return errno;
13168
13169         /* give thread a chance to complete */
13170         /* it should remain joinable and hence detachable */
13171         sleep( 1 );
13172
13173         status = pthread_detach( &t );
13174         if( status ) return errno;
13175 #endif
13176
13177 #ifdef HAVE_LINUX_THREADS
13178         pthread_kill_other_threads_np();
13179 #endif
13180
13181         return 0;
13182
13183 ; return 0; }
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13186   rm -rf conftest*
13187   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13193 fi
13194 rm -f conftest*
13195 else
13196   cat > conftest.$ac_ext <<EOF
13197 #line 13198 "configure"
13198 #include "confdefs.h"
13199 /* pthread test headers */
13200 #include <pthread.h>
13201 #if HAVE_PTHREADS < 7
13202 #include <errno.h>
13203 #endif
13204 #ifndef NULL
13205 #define NULL (void*)0
13206 #endif
13207
13208 static void *task(p)
13209         void *p;
13210 {
13211         return (void *) (p == NULL);
13212 }
13213
13214
13215 int main(argc, argv)
13216         int argc;
13217         char **argv;
13218 {
13219
13220         /* pthread test function */
13221 #ifndef PTHREAD_CREATE_DETACHED
13222 #define PTHREAD_CREATE_DETACHED 1
13223 #endif
13224         pthread_t t;
13225         int status;
13226         int detach = PTHREAD_CREATE_DETACHED;
13227
13228 #if HAVE_PTHREADS > 4
13229         /* Final pthreads */
13230         pthread_attr_t attr;
13231
13232         status = pthread_attr_init(&attr);
13233         if( status ) return status;
13234
13235 #if HAVE_PTHREADS < 7
13236         status = pthread_attr_setdetachstate(&attr, &detach);
13237         if( status < 0 ) status = errno;
13238 #else
13239         status = pthread_attr_setdetachstate(&attr, detach);
13240 #endif
13241         if( status ) return status;
13242         status = pthread_create( &t, &attr, task, NULL );
13243 #if HAVE_PTHREADS < 7
13244         if( status < 0 ) status = errno;
13245 #endif
13246         if( status ) return status;
13247 #else
13248         /* Draft 4 pthreads */
13249         status = pthread_create( &t, pthread_attr_default, task, NULL );
13250         if( status ) return errno;
13251
13252         /* give thread a chance to complete */
13253         /* it should remain joinable and hence detachable */
13254         sleep( 1 );
13255
13256         status = pthread_detach( &t );
13257         if( status ) return errno;
13258 #endif
13259
13260 #ifdef HAVE_LINUX_THREADS
13261         pthread_kill_other_threads_np();
13262 #endif
13263
13264         return 0;
13265
13266 }
13267
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13270 then
13271   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   rm -fr conftest*
13276   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13277 fi
13278 rm -fr conftest*
13279 fi
13280
13281
13282                 # restore the LIBS
13283                 LIBS="$ol_LIBS"
13284         
13285 fi
13286
13287 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13288
13289         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13290                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13291                 ol_link_threads=posix
13292         fi
13293 fi
13294
13295                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13296 if test "$ol_link_threads" = no ; then
13297         # try -lpthread -lmach -lexc
13298         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13299 echo "configure:13300: checking for pthread link with -lpthread -lmach -lexc" >&5
13300 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13301   echo $ac_n "(cached) $ac_c" 1>&6
13302 else
13303   
13304                 # save the flags
13305                 ol_LIBS="$LIBS"
13306                 LIBS="-lpthread -lmach -lexc $LIBS"
13307
13308                 if test "$cross_compiling" = yes; then
13309   cat > conftest.$ac_ext <<EOF
13310 #line 13311 "configure"
13311 #include "confdefs.h"
13312 /* pthread test headers */
13313 #include <pthread.h>
13314 #if HAVE_PTHREADS < 7
13315 #include <errno.h>
13316 #endif
13317 #ifndef NULL
13318 #define NULL (void*)0
13319 #endif
13320
13321 static void *task(p)
13322         void *p;
13323 {
13324         return (void *) (p == NULL);
13325 }
13326
13327 int main() {
13328
13329         /* pthread test function */
13330 #ifndef PTHREAD_CREATE_DETACHED
13331 #define PTHREAD_CREATE_DETACHED 1
13332 #endif
13333         pthread_t t;
13334         int status;
13335         int detach = PTHREAD_CREATE_DETACHED;
13336
13337 #if HAVE_PTHREADS > 4
13338         /* Final pthreads */
13339         pthread_attr_t attr;
13340
13341         status = pthread_attr_init(&attr);
13342         if( status ) return status;
13343
13344 #if HAVE_PTHREADS < 7
13345         status = pthread_attr_setdetachstate(&attr, &detach);
13346         if( status < 0 ) status = errno;
13347 #else
13348         status = pthread_attr_setdetachstate(&attr, detach);
13349 #endif
13350         if( status ) return status;
13351         status = pthread_create( &t, &attr, task, NULL );
13352 #if HAVE_PTHREADS < 7
13353         if( status < 0 ) status = errno;
13354 #endif
13355         if( status ) return status;
13356 #else
13357         /* Draft 4 pthreads */
13358         status = pthread_create( &t, pthread_attr_default, task, NULL );
13359         if( status ) return errno;
13360
13361         /* give thread a chance to complete */
13362         /* it should remain joinable and hence detachable */
13363         sleep( 1 );
13364
13365         status = pthread_detach( &t );
13366         if( status ) return errno;
13367 #endif
13368
13369 #ifdef HAVE_LINUX_THREADS
13370         pthread_kill_other_threads_np();
13371 #endif
13372
13373         return 0;
13374
13375 ; return 0; }
13376 EOF
13377 if { (eval echo configure:13378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13378   rm -rf conftest*
13379   ol_cv_pthread_lpthread_lmach_lexc=yes
13380 else
13381   echo "configure: failed program was:" >&5
13382   cat conftest.$ac_ext >&5
13383   rm -rf conftest*
13384   ol_cv_pthread_lpthread_lmach_lexc=no
13385 fi
13386 rm -f conftest*
13387 else
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 /* pthread test headers */
13392 #include <pthread.h>
13393 #if HAVE_PTHREADS < 7
13394 #include <errno.h>
13395 #endif
13396 #ifndef NULL
13397 #define NULL (void*)0
13398 #endif
13399
13400 static void *task(p)
13401         void *p;
13402 {
13403         return (void *) (p == NULL);
13404 }
13405
13406
13407 int main(argc, argv)
13408         int argc;
13409         char **argv;
13410 {
13411
13412         /* pthread test function */
13413 #ifndef PTHREAD_CREATE_DETACHED
13414 #define PTHREAD_CREATE_DETACHED 1
13415 #endif
13416         pthread_t t;
13417         int status;
13418         int detach = PTHREAD_CREATE_DETACHED;
13419
13420 #if HAVE_PTHREADS > 4
13421         /* Final pthreads */
13422         pthread_attr_t attr;
13423
13424         status = pthread_attr_init(&attr);
13425         if( status ) return status;
13426
13427 #if HAVE_PTHREADS < 7
13428         status = pthread_attr_setdetachstate(&attr, &detach);
13429         if( status < 0 ) status = errno;
13430 #else
13431         status = pthread_attr_setdetachstate(&attr, detach);
13432 #endif
13433         if( status ) return status;
13434         status = pthread_create( &t, &attr, task, NULL );
13435 #if HAVE_PTHREADS < 7
13436         if( status < 0 ) status = errno;
13437 #endif
13438         if( status ) return status;
13439 #else
13440         /* Draft 4 pthreads */
13441         status = pthread_create( &t, pthread_attr_default, task, NULL );
13442         if( status ) return errno;
13443
13444         /* give thread a chance to complete */
13445         /* it should remain joinable and hence detachable */
13446         sleep( 1 );
13447
13448         status = pthread_detach( &t );
13449         if( status ) return errno;
13450 #endif
13451
13452 #ifdef HAVE_LINUX_THREADS
13453         pthread_kill_other_threads_np();
13454 #endif
13455
13456         return 0;
13457
13458 }
13459
13460 EOF
13461 if { (eval echo configure:13462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13462 then
13463   ol_cv_pthread_lpthread_lmach_lexc=yes
13464 else
13465   echo "configure: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   rm -fr conftest*
13468   ol_cv_pthread_lpthread_lmach_lexc=no
13469 fi
13470 rm -fr conftest*
13471 fi
13472
13473
13474                 # restore the LIBS
13475                 LIBS="$ol_LIBS"
13476         
13477 fi
13478
13479 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13480
13481         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13482                 ol_link_pthreads="-lpthread -lmach -lexc"
13483                 ol_link_threads=posix
13484         fi
13485 fi
13486
13487
13488                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13489 if test "$ol_link_threads" = no ; then
13490         # try -lpthread -Wl,-woff,85
13491         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13492 echo "configure:13493: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13493 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13494   echo $ac_n "(cached) $ac_c" 1>&6
13495 else
13496   
13497                 # save the flags
13498                 ol_LIBS="$LIBS"
13499                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13500
13501                 if test "$cross_compiling" = yes; then
13502   cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 /* pthread test headers */
13506 #include <pthread.h>
13507 #if HAVE_PTHREADS < 7
13508 #include <errno.h>
13509 #endif
13510 #ifndef NULL
13511 #define NULL (void*)0
13512 #endif
13513
13514 static void *task(p)
13515         void *p;
13516 {
13517         return (void *) (p == NULL);
13518 }
13519
13520 int main() {
13521
13522         /* pthread test function */
13523 #ifndef PTHREAD_CREATE_DETACHED
13524 #define PTHREAD_CREATE_DETACHED 1
13525 #endif
13526         pthread_t t;
13527         int status;
13528         int detach = PTHREAD_CREATE_DETACHED;
13529
13530 #if HAVE_PTHREADS > 4
13531         /* Final pthreads */
13532         pthread_attr_t attr;
13533
13534         status = pthread_attr_init(&attr);
13535         if( status ) return status;
13536
13537 #if HAVE_PTHREADS < 7
13538         status = pthread_attr_setdetachstate(&attr, &detach);
13539         if( status < 0 ) status = errno;
13540 #else
13541         status = pthread_attr_setdetachstate(&attr, detach);
13542 #endif
13543         if( status ) return status;
13544         status = pthread_create( &t, &attr, task, NULL );
13545 #if HAVE_PTHREADS < 7
13546         if( status < 0 ) status = errno;
13547 #endif
13548         if( status ) return status;
13549 #else
13550         /* Draft 4 pthreads */
13551         status = pthread_create( &t, pthread_attr_default, task, NULL );
13552         if( status ) return errno;
13553
13554         /* give thread a chance to complete */
13555         /* it should remain joinable and hence detachable */
13556         sleep( 1 );
13557
13558         status = pthread_detach( &t );
13559         if( status ) return errno;
13560 #endif
13561
13562 #ifdef HAVE_LINUX_THREADS
13563         pthread_kill_other_threads_np();
13564 #endif
13565
13566         return 0;
13567
13568 ; return 0; }
13569 EOF
13570 if { (eval echo configure:13571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13571   rm -rf conftest*
13572   ol_cv_pthread_lib_lpthread_woff=yes
13573 else
13574   echo "configure: failed program was:" >&5
13575   cat conftest.$ac_ext >&5
13576   rm -rf conftest*
13577   ol_cv_pthread_lib_lpthread_woff=no
13578 fi
13579 rm -f conftest*
13580 else
13581   cat > conftest.$ac_ext <<EOF
13582 #line 13583 "configure"
13583 #include "confdefs.h"
13584 /* pthread test headers */
13585 #include <pthread.h>
13586 #if HAVE_PTHREADS < 7
13587 #include <errno.h>
13588 #endif
13589 #ifndef NULL
13590 #define NULL (void*)0
13591 #endif
13592
13593 static void *task(p)
13594         void *p;
13595 {
13596         return (void *) (p == NULL);
13597 }
13598
13599
13600 int main(argc, argv)
13601         int argc;
13602         char **argv;
13603 {
13604
13605         /* pthread test function */
13606 #ifndef PTHREAD_CREATE_DETACHED
13607 #define PTHREAD_CREATE_DETACHED 1
13608 #endif
13609         pthread_t t;
13610         int status;
13611         int detach = PTHREAD_CREATE_DETACHED;
13612
13613 #if HAVE_PTHREADS > 4
13614         /* Final pthreads */
13615         pthread_attr_t attr;
13616
13617         status = pthread_attr_init(&attr);
13618         if( status ) return status;
13619
13620 #if HAVE_PTHREADS < 7
13621         status = pthread_attr_setdetachstate(&attr, &detach);
13622         if( status < 0 ) status = errno;
13623 #else
13624         status = pthread_attr_setdetachstate(&attr, detach);
13625 #endif
13626         if( status ) return status;
13627         status = pthread_create( &t, &attr, task, NULL );
13628 #if HAVE_PTHREADS < 7
13629         if( status < 0 ) status = errno;
13630 #endif
13631         if( status ) return status;
13632 #else
13633         /* Draft 4 pthreads */
13634         status = pthread_create( &t, pthread_attr_default, task, NULL );
13635         if( status ) return errno;
13636
13637         /* give thread a chance to complete */
13638         /* it should remain joinable and hence detachable */
13639         sleep( 1 );
13640
13641         status = pthread_detach( &t );
13642         if( status ) return errno;
13643 #endif
13644
13645 #ifdef HAVE_LINUX_THREADS
13646         pthread_kill_other_threads_np();
13647 #endif
13648
13649         return 0;
13650
13651 }
13652
13653 EOF
13654 if { (eval echo configure:13655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13655 then
13656   ol_cv_pthread_lib_lpthread_woff=yes
13657 else
13658   echo "configure: failed program was:" >&5
13659   cat conftest.$ac_ext >&5
13660   rm -fr conftest*
13661   ol_cv_pthread_lib_lpthread_woff=no
13662 fi
13663 rm -fr conftest*
13664 fi
13665
13666
13667                 # restore the LIBS
13668                 LIBS="$ol_LIBS"
13669         
13670 fi
13671
13672 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13673
13674         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13675                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13676                 ol_link_threads=posix
13677         fi
13678 fi
13679
13680
13681                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13682 if test "$ol_link_threads" = no ; then
13683         # try -lpthread
13684         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13685 echo "configure:13686: checking for pthread link with -lpthread" >&5
13686 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13687   echo $ac_n "(cached) $ac_c" 1>&6
13688 else
13689   
13690                 # save the flags
13691                 ol_LIBS="$LIBS"
13692                 LIBS="-lpthread $LIBS"
13693
13694                 if test "$cross_compiling" = yes; then
13695   cat > conftest.$ac_ext <<EOF
13696 #line 13697 "configure"
13697 #include "confdefs.h"
13698 /* pthread test headers */
13699 #include <pthread.h>
13700 #if HAVE_PTHREADS < 7
13701 #include <errno.h>
13702 #endif
13703 #ifndef NULL
13704 #define NULL (void*)0
13705 #endif
13706
13707 static void *task(p)
13708         void *p;
13709 {
13710         return (void *) (p == NULL);
13711 }
13712
13713 int main() {
13714
13715         /* pthread test function */
13716 #ifndef PTHREAD_CREATE_DETACHED
13717 #define PTHREAD_CREATE_DETACHED 1
13718 #endif
13719         pthread_t t;
13720         int status;
13721         int detach = PTHREAD_CREATE_DETACHED;
13722
13723 #if HAVE_PTHREADS > 4
13724         /* Final pthreads */
13725         pthread_attr_t attr;
13726
13727         status = pthread_attr_init(&attr);
13728         if( status ) return status;
13729
13730 #if HAVE_PTHREADS < 7
13731         status = pthread_attr_setdetachstate(&attr, &detach);
13732         if( status < 0 ) status = errno;
13733 #else
13734         status = pthread_attr_setdetachstate(&attr, detach);
13735 #endif
13736         if( status ) return status;
13737         status = pthread_create( &t, &attr, task, NULL );
13738 #if HAVE_PTHREADS < 7
13739         if( status < 0 ) status = errno;
13740 #endif
13741         if( status ) return status;
13742 #else
13743         /* Draft 4 pthreads */
13744         status = pthread_create( &t, pthread_attr_default, task, NULL );
13745         if( status ) return errno;
13746
13747         /* give thread a chance to complete */
13748         /* it should remain joinable and hence detachable */
13749         sleep( 1 );
13750
13751         status = pthread_detach( &t );
13752         if( status ) return errno;
13753 #endif
13754
13755 #ifdef HAVE_LINUX_THREADS
13756         pthread_kill_other_threads_np();
13757 #endif
13758
13759         return 0;
13760
13761 ; return 0; }
13762 EOF
13763 if { (eval echo configure:13764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13764   rm -rf conftest*
13765   ol_cv_pthread_lpthread=yes
13766 else
13767   echo "configure: failed program was:" >&5
13768   cat conftest.$ac_ext >&5
13769   rm -rf conftest*
13770   ol_cv_pthread_lpthread=no
13771 fi
13772 rm -f conftest*
13773 else
13774   cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* pthread test headers */
13778 #include <pthread.h>
13779 #if HAVE_PTHREADS < 7
13780 #include <errno.h>
13781 #endif
13782 #ifndef NULL
13783 #define NULL (void*)0
13784 #endif
13785
13786 static void *task(p)
13787         void *p;
13788 {
13789         return (void *) (p == NULL);
13790 }
13791
13792
13793 int main(argc, argv)
13794         int argc;
13795         char **argv;
13796 {
13797
13798         /* pthread test function */
13799 #ifndef PTHREAD_CREATE_DETACHED
13800 #define PTHREAD_CREATE_DETACHED 1
13801 #endif
13802         pthread_t t;
13803         int status;
13804         int detach = PTHREAD_CREATE_DETACHED;
13805
13806 #if HAVE_PTHREADS > 4
13807         /* Final pthreads */
13808         pthread_attr_t attr;
13809
13810         status = pthread_attr_init(&attr);
13811         if( status ) return status;
13812
13813 #if HAVE_PTHREADS < 7
13814         status = pthread_attr_setdetachstate(&attr, &detach);
13815         if( status < 0 ) status = errno;
13816 #else
13817         status = pthread_attr_setdetachstate(&attr, detach);
13818 #endif
13819         if( status ) return status;
13820         status = pthread_create( &t, &attr, task, NULL );
13821 #if HAVE_PTHREADS < 7
13822         if( status < 0 ) status = errno;
13823 #endif
13824         if( status ) return status;
13825 #else
13826         /* Draft 4 pthreads */
13827         status = pthread_create( &t, pthread_attr_default, task, NULL );
13828         if( status ) return errno;
13829
13830         /* give thread a chance to complete */
13831         /* it should remain joinable and hence detachable */
13832         sleep( 1 );
13833
13834         status = pthread_detach( &t );
13835         if( status ) return errno;
13836 #endif
13837
13838 #ifdef HAVE_LINUX_THREADS
13839         pthread_kill_other_threads_np();
13840 #endif
13841
13842         return 0;
13843
13844 }
13845
13846 EOF
13847 if { (eval echo configure:13848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13848 then
13849   ol_cv_pthread_lpthread=yes
13850 else
13851   echo "configure: failed program was:" >&5
13852   cat conftest.$ac_ext >&5
13853   rm -fr conftest*
13854   ol_cv_pthread_lpthread=no
13855 fi
13856 rm -fr conftest*
13857 fi
13858
13859
13860                 # restore the LIBS
13861                 LIBS="$ol_LIBS"
13862         
13863 fi
13864
13865 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13866
13867         if test $ol_cv_pthread_lpthread = yes ; then
13868                 ol_link_pthreads="-lpthread"
13869                 ol_link_threads=posix
13870         fi
13871 fi
13872
13873                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13874 if test "$ol_link_threads" = no ; then
13875         # try -lc_r
13876         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13877 echo "configure:13878: checking for pthread link with -lc_r" >&5
13878 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   
13882                 # save the flags
13883                 ol_LIBS="$LIBS"
13884                 LIBS="-lc_r $LIBS"
13885
13886                 if test "$cross_compiling" = yes; then
13887   cat > conftest.$ac_ext <<EOF
13888 #line 13889 "configure"
13889 #include "confdefs.h"
13890 /* pthread test headers */
13891 #include <pthread.h>
13892 #if HAVE_PTHREADS < 7
13893 #include <errno.h>
13894 #endif
13895 #ifndef NULL
13896 #define NULL (void*)0
13897 #endif
13898
13899 static void *task(p)
13900         void *p;
13901 {
13902         return (void *) (p == NULL);
13903 }
13904
13905 int main() {
13906
13907         /* pthread test function */
13908 #ifndef PTHREAD_CREATE_DETACHED
13909 #define PTHREAD_CREATE_DETACHED 1
13910 #endif
13911         pthread_t t;
13912         int status;
13913         int detach = PTHREAD_CREATE_DETACHED;
13914
13915 #if HAVE_PTHREADS > 4
13916         /* Final pthreads */
13917         pthread_attr_t attr;
13918
13919         status = pthread_attr_init(&attr);
13920         if( status ) return status;
13921
13922 #if HAVE_PTHREADS < 7
13923         status = pthread_attr_setdetachstate(&attr, &detach);
13924         if( status < 0 ) status = errno;
13925 #else
13926         status = pthread_attr_setdetachstate(&attr, detach);
13927 #endif
13928         if( status ) return status;
13929         status = pthread_create( &t, &attr, task, NULL );
13930 #if HAVE_PTHREADS < 7
13931         if( status < 0 ) status = errno;
13932 #endif
13933         if( status ) return status;
13934 #else
13935         /* Draft 4 pthreads */
13936         status = pthread_create( &t, pthread_attr_default, task, NULL );
13937         if( status ) return errno;
13938
13939         /* give thread a chance to complete */
13940         /* it should remain joinable and hence detachable */
13941         sleep( 1 );
13942
13943         status = pthread_detach( &t );
13944         if( status ) return errno;
13945 #endif
13946
13947 #ifdef HAVE_LINUX_THREADS
13948         pthread_kill_other_threads_np();
13949 #endif
13950
13951         return 0;
13952
13953 ; return 0; }
13954 EOF
13955 if { (eval echo configure:13956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13956   rm -rf conftest*
13957   ol_cv_pthread_lc_r=yes
13958 else
13959   echo "configure: failed program was:" >&5
13960   cat conftest.$ac_ext >&5
13961   rm -rf conftest*
13962   ol_cv_pthread_lc_r=no
13963 fi
13964 rm -f conftest*
13965 else
13966   cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13969 /* pthread test headers */
13970 #include <pthread.h>
13971 #if HAVE_PTHREADS < 7
13972 #include <errno.h>
13973 #endif
13974 #ifndef NULL
13975 #define NULL (void*)0
13976 #endif
13977
13978 static void *task(p)
13979         void *p;
13980 {
13981         return (void *) (p == NULL);
13982 }
13983
13984
13985 int main(argc, argv)
13986         int argc;
13987         char **argv;
13988 {
13989
13990         /* pthread test function */
13991 #ifndef PTHREAD_CREATE_DETACHED
13992 #define PTHREAD_CREATE_DETACHED 1
13993 #endif
13994         pthread_t t;
13995         int status;
13996         int detach = PTHREAD_CREATE_DETACHED;
13997
13998 #if HAVE_PTHREADS > 4
13999         /* Final pthreads */
14000         pthread_attr_t attr;
14001
14002         status = pthread_attr_init(&attr);
14003         if( status ) return status;
14004
14005 #if HAVE_PTHREADS < 7
14006         status = pthread_attr_setdetachstate(&attr, &detach);
14007         if( status < 0 ) status = errno;
14008 #else
14009         status = pthread_attr_setdetachstate(&attr, detach);
14010 #endif
14011         if( status ) return status;
14012         status = pthread_create( &t, &attr, task, NULL );
14013 #if HAVE_PTHREADS < 7
14014         if( status < 0 ) status = errno;
14015 #endif
14016         if( status ) return status;
14017 #else
14018         /* Draft 4 pthreads */
14019         status = pthread_create( &t, pthread_attr_default, task, NULL );
14020         if( status ) return errno;
14021
14022         /* give thread a chance to complete */
14023         /* it should remain joinable and hence detachable */
14024         sleep( 1 );
14025
14026         status = pthread_detach( &t );
14027         if( status ) return errno;
14028 #endif
14029
14030 #ifdef HAVE_LINUX_THREADS
14031         pthread_kill_other_threads_np();
14032 #endif
14033
14034         return 0;
14035
14036 }
14037
14038 EOF
14039 if { (eval echo configure:14040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14040 then
14041   ol_cv_pthread_lc_r=yes
14042 else
14043   echo "configure: failed program was:" >&5
14044   cat conftest.$ac_ext >&5
14045   rm -fr conftest*
14046   ol_cv_pthread_lc_r=no
14047 fi
14048 rm -fr conftest*
14049 fi
14050
14051
14052                 # restore the LIBS
14053                 LIBS="$ol_LIBS"
14054         
14055 fi
14056
14057 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14058
14059         if test $ol_cv_pthread_lc_r = yes ; then
14060                 ol_link_pthreads="-lc_r"
14061                 ol_link_threads=posix
14062         fi
14063 fi
14064
14065
14066                 # Pthread try link: -threads (ol_cv_pthread_threads)
14067 if test "$ol_link_threads" = no ; then
14068         # try -threads
14069         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14070 echo "configure:14071: checking for pthread link with -threads" >&5
14071 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14072   echo $ac_n "(cached) $ac_c" 1>&6
14073 else
14074   
14075                 # save the flags
14076                 ol_LIBS="$LIBS"
14077                 LIBS="-threads $LIBS"
14078
14079                 if test "$cross_compiling" = yes; then
14080   cat > conftest.$ac_ext <<EOF
14081 #line 14082 "configure"
14082 #include "confdefs.h"
14083 /* pthread test headers */
14084 #include <pthread.h>
14085 #if HAVE_PTHREADS < 7
14086 #include <errno.h>
14087 #endif
14088 #ifndef NULL
14089 #define NULL (void*)0
14090 #endif
14091
14092 static void *task(p)
14093         void *p;
14094 {
14095         return (void *) (p == NULL);
14096 }
14097
14098 int main() {
14099
14100         /* pthread test function */
14101 #ifndef PTHREAD_CREATE_DETACHED
14102 #define PTHREAD_CREATE_DETACHED 1
14103 #endif
14104         pthread_t t;
14105         int status;
14106         int detach = PTHREAD_CREATE_DETACHED;
14107
14108 #if HAVE_PTHREADS > 4
14109         /* Final pthreads */
14110         pthread_attr_t attr;
14111
14112         status = pthread_attr_init(&attr);
14113         if( status ) return status;
14114
14115 #if HAVE_PTHREADS < 7
14116         status = pthread_attr_setdetachstate(&attr, &detach);
14117         if( status < 0 ) status = errno;
14118 #else
14119         status = pthread_attr_setdetachstate(&attr, detach);
14120 #endif
14121         if( status ) return status;
14122         status = pthread_create( &t, &attr, task, NULL );
14123 #if HAVE_PTHREADS < 7
14124         if( status < 0 ) status = errno;
14125 #endif
14126         if( status ) return status;
14127 #else
14128         /* Draft 4 pthreads */
14129         status = pthread_create( &t, pthread_attr_default, task, NULL );
14130         if( status ) return errno;
14131
14132         /* give thread a chance to complete */
14133         /* it should remain joinable and hence detachable */
14134         sleep( 1 );
14135
14136         status = pthread_detach( &t );
14137         if( status ) return errno;
14138 #endif
14139
14140 #ifdef HAVE_LINUX_THREADS
14141         pthread_kill_other_threads_np();
14142 #endif
14143
14144         return 0;
14145
14146 ; return 0; }
14147 EOF
14148 if { (eval echo configure:14149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14149   rm -rf conftest*
14150   ol_cv_pthread_threads=yes
14151 else
14152   echo "configure: failed program was:" >&5
14153   cat conftest.$ac_ext >&5
14154   rm -rf conftest*
14155   ol_cv_pthread_threads=no
14156 fi
14157 rm -f conftest*
14158 else
14159   cat > conftest.$ac_ext <<EOF
14160 #line 14161 "configure"
14161 #include "confdefs.h"
14162 /* pthread test headers */
14163 #include <pthread.h>
14164 #if HAVE_PTHREADS < 7
14165 #include <errno.h>
14166 #endif
14167 #ifndef NULL
14168 #define NULL (void*)0
14169 #endif
14170
14171 static void *task(p)
14172         void *p;
14173 {
14174         return (void *) (p == NULL);
14175 }
14176
14177
14178 int main(argc, argv)
14179         int argc;
14180         char **argv;
14181 {
14182
14183         /* pthread test function */
14184 #ifndef PTHREAD_CREATE_DETACHED
14185 #define PTHREAD_CREATE_DETACHED 1
14186 #endif
14187         pthread_t t;
14188         int status;
14189         int detach = PTHREAD_CREATE_DETACHED;
14190
14191 #if HAVE_PTHREADS > 4
14192         /* Final pthreads */
14193         pthread_attr_t attr;
14194
14195         status = pthread_attr_init(&attr);
14196         if( status ) return status;
14197
14198 #if HAVE_PTHREADS < 7
14199         status = pthread_attr_setdetachstate(&attr, &detach);
14200         if( status < 0 ) status = errno;
14201 #else
14202         status = pthread_attr_setdetachstate(&attr, detach);
14203 #endif
14204         if( status ) return status;
14205         status = pthread_create( &t, &attr, task, NULL );
14206 #if HAVE_PTHREADS < 7
14207         if( status < 0 ) status = errno;
14208 #endif
14209         if( status ) return status;
14210 #else
14211         /* Draft 4 pthreads */
14212         status = pthread_create( &t, pthread_attr_default, task, NULL );
14213         if( status ) return errno;
14214
14215         /* give thread a chance to complete */
14216         /* it should remain joinable and hence detachable */
14217         sleep( 1 );
14218
14219         status = pthread_detach( &t );
14220         if( status ) return errno;
14221 #endif
14222
14223 #ifdef HAVE_LINUX_THREADS
14224         pthread_kill_other_threads_np();
14225 #endif
14226
14227         return 0;
14228
14229 }
14230
14231 EOF
14232 if { (eval echo configure:14233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14233 then
14234   ol_cv_pthread_threads=yes
14235 else
14236   echo "configure: failed program was:" >&5
14237   cat conftest.$ac_ext >&5
14238   rm -fr conftest*
14239   ol_cv_pthread_threads=no
14240 fi
14241 rm -fr conftest*
14242 fi
14243
14244
14245                 # restore the LIBS
14246                 LIBS="$ol_LIBS"
14247         
14248 fi
14249
14250 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14251
14252         if test $ol_cv_pthread_threads = yes ; then
14253                 ol_link_pthreads="-threads"
14254                 ol_link_threads=posix
14255         fi
14256 fi
14257
14258
14259                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14260 if test "$ol_link_threads" = no ; then
14261         # try -lpthreads -lmach -lexc -lc_r
14262         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14263 echo "configure:14264: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14264 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14265   echo $ac_n "(cached) $ac_c" 1>&6
14266 else
14267   
14268                 # save the flags
14269                 ol_LIBS="$LIBS"
14270                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14271
14272                 if test "$cross_compiling" = yes; then
14273   cat > conftest.$ac_ext <<EOF
14274 #line 14275 "configure"
14275 #include "confdefs.h"
14276 /* pthread test headers */
14277 #include <pthread.h>
14278 #if HAVE_PTHREADS < 7
14279 #include <errno.h>
14280 #endif
14281 #ifndef NULL
14282 #define NULL (void*)0
14283 #endif
14284
14285 static void *task(p)
14286         void *p;
14287 {
14288         return (void *) (p == NULL);
14289 }
14290
14291 int main() {
14292
14293         /* pthread test function */
14294 #ifndef PTHREAD_CREATE_DETACHED
14295 #define PTHREAD_CREATE_DETACHED 1
14296 #endif
14297         pthread_t t;
14298         int status;
14299         int detach = PTHREAD_CREATE_DETACHED;
14300
14301 #if HAVE_PTHREADS > 4
14302         /* Final pthreads */
14303         pthread_attr_t attr;
14304
14305         status = pthread_attr_init(&attr);
14306         if( status ) return status;
14307
14308 #if HAVE_PTHREADS < 7
14309         status = pthread_attr_setdetachstate(&attr, &detach);
14310         if( status < 0 ) status = errno;
14311 #else
14312         status = pthread_attr_setdetachstate(&attr, detach);
14313 #endif
14314         if( status ) return status;
14315         status = pthread_create( &t, &attr, task, NULL );
14316 #if HAVE_PTHREADS < 7
14317         if( status < 0 ) status = errno;
14318 #endif
14319         if( status ) return status;
14320 #else
14321         /* Draft 4 pthreads */
14322         status = pthread_create( &t, pthread_attr_default, task, NULL );
14323         if( status ) return errno;
14324
14325         /* give thread a chance to complete */
14326         /* it should remain joinable and hence detachable */
14327         sleep( 1 );
14328
14329         status = pthread_detach( &t );
14330         if( status ) return errno;
14331 #endif
14332
14333 #ifdef HAVE_LINUX_THREADS
14334         pthread_kill_other_threads_np();
14335 #endif
14336
14337         return 0;
14338
14339 ; return 0; }
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14342   rm -rf conftest*
14343   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -rf conftest*
14348   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14349 fi
14350 rm -f conftest*
14351 else
14352   cat > conftest.$ac_ext <<EOF
14353 #line 14354 "configure"
14354 #include "confdefs.h"
14355 /* pthread test headers */
14356 #include <pthread.h>
14357 #if HAVE_PTHREADS < 7
14358 #include <errno.h>
14359 #endif
14360 #ifndef NULL
14361 #define NULL (void*)0
14362 #endif
14363
14364 static void *task(p)
14365         void *p;
14366 {
14367         return (void *) (p == NULL);
14368 }
14369
14370
14371 int main(argc, argv)
14372         int argc;
14373         char **argv;
14374 {
14375
14376         /* pthread test function */
14377 #ifndef PTHREAD_CREATE_DETACHED
14378 #define PTHREAD_CREATE_DETACHED 1
14379 #endif
14380         pthread_t t;
14381         int status;
14382         int detach = PTHREAD_CREATE_DETACHED;
14383
14384 #if HAVE_PTHREADS > 4
14385         /* Final pthreads */
14386         pthread_attr_t attr;
14387
14388         status = pthread_attr_init(&attr);
14389         if( status ) return status;
14390
14391 #if HAVE_PTHREADS < 7
14392         status = pthread_attr_setdetachstate(&attr, &detach);
14393         if( status < 0 ) status = errno;
14394 #else
14395         status = pthread_attr_setdetachstate(&attr, detach);
14396 #endif
14397         if( status ) return status;
14398         status = pthread_create( &t, &attr, task, NULL );
14399 #if HAVE_PTHREADS < 7
14400         if( status < 0 ) status = errno;
14401 #endif
14402         if( status ) return status;
14403 #else
14404         /* Draft 4 pthreads */
14405         status = pthread_create( &t, pthread_attr_default, task, NULL );
14406         if( status ) return errno;
14407
14408         /* give thread a chance to complete */
14409         /* it should remain joinable and hence detachable */
14410         sleep( 1 );
14411
14412         status = pthread_detach( &t );
14413         if( status ) return errno;
14414 #endif
14415
14416 #ifdef HAVE_LINUX_THREADS
14417         pthread_kill_other_threads_np();
14418 #endif
14419
14420         return 0;
14421
14422 }
14423
14424 EOF
14425 if { (eval echo configure:14426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14426 then
14427   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14428 else
14429   echo "configure: failed program was:" >&5
14430   cat conftest.$ac_ext >&5
14431   rm -fr conftest*
14432   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14433 fi
14434 rm -fr conftest*
14435 fi
14436
14437
14438                 # restore the LIBS
14439                 LIBS="$ol_LIBS"
14440         
14441 fi
14442
14443 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14444
14445         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14446                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14447                 ol_link_threads=posix
14448         fi
14449 fi
14450
14451                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14452 if test "$ol_link_threads" = no ; then
14453         # try -lpthreads -lmach -lexc
14454         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14455 echo "configure:14456: checking for pthread link with -lpthreads -lmach -lexc" >&5
14456 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14457   echo $ac_n "(cached) $ac_c" 1>&6
14458 else
14459   
14460                 # save the flags
14461                 ol_LIBS="$LIBS"
14462                 LIBS="-lpthreads -lmach -lexc $LIBS"
14463
14464                 if test "$cross_compiling" = yes; then
14465   cat > conftest.$ac_ext <<EOF
14466 #line 14467 "configure"
14467 #include "confdefs.h"
14468 /* pthread test headers */
14469 #include <pthread.h>
14470 #if HAVE_PTHREADS < 7
14471 #include <errno.h>
14472 #endif
14473 #ifndef NULL
14474 #define NULL (void*)0
14475 #endif
14476
14477 static void *task(p)
14478         void *p;
14479 {
14480         return (void *) (p == NULL);
14481 }
14482
14483 int main() {
14484
14485         /* pthread test function */
14486 #ifndef PTHREAD_CREATE_DETACHED
14487 #define PTHREAD_CREATE_DETACHED 1
14488 #endif
14489         pthread_t t;
14490         int status;
14491         int detach = PTHREAD_CREATE_DETACHED;
14492
14493 #if HAVE_PTHREADS > 4
14494         /* Final pthreads */
14495         pthread_attr_t attr;
14496
14497         status = pthread_attr_init(&attr);
14498         if( status ) return status;
14499
14500 #if HAVE_PTHREADS < 7
14501         status = pthread_attr_setdetachstate(&attr, &detach);
14502         if( status < 0 ) status = errno;
14503 #else
14504         status = pthread_attr_setdetachstate(&attr, detach);
14505 #endif
14506         if( status ) return status;
14507         status = pthread_create( &t, &attr, task, NULL );
14508 #if HAVE_PTHREADS < 7
14509         if( status < 0 ) status = errno;
14510 #endif
14511         if( status ) return status;
14512 #else
14513         /* Draft 4 pthreads */
14514         status = pthread_create( &t, pthread_attr_default, task, NULL );
14515         if( status ) return errno;
14516
14517         /* give thread a chance to complete */
14518         /* it should remain joinable and hence detachable */
14519         sleep( 1 );
14520
14521         status = pthread_detach( &t );
14522         if( status ) return errno;
14523 #endif
14524
14525 #ifdef HAVE_LINUX_THREADS
14526         pthread_kill_other_threads_np();
14527 #endif
14528
14529         return 0;
14530
14531 ; return 0; }
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14534   rm -rf conftest*
14535   ol_cv_pthread_lpthreads_lmach_lexc=yes
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -rf conftest*
14540   ol_cv_pthread_lpthreads_lmach_lexc=no
14541 fi
14542 rm -f conftest*
14543 else
14544   cat > conftest.$ac_ext <<EOF
14545 #line 14546 "configure"
14546 #include "confdefs.h"
14547 /* pthread test headers */
14548 #include <pthread.h>
14549 #if HAVE_PTHREADS < 7
14550 #include <errno.h>
14551 #endif
14552 #ifndef NULL
14553 #define NULL (void*)0
14554 #endif
14555
14556 static void *task(p)
14557         void *p;
14558 {
14559         return (void *) (p == NULL);
14560 }
14561
14562
14563 int main(argc, argv)
14564         int argc;
14565         char **argv;
14566 {
14567
14568         /* pthread test function */
14569 #ifndef PTHREAD_CREATE_DETACHED
14570 #define PTHREAD_CREATE_DETACHED 1
14571 #endif
14572         pthread_t t;
14573         int status;
14574         int detach = PTHREAD_CREATE_DETACHED;
14575
14576 #if HAVE_PTHREADS > 4
14577         /* Final pthreads */
14578         pthread_attr_t attr;
14579
14580         status = pthread_attr_init(&attr);
14581         if( status ) return status;
14582
14583 #if HAVE_PTHREADS < 7
14584         status = pthread_attr_setdetachstate(&attr, &detach);
14585         if( status < 0 ) status = errno;
14586 #else
14587         status = pthread_attr_setdetachstate(&attr, detach);
14588 #endif
14589         if( status ) return status;
14590         status = pthread_create( &t, &attr, task, NULL );
14591 #if HAVE_PTHREADS < 7
14592         if( status < 0 ) status = errno;
14593 #endif
14594         if( status ) return status;
14595 #else
14596         /* Draft 4 pthreads */
14597         status = pthread_create( &t, pthread_attr_default, task, NULL );
14598         if( status ) return errno;
14599
14600         /* give thread a chance to complete */
14601         /* it should remain joinable and hence detachable */
14602         sleep( 1 );
14603
14604         status = pthread_detach( &t );
14605         if( status ) return errno;
14606 #endif
14607
14608 #ifdef HAVE_LINUX_THREADS
14609         pthread_kill_other_threads_np();
14610 #endif
14611
14612         return 0;
14613
14614 }
14615
14616 EOF
14617 if { (eval echo configure:14618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14618 then
14619   ol_cv_pthread_lpthreads_lmach_lexc=yes
14620 else
14621   echo "configure: failed program was:" >&5
14622   cat conftest.$ac_ext >&5
14623   rm -fr conftest*
14624   ol_cv_pthread_lpthreads_lmach_lexc=no
14625 fi
14626 rm -fr conftest*
14627 fi
14628
14629
14630                 # restore the LIBS
14631                 LIBS="$ol_LIBS"
14632         
14633 fi
14634
14635 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14636
14637         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14638                 ol_link_pthreads="-lpthreads -lmach -lexc"
14639                 ol_link_threads=posix
14640         fi
14641 fi
14642
14643                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14644 if test "$ol_link_threads" = no ; then
14645         # try -lpthreads -lexc
14646         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14647 echo "configure:14648: checking for pthread link with -lpthreads -lexc" >&5
14648 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14649   echo $ac_n "(cached) $ac_c" 1>&6
14650 else
14651   
14652                 # save the flags
14653                 ol_LIBS="$LIBS"
14654                 LIBS="-lpthreads -lexc $LIBS"
14655
14656                 if test "$cross_compiling" = yes; then
14657   cat > conftest.$ac_ext <<EOF
14658 #line 14659 "configure"
14659 #include "confdefs.h"
14660 /* pthread test headers */
14661 #include <pthread.h>
14662 #if HAVE_PTHREADS < 7
14663 #include <errno.h>
14664 #endif
14665 #ifndef NULL
14666 #define NULL (void*)0
14667 #endif
14668
14669 static void *task(p)
14670         void *p;
14671 {
14672         return (void *) (p == NULL);
14673 }
14674
14675 int main() {
14676
14677         /* pthread test function */
14678 #ifndef PTHREAD_CREATE_DETACHED
14679 #define PTHREAD_CREATE_DETACHED 1
14680 #endif
14681         pthread_t t;
14682         int status;
14683         int detach = PTHREAD_CREATE_DETACHED;
14684
14685 #if HAVE_PTHREADS > 4
14686         /* Final pthreads */
14687         pthread_attr_t attr;
14688
14689         status = pthread_attr_init(&attr);
14690         if( status ) return status;
14691
14692 #if HAVE_PTHREADS < 7
14693         status = pthread_attr_setdetachstate(&attr, &detach);
14694         if( status < 0 ) status = errno;
14695 #else
14696         status = pthread_attr_setdetachstate(&attr, detach);
14697 #endif
14698         if( status ) return status;
14699         status = pthread_create( &t, &attr, task, NULL );
14700 #if HAVE_PTHREADS < 7
14701         if( status < 0 ) status = errno;
14702 #endif
14703         if( status ) return status;
14704 #else
14705         /* Draft 4 pthreads */
14706         status = pthread_create( &t, pthread_attr_default, task, NULL );
14707         if( status ) return errno;
14708
14709         /* give thread a chance to complete */
14710         /* it should remain joinable and hence detachable */
14711         sleep( 1 );
14712
14713         status = pthread_detach( &t );
14714         if( status ) return errno;
14715 #endif
14716
14717 #ifdef HAVE_LINUX_THREADS
14718         pthread_kill_other_threads_np();
14719 #endif
14720
14721         return 0;
14722
14723 ; return 0; }
14724 EOF
14725 if { (eval echo configure:14726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14726   rm -rf conftest*
14727   ol_cv_pthread_lpthreads_lexc=yes
14728 else
14729   echo "configure: failed program was:" >&5
14730   cat conftest.$ac_ext >&5
14731   rm -rf conftest*
14732   ol_cv_pthread_lpthreads_lexc=no
14733 fi
14734 rm -f conftest*
14735 else
14736   cat > conftest.$ac_ext <<EOF
14737 #line 14738 "configure"
14738 #include "confdefs.h"
14739 /* pthread test headers */
14740 #include <pthread.h>
14741 #if HAVE_PTHREADS < 7
14742 #include <errno.h>
14743 #endif
14744 #ifndef NULL
14745 #define NULL (void*)0
14746 #endif
14747
14748 static void *task(p)
14749         void *p;
14750 {
14751         return (void *) (p == NULL);
14752 }
14753
14754
14755 int main(argc, argv)
14756         int argc;
14757         char **argv;
14758 {
14759
14760         /* pthread test function */
14761 #ifndef PTHREAD_CREATE_DETACHED
14762 #define PTHREAD_CREATE_DETACHED 1
14763 #endif
14764         pthread_t t;
14765         int status;
14766         int detach = PTHREAD_CREATE_DETACHED;
14767
14768 #if HAVE_PTHREADS > 4
14769         /* Final pthreads */
14770         pthread_attr_t attr;
14771
14772         status = pthread_attr_init(&attr);
14773         if( status ) return status;
14774
14775 #if HAVE_PTHREADS < 7
14776         status = pthread_attr_setdetachstate(&attr, &detach);
14777         if( status < 0 ) status = errno;
14778 #else
14779         status = pthread_attr_setdetachstate(&attr, detach);
14780 #endif
14781         if( status ) return status;
14782         status = pthread_create( &t, &attr, task, NULL );
14783 #if HAVE_PTHREADS < 7
14784         if( status < 0 ) status = errno;
14785 #endif
14786         if( status ) return status;
14787 #else
14788         /* Draft 4 pthreads */
14789         status = pthread_create( &t, pthread_attr_default, task, NULL );
14790         if( status ) return errno;
14791
14792         /* give thread a chance to complete */
14793         /* it should remain joinable and hence detachable */
14794         sleep( 1 );
14795
14796         status = pthread_detach( &t );
14797         if( status ) return errno;
14798 #endif
14799
14800 #ifdef HAVE_LINUX_THREADS
14801         pthread_kill_other_threads_np();
14802 #endif
14803
14804         return 0;
14805
14806 }
14807
14808 EOF
14809 if { (eval echo configure:14810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14810 then
14811   ol_cv_pthread_lpthreads_lexc=yes
14812 else
14813   echo "configure: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815   rm -fr conftest*
14816   ol_cv_pthread_lpthreads_lexc=no
14817 fi
14818 rm -fr conftest*
14819 fi
14820
14821
14822                 # restore the LIBS
14823                 LIBS="$ol_LIBS"
14824         
14825 fi
14826
14827 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14828
14829         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14830                 ol_link_pthreads="-lpthreads -lexc"
14831                 ol_link_threads=posix
14832         fi
14833 fi
14834
14835
14836                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14837 if test "$ol_link_threads" = no ; then
14838         # try -lpthreads
14839         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14840 echo "configure:14841: checking for pthread link with -lpthreads" >&5
14841 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14842   echo $ac_n "(cached) $ac_c" 1>&6
14843 else
14844   
14845                 # save the flags
14846                 ol_LIBS="$LIBS"
14847                 LIBS="-lpthreads $LIBS"
14848
14849                 if test "$cross_compiling" = yes; then
14850   cat > conftest.$ac_ext <<EOF
14851 #line 14852 "configure"
14852 #include "confdefs.h"
14853 /* pthread test headers */
14854 #include <pthread.h>
14855 #if HAVE_PTHREADS < 7
14856 #include <errno.h>
14857 #endif
14858 #ifndef NULL
14859 #define NULL (void*)0
14860 #endif
14861
14862 static void *task(p)
14863         void *p;
14864 {
14865         return (void *) (p == NULL);
14866 }
14867
14868 int main() {
14869
14870         /* pthread test function */
14871 #ifndef PTHREAD_CREATE_DETACHED
14872 #define PTHREAD_CREATE_DETACHED 1
14873 #endif
14874         pthread_t t;
14875         int status;
14876         int detach = PTHREAD_CREATE_DETACHED;
14877
14878 #if HAVE_PTHREADS > 4
14879         /* Final pthreads */
14880         pthread_attr_t attr;
14881
14882         status = pthread_attr_init(&attr);
14883         if( status ) return status;
14884
14885 #if HAVE_PTHREADS < 7
14886         status = pthread_attr_setdetachstate(&attr, &detach);
14887         if( status < 0 ) status = errno;
14888 #else
14889         status = pthread_attr_setdetachstate(&attr, detach);
14890 #endif
14891         if( status ) return status;
14892         status = pthread_create( &t, &attr, task, NULL );
14893 #if HAVE_PTHREADS < 7
14894         if( status < 0 ) status = errno;
14895 #endif
14896         if( status ) return status;
14897 #else
14898         /* Draft 4 pthreads */
14899         status = pthread_create( &t, pthread_attr_default, task, NULL );
14900         if( status ) return errno;
14901
14902         /* give thread a chance to complete */
14903         /* it should remain joinable and hence detachable */
14904         sleep( 1 );
14905
14906         status = pthread_detach( &t );
14907         if( status ) return errno;
14908 #endif
14909
14910 #ifdef HAVE_LINUX_THREADS
14911         pthread_kill_other_threads_np();
14912 #endif
14913
14914         return 0;
14915
14916 ; return 0; }
14917 EOF
14918 if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14919   rm -rf conftest*
14920   ol_cv_pthread_lib_lpthreads=yes
14921 else
14922   echo "configure: failed program was:" >&5
14923   cat conftest.$ac_ext >&5
14924   rm -rf conftest*
14925   ol_cv_pthread_lib_lpthreads=no
14926 fi
14927 rm -f conftest*
14928 else
14929   cat > conftest.$ac_ext <<EOF
14930 #line 14931 "configure"
14931 #include "confdefs.h"
14932 /* pthread test headers */
14933 #include <pthread.h>
14934 #if HAVE_PTHREADS < 7
14935 #include <errno.h>
14936 #endif
14937 #ifndef NULL
14938 #define NULL (void*)0
14939 #endif
14940
14941 static void *task(p)
14942         void *p;
14943 {
14944         return (void *) (p == NULL);
14945 }
14946
14947
14948 int main(argc, argv)
14949         int argc;
14950         char **argv;
14951 {
14952
14953         /* pthread test function */
14954 #ifndef PTHREAD_CREATE_DETACHED
14955 #define PTHREAD_CREATE_DETACHED 1
14956 #endif
14957         pthread_t t;
14958         int status;
14959         int detach = PTHREAD_CREATE_DETACHED;
14960
14961 #if HAVE_PTHREADS > 4
14962         /* Final pthreads */
14963         pthread_attr_t attr;
14964
14965         status = pthread_attr_init(&attr);
14966         if( status ) return status;
14967
14968 #if HAVE_PTHREADS < 7
14969         status = pthread_attr_setdetachstate(&attr, &detach);
14970         if( status < 0 ) status = errno;
14971 #else
14972         status = pthread_attr_setdetachstate(&attr, detach);
14973 #endif
14974         if( status ) return status;
14975         status = pthread_create( &t, &attr, task, NULL );
14976 #if HAVE_PTHREADS < 7
14977         if( status < 0 ) status = errno;
14978 #endif
14979         if( status ) return status;
14980 #else
14981         /* Draft 4 pthreads */
14982         status = pthread_create( &t, pthread_attr_default, task, NULL );
14983         if( status ) return errno;
14984
14985         /* give thread a chance to complete */
14986         /* it should remain joinable and hence detachable */
14987         sleep( 1 );
14988
14989         status = pthread_detach( &t );
14990         if( status ) return errno;
14991 #endif
14992
14993 #ifdef HAVE_LINUX_THREADS
14994         pthread_kill_other_threads_np();
14995 #endif
14996
14997         return 0;
14998
14999 }
15000
15001 EOF
15002 if { (eval echo configure:15003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15003 then
15004   ol_cv_pthread_lib_lpthreads=yes
15005 else
15006   echo "configure: failed program was:" >&5
15007   cat conftest.$ac_ext >&5
15008   rm -fr conftest*
15009   ol_cv_pthread_lib_lpthreads=no
15010 fi
15011 rm -fr conftest*
15012 fi
15013
15014
15015                 # restore the LIBS
15016                 LIBS="$ol_LIBS"
15017         
15018 fi
15019
15020 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15021
15022         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15023                 ol_link_pthreads="-lpthreads"
15024                 ol_link_threads=posix
15025         fi
15026 fi
15027
15028
15029                 if test $ol_link_threads != no ; then
15030                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15031
15032                                                 save_CPPFLAGS="$CPPFLAGS"
15033                         save_LIBS="$LIBS"
15034                         LIBS="$LTHREAD_LIBS $LIBS"
15035
15036                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15037 do
15038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $ac_func" >&5
15040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char $ac_func(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char $ac_func();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 f = $ac_func;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15083   cat >> confdefs.h <<EOF
15084 #define $ac_tr_func 1
15085 EOF
15086  
15087 else
15088   echo "$ac_t""no" 1>&6
15089 fi
15090 done
15091
15092
15093                         if test $ac_cv_func_sched_yield = no -a \
15094                                 $ac_cv_func_pthread_yield = no -a \
15095                                 $ac_cv_func_thr_yield = no ; then
15096                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15097 echo "configure:15098: checking for sched_yield in -lrt" >&5
15098 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15100   echo $ac_n "(cached) $ac_c" 1>&6
15101 else
15102   ac_save_LIBS="$LIBS"
15103 LIBS="-lrt  $LIBS"
15104 cat > conftest.$ac_ext <<EOF
15105 #line 15106 "configure"
15106 #include "confdefs.h"
15107 /* Override any gcc2 internal prototype to avoid an error.  */
15108 /* We use char because int might match the return type of a gcc2
15109     builtin and then its argument prototype would still apply.  */
15110 char sched_yield();
15111
15112 int main() {
15113 sched_yield()
15114 ; return 0; }
15115 EOF
15116 if { (eval echo configure:15117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15117   rm -rf conftest*
15118   eval "ac_cv_lib_$ac_lib_var=yes"
15119 else
15120   echo "configure: failed program was:" >&5
15121   cat conftest.$ac_ext >&5
15122   rm -rf conftest*
15123   eval "ac_cv_lib_$ac_lib_var=no"
15124 fi
15125 rm -f conftest*
15126 LIBS="$ac_save_LIBS"
15127
15128 fi
15129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15130   echo "$ac_t""yes" 1>&6
15131   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15132                                         cat >> confdefs.h <<\EOF
15133 #define HAVE_SCHED_YIELD 1
15134 EOF
15135
15136                                         ac_cv_func_sched_yield=yes
15137 else
15138   echo "$ac_t""no" 1>&6
15139 ac_cv_func_sched_yield=no
15140 fi
15141
15142                         fi
15143                         if test $ac_cv_func_sched_yield = no -a \
15144                                 $ac_cv_func_pthread_yield = no -a \
15145                                 "$ac_cv_func_thr_yield" = no ; then
15146                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15147                         fi
15148
15149                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15150 do
15151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15152 echo "configure:15153: checking for $ac_func" >&5
15153 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15154   echo $ac_n "(cached) $ac_c" 1>&6
15155 else
15156   cat > conftest.$ac_ext <<EOF
15157 #line 15158 "configure"
15158 #include "confdefs.h"
15159 /* System header to define __stub macros and hopefully few prototypes,
15160     which can conflict with char $ac_func(); below.  */
15161 #include <assert.h>
15162 /* Override any gcc2 internal prototype to avoid an error.  */
15163 /* We use char because int might match the return type of a gcc2
15164     builtin and then its argument prototype would still apply.  */
15165 char $ac_func();
15166 char (*f)();
15167
15168 int main() {
15169
15170 /* The GNU C library defines this for functions which it implements
15171     to always fail with ENOSYS.  Some functions are actually named
15172     something starting with __ and the normal name is an alias.  */
15173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15174 choke me
15175 #else
15176 f = $ac_func;
15177 #endif
15178
15179 ; return 0; }
15180 EOF
15181 if { (eval echo configure:15182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15182   rm -rf conftest*
15183   eval "ac_cv_func_$ac_func=yes"
15184 else
15185   echo "configure: failed program was:" >&5
15186   cat conftest.$ac_ext >&5
15187   rm -rf conftest*
15188   eval "ac_cv_func_$ac_func=no"
15189 fi
15190 rm -f conftest*
15191 fi
15192
15193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15194   echo "$ac_t""yes" 1>&6
15195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15196   cat >> confdefs.h <<EOF
15197 #define $ac_tr_func 1
15198 EOF
15199  
15200 else
15201   echo "$ac_t""no" 1>&6
15202 fi
15203 done
15204
15205
15206                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15207 echo "configure:15208: checking for pthread_detach with <pthread.h>" >&5
15208 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15209   echo $ac_n "(cached) $ac_c" 1>&6
15210 else
15211   
15212                                                                 cat > conftest.$ac_ext <<EOF
15213 #line 15214 "configure"
15214 #include "confdefs.h"
15215
15216 #include <pthread.h>
15217 #ifndef NULL
15218 #define NULL (void*)0
15219 #endif
15220
15221 int main() {
15222 pthread_detach(NULL);
15223 ; return 0; }
15224 EOF
15225 if { (eval echo configure:15226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15226   rm -rf conftest*
15227   ol_cv_func_pthread_detach=yes
15228 else
15229   echo "configure: failed program was:" >&5
15230   cat conftest.$ac_ext >&5
15231   rm -rf conftest*
15232   ol_cv_func_pthread_detach=no
15233 fi
15234 rm -f conftest*
15235                         
15236 fi
15237
15238 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15239
15240                         if test $ol_cv_func_pthread_detach = no ; then
15241                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15242                         fi
15243
15244                         cat >> confdefs.h <<\EOF
15245 #define HAVE_PTHREAD_DETACH 1
15246 EOF
15247
15248
15249                                                 for ac_func in \
15250                                 pthread_setconcurrency \
15251                                 pthread_getconcurrency \
15252                                 thr_setconcurrency \
15253                                 thr_getconcurrency \
15254                         
15255 do
15256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15257 echo "configure:15258: checking for $ac_func" >&5
15258 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15259   echo $ac_n "(cached) $ac_c" 1>&6
15260 else
15261   cat > conftest.$ac_ext <<EOF
15262 #line 15263 "configure"
15263 #include "confdefs.h"
15264 /* System header to define __stub macros and hopefully few prototypes,
15265     which can conflict with char $ac_func(); below.  */
15266 #include <assert.h>
15267 /* Override any gcc2 internal prototype to avoid an error.  */
15268 /* We use char because int might match the return type of a gcc2
15269     builtin and then its argument prototype would still apply.  */
15270 char $ac_func();
15271 char (*f)();
15272
15273 int main() {
15274
15275 /* The GNU C library defines this for functions which it implements
15276     to always fail with ENOSYS.  Some functions are actually named
15277     something starting with __ and the normal name is an alias.  */
15278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15279 choke me
15280 #else
15281 f = $ac_func;
15282 #endif
15283
15284 ; return 0; }
15285 EOF
15286 if { (eval echo configure:15287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15287   rm -rf conftest*
15288   eval "ac_cv_func_$ac_func=yes"
15289 else
15290   echo "configure: failed program was:" >&5
15291   cat conftest.$ac_ext >&5
15292   rm -rf conftest*
15293   eval "ac_cv_func_$ac_func=no"
15294 fi
15295 rm -f conftest*
15296 fi
15297
15298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15299   echo "$ac_t""yes" 1>&6
15300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15301   cat >> confdefs.h <<EOF
15302 #define $ac_tr_func 1
15303 EOF
15304  
15305 else
15306   echo "$ac_t""no" 1>&6
15307 fi
15308 done
15309
15310
15311                         
15312         for ac_func in pthread_kill_other_threads_np
15313 do
15314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15315 echo "configure:15316: checking for $ac_func" >&5
15316 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15317   echo $ac_n "(cached) $ac_c" 1>&6
15318 else
15319   cat > conftest.$ac_ext <<EOF
15320 #line 15321 "configure"
15321 #include "confdefs.h"
15322 /* System header to define __stub macros and hopefully few prototypes,
15323     which can conflict with char $ac_func(); below.  */
15324 #include <assert.h>
15325 /* Override any gcc2 internal prototype to avoid an error.  */
15326 /* We use char because int might match the return type of a gcc2
15327     builtin and then its argument prototype would still apply.  */
15328 char $ac_func();
15329 char (*f)();
15330
15331 int main() {
15332
15333 /* The GNU C library defines this for functions which it implements
15334     to always fail with ENOSYS.  Some functions are actually named
15335     something starting with __ and the normal name is an alias.  */
15336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15337 choke me
15338 #else
15339 f = $ac_func;
15340 #endif
15341
15342 ; return 0; }
15343 EOF
15344 if { (eval echo configure:15345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15345   rm -rf conftest*
15346   eval "ac_cv_func_$ac_func=yes"
15347 else
15348   echo "configure: failed program was:" >&5
15349   cat conftest.$ac_ext >&5
15350   rm -rf conftest*
15351   eval "ac_cv_func_$ac_func=no"
15352 fi
15353 rm -f conftest*
15354 fi
15355
15356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15357   echo "$ac_t""yes" 1>&6
15358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15359   cat >> confdefs.h <<EOF
15360 #define $ac_tr_func 1
15361 EOF
15362  
15363 else
15364   echo "$ac_t""no" 1>&6
15365 fi
15366 done
15367
15368         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15369 echo "configure:15370: checking for LinuxThreads implementation" >&5
15370 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15371   echo $ac_n "(cached) $ac_c" 1>&6
15372 else
15373   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15374 fi
15375
15376 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15377
15378                         
15379         
15380         
15381         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15382 echo "configure:15383: checking for LinuxThreads consistency" >&5
15383 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15384   echo $ac_n "(cached) $ac_c" 1>&6
15385 else
15386   
15387                 if test $ol_cv_header_linux_threads = yes -a \
15388                         $ol_cv_sys_linux_threads = yes; then
15389                         ol_cv_linux_threads=yes
15390                 elif test $ol_cv_header_linux_threads = no -a \
15391                         $ol_cv_sys_linux_threads = no; then
15392                         ol_cv_linux_threads=no
15393                 else
15394                         ol_cv_linux_threads=error
15395                 fi
15396         
15397 fi
15398
15399 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15400
15401
15402                         if test $ol_cv_linux_threads = error; then
15403                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15404                         fi
15405
15406                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15407 echo "configure:15408: checking if pthread_create() works" >&5
15408 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15409   echo $ac_n "(cached) $ac_c" 1>&6
15410 else
15411   
15412                         if test "$cross_compiling" = yes; then
15413                                 ol_cv_pthread_create_works=yes
15414 else
15415   cat > conftest.$ac_ext <<EOF
15416 #line 15417 "configure"
15417 #include "confdefs.h"
15418 /* pthread test headers */
15419 #include <pthread.h>
15420 #if HAVE_PTHREADS < 7
15421 #include <errno.h>
15422 #endif
15423 #ifndef NULL
15424 #define NULL (void*)0
15425 #endif
15426
15427 static void *task(p)
15428         void *p;
15429 {
15430         return (void *) (p == NULL);
15431 }
15432
15433
15434 int main(argc, argv)
15435         int argc;
15436         char **argv;
15437 {
15438
15439         /* pthread test function */
15440 #ifndef PTHREAD_CREATE_DETACHED
15441 #define PTHREAD_CREATE_DETACHED 1
15442 #endif
15443         pthread_t t;
15444         int status;
15445         int detach = PTHREAD_CREATE_DETACHED;
15446
15447 #if HAVE_PTHREADS > 4
15448         /* Final pthreads */
15449         pthread_attr_t attr;
15450
15451         status = pthread_attr_init(&attr);
15452         if( status ) return status;
15453
15454 #if HAVE_PTHREADS < 7
15455         status = pthread_attr_setdetachstate(&attr, &detach);
15456         if( status < 0 ) status = errno;
15457 #else
15458         status = pthread_attr_setdetachstate(&attr, detach);
15459 #endif
15460         if( status ) return status;
15461         status = pthread_create( &t, &attr, task, NULL );
15462 #if HAVE_PTHREADS < 7
15463         if( status < 0 ) status = errno;
15464 #endif
15465         if( status ) return status;
15466 #else
15467         /* Draft 4 pthreads */
15468         status = pthread_create( &t, pthread_attr_default, task, NULL );
15469         if( status ) return errno;
15470
15471         /* give thread a chance to complete */
15472         /* it should remain joinable and hence detachable */
15473         sleep( 1 );
15474
15475         status = pthread_detach( &t );
15476         if( status ) return errno;
15477 #endif
15478
15479 #ifdef HAVE_LINUX_THREADS
15480         pthread_kill_other_threads_np();
15481 #endif
15482
15483         return 0;
15484
15485 }
15486
15487 EOF
15488 if { (eval echo configure:15489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15489 then
15490   ol_cv_pthread_create_works=yes
15491 else
15492   echo "configure: failed program was:" >&5
15493   cat conftest.$ac_ext >&5
15494   rm -fr conftest*
15495   ol_cv_pthread_create_works=no
15496 fi
15497 rm -fr conftest*
15498 fi
15499
15500 fi
15501
15502 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15503
15504                         if test $ol_cv_pthread_create_works = no ; then
15505                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15506                         fi
15507
15508                                                 if test $ol_with_yielding_select = auto ; then
15509                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15510 echo "configure:15511: checking if select yields when using pthreads" >&5
15511 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15512   echo $ac_n "(cached) $ac_c" 1>&6
15513 else
15514   
15515                                 if test "$cross_compiling" = yes; then
15516   ol_cv_pthread_select_yields=cross
15517 else
15518   cat > conftest.$ac_ext <<EOF
15519 #line 15520 "configure"
15520 #include "confdefs.h"
15521
15522 #include <sys/types.h>
15523 #include <sys/time.h>
15524 #include <unistd.h>
15525 #include <pthread.h>
15526 #ifndef NULL
15527 #define NULL (void*) 0
15528 #endif
15529
15530 static int fildes[2];
15531
15532 static void *task(p)
15533         void *p;
15534 {
15535         int i;
15536         struct timeval tv;
15537
15538         fd_set rfds;
15539
15540         tv.tv_sec=10;
15541         tv.tv_usec=0;
15542
15543         FD_ZERO(&rfds);
15544         FD_SET(fildes[0], &rfds);
15545
15546         /* we're not interested in any fds */
15547         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15548
15549         if(i < 0) {
15550                 perror("select");
15551                 exit(10);
15552         }
15553
15554         exit(0); /* if we exit here, the select blocked the whole process */
15555 }
15556
15557 int main(argc, argv)
15558         int argc;
15559         char **argv;
15560 {
15561         pthread_t t;
15562
15563         /* create a pipe to select */
15564         if(pipe(&fildes[0])) {
15565                 perror("select");
15566                 exit(1);
15567         }
15568
15569 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15570         (void) pthread_setconcurrency(2);
15571 #else
15572 #ifdef HAVE_THR_SETCONCURRENCY
15573         /* Set Solaris LWP concurrency to 2 */
15574         thr_setconcurrency(2);
15575 #endif
15576 #endif
15577
15578 #if HAVE_PTHREADS < 6
15579         pthread_create(&t, pthread_attr_default, task, NULL);
15580 #else
15581         pthread_create(&t, NULL, task, NULL);
15582 #endif
15583
15584         /* make sure task runs first */
15585 #if HAVE_THR_YIELD
15586         thr_yield();
15587 #elif defined( HAVE_SCHED_YIELD )
15588         sched_yield();
15589 #elif defined( HAVE_PTHREAD_YIELD )
15590         pthread_yield();
15591 #endif
15592
15593         exit(2);
15594 }
15595 EOF
15596 if { (eval echo configure:15597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15597 then
15598   ol_cv_pthread_select_yields=no
15599 else
15600   echo "configure: failed program was:" >&5
15601   cat conftest.$ac_ext >&5
15602   rm -fr conftest*
15603   ol_cv_pthread_select_yields=yes
15604 fi
15605 rm -fr conftest*
15606 fi
15607
15608 fi
15609
15610 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15611
15612                                 if test $ol_cv_pthread_select_yields = cross ; then
15613                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15614                                 fi
15615
15616                                 if test $ol_cv_pthread_select_yields = yes ; then
15617                                         ol_with_yielding_select=yes
15618                                 fi
15619                         fi
15620
15621                                                 CPPFLAGS="$save_CPPFLAGS"
15622                         LIBS="$save_LIBS"
15623                 else
15624                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15625                 fi
15626         fi
15627
15628         if test $ol_with_threads = posix ; then
15629                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15630         fi
15631 fi
15632
15633 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15634         -o $ol_with_threads = mach ; then
15635
15636                 for ac_hdr in mach/cthreads.h cthreads.h
15637 do
15638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15640 echo "configure:15641: checking for $ac_hdr" >&5
15641 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15642   echo $ac_n "(cached) $ac_c" 1>&6
15643 else
15644   cat > conftest.$ac_ext <<EOF
15645 #line 15646 "configure"
15646 #include "confdefs.h"
15647 #include <$ac_hdr>
15648 EOF
15649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15650 { (eval echo configure:15651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15652 if test -z "$ac_err"; then
15653   rm -rf conftest*
15654   eval "ac_cv_header_$ac_safe=yes"
15655 else
15656   echo "$ac_err" >&5
15657   echo "configure: failed program was:" >&5
15658   cat conftest.$ac_ext >&5
15659   rm -rf conftest*
15660   eval "ac_cv_header_$ac_safe=no"
15661 fi
15662 rm -f conftest*
15663 fi
15664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15665   echo "$ac_t""yes" 1>&6
15666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15667   cat >> confdefs.h <<EOF
15668 #define $ac_tr_hdr 1
15669 EOF
15670  
15671 else
15672   echo "$ac_t""no" 1>&6
15673 fi
15674 done
15675
15676         if test $ac_cv_header_mach_cthreads_h = yes ; then
15677                 ol_with_threads=found
15678
15679                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15680 echo "configure:15681: checking for cthread_fork" >&5
15681 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15682   echo $ac_n "(cached) $ac_c" 1>&6
15683 else
15684   cat > conftest.$ac_ext <<EOF
15685 #line 15686 "configure"
15686 #include "confdefs.h"
15687 /* System header to define __stub macros and hopefully few prototypes,
15688     which can conflict with char cthread_fork(); below.  */
15689 #include <assert.h>
15690 /* Override any gcc2 internal prototype to avoid an error.  */
15691 /* We use char because int might match the return type of a gcc2
15692     builtin and then its argument prototype would still apply.  */
15693 char cthread_fork();
15694 char (*f)();
15695
15696 int main() {
15697
15698 /* The GNU C library defines this for functions which it implements
15699     to always fail with ENOSYS.  Some functions are actually named
15700     something starting with __ and the normal name is an alias.  */
15701 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15702 choke me
15703 #else
15704 f = cthread_fork;
15705 #endif
15706
15707 ; return 0; }
15708 EOF
15709 if { (eval echo configure:15710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15710   rm -rf conftest*
15711   eval "ac_cv_func_cthread_fork=yes"
15712 else
15713   echo "configure: failed program was:" >&5
15714   cat conftest.$ac_ext >&5
15715   rm -rf conftest*
15716   eval "ac_cv_func_cthread_fork=no"
15717 fi
15718 rm -f conftest*
15719 fi
15720
15721 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15722   echo "$ac_t""yes" 1>&6
15723   ol_link_threads=yes
15724 else
15725   echo "$ac_t""no" 1>&6
15726 fi
15727
15728
15729                 if test $ol_link_threads = no ; then
15730                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15731 echo "configure:15732: checking for cthread_fork with -all_load" >&5
15732 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15733   echo $ac_n "(cached) $ac_c" 1>&6
15734 else
15735   
15736                                                                 save_LIBS="$LIBS"
15737                                 LIBS="-all_load $LIBS"
15738                                 cat > conftest.$ac_ext <<EOF
15739 #line 15740 "configure"
15740 #include "confdefs.h"
15741 #include <mach/cthreads.h>
15742 int main() {
15743
15744                                         cthread_fork((void *)0, (void *)0);
15745                                         
15746 ; return 0; }
15747 EOF
15748 if { (eval echo configure:15749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15749   rm -rf conftest*
15750   ol_cv_cthread_all_load=yes
15751 else
15752   echo "configure: failed program was:" >&5
15753   cat conftest.$ac_ext >&5
15754   rm -rf conftest*
15755   ol_cv_cthread_all_load=no
15756 fi
15757 rm -f conftest*
15758                                                                 LIBS="$save_LIBS"
15759                         
15760 fi
15761
15762 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15763
15764                         if test $ol_cv_cthread_all_load = yes ; then
15765                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15766                                 ol_link_threads=mach
15767                                 ol_with_threads=found
15768                         fi
15769                 fi
15770
15771         elif test $ac_cv_header_cthreads_h = yes ; then
15772                                 
15773                 ol_with_threads=found
15774  
15775                                 save_LIBS="$LIBS"
15776                 LIBS="$LIBS -lthreads"
15777                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15778 echo "configure:15779: checking for cthread_fork" >&5
15779 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15780   echo $ac_n "(cached) $ac_c" 1>&6
15781 else
15782   cat > conftest.$ac_ext <<EOF
15783 #line 15784 "configure"
15784 #include "confdefs.h"
15785 /* System header to define __stub macros and hopefully few prototypes,
15786     which can conflict with char cthread_fork(); below.  */
15787 #include <assert.h>
15788 /* Override any gcc2 internal prototype to avoid an error.  */
15789 /* We use char because int might match the return type of a gcc2
15790     builtin and then its argument prototype would still apply.  */
15791 char cthread_fork();
15792 char (*f)();
15793
15794 int main() {
15795
15796 /* The GNU C library defines this for functions which it implements
15797     to always fail with ENOSYS.  Some functions are actually named
15798     something starting with __ and the normal name is an alias.  */
15799 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15800 choke me
15801 #else
15802 f = cthread_fork;
15803 #endif
15804
15805 ; return 0; }
15806 EOF
15807 if { (eval echo configure:15808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15808   rm -rf conftest*
15809   eval "ac_cv_func_cthread_fork=yes"
15810 else
15811   echo "configure: failed program was:" >&5
15812   cat conftest.$ac_ext >&5
15813   rm -rf conftest*
15814   eval "ac_cv_func_cthread_fork=no"
15815 fi
15816 rm -f conftest*
15817 fi
15818
15819 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15820   echo "$ac_t""yes" 1>&6
15821   ol_link_threads=yes
15822 else
15823   echo "$ac_t""no" 1>&6
15824 fi
15825
15826                 LIBS="$save_LIBS"
15827
15828                 if test $ol_link_threads = yes ; then
15829                         LTHREAD_LIBS="-lthreads"
15830                         ol_link_threads=mach
15831                         ol_with_threads=found
15832                 else
15833                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15834                 fi
15835
15836         elif test $ol_with_threads = mach ; then
15837                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15838         fi
15839
15840         if test $ol_link_threads = mach ; then
15841                 cat >> confdefs.h <<\EOF
15842 #define HAVE_MACH_CTHREADS 1
15843 EOF
15844
15845         elif test $ol_with_threads = found ; then
15846                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15847         fi
15848 fi
15849
15850 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15851         -o $ol_with_threads = pth ; then
15852
15853         for ac_hdr in pth.h
15854 do
15855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15857 echo "configure:15858: checking for $ac_hdr" >&5
15858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15859   echo $ac_n "(cached) $ac_c" 1>&6
15860 else
15861   cat > conftest.$ac_ext <<EOF
15862 #line 15863 "configure"
15863 #include "confdefs.h"
15864 #include <$ac_hdr>
15865 EOF
15866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15867 { (eval echo configure:15868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15869 if test -z "$ac_err"; then
15870   rm -rf conftest*
15871   eval "ac_cv_header_$ac_safe=yes"
15872 else
15873   echo "$ac_err" >&5
15874   echo "configure: failed program was:" >&5
15875   cat conftest.$ac_ext >&5
15876   rm -rf conftest*
15877   eval "ac_cv_header_$ac_safe=no"
15878 fi
15879 rm -f conftest*
15880 fi
15881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15882   echo "$ac_t""yes" 1>&6
15883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15884   cat >> confdefs.h <<EOF
15885 #define $ac_tr_hdr 1
15886 EOF
15887  
15888 else
15889   echo "$ac_t""no" 1>&6
15890 fi
15891 done
15892
15893
15894         if test $ac_cv_header_pth_h = yes ; then
15895                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15896 echo "configure:15897: checking for pth_version in -lpth" >&5
15897 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15899   echo $ac_n "(cached) $ac_c" 1>&6
15900 else
15901   ac_save_LIBS="$LIBS"
15902 LIBS="-lpth  $LIBS"
15903 cat > conftest.$ac_ext <<EOF
15904 #line 15905 "configure"
15905 #include "confdefs.h"
15906 /* Override any gcc2 internal prototype to avoid an error.  */
15907 /* We use char because int might match the return type of a gcc2
15908     builtin and then its argument prototype would still apply.  */
15909 char pth_version();
15910
15911 int main() {
15912 pth_version()
15913 ; return 0; }
15914 EOF
15915 if { (eval echo configure:15916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15916   rm -rf conftest*
15917   eval "ac_cv_lib_$ac_lib_var=yes"
15918 else
15919   echo "configure: failed program was:" >&5
15920   cat conftest.$ac_ext >&5
15921   rm -rf conftest*
15922   eval "ac_cv_lib_$ac_lib_var=no"
15923 fi
15924 rm -f conftest*
15925 LIBS="$ac_save_LIBS"
15926
15927 fi
15928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15929   echo "$ac_t""yes" 1>&6
15930   have_pth=yes
15931 else
15932   echo "$ac_t""no" 1>&6
15933 have_pth=no
15934 fi
15935
15936
15937                 if test $have_pth = yes ; then
15938                         cat >> confdefs.h <<\EOF
15939 #define HAVE_GNU_PTH 1
15940 EOF
15941
15942                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15943                         ol_link_threads=pth
15944                         ol_with_threads=found
15945
15946                         if test $ol_with_yielding_select = auto ; then
15947                                 ol_with_yielding_select=yes
15948                         fi
15949                 fi
15950         fi
15951 fi
15952
15953 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15954         -o $ol_with_threads = lwp ; then
15955
15956                 for ac_hdr in thread.h synch.h
15957 do
15958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15960 echo "configure:15961: checking for $ac_hdr" >&5
15961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15962   echo $ac_n "(cached) $ac_c" 1>&6
15963 else
15964   cat > conftest.$ac_ext <<EOF
15965 #line 15966 "configure"
15966 #include "confdefs.h"
15967 #include <$ac_hdr>
15968 EOF
15969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15970 { (eval echo configure:15971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15972 if test -z "$ac_err"; then
15973   rm -rf conftest*
15974   eval "ac_cv_header_$ac_safe=yes"
15975 else
15976   echo "$ac_err" >&5
15977   echo "configure: failed program was:" >&5
15978   cat conftest.$ac_ext >&5
15979   rm -rf conftest*
15980   eval "ac_cv_header_$ac_safe=no"
15981 fi
15982 rm -f conftest*
15983 fi
15984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15985   echo "$ac_t""yes" 1>&6
15986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15987   cat >> confdefs.h <<EOF
15988 #define $ac_tr_hdr 1
15989 EOF
15990  
15991 else
15992   echo "$ac_t""no" 1>&6
15993 fi
15994 done
15995
15996         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15997                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15998 echo "configure:15999: checking for thr_create in -lthread" >&5
15999 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16001   echo $ac_n "(cached) $ac_c" 1>&6
16002 else
16003   ac_save_LIBS="$LIBS"
16004 LIBS="-lthread  $LIBS"
16005 cat > conftest.$ac_ext <<EOF
16006 #line 16007 "configure"
16007 #include "confdefs.h"
16008 /* Override any gcc2 internal prototype to avoid an error.  */
16009 /* We use char because int might match the return type of a gcc2
16010     builtin and then its argument prototype would still apply.  */
16011 char thr_create();
16012
16013 int main() {
16014 thr_create()
16015 ; return 0; }
16016 EOF
16017 if { (eval echo configure:16018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16018   rm -rf conftest*
16019   eval "ac_cv_lib_$ac_lib_var=yes"
16020 else
16021   echo "configure: failed program was:" >&5
16022   cat conftest.$ac_ext >&5
16023   rm -rf conftest*
16024   eval "ac_cv_lib_$ac_lib_var=no"
16025 fi
16026 rm -f conftest*
16027 LIBS="$ac_save_LIBS"
16028
16029 fi
16030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16031   echo "$ac_t""yes" 1>&6
16032   have_thr=yes
16033 else
16034   echo "$ac_t""no" 1>&6
16035 have_thr=no
16036 fi
16037
16038
16039                 if test $have_thr = yes ; then
16040                         cat >> confdefs.h <<\EOF
16041 #define HAVE_THR 1
16042 EOF
16043
16044                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16045                         ol_link_threads=thr
16046
16047                         if test $ol_with_yielding_select = auto ; then
16048                                 ol_with_yielding_select=yes
16049                         fi
16050
16051                                                 for ac_func in \
16052                                 thr_setconcurrency \
16053                                 thr_getconcurrency \
16054                         
16055 do
16056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16057 echo "configure:16058: checking for $ac_func" >&5
16058 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16059   echo $ac_n "(cached) $ac_c" 1>&6
16060 else
16061   cat > conftest.$ac_ext <<EOF
16062 #line 16063 "configure"
16063 #include "confdefs.h"
16064 /* System header to define __stub macros and hopefully few prototypes,
16065     which can conflict with char $ac_func(); below.  */
16066 #include <assert.h>
16067 /* Override any gcc2 internal prototype to avoid an error.  */
16068 /* We use char because int might match the return type of a gcc2
16069     builtin and then its argument prototype would still apply.  */
16070 char $ac_func();
16071 char (*f)();
16072
16073 int main() {
16074
16075 /* The GNU C library defines this for functions which it implements
16076     to always fail with ENOSYS.  Some functions are actually named
16077     something starting with __ and the normal name is an alias.  */
16078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16079 choke me
16080 #else
16081 f = $ac_func;
16082 #endif
16083
16084 ; return 0; }
16085 EOF
16086 if { (eval echo configure:16087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16087   rm -rf conftest*
16088   eval "ac_cv_func_$ac_func=yes"
16089 else
16090   echo "configure: failed program was:" >&5
16091   cat conftest.$ac_ext >&5
16092   rm -rf conftest*
16093   eval "ac_cv_func_$ac_func=no"
16094 fi
16095 rm -f conftest*
16096 fi
16097
16098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16099   echo "$ac_t""yes" 1>&6
16100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16101   cat >> confdefs.h <<EOF
16102 #define $ac_tr_func 1
16103 EOF
16104  
16105 else
16106   echo "$ac_t""no" 1>&6
16107 fi
16108 done
16109
16110                 fi
16111         fi
16112
16113                 for ac_hdr in lwp/lwp.h
16114 do
16115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16117 echo "configure:16118: checking for $ac_hdr" >&5
16118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16119   echo $ac_n "(cached) $ac_c" 1>&6
16120 else
16121   cat > conftest.$ac_ext <<EOF
16122 #line 16123 "configure"
16123 #include "confdefs.h"
16124 #include <$ac_hdr>
16125 EOF
16126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16127 { (eval echo configure:16128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16129 if test -z "$ac_err"; then
16130   rm -rf conftest*
16131   eval "ac_cv_header_$ac_safe=yes"
16132 else
16133   echo "$ac_err" >&5
16134   echo "configure: failed program was:" >&5
16135   cat conftest.$ac_ext >&5
16136   rm -rf conftest*
16137   eval "ac_cv_header_$ac_safe=no"
16138 fi
16139 rm -f conftest*
16140 fi
16141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16142   echo "$ac_t""yes" 1>&6
16143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16144   cat >> confdefs.h <<EOF
16145 #define $ac_tr_hdr 1
16146 EOF
16147  
16148 else
16149   echo "$ac_t""no" 1>&6
16150 fi
16151 done
16152
16153         if test $ac_cv_header_lwp_lwp_h = yes ; then
16154                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16155 echo "configure:16156: checking for lwp_create in -llwp" >&5
16156 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16158   echo $ac_n "(cached) $ac_c" 1>&6
16159 else
16160   ac_save_LIBS="$LIBS"
16161 LIBS="-llwp  $LIBS"
16162 cat > conftest.$ac_ext <<EOF
16163 #line 16164 "configure"
16164 #include "confdefs.h"
16165 /* Override any gcc2 internal prototype to avoid an error.  */
16166 /* We use char because int might match the return type of a gcc2
16167     builtin and then its argument prototype would still apply.  */
16168 char lwp_create();
16169
16170 int main() {
16171 lwp_create()
16172 ; return 0; }
16173 EOF
16174 if { (eval echo configure:16175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16175   rm -rf conftest*
16176   eval "ac_cv_lib_$ac_lib_var=yes"
16177 else
16178   echo "configure: failed program was:" >&5
16179   cat conftest.$ac_ext >&5
16180   rm -rf conftest*
16181   eval "ac_cv_lib_$ac_lib_var=no"
16182 fi
16183 rm -f conftest*
16184 LIBS="$ac_save_LIBS"
16185
16186 fi
16187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16188   echo "$ac_t""yes" 1>&6
16189   have_lwp=yes
16190 else
16191   echo "$ac_t""no" 1>&6
16192 have_lwp=no
16193 fi
16194
16195
16196                 if test $have_lwp = yes ; then
16197                         cat >> confdefs.h <<\EOF
16198 #define HAVE_LWP 1
16199 EOF
16200
16201                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16202                         ol_link_threads=lwp
16203
16204                         if test $ol_with_yielding_select = auto ; then
16205                                 ol_with_yielding_select=no
16206                         fi
16207                 fi
16208         fi
16209 fi
16210
16211 if test $ol_with_yielding_select = yes ; then
16212         cat >> confdefs.h <<\EOF
16213 #define HAVE_YIELDING_SELECT 1
16214 EOF
16215
16216 fi
16217
16218 if test $ol_with_threads = manual ; then
16219                 ol_link_threads=yes
16220
16221         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16222
16223         for ac_hdr in pthread.h sched.h
16224 do
16225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16227 echo "configure:16228: checking for $ac_hdr" >&5
16228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16229   echo $ac_n "(cached) $ac_c" 1>&6
16230 else
16231   cat > conftest.$ac_ext <<EOF
16232 #line 16233 "configure"
16233 #include "confdefs.h"
16234 #include <$ac_hdr>
16235 EOF
16236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16237 { (eval echo configure:16238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16239 if test -z "$ac_err"; then
16240   rm -rf conftest*
16241   eval "ac_cv_header_$ac_safe=yes"
16242 else
16243   echo "$ac_err" >&5
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   eval "ac_cv_header_$ac_safe=no"
16248 fi
16249 rm -f conftest*
16250 fi
16251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16252   echo "$ac_t""yes" 1>&6
16253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16254   cat >> confdefs.h <<EOF
16255 #define $ac_tr_hdr 1
16256 EOF
16257  
16258 else
16259   echo "$ac_t""no" 1>&6
16260 fi
16261 done
16262
16263         for ac_func in sched_yield pthread_yield
16264 do
16265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16266 echo "configure:16267: checking for $ac_func" >&5
16267 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16268   echo $ac_n "(cached) $ac_c" 1>&6
16269 else
16270   cat > conftest.$ac_ext <<EOF
16271 #line 16272 "configure"
16272 #include "confdefs.h"
16273 /* System header to define __stub macros and hopefully few prototypes,
16274     which can conflict with char $ac_func(); below.  */
16275 #include <assert.h>
16276 /* Override any gcc2 internal prototype to avoid an error.  */
16277 /* We use char because int might match the return type of a gcc2
16278     builtin and then its argument prototype would still apply.  */
16279 char $ac_func();
16280 char (*f)();
16281
16282 int main() {
16283
16284 /* The GNU C library defines this for functions which it implements
16285     to always fail with ENOSYS.  Some functions are actually named
16286     something starting with __ and the normal name is an alias.  */
16287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16288 choke me
16289 #else
16290 f = $ac_func;
16291 #endif
16292
16293 ; return 0; }
16294 EOF
16295 if { (eval echo configure:16296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16296   rm -rf conftest*
16297   eval "ac_cv_func_$ac_func=yes"
16298 else
16299   echo "configure: failed program was:" >&5
16300   cat conftest.$ac_ext >&5
16301   rm -rf conftest*
16302   eval "ac_cv_func_$ac_func=no"
16303 fi
16304 rm -f conftest*
16305 fi
16306
16307 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16308   echo "$ac_t""yes" 1>&6
16309     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16310   cat >> confdefs.h <<EOF
16311 #define $ac_tr_func 1
16312 EOF
16313  
16314 else
16315   echo "$ac_t""no" 1>&6
16316 fi
16317 done
16318
16319         
16320         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16321 echo "configure:16322: checking for LinuxThreads pthread.h" >&5
16322 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16323   echo $ac_n "(cached) $ac_c" 1>&6
16324 else
16325   cat > conftest.$ac_ext <<EOF
16326 #line 16327 "configure"
16327 #include "confdefs.h"
16328 #include <pthread.h>
16329 EOF
16330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16331   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16332   rm -rf conftest*
16333   ol_cv_header_linux_threads=yes
16334 else
16335   rm -rf conftest*
16336   ol_cv_header_linux_threads=no
16337 fi
16338 rm -f conftest*
16339
16340                 
16341 fi
16342
16343 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16344         if test $ol_cv_header_linux_threads = yes; then
16345                 cat >> confdefs.h <<\EOF
16346 #define HAVE_LINUX_THREADS 1
16347 EOF
16348
16349         fi
16350
16351
16352         for ac_hdr in mach/cthreads.h
16353 do
16354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16356 echo "configure:16357: checking for $ac_hdr" >&5
16357 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16358   echo $ac_n "(cached) $ac_c" 1>&6
16359 else
16360   cat > conftest.$ac_ext <<EOF
16361 #line 16362 "configure"
16362 #include "confdefs.h"
16363 #include <$ac_hdr>
16364 EOF
16365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16366 { (eval echo configure:16367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16368 if test -z "$ac_err"; then
16369   rm -rf conftest*
16370   eval "ac_cv_header_$ac_safe=yes"
16371 else
16372   echo "$ac_err" >&5
16373   echo "configure: failed program was:" >&5
16374   cat conftest.$ac_ext >&5
16375   rm -rf conftest*
16376   eval "ac_cv_header_$ac_safe=no"
16377 fi
16378 rm -f conftest*
16379 fi
16380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16381   echo "$ac_t""yes" 1>&6
16382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16383   cat >> confdefs.h <<EOF
16384 #define $ac_tr_hdr 1
16385 EOF
16386  
16387 else
16388   echo "$ac_t""no" 1>&6
16389 fi
16390 done
16391
16392         for ac_hdr in lwp/lwp.h
16393 do
16394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16396 echo "configure:16397: checking for $ac_hdr" >&5
16397 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16398   echo $ac_n "(cached) $ac_c" 1>&6
16399 else
16400   cat > conftest.$ac_ext <<EOF
16401 #line 16402 "configure"
16402 #include "confdefs.h"
16403 #include <$ac_hdr>
16404 EOF
16405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16406 { (eval echo configure:16407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16408 if test -z "$ac_err"; then
16409   rm -rf conftest*
16410   eval "ac_cv_header_$ac_safe=yes"
16411 else
16412   echo "$ac_err" >&5
16413   echo "configure: failed program was:" >&5
16414   cat conftest.$ac_ext >&5
16415   rm -rf conftest*
16416   eval "ac_cv_header_$ac_safe=no"
16417 fi
16418 rm -f conftest*
16419 fi
16420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16421   echo "$ac_t""yes" 1>&6
16422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16423   cat >> confdefs.h <<EOF
16424 #define $ac_tr_hdr 1
16425 EOF
16426  
16427 else
16428   echo "$ac_t""no" 1>&6
16429 fi
16430 done
16431
16432         for ac_hdr in thread.h synch.h
16433 do
16434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16436 echo "configure:16437: checking for $ac_hdr" >&5
16437 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16438   echo $ac_n "(cached) $ac_c" 1>&6
16439 else
16440   cat > conftest.$ac_ext <<EOF
16441 #line 16442 "configure"
16442 #include "confdefs.h"
16443 #include <$ac_hdr>
16444 EOF
16445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16446 { (eval echo configure:16447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16448 if test -z "$ac_err"; then
16449   rm -rf conftest*
16450   eval "ac_cv_header_$ac_safe=yes"
16451 else
16452   echo "$ac_err" >&5
16453   echo "configure: failed program was:" >&5
16454   cat conftest.$ac_ext >&5
16455   rm -rf conftest*
16456   eval "ac_cv_header_$ac_safe=no"
16457 fi
16458 rm -f conftest*
16459 fi
16460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16461   echo "$ac_t""yes" 1>&6
16462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16463   cat >> confdefs.h <<EOF
16464 #define $ac_tr_hdr 1
16465 EOF
16466  
16467 else
16468   echo "$ac_t""no" 1>&6
16469 fi
16470 done
16471
16472 fi
16473
16474 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16475                         cat >> confdefs.h <<\EOF
16476 #define REENTRANT 1
16477 EOF
16478
16479         cat >> confdefs.h <<\EOF
16480 #define _REENTRANT 1
16481 EOF
16482
16483         cat >> confdefs.h <<\EOF
16484 #define THREAD_SAFE 1
16485 EOF
16486
16487         cat >> confdefs.h <<\EOF
16488 #define _THREAD_SAFE 1
16489 EOF
16490
16491         cat >> confdefs.h <<\EOF
16492 #define THREADSAFE 1
16493 EOF
16494
16495         cat >> confdefs.h <<\EOF
16496 #define _THREADSAFE 1
16497 EOF
16498
16499         cat >> confdefs.h <<\EOF
16500 #define _SGI_MP_SOURCE 1
16501 EOF
16502
16503
16504                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16505 echo "configure:16506: checking for thread specific errno" >&5
16506 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16507   echo $ac_n "(cached) $ac_c" 1>&6
16508 else
16509   
16510                 cat > conftest.$ac_ext <<EOF
16511 #line 16512 "configure"
16512 #include "confdefs.h"
16513 #include <errno.h>
16514 int main() {
16515 errno = 0;
16516 ; return 0; }
16517 EOF
16518 if { (eval echo configure:16519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16519   rm -rf conftest*
16520   ol_cv_errno_thread_specific=yes
16521 else
16522   echo "configure: failed program was:" >&5
16523   cat conftest.$ac_ext >&5
16524   rm -rf conftest*
16525   ol_cv_errno_thread_specific=no
16526 fi
16527 rm -f conftest*
16528         
16529 fi
16530
16531 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16532
16533                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16534 echo "configure:16535: checking for thread specific h_errno" >&5
16535 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16536   echo $ac_n "(cached) $ac_c" 1>&6
16537 else
16538   
16539                 cat > conftest.$ac_ext <<EOF
16540 #line 16541 "configure"
16541 #include "confdefs.h"
16542 #include <netdb.h>
16543 int main() {
16544 h_errno = 0;
16545 ; return 0; }
16546 EOF
16547 if { (eval echo configure:16548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16548   rm -rf conftest*
16549   ol_cv_h_errno_thread_specific=yes
16550 else
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   ol_cv_h_errno_thread_specific=no
16555 fi
16556 rm -f conftest*
16557         
16558 fi
16559
16560 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16561
16562         if test $ol_cv_errno_thread_specific != yes \
16563                 -o $ol_cv_h_errno_thread_specific != yes ; then
16564                 LIBS="$LTHREAD_LIBS $LIBS"
16565                 LTHREAD_LIBS=""
16566         fi
16567
16568 fi  
16569
16570 if test $ol_link_threads = no ; then
16571         if test $ol_with_threads = yes ; then
16572                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16573         fi
16574
16575         if test $ol_with_threads = auto ; then
16576                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16577                 ol_with_threads=no
16578         fi
16579
16580         cat >> confdefs.h <<\EOF
16581 #define NO_THREADS 1
16582 EOF
16583
16584         LTHREAD_LIBS=""
16585 fi
16586
16587 if test $ol_link_threads != no ; then
16588         cat >> confdefs.h <<\EOF
16589 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16590 EOF
16591
16592 fi
16593
16594 for ac_func in \
16595         ctime_r                 \
16596         gethostbyname_r gethostbyaddr_r \
16597
16598 do
16599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16600 echo "configure:16601: checking for $ac_func" >&5
16601 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16602   echo $ac_n "(cached) $ac_c" 1>&6
16603 else
16604   cat > conftest.$ac_ext <<EOF
16605 #line 16606 "configure"
16606 #include "confdefs.h"
16607 /* System header to define __stub macros and hopefully few prototypes,
16608     which can conflict with char $ac_func(); below.  */
16609 #include <assert.h>
16610 /* Override any gcc2 internal prototype to avoid an error.  */
16611 /* We use char because int might match the return type of a gcc2
16612     builtin and then its argument prototype would still apply.  */
16613 char $ac_func();
16614 char (*f)();
16615
16616 int main() {
16617
16618 /* The GNU C library defines this for functions which it implements
16619     to always fail with ENOSYS.  Some functions are actually named
16620     something starting with __ and the normal name is an alias.  */
16621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16622 choke me
16623 #else
16624 f = $ac_func;
16625 #endif
16626
16627 ; return 0; }
16628 EOF
16629 if { (eval echo configure:16630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16630   rm -rf conftest*
16631   eval "ac_cv_func_$ac_func=yes"
16632 else
16633   echo "configure: failed program was:" >&5
16634   cat conftest.$ac_ext >&5
16635   rm -rf conftest*
16636   eval "ac_cv_func_$ac_func=no"
16637 fi
16638 rm -f conftest*
16639 fi
16640
16641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16642   echo "$ac_t""yes" 1>&6
16643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16644   cat >> confdefs.h <<EOF
16645 #define $ac_tr_func 1
16646 EOF
16647  
16648 else
16649   echo "$ac_t""no" 1>&6
16650 fi
16651 done
16652
16653
16654 if test "$ac_cv_func_ctime_r" = no ; then
16655         ol_cv_func_ctime_r_nargs=0
16656 else
16657         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16658 echo "configure:16659: checking number of arguments of ctime_r" >&5
16659 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16660   echo $ac_n "(cached) $ac_c" 1>&6
16661 else
16662   cat > conftest.$ac_ext <<EOF
16663 #line 16664 "configure"
16664 #include "confdefs.h"
16665 #include <time.h>
16666 int main() {
16667 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16668 ; return 0; }
16669 EOF
16670 if { (eval echo configure:16671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16671   rm -rf conftest*
16672   ol_cv_func_ctime_r_nargs3=yes
16673 else
16674   echo "configure: failed program was:" >&5
16675   cat conftest.$ac_ext >&5
16676   rm -rf conftest*
16677   ol_cv_func_ctime_r_nargs3=no
16678 fi
16679 rm -f conftest*
16680
16681         cat > conftest.$ac_ext <<EOF
16682 #line 16683 "configure"
16683 #include "confdefs.h"
16684 #include <time.h>
16685 int main() {
16686 time_t ti; char *buffer; ctime_r(&ti,buffer);
16687 ; return 0; }
16688 EOF
16689 if { (eval echo configure:16690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16690   rm -rf conftest*
16691   ol_cv_func_ctime_r_nargs2=yes
16692 else
16693   echo "configure: failed program was:" >&5
16694   cat conftest.$ac_ext >&5
16695   rm -rf conftest*
16696   ol_cv_func_ctime_r_nargs2=no
16697 fi
16698 rm -f conftest*
16699
16700         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16701                 $ol_cv_func_ctime_r_nargs2 = no ; then
16702
16703                 ol_cv_func_ctime_r_nargs=3
16704
16705         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16706                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16707
16708                 ol_cv_func_ctime_r_nargs=2
16709
16710         else
16711                 ol_cv_func_ctime_r_nargs=0
16712         fi
16713   
16714 fi
16715
16716 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16717
16718   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16719         cat >> confdefs.h <<EOF
16720 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16721 EOF
16722
16723   fi
16724
16725 fi
16726
16727 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16728         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16729 echo "configure:16730: checking number of arguments of gethostbyname_r" >&5
16730 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16731   echo $ac_n "(cached) $ac_c" 1>&6
16732 else
16733   cat > conftest.$ac_ext <<EOF
16734 #line 16735 "configure"
16735 #include "confdefs.h"
16736 #include <sys/types.h>
16737 #include <sys/socket.h>
16738 #include <netinet/in.h>
16739 #include <netdb.h>
16740 #define BUFSIZE (sizeof(struct hostent)+10)
16741 int main() {
16742 struct hostent hent; char buffer[BUFSIZE];
16743                 int bufsize=BUFSIZE;int h_errno;
16744                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16745                         buffer, bufsize, &h_errno);
16746 ; return 0; }
16747 EOF
16748 if { (eval echo configure:16749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16749   rm -rf conftest*
16750   ol_cv_func_gethostbyname_r_nargs5=yes
16751 else
16752   echo "configure: failed program was:" >&5
16753   cat conftest.$ac_ext >&5
16754   rm -rf conftest*
16755   ol_cv_func_gethostbyname_r_nargs5=no
16756 fi
16757 rm -f conftest*
16758
16759         cat > conftest.$ac_ext <<EOF
16760 #line 16761 "configure"
16761 #include "confdefs.h"
16762 #include <sys/types.h>
16763 #include <sys/socket.h>
16764 #include <netinet/in.h>
16765 #include <netdb.h>
16766 #define BUFSIZE (sizeof(struct hostent)+10)
16767 int main() {
16768 struct hostent hent;struct hostent *rhent;
16769                 char buffer[BUFSIZE];
16770                 int bufsize=BUFSIZE;int h_errno;
16771                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16772                         &rhent, &h_errno);
16773 ; return 0; }
16774 EOF
16775 if { (eval echo configure:16776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16776   rm -rf conftest*
16777   ol_cv_func_gethostbyname_r_nargs6=yes
16778 else
16779   echo "configure: failed program was:" >&5
16780   cat conftest.$ac_ext >&5
16781   rm -rf conftest*
16782   ol_cv_func_gethostbyname_r_nargs6=no
16783 fi
16784 rm -f conftest*
16785
16786         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16787                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16788
16789                 ol_cv_func_gethostbyname_r_nargs=5
16790
16791         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16792                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16793
16794                 ol_cv_func_gethostbyname_r_nargs=6
16795
16796         else
16797                 ol_cv_func_gethostbyname_r_nargs=0
16798         fi
16799   
16800 fi
16801
16802 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16803   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16804         cat >> confdefs.h <<EOF
16805 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16806 EOF
16807
16808   fi
16809
16810 else
16811         ol_cv_func_gethostbyname_r_nargs=0
16812 fi
16813  
16814 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16815         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16816 echo "configure:16817: checking number of arguments of gethostbyaddr_r" >&5
16817 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16818   echo $ac_n "(cached) $ac_c" 1>&6
16819 else
16820   cat > conftest.$ac_ext <<EOF
16821 #line 16822 "configure"
16822 #include "confdefs.h"
16823 #include <sys/types.h>
16824 #include <sys/socket.h>
16825 #include <netinet/in.h>
16826 #include <netdb.h>
16827 #define BUFSIZE (sizeof(struct hostent)+10)
16828 int main() {
16829 struct hostent hent; char buffer[BUFSIZE]; 
16830             struct in_addr add;
16831             size_t alen=sizeof(struct in_addr);
16832             int bufsize=BUFSIZE;int h_errno;
16833                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16834                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16835 ; return 0; }
16836 EOF
16837 if { (eval echo configure:16838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16838   rm -rf conftest*
16839   ol_cv_func_gethostbyaddr_r_nargs7=yes
16840 else
16841   echo "configure: failed program was:" >&5
16842   cat conftest.$ac_ext >&5
16843   rm -rf conftest*
16844   ol_cv_func_gethostbyaddr_r_nargs7=no
16845 fi
16846 rm -f conftest*
16847
16848         cat > conftest.$ac_ext <<EOF
16849 #line 16850 "configure"
16850 #include "confdefs.h"
16851 #include <sys/types.h>
16852 #include <sys/socket.h>
16853 #include <netinet/in.h>
16854 #include <netdb.h>
16855 #define BUFSIZE (sizeof(struct hostent)+10)
16856 int main() {
16857 struct hostent hent;
16858                 struct hostent *rhent; char buffer[BUFSIZE]; 
16859                 struct in_addr add;
16860                 size_t alen=sizeof(struct in_addr);
16861                 int bufsize=BUFSIZE;int h_errno;
16862                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16863                         alen, AF_INET, &hent, buffer, bufsize, 
16864                         &rhent, &h_errno);
16865 ; return 0; }
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16868   rm -rf conftest*
16869   ol_cv_func_gethostbyaddr_r_nargs8=yes
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873   rm -rf conftest*
16874   ol_cv_func_gethostbyaddr_r_nargs8=no
16875 fi
16876 rm -f conftest*
16877
16878         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16879                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16880
16881                 ol_cv_func_gethostbyaddr_r_nargs=7
16882
16883         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16884                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16885
16886                 ol_cv_func_gethostbyaddr_r_nargs=8
16887
16888         else
16889                 ol_cv_func_gethostbyaddr_r_nargs=0
16890         fi
16891   
16892 fi
16893
16894 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16895   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16896     cat >> confdefs.h <<EOF
16897 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16898 EOF
16899
16900   fi
16901
16902 else
16903         ol_cv_func_gethostbyaddr_r_nargs=0
16904 fi
16905
16906 ol_link_ldbm=no 
16907
16908 if test $ol_with_ldbm_api = auto \
16909         -o $ol_with_ldbm_api = berkeley \
16910         -o $ol_with_ldbm_api = bcompat ; then
16911
16912         if test $ol_with_ldbm_api = bcompat; then \
16913                 for ac_hdr in db_185.h db.h
16914 do
16915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16917 echo "configure:16918: checking for $ac_hdr" >&5
16918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16919   echo $ac_n "(cached) $ac_c" 1>&6
16920 else
16921   cat > conftest.$ac_ext <<EOF
16922 #line 16923 "configure"
16923 #include "confdefs.h"
16924 #include <$ac_hdr>
16925 EOF
16926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16927 { (eval echo configure:16928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16929 if test -z "$ac_err"; then
16930   rm -rf conftest*
16931   eval "ac_cv_header_$ac_safe=yes"
16932 else
16933   echo "$ac_err" >&5
16934   echo "configure: failed program was:" >&5
16935   cat conftest.$ac_ext >&5
16936   rm -rf conftest*
16937   eval "ac_cv_header_$ac_safe=no"
16938 fi
16939 rm -f conftest*
16940 fi
16941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16942   echo "$ac_t""yes" 1>&6
16943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16944   cat >> confdefs.h <<EOF
16945 #define $ac_tr_hdr 1
16946 EOF
16947  
16948 else
16949   echo "$ac_t""no" 1>&6
16950 fi
16951 done
16952
16953 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16954         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16955 echo "configure:16956: checking if Berkeley DB header compatibility" >&5
16956 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16957   echo $ac_n "(cached) $ac_c" 1>&6
16958 else
16959   
16960                 cat > conftest.$ac_ext <<EOF
16961 #line 16962 "configure"
16962 #include "confdefs.h"
16963
16964 #if HAVE_DB_185_H
16965 #       include <db_185.h>
16966 #else
16967 #       include <db.h>
16968 #endif
16969
16970  /* this check could be improved */
16971 #ifndef DB_VERSION_MAJOR
16972 #       define DB_VERSION_MAJOR 1
16973 #endif
16974
16975 #if DB_VERSION_MAJOR == 1 
16976         __db_version_1
16977 #endif
16978
16979 EOF
16980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16981   egrep "__db_version_1" >/dev/null 2>&1; then
16982   rm -rf conftest*
16983   ol_cv_header_db1=yes
16984 else
16985   rm -rf conftest*
16986   ol_cv_header_db1=no
16987 fi
16988 rm -f conftest*
16989
16990 fi
16991
16992 echo "$ac_t""$ol_cv_header_db1" 1>&6
16993
16994         if test $ol_cv_header_db1 = yes ; then
16995                 ol_cv_lib_db=no
16996 if test $ol_cv_lib_db = no ; then
16997         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16998 echo "configure:16999: checking for Berkeley DB link (default)" >&5
16999 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17000   echo $ac_n "(cached) $ac_c" 1>&6
17001 else
17002   
17003         ol_DB_LIB=
17004         ol_LIBS=$LIBS
17005         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17006
17007         cat > conftest.$ac_ext <<EOF
17008 #line 17009 "configure"
17009 #include "confdefs.h"
17010
17011 #ifdef HAVE_DB_185_H
17012 # include <db_185.h>
17013 #else
17014 # include <db.h>
17015 #endif
17016
17017 #ifndef DB_VERSION_MAJOR
17018 # define DB_VERSION_MAJOR 1
17019 #endif
17020
17021 #ifndef NULL
17022 #define NULL ((void*)0)
17023 #endif
17024
17025 int main() {
17026
17027 #if DB_VERSION_MAJOR > 1
17028         {
17029                 char *version;
17030                 int major, minor, patch;
17031
17032                 version = db_version( &major, &minor, &patch );
17033
17034                 if( major != DB_VERSION_MAJOR ||
17035                         minor < DB_VERSION_MINOR )
17036                 {
17037                         printf("Berkeley DB version mismatch\n"
17038                                 "\theader: %s\n\tlibrary: %s\n",
17039                                 DB_VERSION_STRING, version);
17040                         return 1;
17041                 }
17042         }
17043 #endif
17044
17045 #if DB_VERSION_MAJOR > 2
17046         db_env_create( NULL, 0 );
17047 #elif DB_VERSION_MAJOR > 1
17048         db_appexit( NULL );
17049 #else
17050         (void) dbopen( NULL, 0, 0, 0, NULL);
17051 #endif
17052
17053 ; return 0; }
17054 EOF
17055 if { (eval echo configure:17056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17056   rm -rf conftest*
17057   ol_cv_db_none=yes
17058 else
17059   echo "configure: failed program was:" >&5
17060   cat conftest.$ac_ext >&5
17061   rm -rf conftest*
17062   ol_cv_db_none=no
17063 fi
17064 rm -f conftest*
17065
17066         LIBS="$ol_LIBS"
17067
17068 fi
17069
17070 echo "$ac_t""$ol_cv_db_none" 1>&6
17071
17072         if test $ol_cv_db_none = yes ; then
17073                 ol_cv_lib_db=yes
17074         fi
17075 fi
17076
17077 if test $ol_cv_lib_db = no ; then
17078         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17079 echo "configure:17080: checking for Berkeley DB link (-ldb43)" >&5
17080 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17081   echo $ac_n "(cached) $ac_c" 1>&6
17082 else
17083   
17084         ol_DB_LIB=-ldb43
17085         ol_LIBS=$LIBS
17086         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17087
17088         cat > conftest.$ac_ext <<EOF
17089 #line 17090 "configure"
17090 #include "confdefs.h"
17091
17092 #ifdef HAVE_DB_185_H
17093 # include <db_185.h>
17094 #else
17095 # include <db.h>
17096 #endif
17097
17098 #ifndef DB_VERSION_MAJOR
17099 # define DB_VERSION_MAJOR 1
17100 #endif
17101
17102 #ifndef NULL
17103 #define NULL ((void*)0)
17104 #endif
17105
17106 int main() {
17107
17108 #if DB_VERSION_MAJOR > 1
17109         {
17110                 char *version;
17111                 int major, minor, patch;
17112
17113                 version = db_version( &major, &minor, &patch );
17114
17115                 if( major != DB_VERSION_MAJOR ||
17116                         minor < DB_VERSION_MINOR )
17117                 {
17118                         printf("Berkeley DB version mismatch\n"
17119                                 "\theader: %s\n\tlibrary: %s\n",
17120                                 DB_VERSION_STRING, version);
17121                         return 1;
17122                 }
17123         }
17124 #endif
17125
17126 #if DB_VERSION_MAJOR > 2
17127         db_env_create( NULL, 0 );
17128 #elif DB_VERSION_MAJOR > 1
17129         db_appexit( NULL );
17130 #else
17131         (void) dbopen( NULL, 0, 0, 0, NULL);
17132 #endif
17133
17134 ; return 0; }
17135 EOF
17136 if { (eval echo configure:17137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17137   rm -rf conftest*
17138   ol_cv_db_db43=yes
17139 else
17140   echo "configure: failed program was:" >&5
17141   cat conftest.$ac_ext >&5
17142   rm -rf conftest*
17143   ol_cv_db_db43=no
17144 fi
17145 rm -f conftest*
17146
17147         LIBS="$ol_LIBS"
17148
17149 fi
17150
17151 echo "$ac_t""$ol_cv_db_db43" 1>&6
17152
17153         if test $ol_cv_db_db43 = yes ; then
17154                 ol_cv_lib_db=-ldb43
17155         fi
17156 fi
17157
17158 if test $ol_cv_lib_db = no ; then
17159         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17160 echo "configure:17161: checking for Berkeley DB link (-ldb-43)" >&5
17161 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17162   echo $ac_n "(cached) $ac_c" 1>&6
17163 else
17164   
17165         ol_DB_LIB=-ldb-43
17166         ol_LIBS=$LIBS
17167         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17168
17169         cat > conftest.$ac_ext <<EOF
17170 #line 17171 "configure"
17171 #include "confdefs.h"
17172
17173 #ifdef HAVE_DB_185_H
17174 # include <db_185.h>
17175 #else
17176 # include <db.h>
17177 #endif
17178
17179 #ifndef DB_VERSION_MAJOR
17180 # define DB_VERSION_MAJOR 1
17181 #endif
17182
17183 #ifndef NULL
17184 #define NULL ((void*)0)
17185 #endif
17186
17187 int main() {
17188
17189 #if DB_VERSION_MAJOR > 1
17190         {
17191                 char *version;
17192                 int major, minor, patch;
17193
17194                 version = db_version( &major, &minor, &patch );
17195
17196                 if( major != DB_VERSION_MAJOR ||
17197                         minor < DB_VERSION_MINOR )
17198                 {
17199                         printf("Berkeley DB version mismatch\n"
17200                                 "\theader: %s\n\tlibrary: %s\n",
17201                                 DB_VERSION_STRING, version);
17202                         return 1;
17203                 }
17204         }
17205 #endif
17206
17207 #if DB_VERSION_MAJOR > 2
17208         db_env_create( NULL, 0 );
17209 #elif DB_VERSION_MAJOR > 1
17210         db_appexit( NULL );
17211 #else
17212         (void) dbopen( NULL, 0, 0, 0, NULL);
17213 #endif
17214
17215 ; return 0; }
17216 EOF
17217 if { (eval echo configure:17218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17218   rm -rf conftest*
17219   ol_cv_db_db_43=yes
17220 else
17221   echo "configure: failed program was:" >&5
17222   cat conftest.$ac_ext >&5
17223   rm -rf conftest*
17224   ol_cv_db_db_43=no
17225 fi
17226 rm -f conftest*
17227
17228         LIBS="$ol_LIBS"
17229
17230 fi
17231
17232 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17233
17234         if test $ol_cv_db_db_43 = yes ; then
17235                 ol_cv_lib_db=-ldb-43
17236         fi
17237 fi
17238
17239 if test $ol_cv_lib_db = no ; then
17240         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17241 echo "configure:17242: checking for Berkeley DB link (-ldb-4.3)" >&5
17242 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17243   echo $ac_n "(cached) $ac_c" 1>&6
17244 else
17245   
17246         ol_DB_LIB=-ldb-4.3
17247         ol_LIBS=$LIBS
17248         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17249
17250         cat > conftest.$ac_ext <<EOF
17251 #line 17252 "configure"
17252 #include "confdefs.h"
17253
17254 #ifdef HAVE_DB_185_H
17255 # include <db_185.h>
17256 #else
17257 # include <db.h>
17258 #endif
17259
17260 #ifndef DB_VERSION_MAJOR
17261 # define DB_VERSION_MAJOR 1
17262 #endif
17263
17264 #ifndef NULL
17265 #define NULL ((void*)0)
17266 #endif
17267
17268 int main() {
17269
17270 #if DB_VERSION_MAJOR > 1
17271         {
17272                 char *version;
17273                 int major, minor, patch;
17274
17275                 version = db_version( &major, &minor, &patch );
17276
17277                 if( major != DB_VERSION_MAJOR ||
17278                         minor < DB_VERSION_MINOR )
17279                 {
17280                         printf("Berkeley DB version mismatch\n"
17281                                 "\theader: %s\n\tlibrary: %s\n",
17282                                 DB_VERSION_STRING, version);
17283                         return 1;
17284                 }
17285         }
17286 #endif
17287
17288 #if DB_VERSION_MAJOR > 2
17289         db_env_create( NULL, 0 );
17290 #elif DB_VERSION_MAJOR > 1
17291         db_appexit( NULL );
17292 #else
17293         (void) dbopen( NULL, 0, 0, 0, NULL);
17294 #endif
17295
17296 ; return 0; }
17297 EOF
17298 if { (eval echo configure:17299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17299   rm -rf conftest*
17300   ol_cv_db_db_4_dot_3=yes
17301 else
17302   echo "configure: failed program was:" >&5
17303   cat conftest.$ac_ext >&5
17304   rm -rf conftest*
17305   ol_cv_db_db_4_dot_3=no
17306 fi
17307 rm -f conftest*
17308
17309         LIBS="$ol_LIBS"
17310
17311 fi
17312
17313 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17314
17315         if test $ol_cv_db_db_4_dot_3 = yes ; then
17316                 ol_cv_lib_db=-ldb-4.3
17317         fi
17318 fi
17319
17320 if test $ol_cv_lib_db = no ; then
17321         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17322 echo "configure:17323: checking for Berkeley DB link (-ldb-4-3)" >&5
17323 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17324   echo $ac_n "(cached) $ac_c" 1>&6
17325 else
17326   
17327         ol_DB_LIB=-ldb-4-3
17328         ol_LIBS=$LIBS
17329         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17330
17331         cat > conftest.$ac_ext <<EOF
17332 #line 17333 "configure"
17333 #include "confdefs.h"
17334
17335 #ifdef HAVE_DB_185_H
17336 # include <db_185.h>
17337 #else
17338 # include <db.h>
17339 #endif
17340
17341 #ifndef DB_VERSION_MAJOR
17342 # define DB_VERSION_MAJOR 1
17343 #endif
17344
17345 #ifndef NULL
17346 #define NULL ((void*)0)
17347 #endif
17348
17349 int main() {
17350
17351 #if DB_VERSION_MAJOR > 1
17352         {
17353                 char *version;
17354                 int major, minor, patch;
17355
17356                 version = db_version( &major, &minor, &patch );
17357
17358                 if( major != DB_VERSION_MAJOR ||
17359                         minor < DB_VERSION_MINOR )
17360                 {
17361                         printf("Berkeley DB version mismatch\n"
17362                                 "\theader: %s\n\tlibrary: %s\n",
17363                                 DB_VERSION_STRING, version);
17364                         return 1;
17365                 }
17366         }
17367 #endif
17368
17369 #if DB_VERSION_MAJOR > 2
17370         db_env_create( NULL, 0 );
17371 #elif DB_VERSION_MAJOR > 1
17372         db_appexit( NULL );
17373 #else
17374         (void) dbopen( NULL, 0, 0, 0, NULL);
17375 #endif
17376
17377 ; return 0; }
17378 EOF
17379 if { (eval echo configure:17380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17380   rm -rf conftest*
17381   ol_cv_db_db_4_3=yes
17382 else
17383   echo "configure: failed program was:" >&5
17384   cat conftest.$ac_ext >&5
17385   rm -rf conftest*
17386   ol_cv_db_db_4_3=no
17387 fi
17388 rm -f conftest*
17389
17390         LIBS="$ol_LIBS"
17391
17392 fi
17393
17394 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17395
17396         if test $ol_cv_db_db_4_3 = yes ; then
17397                 ol_cv_lib_db=-ldb-4-3
17398         fi
17399 fi
17400
17401 if test $ol_cv_lib_db = no ; then
17402         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17403 echo "configure:17404: checking for Berkeley DB link (-ldb42)" >&5
17404 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17405   echo $ac_n "(cached) $ac_c" 1>&6
17406 else
17407   
17408         ol_DB_LIB=-ldb42
17409         ol_LIBS=$LIBS
17410         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17411
17412         cat > conftest.$ac_ext <<EOF
17413 #line 17414 "configure"
17414 #include "confdefs.h"
17415
17416 #ifdef HAVE_DB_185_H
17417 # include <db_185.h>
17418 #else
17419 # include <db.h>
17420 #endif
17421
17422 #ifndef DB_VERSION_MAJOR
17423 # define DB_VERSION_MAJOR 1
17424 #endif
17425
17426 #ifndef NULL
17427 #define NULL ((void*)0)
17428 #endif
17429
17430 int main() {
17431
17432 #if DB_VERSION_MAJOR > 1
17433         {
17434                 char *version;
17435                 int major, minor, patch;
17436
17437                 version = db_version( &major, &minor, &patch );
17438
17439                 if( major != DB_VERSION_MAJOR ||
17440                         minor < DB_VERSION_MINOR )
17441                 {
17442                         printf("Berkeley DB version mismatch\n"
17443                                 "\theader: %s\n\tlibrary: %s\n",
17444                                 DB_VERSION_STRING, version);
17445                         return 1;
17446                 }
17447         }
17448 #endif
17449
17450 #if DB_VERSION_MAJOR > 2
17451         db_env_create( NULL, 0 );
17452 #elif DB_VERSION_MAJOR > 1
17453         db_appexit( NULL );
17454 #else
17455         (void) dbopen( NULL, 0, 0, 0, NULL);
17456 #endif
17457
17458 ; return 0; }
17459 EOF
17460 if { (eval echo configure:17461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17461   rm -rf conftest*
17462   ol_cv_db_db42=yes
17463 else
17464   echo "configure: failed program was:" >&5
17465   cat conftest.$ac_ext >&5
17466   rm -rf conftest*
17467   ol_cv_db_db42=no
17468 fi
17469 rm -f conftest*
17470
17471         LIBS="$ol_LIBS"
17472
17473 fi
17474
17475 echo "$ac_t""$ol_cv_db_db42" 1>&6
17476
17477         if test $ol_cv_db_db42 = yes ; then
17478                 ol_cv_lib_db=-ldb42
17479         fi
17480 fi
17481
17482 if test $ol_cv_lib_db = no ; then
17483         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17484 echo "configure:17485: checking for Berkeley DB link (-ldb-42)" >&5
17485 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17486   echo $ac_n "(cached) $ac_c" 1>&6
17487 else
17488   
17489         ol_DB_LIB=-ldb-42
17490         ol_LIBS=$LIBS
17491         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17492
17493         cat > conftest.$ac_ext <<EOF
17494 #line 17495 "configure"
17495 #include "confdefs.h"
17496
17497 #ifdef HAVE_DB_185_H
17498 # include <db_185.h>
17499 #else
17500 # include <db.h>
17501 #endif
17502
17503 #ifndef DB_VERSION_MAJOR
17504 # define DB_VERSION_MAJOR 1
17505 #endif
17506
17507 #ifndef NULL
17508 #define NULL ((void*)0)
17509 #endif
17510
17511 int main() {
17512
17513 #if DB_VERSION_MAJOR > 1
17514         {
17515                 char *version;
17516                 int major, minor, patch;
17517
17518                 version = db_version( &major, &minor, &patch );
17519
17520                 if( major != DB_VERSION_MAJOR ||
17521                         minor < DB_VERSION_MINOR )
17522                 {
17523                         printf("Berkeley DB version mismatch\n"
17524                                 "\theader: %s\n\tlibrary: %s\n",
17525                                 DB_VERSION_STRING, version);
17526                         return 1;
17527                 }
17528         }
17529 #endif
17530
17531 #if DB_VERSION_MAJOR > 2
17532         db_env_create( NULL, 0 );
17533 #elif DB_VERSION_MAJOR > 1
17534         db_appexit( NULL );
17535 #else
17536         (void) dbopen( NULL, 0, 0, 0, NULL);
17537 #endif
17538
17539 ; return 0; }
17540 EOF
17541 if { (eval echo configure:17542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17542   rm -rf conftest*
17543   ol_cv_db_db_42=yes
17544 else
17545   echo "configure: failed program was:" >&5
17546   cat conftest.$ac_ext >&5
17547   rm -rf conftest*
17548   ol_cv_db_db_42=no
17549 fi
17550 rm -f conftest*
17551
17552         LIBS="$ol_LIBS"
17553
17554 fi
17555
17556 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17557
17558         if test $ol_cv_db_db_42 = yes ; then
17559                 ol_cv_lib_db=-ldb-42
17560         fi
17561 fi
17562
17563 if test $ol_cv_lib_db = no ; then
17564         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17565 echo "configure:17566: checking for Berkeley DB link (-ldb-4.2)" >&5
17566 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17567   echo $ac_n "(cached) $ac_c" 1>&6
17568 else
17569   
17570         ol_DB_LIB=-ldb-4.2
17571         ol_LIBS=$LIBS
17572         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17573
17574         cat > conftest.$ac_ext <<EOF
17575 #line 17576 "configure"
17576 #include "confdefs.h"
17577
17578 #ifdef HAVE_DB_185_H
17579 # include <db_185.h>
17580 #else
17581 # include <db.h>
17582 #endif
17583
17584 #ifndef DB_VERSION_MAJOR
17585 # define DB_VERSION_MAJOR 1
17586 #endif
17587
17588 #ifndef NULL
17589 #define NULL ((void*)0)
17590 #endif
17591
17592 int main() {
17593
17594 #if DB_VERSION_MAJOR > 1
17595         {
17596                 char *version;
17597                 int major, minor, patch;
17598
17599                 version = db_version( &major, &minor, &patch );
17600
17601                 if( major != DB_VERSION_MAJOR ||
17602                         minor < DB_VERSION_MINOR )
17603                 {
17604                         printf("Berkeley DB version mismatch\n"
17605                                 "\theader: %s\n\tlibrary: %s\n",
17606                                 DB_VERSION_STRING, version);
17607                         return 1;
17608                 }
17609         }
17610 #endif
17611
17612 #if DB_VERSION_MAJOR > 2
17613         db_env_create( NULL, 0 );
17614 #elif DB_VERSION_MAJOR > 1
17615         db_appexit( NULL );
17616 #else
17617         (void) dbopen( NULL, 0, 0, 0, NULL);
17618 #endif
17619
17620 ; return 0; }
17621 EOF
17622 if { (eval echo configure:17623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17623   rm -rf conftest*
17624   ol_cv_db_db_4_dot_2=yes
17625 else
17626   echo "configure: failed program was:" >&5
17627   cat conftest.$ac_ext >&5
17628   rm -rf conftest*
17629   ol_cv_db_db_4_dot_2=no
17630 fi
17631 rm -f conftest*
17632
17633         LIBS="$ol_LIBS"
17634
17635 fi
17636
17637 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17638
17639         if test $ol_cv_db_db_4_dot_2 = yes ; then
17640                 ol_cv_lib_db=-ldb-4.2
17641         fi
17642 fi
17643
17644 if test $ol_cv_lib_db = no ; then
17645         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17646 echo "configure:17647: checking for Berkeley DB link (-ldb-4-2)" >&5
17647 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17648   echo $ac_n "(cached) $ac_c" 1>&6
17649 else
17650   
17651         ol_DB_LIB=-ldb-4-2
17652         ol_LIBS=$LIBS
17653         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17654
17655         cat > conftest.$ac_ext <<EOF
17656 #line 17657 "configure"
17657 #include "confdefs.h"
17658
17659 #ifdef HAVE_DB_185_H
17660 # include <db_185.h>
17661 #else
17662 # include <db.h>
17663 #endif
17664
17665 #ifndef DB_VERSION_MAJOR
17666 # define DB_VERSION_MAJOR 1
17667 #endif
17668
17669 #ifndef NULL
17670 #define NULL ((void*)0)
17671 #endif
17672
17673 int main() {
17674
17675 #if DB_VERSION_MAJOR > 1
17676         {
17677                 char *version;
17678                 int major, minor, patch;
17679
17680                 version = db_version( &major, &minor, &patch );
17681
17682                 if( major != DB_VERSION_MAJOR ||
17683                         minor < DB_VERSION_MINOR )
17684                 {
17685                         printf("Berkeley DB version mismatch\n"
17686                                 "\theader: %s\n\tlibrary: %s\n",
17687                                 DB_VERSION_STRING, version);
17688                         return 1;
17689                 }
17690         }
17691 #endif
17692
17693 #if DB_VERSION_MAJOR > 2
17694         db_env_create( NULL, 0 );
17695 #elif DB_VERSION_MAJOR > 1
17696         db_appexit( NULL );
17697 #else
17698         (void) dbopen( NULL, 0, 0, 0, NULL);
17699 #endif
17700
17701 ; return 0; }
17702 EOF
17703 if { (eval echo configure:17704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17704   rm -rf conftest*
17705   ol_cv_db_db_4_2=yes
17706 else
17707   echo "configure: failed program was:" >&5
17708   cat conftest.$ac_ext >&5
17709   rm -rf conftest*
17710   ol_cv_db_db_4_2=no
17711 fi
17712 rm -f conftest*
17713
17714         LIBS="$ol_LIBS"
17715
17716 fi
17717
17718 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17719
17720         if test $ol_cv_db_db_4_2 = yes ; then
17721                 ol_cv_lib_db=-ldb-4-2
17722         fi
17723 fi
17724
17725 if test $ol_cv_lib_db = no ; then
17726         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17727 echo "configure:17728: checking for Berkeley DB link (-ldb-4)" >&5
17728 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17729   echo $ac_n "(cached) $ac_c" 1>&6
17730 else
17731   
17732         ol_DB_LIB=-ldb-4
17733         ol_LIBS=$LIBS
17734         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17735
17736         cat > conftest.$ac_ext <<EOF
17737 #line 17738 "configure"
17738 #include "confdefs.h"
17739
17740 #ifdef HAVE_DB_185_H
17741 # include <db_185.h>
17742 #else
17743 # include <db.h>
17744 #endif
17745
17746 #ifndef DB_VERSION_MAJOR
17747 # define DB_VERSION_MAJOR 1
17748 #endif
17749
17750 #ifndef NULL
17751 #define NULL ((void*)0)
17752 #endif
17753
17754 int main() {
17755
17756 #if DB_VERSION_MAJOR > 1
17757         {
17758                 char *version;
17759                 int major, minor, patch;
17760
17761                 version = db_version( &major, &minor, &patch );
17762
17763                 if( major != DB_VERSION_MAJOR ||
17764                         minor < DB_VERSION_MINOR )
17765                 {
17766                         printf("Berkeley DB version mismatch\n"
17767                                 "\theader: %s\n\tlibrary: %s\n",
17768                                 DB_VERSION_STRING, version);
17769                         return 1;
17770                 }
17771         }
17772 #endif
17773
17774 #if DB_VERSION_MAJOR > 2
17775         db_env_create( NULL, 0 );
17776 #elif DB_VERSION_MAJOR > 1
17777         db_appexit( NULL );
17778 #else
17779         (void) dbopen( NULL, 0, 0, 0, NULL);
17780 #endif
17781
17782 ; return 0; }
17783 EOF
17784 if { (eval echo configure:17785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17785   rm -rf conftest*
17786   ol_cv_db_db_4=yes
17787 else
17788   echo "configure: failed program was:" >&5
17789   cat conftest.$ac_ext >&5
17790   rm -rf conftest*
17791   ol_cv_db_db_4=no
17792 fi
17793 rm -f conftest*
17794
17795         LIBS="$ol_LIBS"
17796
17797 fi
17798
17799 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17800
17801         if test $ol_cv_db_db_4 = yes ; then
17802                 ol_cv_lib_db=-ldb-4
17803         fi
17804 fi
17805
17806 if test $ol_cv_lib_db = no ; then
17807         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17808 echo "configure:17809: checking for Berkeley DB link (-ldb4)" >&5
17809 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17810   echo $ac_n "(cached) $ac_c" 1>&6
17811 else
17812   
17813         ol_DB_LIB=-ldb4
17814         ol_LIBS=$LIBS
17815         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17816
17817         cat > conftest.$ac_ext <<EOF
17818 #line 17819 "configure"
17819 #include "confdefs.h"
17820
17821 #ifdef HAVE_DB_185_H
17822 # include <db_185.h>
17823 #else
17824 # include <db.h>
17825 #endif
17826
17827 #ifndef DB_VERSION_MAJOR
17828 # define DB_VERSION_MAJOR 1
17829 #endif
17830
17831 #ifndef NULL
17832 #define NULL ((void*)0)
17833 #endif
17834
17835 int main() {
17836
17837 #if DB_VERSION_MAJOR > 1
17838         {
17839                 char *version;
17840                 int major, minor, patch;
17841
17842                 version = db_version( &major, &minor, &patch );
17843
17844                 if( major != DB_VERSION_MAJOR ||
17845                         minor < DB_VERSION_MINOR )
17846                 {
17847                         printf("Berkeley DB version mismatch\n"
17848                                 "\theader: %s\n\tlibrary: %s\n",
17849                                 DB_VERSION_STRING, version);
17850                         return 1;
17851                 }
17852         }
17853 #endif
17854
17855 #if DB_VERSION_MAJOR > 2
17856         db_env_create( NULL, 0 );
17857 #elif DB_VERSION_MAJOR > 1
17858         db_appexit( NULL );
17859 #else
17860         (void) dbopen( NULL, 0, 0, 0, NULL);
17861 #endif
17862
17863 ; return 0; }
17864 EOF
17865 if { (eval echo configure:17866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17866   rm -rf conftest*
17867   ol_cv_db_db4=yes
17868 else
17869   echo "configure: failed program was:" >&5
17870   cat conftest.$ac_ext >&5
17871   rm -rf conftest*
17872   ol_cv_db_db4=no
17873 fi
17874 rm -f conftest*
17875
17876         LIBS="$ol_LIBS"
17877
17878 fi
17879
17880 echo "$ac_t""$ol_cv_db_db4" 1>&6
17881
17882         if test $ol_cv_db_db4 = yes ; then
17883                 ol_cv_lib_db=-ldb4
17884         fi
17885 fi
17886
17887 if test $ol_cv_lib_db = no ; then
17888         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17889 echo "configure:17890: checking for Berkeley DB link (-ldb)" >&5
17890 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17891   echo $ac_n "(cached) $ac_c" 1>&6
17892 else
17893   
17894         ol_DB_LIB=-ldb
17895         ol_LIBS=$LIBS
17896         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17897
17898         cat > conftest.$ac_ext <<EOF
17899 #line 17900 "configure"
17900 #include "confdefs.h"
17901
17902 #ifdef HAVE_DB_185_H
17903 # include <db_185.h>
17904 #else
17905 # include <db.h>
17906 #endif
17907
17908 #ifndef DB_VERSION_MAJOR
17909 # define DB_VERSION_MAJOR 1
17910 #endif
17911
17912 #ifndef NULL
17913 #define NULL ((void*)0)
17914 #endif
17915
17916 int main() {
17917
17918 #if DB_VERSION_MAJOR > 1
17919         {
17920                 char *version;
17921                 int major, minor, patch;
17922
17923                 version = db_version( &major, &minor, &patch );
17924
17925                 if( major != DB_VERSION_MAJOR ||
17926                         minor < DB_VERSION_MINOR )
17927                 {
17928                         printf("Berkeley DB version mismatch\n"
17929                                 "\theader: %s\n\tlibrary: %s\n",
17930                                 DB_VERSION_STRING, version);
17931                         return 1;
17932                 }
17933         }
17934 #endif
17935
17936 #if DB_VERSION_MAJOR > 2
17937         db_env_create( NULL, 0 );
17938 #elif DB_VERSION_MAJOR > 1
17939         db_appexit( NULL );
17940 #else
17941         (void) dbopen( NULL, 0, 0, 0, NULL);
17942 #endif
17943
17944 ; return 0; }
17945 EOF
17946 if { (eval echo configure:17947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17947   rm -rf conftest*
17948   ol_cv_db_db=yes
17949 else
17950   echo "configure: failed program was:" >&5
17951   cat conftest.$ac_ext >&5
17952   rm -rf conftest*
17953   ol_cv_db_db=no
17954 fi
17955 rm -f conftest*
17956
17957         LIBS="$ol_LIBS"
17958
17959 fi
17960
17961 echo "$ac_t""$ol_cv_db_db" 1>&6
17962
17963         if test $ol_cv_db_db = yes ; then
17964                 ol_cv_lib_db=-ldb
17965         fi
17966 fi
17967
17968 if test $ol_cv_lib_db = no ; then
17969         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17970 echo "configure:17971: checking for Berkeley DB link (-ldb41)" >&5
17971 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17972   echo $ac_n "(cached) $ac_c" 1>&6
17973 else
17974   
17975         ol_DB_LIB=-ldb41
17976         ol_LIBS=$LIBS
17977         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17978
17979         cat > conftest.$ac_ext <<EOF
17980 #line 17981 "configure"
17981 #include "confdefs.h"
17982
17983 #ifdef HAVE_DB_185_H
17984 # include <db_185.h>
17985 #else
17986 # include <db.h>
17987 #endif
17988
17989 #ifndef DB_VERSION_MAJOR
17990 # define DB_VERSION_MAJOR 1
17991 #endif
17992
17993 #ifndef NULL
17994 #define NULL ((void*)0)
17995 #endif
17996
17997 int main() {
17998
17999 #if DB_VERSION_MAJOR > 1
18000         {
18001                 char *version;
18002                 int major, minor, patch;
18003
18004                 version = db_version( &major, &minor, &patch );
18005
18006                 if( major != DB_VERSION_MAJOR ||
18007                         minor < DB_VERSION_MINOR )
18008                 {
18009                         printf("Berkeley DB version mismatch\n"
18010                                 "\theader: %s\n\tlibrary: %s\n",
18011                                 DB_VERSION_STRING, version);
18012                         return 1;
18013                 }
18014         }
18015 #endif
18016
18017 #if DB_VERSION_MAJOR > 2
18018         db_env_create( NULL, 0 );
18019 #elif DB_VERSION_MAJOR > 1
18020         db_appexit( NULL );
18021 #else
18022         (void) dbopen( NULL, 0, 0, 0, NULL);
18023 #endif
18024
18025 ; return 0; }
18026 EOF
18027 if { (eval echo configure:18028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18028   rm -rf conftest*
18029   ol_cv_db_db41=yes
18030 else
18031   echo "configure: failed program was:" >&5
18032   cat conftest.$ac_ext >&5
18033   rm -rf conftest*
18034   ol_cv_db_db41=no
18035 fi
18036 rm -f conftest*
18037
18038         LIBS="$ol_LIBS"
18039
18040 fi
18041
18042 echo "$ac_t""$ol_cv_db_db41" 1>&6
18043
18044         if test $ol_cv_db_db41 = yes ; then
18045                 ol_cv_lib_db=-ldb41
18046         fi
18047 fi
18048
18049 if test $ol_cv_lib_db = no ; then
18050         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18051 echo "configure:18052: checking for Berkeley DB link (-ldb-41)" >&5
18052 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18053   echo $ac_n "(cached) $ac_c" 1>&6
18054 else
18055   
18056         ol_DB_LIB=-ldb-41
18057         ol_LIBS=$LIBS
18058         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18059
18060         cat > conftest.$ac_ext <<EOF
18061 #line 18062 "configure"
18062 #include "confdefs.h"
18063
18064 #ifdef HAVE_DB_185_H
18065 # include <db_185.h>
18066 #else
18067 # include <db.h>
18068 #endif
18069
18070 #ifndef DB_VERSION_MAJOR
18071 # define DB_VERSION_MAJOR 1
18072 #endif
18073
18074 #ifndef NULL
18075 #define NULL ((void*)0)
18076 #endif
18077
18078 int main() {
18079
18080 #if DB_VERSION_MAJOR > 1
18081         {
18082                 char *version;
18083                 int major, minor, patch;
18084
18085                 version = db_version( &major, &minor, &patch );
18086
18087                 if( major != DB_VERSION_MAJOR ||
18088                         minor < DB_VERSION_MINOR )
18089                 {
18090                         printf("Berkeley DB version mismatch\n"
18091                                 "\theader: %s\n\tlibrary: %s\n",
18092                                 DB_VERSION_STRING, version);
18093                         return 1;
18094                 }
18095         }
18096 #endif
18097
18098 #if DB_VERSION_MAJOR > 2
18099         db_env_create( NULL, 0 );
18100 #elif DB_VERSION_MAJOR > 1
18101         db_appexit( NULL );
18102 #else
18103         (void) dbopen( NULL, 0, 0, 0, NULL);
18104 #endif
18105
18106 ; return 0; }
18107 EOF
18108 if { (eval echo configure:18109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18109   rm -rf conftest*
18110   ol_cv_db_db_41=yes
18111 else
18112   echo "configure: failed program was:" >&5
18113   cat conftest.$ac_ext >&5
18114   rm -rf conftest*
18115   ol_cv_db_db_41=no
18116 fi
18117 rm -f conftest*
18118
18119         LIBS="$ol_LIBS"
18120
18121 fi
18122
18123 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18124
18125         if test $ol_cv_db_db_41 = yes ; then
18126                 ol_cv_lib_db=-ldb-41
18127         fi
18128 fi
18129
18130 if test $ol_cv_lib_db = no ; then
18131         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18132 echo "configure:18133: checking for Berkeley DB link (-ldb-4.1)" >&5
18133 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18134   echo $ac_n "(cached) $ac_c" 1>&6
18135 else
18136   
18137         ol_DB_LIB=-ldb-4.1
18138         ol_LIBS=$LIBS
18139         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18140
18141         cat > conftest.$ac_ext <<EOF
18142 #line 18143 "configure"
18143 #include "confdefs.h"
18144
18145 #ifdef HAVE_DB_185_H
18146 # include <db_185.h>
18147 #else
18148 # include <db.h>
18149 #endif
18150
18151 #ifndef DB_VERSION_MAJOR
18152 # define DB_VERSION_MAJOR 1
18153 #endif
18154
18155 #ifndef NULL
18156 #define NULL ((void*)0)
18157 #endif
18158
18159 int main() {
18160
18161 #if DB_VERSION_MAJOR > 1
18162         {
18163                 char *version;
18164                 int major, minor, patch;
18165
18166                 version = db_version( &major, &minor, &patch );
18167
18168                 if( major != DB_VERSION_MAJOR ||
18169                         minor < DB_VERSION_MINOR )
18170                 {
18171                         printf("Berkeley DB version mismatch\n"
18172                                 "\theader: %s\n\tlibrary: %s\n",
18173                                 DB_VERSION_STRING, version);
18174                         return 1;
18175                 }
18176         }
18177 #endif
18178
18179 #if DB_VERSION_MAJOR > 2
18180         db_env_create( NULL, 0 );
18181 #elif DB_VERSION_MAJOR > 1
18182         db_appexit( NULL );
18183 #else
18184         (void) dbopen( NULL, 0, 0, 0, NULL);
18185 #endif
18186
18187 ; return 0; }
18188 EOF
18189 if { (eval echo configure:18190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18190   rm -rf conftest*
18191   ol_cv_db_db_4_dot_1=yes
18192 else
18193   echo "configure: failed program was:" >&5
18194   cat conftest.$ac_ext >&5
18195   rm -rf conftest*
18196   ol_cv_db_db_4_dot_1=no
18197 fi
18198 rm -f conftest*
18199
18200         LIBS="$ol_LIBS"
18201
18202 fi
18203
18204 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18205
18206         if test $ol_cv_db_db_4_dot_1 = yes ; then
18207                 ol_cv_lib_db=-ldb-4.1
18208         fi
18209 fi
18210
18211 if test $ol_cv_lib_db = no ; then
18212         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18213 echo "configure:18214: checking for Berkeley DB link (-ldb-4-1)" >&5
18214 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18215   echo $ac_n "(cached) $ac_c" 1>&6
18216 else
18217   
18218         ol_DB_LIB=-ldb-4-1
18219         ol_LIBS=$LIBS
18220         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18221
18222         cat > conftest.$ac_ext <<EOF
18223 #line 18224 "configure"
18224 #include "confdefs.h"
18225
18226 #ifdef HAVE_DB_185_H
18227 # include <db_185.h>
18228 #else
18229 # include <db.h>
18230 #endif
18231
18232 #ifndef DB_VERSION_MAJOR
18233 # define DB_VERSION_MAJOR 1
18234 #endif
18235
18236 #ifndef NULL
18237 #define NULL ((void*)0)
18238 #endif
18239
18240 int main() {
18241
18242 #if DB_VERSION_MAJOR > 1
18243         {
18244                 char *version;
18245                 int major, minor, patch;
18246
18247                 version = db_version( &major, &minor, &patch );
18248
18249                 if( major != DB_VERSION_MAJOR ||
18250                         minor < DB_VERSION_MINOR )
18251                 {
18252                         printf("Berkeley DB version mismatch\n"
18253                                 "\theader: %s\n\tlibrary: %s\n",
18254                                 DB_VERSION_STRING, version);
18255                         return 1;
18256                 }
18257         }
18258 #endif
18259
18260 #if DB_VERSION_MAJOR > 2
18261         db_env_create( NULL, 0 );
18262 #elif DB_VERSION_MAJOR > 1
18263         db_appexit( NULL );
18264 #else
18265         (void) dbopen( NULL, 0, 0, 0, NULL);
18266 #endif
18267
18268 ; return 0; }
18269 EOF
18270 if { (eval echo configure:18271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18271   rm -rf conftest*
18272   ol_cv_db_db_4_1=yes
18273 else
18274   echo "configure: failed program was:" >&5
18275   cat conftest.$ac_ext >&5
18276   rm -rf conftest*
18277   ol_cv_db_db_4_1=no
18278 fi
18279 rm -f conftest*
18280
18281         LIBS="$ol_LIBS"
18282
18283 fi
18284
18285 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18286
18287         if test $ol_cv_db_db_4_1 = yes ; then
18288                 ol_cv_lib_db=-ldb-4-1
18289         fi
18290 fi
18291
18292 if test $ol_cv_lib_db = no ; then
18293         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18294 echo "configure:18295: checking for Berkeley DB link (-ldb3)" >&5
18295 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18296   echo $ac_n "(cached) $ac_c" 1>&6
18297 else
18298   
18299         ol_DB_LIB=-ldb3
18300         ol_LIBS=$LIBS
18301         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18302
18303         cat > conftest.$ac_ext <<EOF
18304 #line 18305 "configure"
18305 #include "confdefs.h"
18306
18307 #ifdef HAVE_DB_185_H
18308 # include <db_185.h>
18309 #else
18310 # include <db.h>
18311 #endif
18312
18313 #ifndef DB_VERSION_MAJOR
18314 # define DB_VERSION_MAJOR 1
18315 #endif
18316
18317 #ifndef NULL
18318 #define NULL ((void*)0)
18319 #endif
18320
18321 int main() {
18322
18323 #if DB_VERSION_MAJOR > 1
18324         {
18325                 char *version;
18326                 int major, minor, patch;
18327
18328                 version = db_version( &major, &minor, &patch );
18329
18330                 if( major != DB_VERSION_MAJOR ||
18331                         minor < DB_VERSION_MINOR )
18332                 {
18333                         printf("Berkeley DB version mismatch\n"
18334                                 "\theader: %s\n\tlibrary: %s\n",
18335                                 DB_VERSION_STRING, version);
18336                         return 1;
18337                 }
18338         }
18339 #endif
18340
18341 #if DB_VERSION_MAJOR > 2
18342         db_env_create( NULL, 0 );
18343 #elif DB_VERSION_MAJOR > 1
18344         db_appexit( NULL );
18345 #else
18346         (void) dbopen( NULL, 0, 0, 0, NULL);
18347 #endif
18348
18349 ; return 0; }
18350 EOF
18351 if { (eval echo configure:18352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18352   rm -rf conftest*
18353   ol_cv_db_db3=yes
18354 else
18355   echo "configure: failed program was:" >&5
18356   cat conftest.$ac_ext >&5
18357   rm -rf conftest*
18358   ol_cv_db_db3=no
18359 fi
18360 rm -f conftest*
18361
18362         LIBS="$ol_LIBS"
18363
18364 fi
18365
18366 echo "$ac_t""$ol_cv_db_db3" 1>&6
18367
18368         if test $ol_cv_db_db3 = yes ; then
18369                 ol_cv_lib_db=-ldb3
18370         fi
18371 fi
18372
18373 if test $ol_cv_lib_db = no ; then
18374         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18375 echo "configure:18376: checking for Berkeley DB link (-ldb-3)" >&5
18376 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18377   echo $ac_n "(cached) $ac_c" 1>&6
18378 else
18379   
18380         ol_DB_LIB=-ldb-3
18381         ol_LIBS=$LIBS
18382         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18383
18384         cat > conftest.$ac_ext <<EOF
18385 #line 18386 "configure"
18386 #include "confdefs.h"
18387
18388 #ifdef HAVE_DB_185_H
18389 # include <db_185.h>
18390 #else
18391 # include <db.h>
18392 #endif
18393
18394 #ifndef DB_VERSION_MAJOR
18395 # define DB_VERSION_MAJOR 1
18396 #endif
18397
18398 #ifndef NULL
18399 #define NULL ((void*)0)
18400 #endif
18401
18402 int main() {
18403
18404 #if DB_VERSION_MAJOR > 1
18405         {
18406                 char *version;
18407                 int major, minor, patch;
18408
18409                 version = db_version( &major, &minor, &patch );
18410
18411                 if( major != DB_VERSION_MAJOR ||
18412                         minor < DB_VERSION_MINOR )
18413                 {
18414                         printf("Berkeley DB version mismatch\n"
18415                                 "\theader: %s\n\tlibrary: %s\n",
18416                                 DB_VERSION_STRING, version);
18417                         return 1;
18418                 }
18419         }
18420 #endif
18421
18422 #if DB_VERSION_MAJOR > 2
18423         db_env_create( NULL, 0 );
18424 #elif DB_VERSION_MAJOR > 1
18425         db_appexit( NULL );
18426 #else
18427         (void) dbopen( NULL, 0, 0, 0, NULL);
18428 #endif
18429
18430 ; return 0; }
18431 EOF
18432 if { (eval echo configure:18433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18433   rm -rf conftest*
18434   ol_cv_db_db_3=yes
18435 else
18436   echo "configure: failed program was:" >&5
18437   cat conftest.$ac_ext >&5
18438   rm -rf conftest*
18439   ol_cv_db_db_3=no
18440 fi
18441 rm -f conftest*
18442
18443         LIBS="$ol_LIBS"
18444
18445 fi
18446
18447 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18448
18449         if test $ol_cv_db_db_3 = yes ; then
18450                 ol_cv_lib_db=-ldb-3
18451         fi
18452 fi
18453
18454 if test $ol_cv_lib_db = no ; then
18455         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18456 echo "configure:18457: checking for Berkeley DB link (-ldb2)" >&5
18457 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18458   echo $ac_n "(cached) $ac_c" 1>&6
18459 else
18460   
18461         ol_DB_LIB=-ldb2
18462         ol_LIBS=$LIBS
18463         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18464
18465         cat > conftest.$ac_ext <<EOF
18466 #line 18467 "configure"
18467 #include "confdefs.h"
18468
18469 #ifdef HAVE_DB_185_H
18470 # include <db_185.h>
18471 #else
18472 # include <db.h>
18473 #endif
18474
18475 #ifndef DB_VERSION_MAJOR
18476 # define DB_VERSION_MAJOR 1
18477 #endif
18478
18479 #ifndef NULL
18480 #define NULL ((void*)0)
18481 #endif
18482
18483 int main() {
18484
18485 #if DB_VERSION_MAJOR > 1
18486         {
18487                 char *version;
18488                 int major, minor, patch;
18489
18490                 version = db_version( &major, &minor, &patch );
18491
18492                 if( major != DB_VERSION_MAJOR ||
18493                         minor < DB_VERSION_MINOR )
18494                 {
18495                         printf("Berkeley DB version mismatch\n"
18496                                 "\theader: %s\n\tlibrary: %s\n",
18497                                 DB_VERSION_STRING, version);
18498                         return 1;
18499                 }
18500         }
18501 #endif
18502
18503 #if DB_VERSION_MAJOR > 2
18504         db_env_create( NULL, 0 );
18505 #elif DB_VERSION_MAJOR > 1
18506         db_appexit( NULL );
18507 #else
18508         (void) dbopen( NULL, 0, 0, 0, NULL);
18509 #endif
18510
18511 ; return 0; }
18512 EOF
18513 if { (eval echo configure:18514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18514   rm -rf conftest*
18515   ol_cv_db_db2=yes
18516 else
18517   echo "configure: failed program was:" >&5
18518   cat conftest.$ac_ext >&5
18519   rm -rf conftest*
18520   ol_cv_db_db2=no
18521 fi
18522 rm -f conftest*
18523
18524         LIBS="$ol_LIBS"
18525
18526 fi
18527
18528 echo "$ac_t""$ol_cv_db_db2" 1>&6
18529
18530         if test $ol_cv_db_db2 = yes ; then
18531                 ol_cv_lib_db=-ldb2
18532         fi
18533 fi
18534
18535 if test $ol_cv_lib_db = no ; then
18536         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18537 echo "configure:18538: checking for Berkeley DB link (-ldb-2)" >&5
18538 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18539   echo $ac_n "(cached) $ac_c" 1>&6
18540 else
18541   
18542         ol_DB_LIB=-ldb-2
18543         ol_LIBS=$LIBS
18544         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18545
18546         cat > conftest.$ac_ext <<EOF
18547 #line 18548 "configure"
18548 #include "confdefs.h"
18549
18550 #ifdef HAVE_DB_185_H
18551 # include <db_185.h>
18552 #else
18553 # include <db.h>
18554 #endif
18555
18556 #ifndef DB_VERSION_MAJOR
18557 # define DB_VERSION_MAJOR 1
18558 #endif
18559
18560 #ifndef NULL
18561 #define NULL ((void*)0)
18562 #endif
18563
18564 int main() {
18565
18566 #if DB_VERSION_MAJOR > 1
18567         {
18568                 char *version;
18569                 int major, minor, patch;
18570
18571                 version = db_version( &major, &minor, &patch );
18572
18573                 if( major != DB_VERSION_MAJOR ||
18574                         minor < DB_VERSION_MINOR )
18575                 {
18576                         printf("Berkeley DB version mismatch\n"
18577                                 "\theader: %s\n\tlibrary: %s\n",
18578                                 DB_VERSION_STRING, version);
18579                         return 1;
18580                 }
18581         }
18582 #endif
18583
18584 #if DB_VERSION_MAJOR > 2
18585         db_env_create( NULL, 0 );
18586 #elif DB_VERSION_MAJOR > 1
18587         db_appexit( NULL );
18588 #else
18589         (void) dbopen( NULL, 0, 0, 0, NULL);
18590 #endif
18591
18592 ; return 0; }
18593 EOF
18594 if { (eval echo configure:18595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18595   rm -rf conftest*
18596   ol_cv_db_db_2=yes
18597 else
18598   echo "configure: failed program was:" >&5
18599   cat conftest.$ac_ext >&5
18600   rm -rf conftest*
18601   ol_cv_db_db_2=no
18602 fi
18603 rm -f conftest*
18604
18605         LIBS="$ol_LIBS"
18606
18607 fi
18608
18609 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18610
18611         if test $ol_cv_db_db_2 = yes ; then
18612                 ol_cv_lib_db=-ldb-2
18613         fi
18614 fi
18615
18616 if test $ol_cv_lib_db = no ; then
18617         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18618 echo "configure:18619: checking for Berkeley DB link (-ldb1)" >&5
18619 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18620   echo $ac_n "(cached) $ac_c" 1>&6
18621 else
18622   
18623         ol_DB_LIB=-ldb1
18624         ol_LIBS=$LIBS
18625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18626
18627         cat > conftest.$ac_ext <<EOF
18628 #line 18629 "configure"
18629 #include "confdefs.h"
18630
18631 #ifdef HAVE_DB_185_H
18632 # include <db_185.h>
18633 #else
18634 # include <db.h>
18635 #endif
18636
18637 #ifndef DB_VERSION_MAJOR
18638 # define DB_VERSION_MAJOR 1
18639 #endif
18640
18641 #ifndef NULL
18642 #define NULL ((void*)0)
18643 #endif
18644
18645 int main() {
18646
18647 #if DB_VERSION_MAJOR > 1
18648         {
18649                 char *version;
18650                 int major, minor, patch;
18651
18652                 version = db_version( &major, &minor, &patch );
18653
18654                 if( major != DB_VERSION_MAJOR ||
18655                         minor < DB_VERSION_MINOR )
18656                 {
18657                         printf("Berkeley DB version mismatch\n"
18658                                 "\theader: %s\n\tlibrary: %s\n",
18659                                 DB_VERSION_STRING, version);
18660                         return 1;
18661                 }
18662         }
18663 #endif
18664
18665 #if DB_VERSION_MAJOR > 2
18666         db_env_create( NULL, 0 );
18667 #elif DB_VERSION_MAJOR > 1
18668         db_appexit( NULL );
18669 #else
18670         (void) dbopen( NULL, 0, 0, 0, NULL);
18671 #endif
18672
18673 ; return 0; }
18674 EOF
18675 if { (eval echo configure:18676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18676   rm -rf conftest*
18677   ol_cv_db_db1=yes
18678 else
18679   echo "configure: failed program was:" >&5
18680   cat conftest.$ac_ext >&5
18681   rm -rf conftest*
18682   ol_cv_db_db1=no
18683 fi
18684 rm -f conftest*
18685
18686         LIBS="$ol_LIBS"
18687
18688 fi
18689
18690 echo "$ac_t""$ol_cv_db_db1" 1>&6
18691
18692         if test $ol_cv_db_db1 = yes ; then
18693                 ol_cv_lib_db=-ldb1
18694         fi
18695 fi
18696
18697 if test $ol_cv_lib_db = no ; then
18698         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18699 echo "configure:18700: checking for Berkeley DB link (-ldb-1)" >&5
18700 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18701   echo $ac_n "(cached) $ac_c" 1>&6
18702 else
18703   
18704         ol_DB_LIB=-ldb-1
18705         ol_LIBS=$LIBS
18706         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18707
18708         cat > conftest.$ac_ext <<EOF
18709 #line 18710 "configure"
18710 #include "confdefs.h"
18711
18712 #ifdef HAVE_DB_185_H
18713 # include <db_185.h>
18714 #else
18715 # include <db.h>
18716 #endif
18717
18718 #ifndef DB_VERSION_MAJOR
18719 # define DB_VERSION_MAJOR 1
18720 #endif
18721
18722 #ifndef NULL
18723 #define NULL ((void*)0)
18724 #endif
18725
18726 int main() {
18727
18728 #if DB_VERSION_MAJOR > 1
18729         {
18730                 char *version;
18731                 int major, minor, patch;
18732
18733                 version = db_version( &major, &minor, &patch );
18734
18735                 if( major != DB_VERSION_MAJOR ||
18736                         minor < DB_VERSION_MINOR )
18737                 {
18738                         printf("Berkeley DB version mismatch\n"
18739                                 "\theader: %s\n\tlibrary: %s\n",
18740                                 DB_VERSION_STRING, version);
18741                         return 1;
18742                 }
18743         }
18744 #endif
18745
18746 #if DB_VERSION_MAJOR > 2
18747         db_env_create( NULL, 0 );
18748 #elif DB_VERSION_MAJOR > 1
18749         db_appexit( NULL );
18750 #else
18751         (void) dbopen( NULL, 0, 0, 0, NULL);
18752 #endif
18753
18754 ; return 0; }
18755 EOF
18756 if { (eval echo configure:18757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18757   rm -rf conftest*
18758   ol_cv_db_db_1=yes
18759 else
18760   echo "configure: failed program was:" >&5
18761   cat conftest.$ac_ext >&5
18762   rm -rf conftest*
18763   ol_cv_db_db_1=no
18764 fi
18765 rm -f conftest*
18766
18767         LIBS="$ol_LIBS"
18768
18769 fi
18770
18771 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18772
18773         if test $ol_cv_db_db_1 = yes ; then
18774                 ol_cv_lib_db=-ldb-1
18775         fi
18776 fi
18777
18778
18779                 if test "$ol_cv_lib_db" != no ; then
18780                         ol_cv_berkeley_db=yes
18781                 fi
18782         fi
18783 fi
18784
18785         else
18786                 ol_cv_berkeley_db=no
18787 for ac_hdr in db.h
18788 do
18789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18791 echo "configure:18792: checking for $ac_hdr" >&5
18792 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18793   echo $ac_n "(cached) $ac_c" 1>&6
18794 else
18795   cat > conftest.$ac_ext <<EOF
18796 #line 18797 "configure"
18797 #include "confdefs.h"
18798 #include <$ac_hdr>
18799 EOF
18800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18801 { (eval echo configure:18802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18803 if test -z "$ac_err"; then
18804   rm -rf conftest*
18805   eval "ac_cv_header_$ac_safe=yes"
18806 else
18807   echo "$ac_err" >&5
18808   echo "configure: failed program was:" >&5
18809   cat conftest.$ac_ext >&5
18810   rm -rf conftest*
18811   eval "ac_cv_header_$ac_safe=no"
18812 fi
18813 rm -f conftest*
18814 fi
18815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18816   echo "$ac_t""yes" 1>&6
18817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18818   cat >> confdefs.h <<EOF
18819 #define $ac_tr_hdr 1
18820 EOF
18821  
18822 else
18823   echo "$ac_t""no" 1>&6
18824 fi
18825 done
18826
18827 if test $ac_cv_header_db_h = yes; then
18828         ol_cv_lib_db=no
18829 if test $ol_cv_lib_db = no ; then
18830         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18831 echo "configure:18832: checking for Berkeley DB link (default)" >&5
18832 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18833   echo $ac_n "(cached) $ac_c" 1>&6
18834 else
18835   
18836         ol_DB_LIB=
18837         ol_LIBS=$LIBS
18838         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18839
18840         cat > conftest.$ac_ext <<EOF
18841 #line 18842 "configure"
18842 #include "confdefs.h"
18843
18844 #ifdef HAVE_DB_185_H
18845 # include <db_185.h>
18846 #else
18847 # include <db.h>
18848 #endif
18849
18850 #ifndef DB_VERSION_MAJOR
18851 # define DB_VERSION_MAJOR 1
18852 #endif
18853
18854 #ifndef NULL
18855 #define NULL ((void*)0)
18856 #endif
18857
18858 int main() {
18859
18860 #if DB_VERSION_MAJOR > 1
18861         {
18862                 char *version;
18863                 int major, minor, patch;
18864
18865                 version = db_version( &major, &minor, &patch );
18866
18867                 if( major != DB_VERSION_MAJOR ||
18868                         minor < DB_VERSION_MINOR )
18869                 {
18870                         printf("Berkeley DB version mismatch\n"
18871                                 "\theader: %s\n\tlibrary: %s\n",
18872                                 DB_VERSION_STRING, version);
18873                         return 1;
18874                 }
18875         }
18876 #endif
18877
18878 #if DB_VERSION_MAJOR > 2
18879         db_env_create( NULL, 0 );
18880 #elif DB_VERSION_MAJOR > 1
18881         db_appexit( NULL );
18882 #else
18883         (void) dbopen( NULL, 0, 0, 0, NULL);
18884 #endif
18885
18886 ; return 0; }
18887 EOF
18888 if { (eval echo configure:18889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18889   rm -rf conftest*
18890   ol_cv_db_none=yes
18891 else
18892   echo "configure: failed program was:" >&5
18893   cat conftest.$ac_ext >&5
18894   rm -rf conftest*
18895   ol_cv_db_none=no
18896 fi
18897 rm -f conftest*
18898
18899         LIBS="$ol_LIBS"
18900
18901 fi
18902
18903 echo "$ac_t""$ol_cv_db_none" 1>&6
18904
18905         if test $ol_cv_db_none = yes ; then
18906                 ol_cv_lib_db=yes
18907         fi
18908 fi
18909
18910 if test $ol_cv_lib_db = no ; then
18911         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18912 echo "configure:18913: checking for Berkeley DB link (-ldb43)" >&5
18913 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18914   echo $ac_n "(cached) $ac_c" 1>&6
18915 else
18916   
18917         ol_DB_LIB=-ldb43
18918         ol_LIBS=$LIBS
18919         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18920
18921         cat > conftest.$ac_ext <<EOF
18922 #line 18923 "configure"
18923 #include "confdefs.h"
18924
18925 #ifdef HAVE_DB_185_H
18926 # include <db_185.h>
18927 #else
18928 # include <db.h>
18929 #endif
18930
18931 #ifndef DB_VERSION_MAJOR
18932 # define DB_VERSION_MAJOR 1
18933 #endif
18934
18935 #ifndef NULL
18936 #define NULL ((void*)0)
18937 #endif
18938
18939 int main() {
18940
18941 #if DB_VERSION_MAJOR > 1
18942         {
18943                 char *version;
18944                 int major, minor, patch;
18945
18946                 version = db_version( &major, &minor, &patch );
18947
18948                 if( major != DB_VERSION_MAJOR ||
18949                         minor < DB_VERSION_MINOR )
18950                 {
18951                         printf("Berkeley DB version mismatch\n"
18952                                 "\theader: %s\n\tlibrary: %s\n",
18953                                 DB_VERSION_STRING, version);
18954                         return 1;
18955                 }
18956         }
18957 #endif
18958
18959 #if DB_VERSION_MAJOR > 2
18960         db_env_create( NULL, 0 );
18961 #elif DB_VERSION_MAJOR > 1
18962         db_appexit( NULL );
18963 #else
18964         (void) dbopen( NULL, 0, 0, 0, NULL);
18965 #endif
18966
18967 ; return 0; }
18968 EOF
18969 if { (eval echo configure:18970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18970   rm -rf conftest*
18971   ol_cv_db_db43=yes
18972 else
18973   echo "configure: failed program was:" >&5
18974   cat conftest.$ac_ext >&5
18975   rm -rf conftest*
18976   ol_cv_db_db43=no
18977 fi
18978 rm -f conftest*
18979
18980         LIBS="$ol_LIBS"
18981
18982 fi
18983
18984 echo "$ac_t""$ol_cv_db_db43" 1>&6
18985
18986         if test $ol_cv_db_db43 = yes ; then
18987                 ol_cv_lib_db=-ldb43
18988         fi
18989 fi
18990
18991 if test $ol_cv_lib_db = no ; then
18992         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
18993 echo "configure:18994: checking for Berkeley DB link (-ldb-43)" >&5
18994 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
18995   echo $ac_n "(cached) $ac_c" 1>&6
18996 else
18997   
18998         ol_DB_LIB=-ldb-43
18999         ol_LIBS=$LIBS
19000         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19001
19002         cat > conftest.$ac_ext <<EOF
19003 #line 19004 "configure"
19004 #include "confdefs.h"
19005
19006 #ifdef HAVE_DB_185_H
19007 # include <db_185.h>
19008 #else
19009 # include <db.h>
19010 #endif
19011
19012 #ifndef DB_VERSION_MAJOR
19013 # define DB_VERSION_MAJOR 1
19014 #endif
19015
19016 #ifndef NULL
19017 #define NULL ((void*)0)
19018 #endif
19019
19020 int main() {
19021
19022 #if DB_VERSION_MAJOR > 1
19023         {
19024                 char *version;
19025                 int major, minor, patch;
19026
19027                 version = db_version( &major, &minor, &patch );
19028
19029                 if( major != DB_VERSION_MAJOR ||
19030                         minor < DB_VERSION_MINOR )
19031                 {
19032                         printf("Berkeley DB version mismatch\n"
19033                                 "\theader: %s\n\tlibrary: %s\n",
19034                                 DB_VERSION_STRING, version);
19035                         return 1;
19036                 }
19037         }
19038 #endif
19039
19040 #if DB_VERSION_MAJOR > 2
19041         db_env_create( NULL, 0 );
19042 #elif DB_VERSION_MAJOR > 1
19043         db_appexit( NULL );
19044 #else
19045         (void) dbopen( NULL, 0, 0, 0, NULL);
19046 #endif
19047
19048 ; return 0; }
19049 EOF
19050 if { (eval echo configure:19051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19051   rm -rf conftest*
19052   ol_cv_db_db_43=yes
19053 else
19054   echo "configure: failed program was:" >&5
19055   cat conftest.$ac_ext >&5
19056   rm -rf conftest*
19057   ol_cv_db_db_43=no
19058 fi
19059 rm -f conftest*
19060
19061         LIBS="$ol_LIBS"
19062
19063 fi
19064
19065 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19066
19067         if test $ol_cv_db_db_43 = yes ; then
19068                 ol_cv_lib_db=-ldb-43
19069         fi
19070 fi
19071
19072 if test $ol_cv_lib_db = no ; then
19073         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19074 echo "configure:19075: checking for Berkeley DB link (-ldb-4.3)" >&5
19075 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19076   echo $ac_n "(cached) $ac_c" 1>&6
19077 else
19078   
19079         ol_DB_LIB=-ldb-4.3
19080         ol_LIBS=$LIBS
19081         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19082
19083         cat > conftest.$ac_ext <<EOF
19084 #line 19085 "configure"
19085 #include "confdefs.h"
19086
19087 #ifdef HAVE_DB_185_H
19088 # include <db_185.h>
19089 #else
19090 # include <db.h>
19091 #endif
19092
19093 #ifndef DB_VERSION_MAJOR
19094 # define DB_VERSION_MAJOR 1
19095 #endif
19096
19097 #ifndef NULL
19098 #define NULL ((void*)0)
19099 #endif
19100
19101 int main() {
19102
19103 #if DB_VERSION_MAJOR > 1
19104         {
19105                 char *version;
19106                 int major, minor, patch;
19107
19108                 version = db_version( &major, &minor, &patch );
19109
19110                 if( major != DB_VERSION_MAJOR ||
19111                         minor < DB_VERSION_MINOR )
19112                 {
19113                         printf("Berkeley DB version mismatch\n"
19114                                 "\theader: %s\n\tlibrary: %s\n",
19115                                 DB_VERSION_STRING, version);
19116                         return 1;
19117                 }
19118         }
19119 #endif
19120
19121 #if DB_VERSION_MAJOR > 2
19122         db_env_create( NULL, 0 );
19123 #elif DB_VERSION_MAJOR > 1
19124         db_appexit( NULL );
19125 #else
19126         (void) dbopen( NULL, 0, 0, 0, NULL);
19127 #endif
19128
19129 ; return 0; }
19130 EOF
19131 if { (eval echo configure:19132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19132   rm -rf conftest*
19133   ol_cv_db_db_4_dot_3=yes
19134 else
19135   echo "configure: failed program was:" >&5
19136   cat conftest.$ac_ext >&5
19137   rm -rf conftest*
19138   ol_cv_db_db_4_dot_3=no
19139 fi
19140 rm -f conftest*
19141
19142         LIBS="$ol_LIBS"
19143
19144 fi
19145
19146 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19147
19148         if test $ol_cv_db_db_4_dot_3 = yes ; then
19149                 ol_cv_lib_db=-ldb-4.3
19150         fi
19151 fi
19152
19153 if test $ol_cv_lib_db = no ; then
19154         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19155 echo "configure:19156: checking for Berkeley DB link (-ldb-4-3)" >&5
19156 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19157   echo $ac_n "(cached) $ac_c" 1>&6
19158 else
19159   
19160         ol_DB_LIB=-ldb-4-3
19161         ol_LIBS=$LIBS
19162         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19163
19164         cat > conftest.$ac_ext <<EOF
19165 #line 19166 "configure"
19166 #include "confdefs.h"
19167
19168 #ifdef HAVE_DB_185_H
19169 # include <db_185.h>
19170 #else
19171 # include <db.h>
19172 #endif
19173
19174 #ifndef DB_VERSION_MAJOR
19175 # define DB_VERSION_MAJOR 1
19176 #endif
19177
19178 #ifndef NULL
19179 #define NULL ((void*)0)
19180 #endif
19181
19182 int main() {
19183
19184 #if DB_VERSION_MAJOR > 1
19185         {
19186                 char *version;
19187                 int major, minor, patch;
19188
19189                 version = db_version( &major, &minor, &patch );
19190
19191                 if( major != DB_VERSION_MAJOR ||
19192                         minor < DB_VERSION_MINOR )
19193                 {
19194                         printf("Berkeley DB version mismatch\n"
19195                                 "\theader: %s\n\tlibrary: %s\n",
19196                                 DB_VERSION_STRING, version);
19197                         return 1;
19198                 }
19199         }
19200 #endif
19201
19202 #if DB_VERSION_MAJOR > 2
19203         db_env_create( NULL, 0 );
19204 #elif DB_VERSION_MAJOR > 1
19205         db_appexit( NULL );
19206 #else
19207         (void) dbopen( NULL, 0, 0, 0, NULL);
19208 #endif
19209
19210 ; return 0; }
19211 EOF
19212 if { (eval echo configure:19213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19213   rm -rf conftest*
19214   ol_cv_db_db_4_3=yes
19215 else
19216   echo "configure: failed program was:" >&5
19217   cat conftest.$ac_ext >&5
19218   rm -rf conftest*
19219   ol_cv_db_db_4_3=no
19220 fi
19221 rm -f conftest*
19222
19223         LIBS="$ol_LIBS"
19224
19225 fi
19226
19227 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19228
19229         if test $ol_cv_db_db_4_3 = yes ; then
19230                 ol_cv_lib_db=-ldb-4-3
19231         fi
19232 fi
19233
19234 if test $ol_cv_lib_db = no ; then
19235         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19236 echo "configure:19237: checking for Berkeley DB link (-ldb42)" >&5
19237 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19238   echo $ac_n "(cached) $ac_c" 1>&6
19239 else
19240   
19241         ol_DB_LIB=-ldb42
19242         ol_LIBS=$LIBS
19243         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19244
19245         cat > conftest.$ac_ext <<EOF
19246 #line 19247 "configure"
19247 #include "confdefs.h"
19248
19249 #ifdef HAVE_DB_185_H
19250 # include <db_185.h>
19251 #else
19252 # include <db.h>
19253 #endif
19254
19255 #ifndef DB_VERSION_MAJOR
19256 # define DB_VERSION_MAJOR 1
19257 #endif
19258
19259 #ifndef NULL
19260 #define NULL ((void*)0)
19261 #endif
19262
19263 int main() {
19264
19265 #if DB_VERSION_MAJOR > 1
19266         {
19267                 char *version;
19268                 int major, minor, patch;
19269
19270                 version = db_version( &major, &minor, &patch );
19271
19272                 if( major != DB_VERSION_MAJOR ||
19273                         minor < DB_VERSION_MINOR )
19274                 {
19275                         printf("Berkeley DB version mismatch\n"
19276                                 "\theader: %s\n\tlibrary: %s\n",
19277                                 DB_VERSION_STRING, version);
19278                         return 1;
19279                 }
19280         }
19281 #endif
19282
19283 #if DB_VERSION_MAJOR > 2
19284         db_env_create( NULL, 0 );
19285 #elif DB_VERSION_MAJOR > 1
19286         db_appexit( NULL );
19287 #else
19288         (void) dbopen( NULL, 0, 0, 0, NULL);
19289 #endif
19290
19291 ; return 0; }
19292 EOF
19293 if { (eval echo configure:19294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19294   rm -rf conftest*
19295   ol_cv_db_db42=yes
19296 else
19297   echo "configure: failed program was:" >&5
19298   cat conftest.$ac_ext >&5
19299   rm -rf conftest*
19300   ol_cv_db_db42=no
19301 fi
19302 rm -f conftest*
19303
19304         LIBS="$ol_LIBS"
19305
19306 fi
19307
19308 echo "$ac_t""$ol_cv_db_db42" 1>&6
19309
19310         if test $ol_cv_db_db42 = yes ; then
19311                 ol_cv_lib_db=-ldb42
19312         fi
19313 fi
19314
19315 if test $ol_cv_lib_db = no ; then
19316         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19317 echo "configure:19318: checking for Berkeley DB link (-ldb-42)" >&5
19318 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19319   echo $ac_n "(cached) $ac_c" 1>&6
19320 else
19321   
19322         ol_DB_LIB=-ldb-42
19323         ol_LIBS=$LIBS
19324         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19325
19326         cat > conftest.$ac_ext <<EOF
19327 #line 19328 "configure"
19328 #include "confdefs.h"
19329
19330 #ifdef HAVE_DB_185_H
19331 # include <db_185.h>
19332 #else
19333 # include <db.h>
19334 #endif
19335
19336 #ifndef DB_VERSION_MAJOR
19337 # define DB_VERSION_MAJOR 1
19338 #endif
19339
19340 #ifndef NULL
19341 #define NULL ((void*)0)
19342 #endif
19343
19344 int main() {
19345
19346 #if DB_VERSION_MAJOR > 1
19347         {
19348                 char *version;
19349                 int major, minor, patch;
19350
19351                 version = db_version( &major, &minor, &patch );
19352
19353                 if( major != DB_VERSION_MAJOR ||
19354                         minor < DB_VERSION_MINOR )
19355                 {
19356                         printf("Berkeley DB version mismatch\n"
19357                                 "\theader: %s\n\tlibrary: %s\n",
19358                                 DB_VERSION_STRING, version);
19359                         return 1;
19360                 }
19361         }
19362 #endif
19363
19364 #if DB_VERSION_MAJOR > 2
19365         db_env_create( NULL, 0 );
19366 #elif DB_VERSION_MAJOR > 1
19367         db_appexit( NULL );
19368 #else
19369         (void) dbopen( NULL, 0, 0, 0, NULL);
19370 #endif
19371
19372 ; return 0; }
19373 EOF
19374 if { (eval echo configure:19375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19375   rm -rf conftest*
19376   ol_cv_db_db_42=yes
19377 else
19378   echo "configure: failed program was:" >&5
19379   cat conftest.$ac_ext >&5
19380   rm -rf conftest*
19381   ol_cv_db_db_42=no
19382 fi
19383 rm -f conftest*
19384
19385         LIBS="$ol_LIBS"
19386
19387 fi
19388
19389 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19390
19391         if test $ol_cv_db_db_42 = yes ; then
19392                 ol_cv_lib_db=-ldb-42
19393         fi
19394 fi
19395
19396 if test $ol_cv_lib_db = no ; then
19397         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19398 echo "configure:19399: checking for Berkeley DB link (-ldb-4.2)" >&5
19399 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19400   echo $ac_n "(cached) $ac_c" 1>&6
19401 else
19402   
19403         ol_DB_LIB=-ldb-4.2
19404         ol_LIBS=$LIBS
19405         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19406
19407         cat > conftest.$ac_ext <<EOF
19408 #line 19409 "configure"
19409 #include "confdefs.h"
19410
19411 #ifdef HAVE_DB_185_H
19412 # include <db_185.h>
19413 #else
19414 # include <db.h>
19415 #endif
19416
19417 #ifndef DB_VERSION_MAJOR
19418 # define DB_VERSION_MAJOR 1
19419 #endif
19420
19421 #ifndef NULL
19422 #define NULL ((void*)0)
19423 #endif
19424
19425 int main() {
19426
19427 #if DB_VERSION_MAJOR > 1
19428         {
19429                 char *version;
19430                 int major, minor, patch;
19431
19432                 version = db_version( &major, &minor, &patch );
19433
19434                 if( major != DB_VERSION_MAJOR ||
19435                         minor < DB_VERSION_MINOR )
19436                 {
19437                         printf("Berkeley DB version mismatch\n"
19438                                 "\theader: %s\n\tlibrary: %s\n",
19439                                 DB_VERSION_STRING, version);
19440                         return 1;
19441                 }
19442         }
19443 #endif
19444
19445 #if DB_VERSION_MAJOR > 2
19446         db_env_create( NULL, 0 );
19447 #elif DB_VERSION_MAJOR > 1
19448         db_appexit( NULL );
19449 #else
19450         (void) dbopen( NULL, 0, 0, 0, NULL);
19451 #endif
19452
19453 ; return 0; }
19454 EOF
19455 if { (eval echo configure:19456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19456   rm -rf conftest*
19457   ol_cv_db_db_4_dot_2=yes
19458 else
19459   echo "configure: failed program was:" >&5
19460   cat conftest.$ac_ext >&5
19461   rm -rf conftest*
19462   ol_cv_db_db_4_dot_2=no
19463 fi
19464 rm -f conftest*
19465
19466         LIBS="$ol_LIBS"
19467
19468 fi
19469
19470 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19471
19472         if test $ol_cv_db_db_4_dot_2 = yes ; then
19473                 ol_cv_lib_db=-ldb-4.2
19474         fi
19475 fi
19476
19477 if test $ol_cv_lib_db = no ; then
19478         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19479 echo "configure:19480: checking for Berkeley DB link (-ldb-4-2)" >&5
19480 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19481   echo $ac_n "(cached) $ac_c" 1>&6
19482 else
19483   
19484         ol_DB_LIB=-ldb-4-2
19485         ol_LIBS=$LIBS
19486         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19487
19488         cat > conftest.$ac_ext <<EOF
19489 #line 19490 "configure"
19490 #include "confdefs.h"
19491
19492 #ifdef HAVE_DB_185_H
19493 # include <db_185.h>
19494 #else
19495 # include <db.h>
19496 #endif
19497
19498 #ifndef DB_VERSION_MAJOR
19499 # define DB_VERSION_MAJOR 1
19500 #endif
19501
19502 #ifndef NULL
19503 #define NULL ((void*)0)
19504 #endif
19505
19506 int main() {
19507
19508 #if DB_VERSION_MAJOR > 1
19509         {
19510                 char *version;
19511                 int major, minor, patch;
19512
19513                 version = db_version( &major, &minor, &patch );
19514
19515                 if( major != DB_VERSION_MAJOR ||
19516                         minor < DB_VERSION_MINOR )
19517                 {
19518                         printf("Berkeley DB version mismatch\n"
19519                                 "\theader: %s\n\tlibrary: %s\n",
19520                                 DB_VERSION_STRING, version);
19521                         return 1;
19522                 }
19523         }
19524 #endif
19525
19526 #if DB_VERSION_MAJOR > 2
19527         db_env_create( NULL, 0 );
19528 #elif DB_VERSION_MAJOR > 1
19529         db_appexit( NULL );
19530 #else
19531         (void) dbopen( NULL, 0, 0, 0, NULL);
19532 #endif
19533
19534 ; return 0; }
19535 EOF
19536 if { (eval echo configure:19537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19537   rm -rf conftest*
19538   ol_cv_db_db_4_2=yes
19539 else
19540   echo "configure: failed program was:" >&5
19541   cat conftest.$ac_ext >&5
19542   rm -rf conftest*
19543   ol_cv_db_db_4_2=no
19544 fi
19545 rm -f conftest*
19546
19547         LIBS="$ol_LIBS"
19548
19549 fi
19550
19551 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19552
19553         if test $ol_cv_db_db_4_2 = yes ; then
19554                 ol_cv_lib_db=-ldb-4-2
19555         fi
19556 fi
19557
19558 if test $ol_cv_lib_db = no ; then
19559         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19560 echo "configure:19561: checking for Berkeley DB link (-ldb-4)" >&5
19561 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19562   echo $ac_n "(cached) $ac_c" 1>&6
19563 else
19564   
19565         ol_DB_LIB=-ldb-4
19566         ol_LIBS=$LIBS
19567         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19568
19569         cat > conftest.$ac_ext <<EOF
19570 #line 19571 "configure"
19571 #include "confdefs.h"
19572
19573 #ifdef HAVE_DB_185_H
19574 # include <db_185.h>
19575 #else
19576 # include <db.h>
19577 #endif
19578
19579 #ifndef DB_VERSION_MAJOR
19580 # define DB_VERSION_MAJOR 1
19581 #endif
19582
19583 #ifndef NULL
19584 #define NULL ((void*)0)
19585 #endif
19586
19587 int main() {
19588
19589 #if DB_VERSION_MAJOR > 1
19590         {
19591                 char *version;
19592                 int major, minor, patch;
19593
19594                 version = db_version( &major, &minor, &patch );
19595
19596                 if( major != DB_VERSION_MAJOR ||
19597                         minor < DB_VERSION_MINOR )
19598                 {
19599                         printf("Berkeley DB version mismatch\n"
19600                                 "\theader: %s\n\tlibrary: %s\n",
19601                                 DB_VERSION_STRING, version);
19602                         return 1;
19603                 }
19604         }
19605 #endif
19606
19607 #if DB_VERSION_MAJOR > 2
19608         db_env_create( NULL, 0 );
19609 #elif DB_VERSION_MAJOR > 1
19610         db_appexit( NULL );
19611 #else
19612         (void) dbopen( NULL, 0, 0, 0, NULL);
19613 #endif
19614
19615 ; return 0; }
19616 EOF
19617 if { (eval echo configure:19618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19618   rm -rf conftest*
19619   ol_cv_db_db_4=yes
19620 else
19621   echo "configure: failed program was:" >&5
19622   cat conftest.$ac_ext >&5
19623   rm -rf conftest*
19624   ol_cv_db_db_4=no
19625 fi
19626 rm -f conftest*
19627
19628         LIBS="$ol_LIBS"
19629
19630 fi
19631
19632 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19633
19634         if test $ol_cv_db_db_4 = yes ; then
19635                 ol_cv_lib_db=-ldb-4
19636         fi
19637 fi
19638
19639 if test $ol_cv_lib_db = no ; then
19640         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19641 echo "configure:19642: checking for Berkeley DB link (-ldb4)" >&5
19642 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19643   echo $ac_n "(cached) $ac_c" 1>&6
19644 else
19645   
19646         ol_DB_LIB=-ldb4
19647         ol_LIBS=$LIBS
19648         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19649
19650         cat > conftest.$ac_ext <<EOF
19651 #line 19652 "configure"
19652 #include "confdefs.h"
19653
19654 #ifdef HAVE_DB_185_H
19655 # include <db_185.h>
19656 #else
19657 # include <db.h>
19658 #endif
19659
19660 #ifndef DB_VERSION_MAJOR
19661 # define DB_VERSION_MAJOR 1
19662 #endif
19663
19664 #ifndef NULL
19665 #define NULL ((void*)0)
19666 #endif
19667
19668 int main() {
19669
19670 #if DB_VERSION_MAJOR > 1
19671         {
19672                 char *version;
19673                 int major, minor, patch;
19674
19675                 version = db_version( &major, &minor, &patch );
19676
19677                 if( major != DB_VERSION_MAJOR ||
19678                         minor < DB_VERSION_MINOR )
19679                 {
19680                         printf("Berkeley DB version mismatch\n"
19681                                 "\theader: %s\n\tlibrary: %s\n",
19682                                 DB_VERSION_STRING, version);
19683                         return 1;
19684                 }
19685         }
19686 #endif
19687
19688 #if DB_VERSION_MAJOR > 2
19689         db_env_create( NULL, 0 );
19690 #elif DB_VERSION_MAJOR > 1
19691         db_appexit( NULL );
19692 #else
19693         (void) dbopen( NULL, 0, 0, 0, NULL);
19694 #endif
19695
19696 ; return 0; }
19697 EOF
19698 if { (eval echo configure:19699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19699   rm -rf conftest*
19700   ol_cv_db_db4=yes
19701 else
19702   echo "configure: failed program was:" >&5
19703   cat conftest.$ac_ext >&5
19704   rm -rf conftest*
19705   ol_cv_db_db4=no
19706 fi
19707 rm -f conftest*
19708
19709         LIBS="$ol_LIBS"
19710
19711 fi
19712
19713 echo "$ac_t""$ol_cv_db_db4" 1>&6
19714
19715         if test $ol_cv_db_db4 = yes ; then
19716                 ol_cv_lib_db=-ldb4
19717         fi
19718 fi
19719
19720 if test $ol_cv_lib_db = no ; then
19721         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19722 echo "configure:19723: checking for Berkeley DB link (-ldb)" >&5
19723 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19724   echo $ac_n "(cached) $ac_c" 1>&6
19725 else
19726   
19727         ol_DB_LIB=-ldb
19728         ol_LIBS=$LIBS
19729         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19730
19731         cat > conftest.$ac_ext <<EOF
19732 #line 19733 "configure"
19733 #include "confdefs.h"
19734
19735 #ifdef HAVE_DB_185_H
19736 # include <db_185.h>
19737 #else
19738 # include <db.h>
19739 #endif
19740
19741 #ifndef DB_VERSION_MAJOR
19742 # define DB_VERSION_MAJOR 1
19743 #endif
19744
19745 #ifndef NULL
19746 #define NULL ((void*)0)
19747 #endif
19748
19749 int main() {
19750
19751 #if DB_VERSION_MAJOR > 1
19752         {
19753                 char *version;
19754                 int major, minor, patch;
19755
19756                 version = db_version( &major, &minor, &patch );
19757
19758                 if( major != DB_VERSION_MAJOR ||
19759                         minor < DB_VERSION_MINOR )
19760                 {
19761                         printf("Berkeley DB version mismatch\n"
19762                                 "\theader: %s\n\tlibrary: %s\n",
19763                                 DB_VERSION_STRING, version);
19764                         return 1;
19765                 }
19766         }
19767 #endif
19768
19769 #if DB_VERSION_MAJOR > 2
19770         db_env_create( NULL, 0 );
19771 #elif DB_VERSION_MAJOR > 1
19772         db_appexit( NULL );
19773 #else
19774         (void) dbopen( NULL, 0, 0, 0, NULL);
19775 #endif
19776
19777 ; return 0; }
19778 EOF
19779 if { (eval echo configure:19780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19780   rm -rf conftest*
19781   ol_cv_db_db=yes
19782 else
19783   echo "configure: failed program was:" >&5
19784   cat conftest.$ac_ext >&5
19785   rm -rf conftest*
19786   ol_cv_db_db=no
19787 fi
19788 rm -f conftest*
19789
19790         LIBS="$ol_LIBS"
19791
19792 fi
19793
19794 echo "$ac_t""$ol_cv_db_db" 1>&6
19795
19796         if test $ol_cv_db_db = yes ; then
19797                 ol_cv_lib_db=-ldb
19798         fi
19799 fi
19800
19801 if test $ol_cv_lib_db = no ; then
19802         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19803 echo "configure:19804: checking for Berkeley DB link (-ldb41)" >&5
19804 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19805   echo $ac_n "(cached) $ac_c" 1>&6
19806 else
19807   
19808         ol_DB_LIB=-ldb41
19809         ol_LIBS=$LIBS
19810         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19811
19812         cat > conftest.$ac_ext <<EOF
19813 #line 19814 "configure"
19814 #include "confdefs.h"
19815
19816 #ifdef HAVE_DB_185_H
19817 # include <db_185.h>
19818 #else
19819 # include <db.h>
19820 #endif
19821
19822 #ifndef DB_VERSION_MAJOR
19823 # define DB_VERSION_MAJOR 1
19824 #endif
19825
19826 #ifndef NULL
19827 #define NULL ((void*)0)
19828 #endif
19829
19830 int main() {
19831
19832 #if DB_VERSION_MAJOR > 1
19833         {
19834                 char *version;
19835                 int major, minor, patch;
19836
19837                 version = db_version( &major, &minor, &patch );
19838
19839                 if( major != DB_VERSION_MAJOR ||
19840                         minor < DB_VERSION_MINOR )
19841                 {
19842                         printf("Berkeley DB version mismatch\n"
19843                                 "\theader: %s\n\tlibrary: %s\n",
19844                                 DB_VERSION_STRING, version);
19845                         return 1;
19846                 }
19847         }
19848 #endif
19849
19850 #if DB_VERSION_MAJOR > 2
19851         db_env_create( NULL, 0 );
19852 #elif DB_VERSION_MAJOR > 1
19853         db_appexit( NULL );
19854 #else
19855         (void) dbopen( NULL, 0, 0, 0, NULL);
19856 #endif
19857
19858 ; return 0; }
19859 EOF
19860 if { (eval echo configure:19861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19861   rm -rf conftest*
19862   ol_cv_db_db41=yes
19863 else
19864   echo "configure: failed program was:" >&5
19865   cat conftest.$ac_ext >&5
19866   rm -rf conftest*
19867   ol_cv_db_db41=no
19868 fi
19869 rm -f conftest*
19870
19871         LIBS="$ol_LIBS"
19872
19873 fi
19874
19875 echo "$ac_t""$ol_cv_db_db41" 1>&6
19876
19877         if test $ol_cv_db_db41 = yes ; then
19878                 ol_cv_lib_db=-ldb41
19879         fi
19880 fi
19881
19882 if test $ol_cv_lib_db = no ; then
19883         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19884 echo "configure:19885: checking for Berkeley DB link (-ldb-41)" >&5
19885 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19886   echo $ac_n "(cached) $ac_c" 1>&6
19887 else
19888   
19889         ol_DB_LIB=-ldb-41
19890         ol_LIBS=$LIBS
19891         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19892
19893         cat > conftest.$ac_ext <<EOF
19894 #line 19895 "configure"
19895 #include "confdefs.h"
19896
19897 #ifdef HAVE_DB_185_H
19898 # include <db_185.h>
19899 #else
19900 # include <db.h>
19901 #endif
19902
19903 #ifndef DB_VERSION_MAJOR
19904 # define DB_VERSION_MAJOR 1
19905 #endif
19906
19907 #ifndef NULL
19908 #define NULL ((void*)0)
19909 #endif
19910
19911 int main() {
19912
19913 #if DB_VERSION_MAJOR > 1
19914         {
19915                 char *version;
19916                 int major, minor, patch;
19917
19918                 version = db_version( &major, &minor, &patch );
19919
19920                 if( major != DB_VERSION_MAJOR ||
19921                         minor < DB_VERSION_MINOR )
19922                 {
19923                         printf("Berkeley DB version mismatch\n"
19924                                 "\theader: %s\n\tlibrary: %s\n",
19925                                 DB_VERSION_STRING, version);
19926                         return 1;
19927                 }
19928         }
19929 #endif
19930
19931 #if DB_VERSION_MAJOR > 2
19932         db_env_create( NULL, 0 );
19933 #elif DB_VERSION_MAJOR > 1
19934         db_appexit( NULL );
19935 #else
19936         (void) dbopen( NULL, 0, 0, 0, NULL);
19937 #endif
19938
19939 ; return 0; }
19940 EOF
19941 if { (eval echo configure:19942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19942   rm -rf conftest*
19943   ol_cv_db_db_41=yes
19944 else
19945   echo "configure: failed program was:" >&5
19946   cat conftest.$ac_ext >&5
19947   rm -rf conftest*
19948   ol_cv_db_db_41=no
19949 fi
19950 rm -f conftest*
19951
19952         LIBS="$ol_LIBS"
19953
19954 fi
19955
19956 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19957
19958         if test $ol_cv_db_db_41 = yes ; then
19959                 ol_cv_lib_db=-ldb-41
19960         fi
19961 fi
19962
19963 if test $ol_cv_lib_db = no ; then
19964         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19965 echo "configure:19966: checking for Berkeley DB link (-ldb-4.1)" >&5
19966 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19967   echo $ac_n "(cached) $ac_c" 1>&6
19968 else
19969   
19970         ol_DB_LIB=-ldb-4.1
19971         ol_LIBS=$LIBS
19972         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19973
19974         cat > conftest.$ac_ext <<EOF
19975 #line 19976 "configure"
19976 #include "confdefs.h"
19977
19978 #ifdef HAVE_DB_185_H
19979 # include <db_185.h>
19980 #else
19981 # include <db.h>
19982 #endif
19983
19984 #ifndef DB_VERSION_MAJOR
19985 # define DB_VERSION_MAJOR 1
19986 #endif
19987
19988 #ifndef NULL
19989 #define NULL ((void*)0)
19990 #endif
19991
19992 int main() {
19993
19994 #if DB_VERSION_MAJOR > 1
19995         {
19996                 char *version;
19997                 int major, minor, patch;
19998
19999                 version = db_version( &major, &minor, &patch );
20000
20001                 if( major != DB_VERSION_MAJOR ||
20002                         minor < DB_VERSION_MINOR )
20003                 {
20004                         printf("Berkeley DB version mismatch\n"
20005                                 "\theader: %s\n\tlibrary: %s\n",
20006                                 DB_VERSION_STRING, version);
20007                         return 1;
20008                 }
20009         }
20010 #endif
20011
20012 #if DB_VERSION_MAJOR > 2
20013         db_env_create( NULL, 0 );
20014 #elif DB_VERSION_MAJOR > 1
20015         db_appexit( NULL );
20016 #else
20017         (void) dbopen( NULL, 0, 0, 0, NULL);
20018 #endif
20019
20020 ; return 0; }
20021 EOF
20022 if { (eval echo configure:20023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20023   rm -rf conftest*
20024   ol_cv_db_db_4_dot_1=yes
20025 else
20026   echo "configure: failed program was:" >&5
20027   cat conftest.$ac_ext >&5
20028   rm -rf conftest*
20029   ol_cv_db_db_4_dot_1=no
20030 fi
20031 rm -f conftest*
20032
20033         LIBS="$ol_LIBS"
20034
20035 fi
20036
20037 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20038
20039         if test $ol_cv_db_db_4_dot_1 = yes ; then
20040                 ol_cv_lib_db=-ldb-4.1
20041         fi
20042 fi
20043
20044 if test $ol_cv_lib_db = no ; then
20045         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20046 echo "configure:20047: checking for Berkeley DB link (-ldb-4-1)" >&5
20047 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20048   echo $ac_n "(cached) $ac_c" 1>&6
20049 else
20050   
20051         ol_DB_LIB=-ldb-4-1
20052         ol_LIBS=$LIBS
20053         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20054
20055         cat > conftest.$ac_ext <<EOF
20056 #line 20057 "configure"
20057 #include "confdefs.h"
20058
20059 #ifdef HAVE_DB_185_H
20060 # include <db_185.h>
20061 #else
20062 # include <db.h>
20063 #endif
20064
20065 #ifndef DB_VERSION_MAJOR
20066 # define DB_VERSION_MAJOR 1
20067 #endif
20068
20069 #ifndef NULL
20070 #define NULL ((void*)0)
20071 #endif
20072
20073 int main() {
20074
20075 #if DB_VERSION_MAJOR > 1
20076         {
20077                 char *version;
20078                 int major, minor, patch;
20079
20080                 version = db_version( &major, &minor, &patch );
20081
20082                 if( major != DB_VERSION_MAJOR ||
20083                         minor < DB_VERSION_MINOR )
20084                 {
20085                         printf("Berkeley DB version mismatch\n"
20086                                 "\theader: %s\n\tlibrary: %s\n",
20087                                 DB_VERSION_STRING, version);
20088                         return 1;
20089                 }
20090         }
20091 #endif
20092
20093 #if DB_VERSION_MAJOR > 2
20094         db_env_create( NULL, 0 );
20095 #elif DB_VERSION_MAJOR > 1
20096         db_appexit( NULL );
20097 #else
20098         (void) dbopen( NULL, 0, 0, 0, NULL);
20099 #endif
20100
20101 ; return 0; }
20102 EOF
20103 if { (eval echo configure:20104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20104   rm -rf conftest*
20105   ol_cv_db_db_4_1=yes
20106 else
20107   echo "configure: failed program was:" >&5
20108   cat conftest.$ac_ext >&5
20109   rm -rf conftest*
20110   ol_cv_db_db_4_1=no
20111 fi
20112 rm -f conftest*
20113
20114         LIBS="$ol_LIBS"
20115
20116 fi
20117
20118 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20119
20120         if test $ol_cv_db_db_4_1 = yes ; then
20121                 ol_cv_lib_db=-ldb-4-1
20122         fi
20123 fi
20124
20125 if test $ol_cv_lib_db = no ; then
20126         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20127 echo "configure:20128: checking for Berkeley DB link (-ldb3)" >&5
20128 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20129   echo $ac_n "(cached) $ac_c" 1>&6
20130 else
20131   
20132         ol_DB_LIB=-ldb3
20133         ol_LIBS=$LIBS
20134         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20135
20136         cat > conftest.$ac_ext <<EOF
20137 #line 20138 "configure"
20138 #include "confdefs.h"
20139
20140 #ifdef HAVE_DB_185_H
20141 # include <db_185.h>
20142 #else
20143 # include <db.h>
20144 #endif
20145
20146 #ifndef DB_VERSION_MAJOR
20147 # define DB_VERSION_MAJOR 1
20148 #endif
20149
20150 #ifndef NULL
20151 #define NULL ((void*)0)
20152 #endif
20153
20154 int main() {
20155
20156 #if DB_VERSION_MAJOR > 1
20157         {
20158                 char *version;
20159                 int major, minor, patch;
20160
20161                 version = db_version( &major, &minor, &patch );
20162
20163                 if( major != DB_VERSION_MAJOR ||
20164                         minor < DB_VERSION_MINOR )
20165                 {
20166                         printf("Berkeley DB version mismatch\n"
20167                                 "\theader: %s\n\tlibrary: %s\n",
20168                                 DB_VERSION_STRING, version);
20169                         return 1;
20170                 }
20171         }
20172 #endif
20173
20174 #if DB_VERSION_MAJOR > 2
20175         db_env_create( NULL, 0 );
20176 #elif DB_VERSION_MAJOR > 1
20177         db_appexit( NULL );
20178 #else
20179         (void) dbopen( NULL, 0, 0, 0, NULL);
20180 #endif
20181
20182 ; return 0; }
20183 EOF
20184 if { (eval echo configure:20185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20185   rm -rf conftest*
20186   ol_cv_db_db3=yes
20187 else
20188   echo "configure: failed program was:" >&5
20189   cat conftest.$ac_ext >&5
20190   rm -rf conftest*
20191   ol_cv_db_db3=no
20192 fi
20193 rm -f conftest*
20194
20195         LIBS="$ol_LIBS"
20196
20197 fi
20198
20199 echo "$ac_t""$ol_cv_db_db3" 1>&6
20200
20201         if test $ol_cv_db_db3 = yes ; then
20202                 ol_cv_lib_db=-ldb3
20203         fi
20204 fi
20205
20206 if test $ol_cv_lib_db = no ; then
20207         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20208 echo "configure:20209: checking for Berkeley DB link (-ldb-3)" >&5
20209 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20210   echo $ac_n "(cached) $ac_c" 1>&6
20211 else
20212   
20213         ol_DB_LIB=-ldb-3
20214         ol_LIBS=$LIBS
20215         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20216
20217         cat > conftest.$ac_ext <<EOF
20218 #line 20219 "configure"
20219 #include "confdefs.h"
20220
20221 #ifdef HAVE_DB_185_H
20222 # include <db_185.h>
20223 #else
20224 # include <db.h>
20225 #endif
20226
20227 #ifndef DB_VERSION_MAJOR
20228 # define DB_VERSION_MAJOR 1
20229 #endif
20230
20231 #ifndef NULL
20232 #define NULL ((void*)0)
20233 #endif
20234
20235 int main() {
20236
20237 #if DB_VERSION_MAJOR > 1
20238         {
20239                 char *version;
20240                 int major, minor, patch;
20241
20242                 version = db_version( &major, &minor, &patch );
20243
20244                 if( major != DB_VERSION_MAJOR ||
20245                         minor < DB_VERSION_MINOR )
20246                 {
20247                         printf("Berkeley DB version mismatch\n"
20248                                 "\theader: %s\n\tlibrary: %s\n",
20249                                 DB_VERSION_STRING, version);
20250                         return 1;
20251                 }
20252         }
20253 #endif
20254
20255 #if DB_VERSION_MAJOR > 2
20256         db_env_create( NULL, 0 );
20257 #elif DB_VERSION_MAJOR > 1
20258         db_appexit( NULL );
20259 #else
20260         (void) dbopen( NULL, 0, 0, 0, NULL);
20261 #endif
20262
20263 ; return 0; }
20264 EOF
20265 if { (eval echo configure:20266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20266   rm -rf conftest*
20267   ol_cv_db_db_3=yes
20268 else
20269   echo "configure: failed program was:" >&5
20270   cat conftest.$ac_ext >&5
20271   rm -rf conftest*
20272   ol_cv_db_db_3=no
20273 fi
20274 rm -f conftest*
20275
20276         LIBS="$ol_LIBS"
20277
20278 fi
20279
20280 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20281
20282         if test $ol_cv_db_db_3 = yes ; then
20283                 ol_cv_lib_db=-ldb-3
20284         fi
20285 fi
20286
20287 if test $ol_cv_lib_db = no ; then
20288         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20289 echo "configure:20290: checking for Berkeley DB link (-ldb2)" >&5
20290 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20291   echo $ac_n "(cached) $ac_c" 1>&6
20292 else
20293   
20294         ol_DB_LIB=-ldb2
20295         ol_LIBS=$LIBS
20296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20297
20298         cat > conftest.$ac_ext <<EOF
20299 #line 20300 "configure"
20300 #include "confdefs.h"
20301
20302 #ifdef HAVE_DB_185_H
20303 # include <db_185.h>
20304 #else
20305 # include <db.h>
20306 #endif
20307
20308 #ifndef DB_VERSION_MAJOR
20309 # define DB_VERSION_MAJOR 1
20310 #endif
20311
20312 #ifndef NULL
20313 #define NULL ((void*)0)
20314 #endif
20315
20316 int main() {
20317
20318 #if DB_VERSION_MAJOR > 1
20319         {
20320                 char *version;
20321                 int major, minor, patch;
20322
20323                 version = db_version( &major, &minor, &patch );
20324
20325                 if( major != DB_VERSION_MAJOR ||
20326                         minor < DB_VERSION_MINOR )
20327                 {
20328                         printf("Berkeley DB version mismatch\n"
20329                                 "\theader: %s\n\tlibrary: %s\n",
20330                                 DB_VERSION_STRING, version);
20331                         return 1;
20332                 }
20333         }
20334 #endif
20335
20336 #if DB_VERSION_MAJOR > 2
20337         db_env_create( NULL, 0 );
20338 #elif DB_VERSION_MAJOR > 1
20339         db_appexit( NULL );
20340 #else
20341         (void) dbopen( NULL, 0, 0, 0, NULL);
20342 #endif
20343
20344 ; return 0; }
20345 EOF
20346 if { (eval echo configure:20347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20347   rm -rf conftest*
20348   ol_cv_db_db2=yes
20349 else
20350   echo "configure: failed program was:" >&5
20351   cat conftest.$ac_ext >&5
20352   rm -rf conftest*
20353   ol_cv_db_db2=no
20354 fi
20355 rm -f conftest*
20356
20357         LIBS="$ol_LIBS"
20358
20359 fi
20360
20361 echo "$ac_t""$ol_cv_db_db2" 1>&6
20362
20363         if test $ol_cv_db_db2 = yes ; then
20364                 ol_cv_lib_db=-ldb2
20365         fi
20366 fi
20367
20368 if test $ol_cv_lib_db = no ; then
20369         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20370 echo "configure:20371: checking for Berkeley DB link (-ldb-2)" >&5
20371 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20372   echo $ac_n "(cached) $ac_c" 1>&6
20373 else
20374   
20375         ol_DB_LIB=-ldb-2
20376         ol_LIBS=$LIBS
20377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20378
20379         cat > conftest.$ac_ext <<EOF
20380 #line 20381 "configure"
20381 #include "confdefs.h"
20382
20383 #ifdef HAVE_DB_185_H
20384 # include <db_185.h>
20385 #else
20386 # include <db.h>
20387 #endif
20388
20389 #ifndef DB_VERSION_MAJOR
20390 # define DB_VERSION_MAJOR 1
20391 #endif
20392
20393 #ifndef NULL
20394 #define NULL ((void*)0)
20395 #endif
20396
20397 int main() {
20398
20399 #if DB_VERSION_MAJOR > 1
20400         {
20401                 char *version;
20402                 int major, minor, patch;
20403
20404                 version = db_version( &major, &minor, &patch );
20405
20406                 if( major != DB_VERSION_MAJOR ||
20407                         minor < DB_VERSION_MINOR )
20408                 {
20409                         printf("Berkeley DB version mismatch\n"
20410                                 "\theader: %s\n\tlibrary: %s\n",
20411                                 DB_VERSION_STRING, version);
20412                         return 1;
20413                 }
20414         }
20415 #endif
20416
20417 #if DB_VERSION_MAJOR > 2
20418         db_env_create( NULL, 0 );
20419 #elif DB_VERSION_MAJOR > 1
20420         db_appexit( NULL );
20421 #else
20422         (void) dbopen( NULL, 0, 0, 0, NULL);
20423 #endif
20424
20425 ; return 0; }
20426 EOF
20427 if { (eval echo configure:20428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20428   rm -rf conftest*
20429   ol_cv_db_db_2=yes
20430 else
20431   echo "configure: failed program was:" >&5
20432   cat conftest.$ac_ext >&5
20433   rm -rf conftest*
20434   ol_cv_db_db_2=no
20435 fi
20436 rm -f conftest*
20437
20438         LIBS="$ol_LIBS"
20439
20440 fi
20441
20442 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20443
20444         if test $ol_cv_db_db_2 = yes ; then
20445                 ol_cv_lib_db=-ldb-2
20446         fi
20447 fi
20448
20449 if test $ol_cv_lib_db = no ; then
20450         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20451 echo "configure:20452: checking for Berkeley DB link (-ldb1)" >&5
20452 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20453   echo $ac_n "(cached) $ac_c" 1>&6
20454 else
20455   
20456         ol_DB_LIB=-ldb1
20457         ol_LIBS=$LIBS
20458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20459
20460         cat > conftest.$ac_ext <<EOF
20461 #line 20462 "configure"
20462 #include "confdefs.h"
20463
20464 #ifdef HAVE_DB_185_H
20465 # include <db_185.h>
20466 #else
20467 # include <db.h>
20468 #endif
20469
20470 #ifndef DB_VERSION_MAJOR
20471 # define DB_VERSION_MAJOR 1
20472 #endif
20473
20474 #ifndef NULL
20475 #define NULL ((void*)0)
20476 #endif
20477
20478 int main() {
20479
20480 #if DB_VERSION_MAJOR > 1
20481         {
20482                 char *version;
20483                 int major, minor, patch;
20484
20485                 version = db_version( &major, &minor, &patch );
20486
20487                 if( major != DB_VERSION_MAJOR ||
20488                         minor < DB_VERSION_MINOR )
20489                 {
20490                         printf("Berkeley DB version mismatch\n"
20491                                 "\theader: %s\n\tlibrary: %s\n",
20492                                 DB_VERSION_STRING, version);
20493                         return 1;
20494                 }
20495         }
20496 #endif
20497
20498 #if DB_VERSION_MAJOR > 2
20499         db_env_create( NULL, 0 );
20500 #elif DB_VERSION_MAJOR > 1
20501         db_appexit( NULL );
20502 #else
20503         (void) dbopen( NULL, 0, 0, 0, NULL);
20504 #endif
20505
20506 ; return 0; }
20507 EOF
20508 if { (eval echo configure:20509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20509   rm -rf conftest*
20510   ol_cv_db_db1=yes
20511 else
20512   echo "configure: failed program was:" >&5
20513   cat conftest.$ac_ext >&5
20514   rm -rf conftest*
20515   ol_cv_db_db1=no
20516 fi
20517 rm -f conftest*
20518
20519         LIBS="$ol_LIBS"
20520
20521 fi
20522
20523 echo "$ac_t""$ol_cv_db_db1" 1>&6
20524
20525         if test $ol_cv_db_db1 = yes ; then
20526                 ol_cv_lib_db=-ldb1
20527         fi
20528 fi
20529
20530 if test $ol_cv_lib_db = no ; then
20531         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20532 echo "configure:20533: checking for Berkeley DB link (-ldb-1)" >&5
20533 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20534   echo $ac_n "(cached) $ac_c" 1>&6
20535 else
20536   
20537         ol_DB_LIB=-ldb-1
20538         ol_LIBS=$LIBS
20539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20540
20541         cat > conftest.$ac_ext <<EOF
20542 #line 20543 "configure"
20543 #include "confdefs.h"
20544
20545 #ifdef HAVE_DB_185_H
20546 # include <db_185.h>
20547 #else
20548 # include <db.h>
20549 #endif
20550
20551 #ifndef DB_VERSION_MAJOR
20552 # define DB_VERSION_MAJOR 1
20553 #endif
20554
20555 #ifndef NULL
20556 #define NULL ((void*)0)
20557 #endif
20558
20559 int main() {
20560
20561 #if DB_VERSION_MAJOR > 1
20562         {
20563                 char *version;
20564                 int major, minor, patch;
20565
20566                 version = db_version( &major, &minor, &patch );
20567
20568                 if( major != DB_VERSION_MAJOR ||
20569                         minor < DB_VERSION_MINOR )
20570                 {
20571                         printf("Berkeley DB version mismatch\n"
20572                                 "\theader: %s\n\tlibrary: %s\n",
20573                                 DB_VERSION_STRING, version);
20574                         return 1;
20575                 }
20576         }
20577 #endif
20578
20579 #if DB_VERSION_MAJOR > 2
20580         db_env_create( NULL, 0 );
20581 #elif DB_VERSION_MAJOR > 1
20582         db_appexit( NULL );
20583 #else
20584         (void) dbopen( NULL, 0, 0, 0, NULL);
20585 #endif
20586
20587 ; return 0; }
20588 EOF
20589 if { (eval echo configure:20590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20590   rm -rf conftest*
20591   ol_cv_db_db_1=yes
20592 else
20593   echo "configure: failed program was:" >&5
20594   cat conftest.$ac_ext >&5
20595   rm -rf conftest*
20596   ol_cv_db_db_1=no
20597 fi
20598 rm -f conftest*
20599
20600         LIBS="$ol_LIBS"
20601
20602 fi
20603
20604 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20605
20606         if test $ol_cv_db_db_1 = yes ; then
20607                 ol_cv_lib_db=-ldb-1
20608         fi
20609 fi
20610
20611
20612         if test "$ol_cv_lib_db" != no ; then
20613                 ol_cv_berkeley_db=yes
20614                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20615 echo "configure:20616: checking for Berkeley DB version match" >&5
20616 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20617   echo $ac_n "(cached) $ac_c" 1>&6
20618 else
20619   
20620         ol_LIBS="$LIBS"
20621         LIBS="$LTHREAD_LIBS $LIBS"
20622         if test $ol_cv_lib_db != yes ; then
20623                 LIBS="$ol_cv_lib_db $LIBS"
20624         fi
20625
20626         if test "$cross_compiling" = yes; then
20627   ol_cv_berkeley_db_version=cross
20628 else
20629   cat > conftest.$ac_ext <<EOF
20630 #line 20631 "configure"
20631 #include "confdefs.h"
20632
20633 #ifdef HAVE_DB_185_H
20634         choke me;
20635 #else
20636 #include <db.h>
20637 #endif
20638 #ifndef DB_VERSION_MAJOR
20639 # define DB_VERSION_MAJOR 1
20640 #endif
20641 #ifndef NULL
20642 #define NULL ((void *)0)
20643 #endif
20644 main()
20645 {
20646 #if DB_VERSION_MAJOR > 1
20647         char *version;
20648         int major, minor, patch;
20649
20650         version = db_version( &major, &minor, &patch );
20651
20652         if( major != DB_VERSION_MAJOR ||
20653                 minor != DB_VERSION_MINOR ||
20654                 patch != DB_VERSION_PATCH )
20655         {
20656                 printf("Berkeley DB version mismatch\n"
20657                         "\theader: %s\n\tlibrary: %s\n",
20658                         DB_VERSION_STRING, version);
20659                 return 1;
20660         }
20661 #endif
20662
20663         return 0;
20664 }
20665 EOF
20666 if { (eval echo configure:20667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20667 then
20668   ol_cv_berkeley_db_version=yes
20669 else
20670   echo "configure: failed program was:" >&5
20671   cat conftest.$ac_ext >&5
20672   rm -fr conftest*
20673   ol_cv_berkeley_db_version=no
20674 fi
20675 rm -fr conftest*
20676 fi
20677
20678
20679         LIBS="$ol_LIBS"
20680
20681 fi
20682
20683 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20684
20685         if test $ol_cv_berkeley_db_version = no ; then
20686                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20687         fi
20688
20689                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20690 echo "configure:20691: checking for Berkeley DB thread support" >&5
20691 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20692   echo $ac_n "(cached) $ac_c" 1>&6
20693 else
20694   
20695         ol_LIBS="$LIBS"
20696         LIBS="$LTHREAD_LIBS $LIBS"
20697         if test $ol_cv_lib_db != yes ; then
20698                 LIBS="$ol_cv_lib_db $LIBS"
20699         fi
20700
20701         if test "$cross_compiling" = yes; then
20702   ol_cv_berkeley_db_thread=cross
20703 else
20704   cat > conftest.$ac_ext <<EOF
20705 #line 20706 "configure"
20706 #include "confdefs.h"
20707
20708 #ifdef HAVE_DB_185_H
20709         choke me;
20710 #else
20711 #include <db.h>
20712 #endif
20713 #ifndef NULL
20714 #define NULL ((void *)0)
20715 #endif
20716 main()
20717 {
20718         int rc;
20719         u_int32_t flags = DB_CREATE |
20720 #ifdef DB_PRIVATE
20721                 DB_PRIVATE |
20722 #endif
20723                 DB_THREAD;
20724
20725 #if DB_VERSION_MAJOR > 2
20726         DB_ENV *env = NULL;
20727
20728         rc = db_env_create( &env, 0 );
20729
20730         flags |= DB_INIT_MPOOL;
20731 #ifdef DB_MPOOL_PRIVATE
20732         flags |= DB_MPOOL_PRIVATE;
20733 #endif
20734
20735         if( rc ) {
20736                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20737                 return rc;
20738         }
20739
20740 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20741         rc = env->open( env, NULL, flags, 0 );
20742 #else
20743         rc = env->open( env, NULL, NULL, flags, 0 );
20744 #endif
20745
20746         if ( rc == 0 ) {
20747                 rc = env->close( env, 0 );
20748         }
20749
20750         if( rc ) {
20751                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20752                 return rc;
20753         }
20754
20755 #else
20756         DB_ENV env;
20757         memset( &env, '\0', sizeof(env) );
20758
20759         rc = db_appinit( NULL, NULL, &env, flags );
20760
20761         if( rc == 0 ) {
20762                 db_appexit( &env );
20763         }
20764
20765         unlink("__db_mpool.share");
20766         unlink("__db_lock.share");
20767 #endif
20768
20769         return rc;
20770 }
20771 EOF
20772 if { (eval echo configure:20773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20773 then
20774   ol_cv_berkeley_db_thread=yes
20775 else
20776   echo "configure: failed program was:" >&5
20777   cat conftest.$ac_ext >&5
20778   rm -fr conftest*
20779   ol_cv_berkeley_db_thread=no
20780 fi
20781 rm -fr conftest*
20782 fi
20783
20784
20785         LIBS="$ol_LIBS"
20786
20787 fi
20788
20789 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20790
20791         if test $ol_cv_berkeley_db_thread != no ; then
20792                 cat >> confdefs.h <<\EOF
20793 #define HAVE_BERKELEY_DB_THREAD 1
20794 EOF
20795
20796         fi
20797
20798         fi
20799 fi
20800
20801         fi
20802
20803         if test $ol_cv_berkeley_db != no ; then
20804                 cat >> confdefs.h <<\EOF
20805 #define HAVE_BERKELEY_DB 1
20806 EOF
20807
20808
20809                 ol_link_ldbm=berkeley
20810                 ol_with_ldbm_api=berkeley
20811
20812                 if test $ol_with_ldbm_type = hash ; then
20813                         cat >> confdefs.h <<\EOF
20814 #define LDBM_USE_DBHASH 1
20815 EOF
20816
20817                 else
20818                         cat >> confdefs.h <<\EOF
20819 #define LDBM_USE_DBBTREE 1
20820 EOF
20821
20822                 fi
20823
20824                                                 if test $ol_cv_lib_db != yes ; then
20825                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20826                 fi
20827         fi
20828 fi
20829
20830 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20831         if test $ol_link_ldbm != berkeley ; then
20832                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20833         else
20834                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20835 echo "configure:20836: checking Berkeley DB version for BDB backend" >&5
20836 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20837   echo $ac_n "(cached) $ac_c" 1>&6
20838 else
20839   
20840         cat > conftest.$ac_ext <<EOF
20841 #line 20842 "configure"
20842 #include "confdefs.h"
20843
20844 #include <db.h>
20845
20846  /* this check could be improved */
20847 #ifndef DB_VERSION_MAJOR
20848 #       define DB_VERSION_MAJOR 1
20849 #endif
20850 #ifndef DB_VERSION_MINOR
20851 #       define DB_VERSION_MINOR 0
20852 #endif
20853
20854 /* require 4.2 or later */
20855 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20856         __db_version_compat
20857 #endif
20858         
20859 EOF
20860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20861   egrep "__db_version_compat" >/dev/null 2>&1; then
20862   rm -rf conftest*
20863   ol_cv_bdb_compat=yes
20864 else
20865   rm -rf conftest*
20866   ol_cv_bdb_compat=no
20867 fi
20868 rm -f conftest*
20869
20870 fi
20871
20872 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20873
20874
20875                 if test $ol_cv_bdb_compat != yes ; then
20876                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20877                 fi
20878         fi
20879 fi
20880
20881 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20882         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20883         ol_with_ldbm_api=none
20884 fi
20885
20886 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20887         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20888 echo "configure:20889: checking for MDBM library" >&5
20889 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20890   echo $ac_n "(cached) $ac_c" 1>&6
20891 else
20892         ol_LIBS="$LIBS"
20893         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20894 echo "configure:20895: checking for mdbm_set_chain" >&5
20895 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20896   echo $ac_n "(cached) $ac_c" 1>&6
20897 else
20898   cat > conftest.$ac_ext <<EOF
20899 #line 20900 "configure"
20900 #include "confdefs.h"
20901 /* System header to define __stub macros and hopefully few prototypes,
20902     which can conflict with char mdbm_set_chain(); below.  */
20903 #include <assert.h>
20904 /* Override any gcc2 internal prototype to avoid an error.  */
20905 /* We use char because int might match the return type of a gcc2
20906     builtin and then its argument prototype would still apply.  */
20907 char mdbm_set_chain();
20908 char (*f)();
20909
20910 int main() {
20911
20912 /* The GNU C library defines this for functions which it implements
20913     to always fail with ENOSYS.  Some functions are actually named
20914     something starting with __ and the normal name is an alias.  */
20915 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20916 choke me
20917 #else
20918 f = mdbm_set_chain;
20919 #endif
20920
20921 ; return 0; }
20922 EOF
20923 if { (eval echo configure:20924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20924   rm -rf conftest*
20925   eval "ac_cv_func_mdbm_set_chain=yes"
20926 else
20927   echo "configure: failed program was:" >&5
20928   cat conftest.$ac_ext >&5
20929   rm -rf conftest*
20930   eval "ac_cv_func_mdbm_set_chain=no"
20931 fi
20932 rm -f conftest*
20933 fi
20934
20935 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20936   echo "$ac_t""yes" 1>&6
20937   ol_cv_lib_mdbm=yes
20938 else
20939   echo "$ac_t""no" 1>&6
20940
20941                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20942 echo "configure:20943: checking for mdbm_set_chain in -lmdbm" >&5
20943 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20945   echo $ac_n "(cached) $ac_c" 1>&6
20946 else
20947   ac_save_LIBS="$LIBS"
20948 LIBS="-lmdbm  $LIBS"
20949 cat > conftest.$ac_ext <<EOF
20950 #line 20951 "configure"
20951 #include "confdefs.h"
20952 /* Override any gcc2 internal prototype to avoid an error.  */
20953 /* We use char because int might match the return type of a gcc2
20954     builtin and then its argument prototype would still apply.  */
20955 char mdbm_set_chain();
20956
20957 int main() {
20958 mdbm_set_chain()
20959 ; return 0; }
20960 EOF
20961 if { (eval echo configure:20962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20962   rm -rf conftest*
20963   eval "ac_cv_lib_$ac_lib_var=yes"
20964 else
20965   echo "configure: failed program was:" >&5
20966   cat conftest.$ac_ext >&5
20967   rm -rf conftest*
20968   eval "ac_cv_lib_$ac_lib_var=no"
20969 fi
20970 rm -f conftest*
20971 LIBS="$ac_save_LIBS"
20972
20973 fi
20974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20975   echo "$ac_t""yes" 1>&6
20976   ol_cv_lib_mdbm=-lmdbm
20977 else
20978   echo "$ac_t""no" 1>&6
20979 ol_cv_lib_mdbm=no
20980 fi
20981
20982         
20983 fi
20984
20985         LIBS="$ol_LIBS"
20986
20987 fi
20988
20989 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20990
20991
20992  for ac_hdr in mdbm.h
20993 do
20994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20996 echo "configure:20997: checking for $ac_hdr" >&5
20997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20998   echo $ac_n "(cached) $ac_c" 1>&6
20999 else
21000   cat > conftest.$ac_ext <<EOF
21001 #line 21002 "configure"
21002 #include "confdefs.h"
21003 #include <$ac_hdr>
21004 EOF
21005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21006 { (eval echo configure:21007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21008 if test -z "$ac_err"; then
21009   rm -rf conftest*
21010   eval "ac_cv_header_$ac_safe=yes"
21011 else
21012   echo "$ac_err" >&5
21013   echo "configure: failed program was:" >&5
21014   cat conftest.$ac_ext >&5
21015   rm -rf conftest*
21016   eval "ac_cv_header_$ac_safe=no"
21017 fi
21018 rm -f conftest*
21019 fi
21020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21021   echo "$ac_t""yes" 1>&6
21022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21023   cat >> confdefs.h <<EOF
21024 #define $ac_tr_hdr 1
21025 EOF
21026  
21027 else
21028   echo "$ac_t""no" 1>&6
21029 fi
21030 done
21031
21032  echo $ac_n "checking for db""... $ac_c" 1>&6
21033 echo "configure:21034: checking for db" >&5
21034 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21035   echo $ac_n "(cached) $ac_c" 1>&6
21036 else
21037   
21038         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21039                 ol_cv_mdbm=no
21040         else
21041                 ol_cv_mdbm=yes
21042         fi
21043
21044 fi
21045
21046 echo "$ac_t""$ol_cv_mdbm" 1>&6
21047  if test $ol_cv_mdbm = yes ; then
21048         cat >> confdefs.h <<\EOF
21049 #define HAVE_MDBM 1
21050 EOF
21051
21052  fi
21053
21054
21055         if test $ol_cv_mdbm = yes ; then
21056                 ol_link_ldbm=mdbm
21057                 ol_with_ldbm_api=mdbm
21058                 if test $ol_cv_lib_mdbm != yes ; then
21059                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21060                 fi
21061         fi
21062 fi
21063
21064 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21065         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21066 echo "configure:21067: checking for GDBM library" >&5
21067 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21068   echo $ac_n "(cached) $ac_c" 1>&6
21069 else
21070         ol_LIBS="$LIBS"
21071         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21072 echo "configure:21073: checking for gdbm_open" >&5
21073 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21074   echo $ac_n "(cached) $ac_c" 1>&6
21075 else
21076   cat > conftest.$ac_ext <<EOF
21077 #line 21078 "configure"
21078 #include "confdefs.h"
21079 /* System header to define __stub macros and hopefully few prototypes,
21080     which can conflict with char gdbm_open(); below.  */
21081 #include <assert.h>
21082 /* Override any gcc2 internal prototype to avoid an error.  */
21083 /* We use char because int might match the return type of a gcc2
21084     builtin and then its argument prototype would still apply.  */
21085 char gdbm_open();
21086 char (*f)();
21087
21088 int main() {
21089
21090 /* The GNU C library defines this for functions which it implements
21091     to always fail with ENOSYS.  Some functions are actually named
21092     something starting with __ and the normal name is an alias.  */
21093 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21094 choke me
21095 #else
21096 f = gdbm_open;
21097 #endif
21098
21099 ; return 0; }
21100 EOF
21101 if { (eval echo configure:21102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21102   rm -rf conftest*
21103   eval "ac_cv_func_gdbm_open=yes"
21104 else
21105   echo "configure: failed program was:" >&5
21106   cat conftest.$ac_ext >&5
21107   rm -rf conftest*
21108   eval "ac_cv_func_gdbm_open=no"
21109 fi
21110 rm -f conftest*
21111 fi
21112
21113 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21114   echo "$ac_t""yes" 1>&6
21115   ol_cv_lib_gdbm=yes
21116 else
21117   echo "$ac_t""no" 1>&6
21118
21119                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21120 echo "configure:21121: checking for gdbm_open in -lgdbm" >&5
21121 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21123   echo $ac_n "(cached) $ac_c" 1>&6
21124 else
21125   ac_save_LIBS="$LIBS"
21126 LIBS="-lgdbm  $LIBS"
21127 cat > conftest.$ac_ext <<EOF
21128 #line 21129 "configure"
21129 #include "confdefs.h"
21130 /* Override any gcc2 internal prototype to avoid an error.  */
21131 /* We use char because int might match the return type of a gcc2
21132     builtin and then its argument prototype would still apply.  */
21133 char gdbm_open();
21134
21135 int main() {
21136 gdbm_open()
21137 ; return 0; }
21138 EOF
21139 if { (eval echo configure:21140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21140   rm -rf conftest*
21141   eval "ac_cv_lib_$ac_lib_var=yes"
21142 else
21143   echo "configure: failed program was:" >&5
21144   cat conftest.$ac_ext >&5
21145   rm -rf conftest*
21146   eval "ac_cv_lib_$ac_lib_var=no"
21147 fi
21148 rm -f conftest*
21149 LIBS="$ac_save_LIBS"
21150
21151 fi
21152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21153   echo "$ac_t""yes" 1>&6
21154   ol_cv_lib_gdbm=-lgdbm
21155 else
21156   echo "$ac_t""no" 1>&6
21157 ol_cv_lib_gdbm=no
21158 fi
21159
21160         
21161 fi
21162
21163         LIBS="$ol_LIBS"
21164
21165 fi
21166
21167 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21168
21169
21170  for ac_hdr in gdbm.h
21171 do
21172 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21173 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21174 echo "configure:21175: checking for $ac_hdr" >&5
21175 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21176   echo $ac_n "(cached) $ac_c" 1>&6
21177 else
21178   cat > conftest.$ac_ext <<EOF
21179 #line 21180 "configure"
21180 #include "confdefs.h"
21181 #include <$ac_hdr>
21182 EOF
21183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21184 { (eval echo configure:21185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21186 if test -z "$ac_err"; then
21187   rm -rf conftest*
21188   eval "ac_cv_header_$ac_safe=yes"
21189 else
21190   echo "$ac_err" >&5
21191   echo "configure: failed program was:" >&5
21192   cat conftest.$ac_ext >&5
21193   rm -rf conftest*
21194   eval "ac_cv_header_$ac_safe=no"
21195 fi
21196 rm -f conftest*
21197 fi
21198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21199   echo "$ac_t""yes" 1>&6
21200     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21201   cat >> confdefs.h <<EOF
21202 #define $ac_tr_hdr 1
21203 EOF
21204  
21205 else
21206   echo "$ac_t""no" 1>&6
21207 fi
21208 done
21209
21210  echo $ac_n "checking for db""... $ac_c" 1>&6
21211 echo "configure:21212: checking for db" >&5
21212 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21213   echo $ac_n "(cached) $ac_c" 1>&6
21214 else
21215   
21216         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21217                 ol_cv_gdbm=no
21218         else
21219                 ol_cv_gdbm=yes
21220         fi
21221
21222 fi
21223
21224 echo "$ac_t""$ol_cv_gdbm" 1>&6
21225  if test $ol_cv_gdbm = yes ; then
21226         cat >> confdefs.h <<\EOF
21227 #define HAVE_GDBM 1
21228 EOF
21229
21230  fi
21231
21232
21233         if test $ol_cv_gdbm = yes ; then
21234                 ol_link_ldbm=gdbm
21235                 ol_with_ldbm_api=gdbm
21236
21237                 if test $ol_cv_lib_gdbm != yes ; then
21238                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21239                 fi
21240         fi
21241 fi
21242
21243 if test $ol_with_ldbm_api = ndbm ; then
21244         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21245 echo "configure:21246: checking for NDBM library" >&5
21246 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21247   echo $ac_n "(cached) $ac_c" 1>&6
21248 else
21249         ol_LIBS="$LIBS"
21250         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21251 echo "configure:21252: checking for dbm_open" >&5
21252 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21253   echo $ac_n "(cached) $ac_c" 1>&6
21254 else
21255   cat > conftest.$ac_ext <<EOF
21256 #line 21257 "configure"
21257 #include "confdefs.h"
21258 /* System header to define __stub macros and hopefully few prototypes,
21259     which can conflict with char dbm_open(); below.  */
21260 #include <assert.h>
21261 /* Override any gcc2 internal prototype to avoid an error.  */
21262 /* We use char because int might match the return type of a gcc2
21263     builtin and then its argument prototype would still apply.  */
21264 char dbm_open();
21265 char (*f)();
21266
21267 int main() {
21268
21269 /* The GNU C library defines this for functions which it implements
21270     to always fail with ENOSYS.  Some functions are actually named
21271     something starting with __ and the normal name is an alias.  */
21272 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21273 choke me
21274 #else
21275 f = dbm_open;
21276 #endif
21277
21278 ; return 0; }
21279 EOF
21280 if { (eval echo configure:21281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21281   rm -rf conftest*
21282   eval "ac_cv_func_dbm_open=yes"
21283 else
21284   echo "configure: failed program was:" >&5
21285   cat conftest.$ac_ext >&5
21286   rm -rf conftest*
21287   eval "ac_cv_func_dbm_open=no"
21288 fi
21289 rm -f conftest*
21290 fi
21291
21292 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21293   echo "$ac_t""yes" 1>&6
21294   ol_cv_lib_ndbm=yes
21295 else
21296   echo "$ac_t""no" 1>&6
21297
21298                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21299 echo "configure:21300: checking for dbm_open in -lndbm" >&5
21300 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21301 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21302   echo $ac_n "(cached) $ac_c" 1>&6
21303 else
21304   ac_save_LIBS="$LIBS"
21305 LIBS="-lndbm  $LIBS"
21306 cat > conftest.$ac_ext <<EOF
21307 #line 21308 "configure"
21308 #include "confdefs.h"
21309 /* Override any gcc2 internal prototype to avoid an error.  */
21310 /* We use char because int might match the return type of a gcc2
21311     builtin and then its argument prototype would still apply.  */
21312 char dbm_open();
21313
21314 int main() {
21315 dbm_open()
21316 ; return 0; }
21317 EOF
21318 if { (eval echo configure:21319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21319   rm -rf conftest*
21320   eval "ac_cv_lib_$ac_lib_var=yes"
21321 else
21322   echo "configure: failed program was:" >&5
21323   cat conftest.$ac_ext >&5
21324   rm -rf conftest*
21325   eval "ac_cv_lib_$ac_lib_var=no"
21326 fi
21327 rm -f conftest*
21328 LIBS="$ac_save_LIBS"
21329
21330 fi
21331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21332   echo "$ac_t""yes" 1>&6
21333   ol_cv_lib_ndbm=-lndbm
21334 else
21335   echo "$ac_t""no" 1>&6
21336
21337                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21338 echo "configure:21339: checking for dbm_open in -ldbm" >&5
21339 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21341   echo $ac_n "(cached) $ac_c" 1>&6
21342 else
21343   ac_save_LIBS="$LIBS"
21344 LIBS="-ldbm  $LIBS"
21345 cat > conftest.$ac_ext <<EOF
21346 #line 21347 "configure"
21347 #include "confdefs.h"
21348 /* Override any gcc2 internal prototype to avoid an error.  */
21349 /* We use char because int might match the return type of a gcc2
21350     builtin and then its argument prototype would still apply.  */
21351 char dbm_open();
21352
21353 int main() {
21354 dbm_open()
21355 ; return 0; }
21356 EOF
21357 if { (eval echo configure:21358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21358   rm -rf conftest*
21359   eval "ac_cv_lib_$ac_lib_var=yes"
21360 else
21361   echo "configure: failed program was:" >&5
21362   cat conftest.$ac_ext >&5
21363   rm -rf conftest*
21364   eval "ac_cv_lib_$ac_lib_var=no"
21365 fi
21366 rm -f conftest*
21367 LIBS="$ac_save_LIBS"
21368
21369 fi
21370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21371   echo "$ac_t""yes" 1>&6
21372   ol_cv_lib_ndbm=-ldbm
21373 else
21374   echo "$ac_t""no" 1>&6
21375 ol_cv_lib_ndbm=no
21376 fi
21377                 
21378 fi
21379
21380         
21381 fi
21382
21383         LIBS="$ol_LIBS"
21384
21385 fi
21386
21387 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21388
21389
21390  for ac_hdr in ndbm.h
21391 do
21392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21394 echo "configure:21395: checking for $ac_hdr" >&5
21395 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21396   echo $ac_n "(cached) $ac_c" 1>&6
21397 else
21398   cat > conftest.$ac_ext <<EOF
21399 #line 21400 "configure"
21400 #include "confdefs.h"
21401 #include <$ac_hdr>
21402 EOF
21403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21404 { (eval echo configure:21405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21406 if test -z "$ac_err"; then
21407   rm -rf conftest*
21408   eval "ac_cv_header_$ac_safe=yes"
21409 else
21410   echo "$ac_err" >&5
21411   echo "configure: failed program was:" >&5
21412   cat conftest.$ac_ext >&5
21413   rm -rf conftest*
21414   eval "ac_cv_header_$ac_safe=no"
21415 fi
21416 rm -f conftest*
21417 fi
21418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21419   echo "$ac_t""yes" 1>&6
21420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21421   cat >> confdefs.h <<EOF
21422 #define $ac_tr_hdr 1
21423 EOF
21424  
21425 else
21426   echo "$ac_t""no" 1>&6
21427 fi
21428 done
21429
21430  echo $ac_n "checking for db""... $ac_c" 1>&6
21431 echo "configure:21432: checking for db" >&5
21432 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21433   echo $ac_n "(cached) $ac_c" 1>&6
21434 else
21435   
21436         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21437                 ol_cv_ndbm=no
21438         else
21439                 ol_cv_ndbm=yes
21440         fi
21441
21442 fi
21443
21444 echo "$ac_t""$ol_cv_ndbm" 1>&6
21445  if test $ol_cv_ndbm = yes ; then
21446         cat >> confdefs.h <<\EOF
21447 #define HAVE_NDBM 1
21448 EOF
21449
21450  fi
21451
21452
21453         if test $ol_cv_ndbm = yes ; then
21454                 ol_link_ldbm=ndbm
21455                 ol_with_ldbm_api=ndbm
21456
21457                 if test $ol_cv_lib_ndbm != yes ; then
21458                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21459                 fi
21460         fi
21461 fi
21462
21463 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21464         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21465 fi
21466
21467 if test $ol_enable_bdb = yes -o \
21468         $ol_enable_hdb = yes -o \
21469         $ol_enable_ldbm = yes ; then
21470         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21471 fi
21472
21473
21474 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21475         BUILD_LIBS_DYNAMIC=shared
21476         cat >> confdefs.h <<\EOF
21477 #define LDAP_LIBS_DYNAMIC 1
21478 EOF
21479
21480         LTSTATIC=""
21481 else
21482         BUILD_LIBS_DYNAMIC=static
21483         LTSTATIC="-static"
21484 fi
21485
21486 if test $ol_enable_wrappers != no ; then
21487         for ac_hdr in tcpd.h
21488 do
21489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21491 echo "configure:21492: checking for $ac_hdr" >&5
21492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21493   echo $ac_n "(cached) $ac_c" 1>&6
21494 else
21495   cat > conftest.$ac_ext <<EOF
21496 #line 21497 "configure"
21497 #include "confdefs.h"
21498 #include <$ac_hdr>
21499 EOF
21500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21501 { (eval echo configure:21502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21503 if test -z "$ac_err"; then
21504   rm -rf conftest*
21505   eval "ac_cv_header_$ac_safe=yes"
21506 else
21507   echo "$ac_err" >&5
21508   echo "configure: failed program was:" >&5
21509   cat conftest.$ac_ext >&5
21510   rm -rf conftest*
21511   eval "ac_cv_header_$ac_safe=no"
21512 fi
21513 rm -f conftest*
21514 fi
21515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21516   echo "$ac_t""yes" 1>&6
21517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21518   cat >> confdefs.h <<EOF
21519 #define $ac_tr_hdr 1
21520 EOF
21521  
21522                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21523 echo "configure:21524: checking for TCP wrappers library" >&5
21524                 save_LIBS="$LIBS"
21525                 LIBS="$LIBS -lwrap"
21526                 cat > conftest.$ac_ext <<EOF
21527 #line 21528 "configure"
21528 #include "confdefs.h"
21529
21530 #include <tcpd.h>
21531 int allow_severity = 0;
21532 int deny_severity  = 0;
21533
21534 struct request_info *req;
21535                 
21536 int main() {
21537
21538 hosts_access(req)
21539                 
21540 ; return 0; }
21541 EOF
21542 if { (eval echo configure:21543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21543   rm -rf conftest*
21544   echo "$ac_t""-lwrap" 1>&6
21545                 have_wrappers=yes
21546                 LIBS="$save_LIBS"
21547 else
21548   echo "configure: failed program was:" >&5
21549   cat conftest.$ac_ext >&5
21550   rm -rf conftest*
21551   
21552                                 LIBS="$LIBS -lnsl"
21553                 cat > conftest.$ac_ext <<EOF
21554 #line 21555 "configure"
21555 #include "confdefs.h"
21556
21557 #include <tcpd.h>
21558 int allow_severity = 0;
21559 int deny_severity  = 0;
21560
21561 struct request_info *req;
21562                 
21563 int main() {
21564
21565 hosts_access(req)
21566                 
21567 ; return 0; }
21568 EOF
21569 if { (eval echo configure:21570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21570   rm -rf conftest*
21571   echo "$ac_t""-lwrap -lnsl" 1>&6
21572                 have_wrappers=yes
21573                 LIBS="$save_LIBS -lnsl"
21574 else
21575   echo "configure: failed program was:" >&5
21576   cat conftest.$ac_ext >&5
21577   rm -rf conftest*
21578   
21579                 echo "$ac_t""no" 1>&6
21580                 have_wrappers=no
21581                 LIBS=$save_LIBS
21582 fi
21583 rm -f conftest*
21584 fi
21585 rm -f conftest*
21586 else
21587   echo "$ac_t""no" 1>&6
21588 have_wrappers=no
21589 fi
21590 done
21591
21592
21593         if test $have_wrappers = yes ; then
21594                 cat >> confdefs.h <<\EOF
21595 #define HAVE_TCPD 1
21596 EOF
21597
21598                 WRAP_LIBS="-lwrap"
21599         elif test $ol_enable_wrappers = yes ; then
21600                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21601         else
21602                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21603                 WRAP_LIBS=""
21604         fi
21605 fi
21606
21607 if test $ol_enable_syslog != no ; then
21608         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21609 echo "configure:21610: checking for openlog" >&5
21610 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21611   echo $ac_n "(cached) $ac_c" 1>&6
21612 else
21613   cat > conftest.$ac_ext <<EOF
21614 #line 21615 "configure"
21615 #include "confdefs.h"
21616 /* System header to define __stub macros and hopefully few prototypes,
21617     which can conflict with char openlog(); below.  */
21618 #include <assert.h>
21619 /* Override any gcc2 internal prototype to avoid an error.  */
21620 /* We use char because int might match the return type of a gcc2
21621     builtin and then its argument prototype would still apply.  */
21622 char openlog();
21623 char (*f)();
21624
21625 int main() {
21626
21627 /* The GNU C library defines this for functions which it implements
21628     to always fail with ENOSYS.  Some functions are actually named
21629     something starting with __ and the normal name is an alias.  */
21630 #if defined (__stub_openlog) || defined (__stub___openlog)
21631 choke me
21632 #else
21633 f = openlog;
21634 #endif
21635
21636 ; return 0; }
21637 EOF
21638 if { (eval echo configure:21639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21639   rm -rf conftest*
21640   eval "ac_cv_func_openlog=yes"
21641 else
21642   echo "configure: failed program was:" >&5
21643   cat conftest.$ac_ext >&5
21644   rm -rf conftest*
21645   eval "ac_cv_func_openlog=no"
21646 fi
21647 rm -f conftest*
21648 fi
21649
21650 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21651   echo "$ac_t""yes" 1>&6
21652   :
21653 else
21654   echo "$ac_t""no" 1>&6
21655 fi
21656
21657         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21658                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21659         fi
21660         ol_enable_syslog=$ac_cv_func_openlog
21661 fi
21662
21663
21664 ol_link_sql=no
21665 if test $ol_enable_sql != no ; then
21666         for ac_hdr in sql.h sqlext.h
21667 do
21668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21670 echo "configure:21671: checking for $ac_hdr" >&5
21671 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21672   echo $ac_n "(cached) $ac_c" 1>&6
21673 else
21674   cat > conftest.$ac_ext <<EOF
21675 #line 21676 "configure"
21676 #include "confdefs.h"
21677 #include <$ac_hdr>
21678 EOF
21679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21680 { (eval echo configure:21681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21682 if test -z "$ac_err"; then
21683   rm -rf conftest*
21684   eval "ac_cv_header_$ac_safe=yes"
21685 else
21686   echo "$ac_err" >&5
21687   echo "configure: failed program was:" >&5
21688   cat conftest.$ac_ext >&5
21689   rm -rf conftest*
21690   eval "ac_cv_header_$ac_safe=no"
21691 fi
21692 rm -f conftest*
21693 fi
21694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21695   echo "$ac_t""yes" 1>&6
21696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21697   cat >> confdefs.h <<EOF
21698 #define $ac_tr_hdr 1
21699 EOF
21700  
21701 else
21702   echo "$ac_t""no" 1>&6
21703 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21704         
21705 fi
21706 done
21707
21708
21709         sql_LIBS="$LIBS"
21710         LIBS="$LTHREAD_LIBS"
21711
21712         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21713 echo "configure:21714: checking for SQLDriverConnect in -liodbc" >&5
21714 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21716   echo $ac_n "(cached) $ac_c" 1>&6
21717 else
21718   ac_save_LIBS="$LIBS"
21719 LIBS="-liodbc  $LIBS"
21720 cat > conftest.$ac_ext <<EOF
21721 #line 21722 "configure"
21722 #include "confdefs.h"
21723 /* Override any gcc2 internal prototype to avoid an error.  */
21724 /* We use char because int might match the return type of a gcc2
21725     builtin and then its argument prototype would still apply.  */
21726 char SQLDriverConnect();
21727
21728 int main() {
21729 SQLDriverConnect()
21730 ; return 0; }
21731 EOF
21732 if { (eval echo configure:21733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21733   rm -rf conftest*
21734   eval "ac_cv_lib_$ac_lib_var=yes"
21735 else
21736   echo "configure: failed program was:" >&5
21737   cat conftest.$ac_ext >&5
21738   rm -rf conftest*
21739   eval "ac_cv_lib_$ac_lib_var=no"
21740 fi
21741 rm -f conftest*
21742 LIBS="$ac_save_LIBS"
21743
21744 fi
21745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21746   echo "$ac_t""yes" 1>&6
21747   have_iodbc=yes
21748 else
21749   echo "$ac_t""no" 1>&6
21750 have_iodbc=no
21751 fi
21752
21753         if test $have_iodbc = yes ; then
21754                 ol_link_sql="-liodbc"
21755         else
21756                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21757 echo "configure:21758: checking for SQLDriverConnect in -lodbc" >&5
21758 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21760   echo $ac_n "(cached) $ac_c" 1>&6
21761 else
21762   ac_save_LIBS="$LIBS"
21763 LIBS="-lodbc  $LIBS"
21764 cat > conftest.$ac_ext <<EOF
21765 #line 21766 "configure"
21766 #include "confdefs.h"
21767 /* Override any gcc2 internal prototype to avoid an error.  */
21768 /* We use char because int might match the return type of a gcc2
21769     builtin and then its argument prototype would still apply.  */
21770 char SQLDriverConnect();
21771
21772 int main() {
21773 SQLDriverConnect()
21774 ; return 0; }
21775 EOF
21776 if { (eval echo configure:21777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21777   rm -rf conftest*
21778   eval "ac_cv_lib_$ac_lib_var=yes"
21779 else
21780   echo "configure: failed program was:" >&5
21781   cat conftest.$ac_ext >&5
21782   rm -rf conftest*
21783   eval "ac_cv_lib_$ac_lib_var=no"
21784 fi
21785 rm -f conftest*
21786 LIBS="$ac_save_LIBS"
21787
21788 fi
21789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21790   echo "$ac_t""yes" 1>&6
21791   have_odbc=yes
21792 else
21793   echo "$ac_t""no" 1>&6
21794 have_odbc=no
21795 fi
21796
21797                 if test $have_odbc = yes ; then
21798                         ol_link_sql="-lodbc"
21799                 fi
21800         fi
21801
21802         LIBS="$sql_LIBS"
21803
21804         if test $ol_link_sql != no ; then
21805                 SLAPD_SQL_LIBS="$ol_link_sql"
21806
21807         elif test $ol_enable_sql != auto ; then
21808                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21809         fi
21810 fi
21811
21812 WITH_SASL=no
21813 ol_link_sasl=no
21814 ol_link_spasswd=no
21815 if test $ol_with_cyrus_sasl != no ; then
21816         for ac_hdr in sasl/sasl.h sasl.h
21817 do
21818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21820 echo "configure:21821: checking for $ac_hdr" >&5
21821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21822   echo $ac_n "(cached) $ac_c" 1>&6
21823 else
21824   cat > conftest.$ac_ext <<EOF
21825 #line 21826 "configure"
21826 #include "confdefs.h"
21827 #include <$ac_hdr>
21828 EOF
21829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21830 { (eval echo configure:21831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21832 if test -z "$ac_err"; then
21833   rm -rf conftest*
21834   eval "ac_cv_header_$ac_safe=yes"
21835 else
21836   echo "$ac_err" >&5
21837   echo "configure: failed program was:" >&5
21838   cat conftest.$ac_ext >&5
21839   rm -rf conftest*
21840   eval "ac_cv_header_$ac_safe=no"
21841 fi
21842 rm -f conftest*
21843 fi
21844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21845   echo "$ac_t""yes" 1>&6
21846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21847   cat >> confdefs.h <<EOF
21848 #define $ac_tr_hdr 1
21849 EOF
21850  
21851 else
21852   echo "$ac_t""no" 1>&6
21853 fi
21854 done
21855
21856
21857         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21858                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21859 echo "configure:21860: checking for sasl_client_init in -lsasl2" >&5
21860 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21862   echo $ac_n "(cached) $ac_c" 1>&6
21863 else
21864   ac_save_LIBS="$LIBS"
21865 LIBS="-lsasl2  $LIBS"
21866 cat > conftest.$ac_ext <<EOF
21867 #line 21868 "configure"
21868 #include "confdefs.h"
21869 /* Override any gcc2 internal prototype to avoid an error.  */
21870 /* We use char because int might match the return type of a gcc2
21871     builtin and then its argument prototype would still apply.  */
21872 char sasl_client_init();
21873
21874 int main() {
21875 sasl_client_init()
21876 ; return 0; }
21877 EOF
21878 if { (eval echo configure:21879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21879   rm -rf conftest*
21880   eval "ac_cv_lib_$ac_lib_var=yes"
21881 else
21882   echo "configure: failed program was:" >&5
21883   cat conftest.$ac_ext >&5
21884   rm -rf conftest*
21885   eval "ac_cv_lib_$ac_lib_var=no"
21886 fi
21887 rm -f conftest*
21888 LIBS="$ac_save_LIBS"
21889
21890 fi
21891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21892   echo "$ac_t""yes" 1>&6
21893   ol_link_sasl="-lsasl2"
21894 else
21895   echo "$ac_t""no" 1>&6
21896 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21897 echo "configure:21898: checking for sasl_client_init in -lsasl" >&5
21898 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21900   echo $ac_n "(cached) $ac_c" 1>&6
21901 else
21902   ac_save_LIBS="$LIBS"
21903 LIBS="-lsasl  $LIBS"
21904 cat > conftest.$ac_ext <<EOF
21905 #line 21906 "configure"
21906 #include "confdefs.h"
21907 /* Override any gcc2 internal prototype to avoid an error.  */
21908 /* We use char because int might match the return type of a gcc2
21909     builtin and then its argument prototype would still apply.  */
21910 char sasl_client_init();
21911
21912 int main() {
21913 sasl_client_init()
21914 ; return 0; }
21915 EOF
21916 if { (eval echo configure:21917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21917   rm -rf conftest*
21918   eval "ac_cv_lib_$ac_lib_var=yes"
21919 else
21920   echo "configure: failed program was:" >&5
21921   cat conftest.$ac_ext >&5
21922   rm -rf conftest*
21923   eval "ac_cv_lib_$ac_lib_var=no"
21924 fi
21925 rm -f conftest*
21926 LIBS="$ac_save_LIBS"
21927
21928 fi
21929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21930   echo "$ac_t""yes" 1>&6
21931   ol_link_sasl="-lsasl"
21932 else
21933   echo "$ac_t""no" 1>&6
21934 fi
21935
21936 fi
21937
21938         fi
21939
21940         if test $ol_link_sasl = no ; then
21941                 if test $ol_with_cyrus_sasl != auto ; then
21942                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21943                 else
21944                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21945                         echo "configure: warning: SASL authentication not supported!" 1>&2
21946                         if test $ol_link_tls = no ; then
21947                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21948                         fi
21949                 fi
21950         else
21951                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21952 echo "configure:21953: checking Cyrus SASL library version" >&5
21953 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21954   echo $ac_n "(cached) $ac_c" 1>&6
21955 else
21956   
21957         cat > conftest.$ac_ext <<EOF
21958 #line 21959 "configure"
21959 #include "confdefs.h"
21960
21961 #ifdef HAVE_SASL_SASL_H
21962 #include <sasl/sasl.h>
21963 #else
21964 #include <sasl.h>
21965 #endif
21966
21967 /* Require 2.1.15+ */
21968 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21969         char *__sasl_compat = "2.2+ or better okay (we guess)";
21970 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21971         && SASL_VERSION_STEP >=15
21972         char *__sasl_compat = "2.1.15+ or better okay";
21973 #endif
21974         
21975 EOF
21976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21977   egrep "__sasl_compat" >/dev/null 2>&1; then
21978   rm -rf conftest*
21979   ol_cv_sasl_compat=yes
21980 else
21981   rm -rf conftest*
21982   ol_cv_sasl_compat=no
21983 fi
21984 rm -f conftest*
21985
21986 fi
21987
21988 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21989
21990                 if test $ol_cv_sasl_compat = no ; then
21991                         ol_link_sasl=no
21992                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21993                 fi
21994
21995                 cat >> confdefs.h <<\EOF
21996 #define HAVE_CYRUS_SASL 1
21997 EOF
21998
21999                 SASL_LIBS="$ol_link_sasl"
22000                 if test $ol_enable_spasswd != no ; then
22001                         ol_link_spasswd=yes
22002                 fi
22003
22004                 ac_save_LIBS="$LIBS"
22005                 LIBS="$LIBS $ol_link_sasl"
22006                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22007 echo "configure:22008: checking for sasl_version" >&5
22008 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22009   echo $ac_n "(cached) $ac_c" 1>&6
22010 else
22011   cat > conftest.$ac_ext <<EOF
22012 #line 22013 "configure"
22013 #include "confdefs.h"
22014 /* System header to define __stub macros and hopefully few prototypes,
22015     which can conflict with char sasl_version(); below.  */
22016 #include <assert.h>
22017 /* Override any gcc2 internal prototype to avoid an error.  */
22018 /* We use char because int might match the return type of a gcc2
22019     builtin and then its argument prototype would still apply.  */
22020 char sasl_version();
22021 char (*f)();
22022
22023 int main() {
22024
22025 /* The GNU C library defines this for functions which it implements
22026     to always fail with ENOSYS.  Some functions are actually named
22027     something starting with __ and the normal name is an alias.  */
22028 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22029 choke me
22030 #else
22031 f = sasl_version;
22032 #endif
22033
22034 ; return 0; }
22035 EOF
22036 if { (eval echo configure:22037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22037   rm -rf conftest*
22038   eval "ac_cv_func_sasl_version=yes"
22039 else
22040   echo "configure: failed program was:" >&5
22041   cat conftest.$ac_ext >&5
22042   rm -rf conftest*
22043   eval "ac_cv_func_sasl_version=no"
22044 fi
22045 rm -f conftest*
22046 fi
22047
22048 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22049   echo "$ac_t""yes" 1>&6
22050   cat >> confdefs.h <<\EOF
22051 #define HAVE_SASL_VERSION 1
22052 EOF
22053
22054 else
22055   echo "$ac_t""no" 1>&6
22056 fi
22057
22058                 LIBS="$ac_save_LIBS"
22059
22060                 WITH_SASL=yes
22061         fi
22062
22063 else
22064         echo "configure: warning: SASL authentication not supported!" 1>&2
22065         if test $ol_link_tls = no ; then
22066                 echo "configure: warning: Strong authentication not supported!" 1>&2
22067         fi
22068 fi
22069
22070 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22071         dev=no
22072         if test -r /dev/urandom ; then
22073                 dev="/dev/urandom";
22074         elif test -r /idev/urandom ; then
22075                 dev="/idev/urandom";
22076         elif test -r /dev/srandom ; then
22077                 dev="/dev/srandom";
22078         elif test -r /dev/random ; then
22079                 dev="/dev/random";
22080         elif test -r /idev/random ; then
22081                 dev="/idev/random";
22082         fi
22083
22084         if test $dev != no ; then
22085                 cat >> confdefs.h <<EOF
22086 #define URANDOM_DEVICE "$dev"
22087 EOF
22088
22089         fi
22090 fi
22091
22092 ol_link_fetch=no
22093 if test $ol_with_fetch != no ; then
22094         ol_LIBS=$LIBS
22095 LIBS="-lfetch -lcom_err $LIBS"
22096 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22097 echo "configure:22098: checking fetch(3) library" >&5
22098 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22099   echo $ac_n "(cached) $ac_c" 1>&6
22100 else
22101   
22102         cat > conftest.$ac_ext <<EOF
22103 #line 22104 "configure"
22104 #include "confdefs.h"
22105
22106 #include <sys/param.h>
22107 #include <stdio.h>
22108 #include <fetch.h>
22109 int main() {
22110 struct url *u = fetchParseURL("file:///"); 
22111 ; return 0; }
22112 EOF
22113 if { (eval echo configure:22114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22114   rm -rf conftest*
22115   ol_cv_lib_fetch=yes
22116 else
22117   echo "configure: failed program was:" >&5
22118   cat conftest.$ac_ext >&5
22119   rm -rf conftest*
22120   ol_cv_lib_fetch=no
22121 fi
22122 rm -f conftest*
22123 fi
22124
22125 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22126 LIBS=$ol_LIBS
22127 if test $ol_cv_lib_fetch != no ; then
22128         ol_link_fetch="-lfetch -lcom_err"
22129         cat >> confdefs.h <<\EOF
22130 #define HAVE_FETCH 1
22131 EOF
22132
22133 fi
22134
22135
22136         if test $ol_cv_lib_fetch != no ; then
22137                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22138                 ol_link_fetch=freebsd
22139
22140         elif test $ol_with_fetch != auto ; then
22141                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22142         fi 
22143 fi
22144
22145 if test $ol_enable_crypt != no ; then
22146         save_LIBS="$LIBS"
22147         LIBS="$TLS_LIBS $LIBS"
22148
22149         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22150 echo "configure:22151: checking for crypt" >&5
22151 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22152   echo $ac_n "(cached) $ac_c" 1>&6
22153 else
22154   cat > conftest.$ac_ext <<EOF
22155 #line 22156 "configure"
22156 #include "confdefs.h"
22157 /* System header to define __stub macros and hopefully few prototypes,
22158     which can conflict with char crypt(); below.  */
22159 #include <assert.h>
22160 /* Override any gcc2 internal prototype to avoid an error.  */
22161 /* We use char because int might match the return type of a gcc2
22162     builtin and then its argument prototype would still apply.  */
22163 char crypt();
22164 char (*f)();
22165
22166 int main() {
22167
22168 /* The GNU C library defines this for functions which it implements
22169     to always fail with ENOSYS.  Some functions are actually named
22170     something starting with __ and the normal name is an alias.  */
22171 #if defined (__stub_crypt) || defined (__stub___crypt)
22172 choke me
22173 #else
22174 f = crypt;
22175 #endif
22176
22177 ; return 0; }
22178 EOF
22179 if { (eval echo configure:22180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22180   rm -rf conftest*
22181   eval "ac_cv_func_crypt=yes"
22182 else
22183   echo "configure: failed program was:" >&5
22184   cat conftest.$ac_ext >&5
22185   rm -rf conftest*
22186   eval "ac_cv_func_crypt=no"
22187 fi
22188 rm -f conftest*
22189 fi
22190
22191 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22192   echo "$ac_t""yes" 1>&6
22193   have_crypt=yes
22194 else
22195   echo "$ac_t""no" 1>&6
22196
22197                 LIBS="$save_LIBS"
22198                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22199 echo "configure:22200: checking for crypt in -lcrypt" >&5
22200 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22202   echo $ac_n "(cached) $ac_c" 1>&6
22203 else
22204   ac_save_LIBS="$LIBS"
22205 LIBS="-lcrypt  $LIBS"
22206 cat > conftest.$ac_ext <<EOF
22207 #line 22208 "configure"
22208 #include "confdefs.h"
22209 /* Override any gcc2 internal prototype to avoid an error.  */
22210 /* We use char because int might match the return type of a gcc2
22211     builtin and then its argument prototype would still apply.  */
22212 char crypt();
22213
22214 int main() {
22215 crypt()
22216 ; return 0; }
22217 EOF
22218 if { (eval echo configure:22219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22219   rm -rf conftest*
22220   eval "ac_cv_lib_$ac_lib_var=yes"
22221 else
22222   echo "configure: failed program was:" >&5
22223   cat conftest.$ac_ext >&5
22224   rm -rf conftest*
22225   eval "ac_cv_lib_$ac_lib_var=no"
22226 fi
22227 rm -f conftest*
22228 LIBS="$ac_save_LIBS"
22229
22230 fi
22231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22232   echo "$ac_t""yes" 1>&6
22233   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22234                         have_crypt=yes
22235 else
22236   echo "$ac_t""no" 1>&6
22237 have_crypt=no
22238 fi
22239
22240 fi
22241
22242
22243         LIBS="$save_LIBS"
22244
22245         if test $have_crypt = yes ; then
22246                 cat >> confdefs.h <<\EOF
22247 #define HAVE_CRYPT 1
22248 EOF
22249
22250         else
22251                 echo "configure: warning: could not find crypt" 1>&2
22252                 if test $ol_enable_crypt = yes ; then
22253                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22254                 fi
22255
22256                 echo "configure: warning: disabling crypt support" 1>&2
22257                 ol_enable_crypt=no
22258         fi
22259 fi
22260
22261 if test $ol_enable_proctitle != no ; then
22262         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22263 echo "configure:22264: checking for setproctitle" >&5
22264 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22265   echo $ac_n "(cached) $ac_c" 1>&6
22266 else
22267   cat > conftest.$ac_ext <<EOF
22268 #line 22269 "configure"
22269 #include "confdefs.h"
22270 /* System header to define __stub macros and hopefully few prototypes,
22271     which can conflict with char setproctitle(); below.  */
22272 #include <assert.h>
22273 /* Override any gcc2 internal prototype to avoid an error.  */
22274 /* We use char because int might match the return type of a gcc2
22275     builtin and then its argument prototype would still apply.  */
22276 char setproctitle();
22277 char (*f)();
22278
22279 int main() {
22280
22281 /* The GNU C library defines this for functions which it implements
22282     to always fail with ENOSYS.  Some functions are actually named
22283     something starting with __ and the normal name is an alias.  */
22284 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22285 choke me
22286 #else
22287 f = setproctitle;
22288 #endif
22289
22290 ; return 0; }
22291 EOF
22292 if { (eval echo configure:22293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22293   rm -rf conftest*
22294   eval "ac_cv_func_setproctitle=yes"
22295 else
22296   echo "configure: failed program was:" >&5
22297   cat conftest.$ac_ext >&5
22298   rm -rf conftest*
22299   eval "ac_cv_func_setproctitle=no"
22300 fi
22301 rm -f conftest*
22302 fi
22303
22304 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22305   echo "$ac_t""yes" 1>&6
22306   have_setproctitle=yes
22307 else
22308   echo "$ac_t""no" 1>&6
22309
22310                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22311 echo "configure:22312: checking for setproctitle in -lutil" >&5
22312 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22314   echo $ac_n "(cached) $ac_c" 1>&6
22315 else
22316   ac_save_LIBS="$LIBS"
22317 LIBS="-lutil  $LIBS"
22318 cat > conftest.$ac_ext <<EOF
22319 #line 22320 "configure"
22320 #include "confdefs.h"
22321 /* Override any gcc2 internal prototype to avoid an error.  */
22322 /* We use char because int might match the return type of a gcc2
22323     builtin and then its argument prototype would still apply.  */
22324 char setproctitle();
22325
22326 int main() {
22327 setproctitle()
22328 ; return 0; }
22329 EOF
22330 if { (eval echo configure:22331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22331   rm -rf conftest*
22332   eval "ac_cv_lib_$ac_lib_var=yes"
22333 else
22334   echo "configure: failed program was:" >&5
22335   cat conftest.$ac_ext >&5
22336   rm -rf conftest*
22337   eval "ac_cv_lib_$ac_lib_var=no"
22338 fi
22339 rm -f conftest*
22340 LIBS="$ac_save_LIBS"
22341
22342 fi
22343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22344   echo "$ac_t""yes" 1>&6
22345   have_setproctitle=yes
22346                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22347 else
22348   echo "$ac_t""no" 1>&6
22349 have_setproctitle=no
22350                         LIBOBJS="$LIBOBJS setproctitle.o"
22351                         LIBSRCS="$LIBSRCS setproctitle.c"
22352 fi
22353
22354 fi
22355
22356
22357         if test $have_setproctitle = yes ; then
22358                 cat >> confdefs.h <<\EOF
22359 #define HAVE_SETPROCTITLE 1
22360 EOF
22361
22362         fi
22363 fi
22364
22365 if test $ol_enable_slp != no ; then
22366         for ac_hdr in slp.h 
22367 do
22368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22370 echo "configure:22371: checking for $ac_hdr" >&5
22371 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22372   echo $ac_n "(cached) $ac_c" 1>&6
22373 else
22374   cat > conftest.$ac_ext <<EOF
22375 #line 22376 "configure"
22376 #include "confdefs.h"
22377 #include <$ac_hdr>
22378 EOF
22379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22380 { (eval echo configure:22381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22382 if test -z "$ac_err"; then
22383   rm -rf conftest*
22384   eval "ac_cv_header_$ac_safe=yes"
22385 else
22386   echo "$ac_err" >&5
22387   echo "configure: failed program was:" >&5
22388   cat conftest.$ac_ext >&5
22389   rm -rf conftest*
22390   eval "ac_cv_header_$ac_safe=no"
22391 fi
22392 rm -f conftest*
22393 fi
22394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22395   echo "$ac_t""yes" 1>&6
22396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22397   cat >> confdefs.h <<EOF
22398 #define $ac_tr_hdr 1
22399 EOF
22400  
22401 else
22402   echo "$ac_t""no" 1>&6
22403 fi
22404 done
22405
22406
22407         if test $ac_cv_header_slp_h = yes ; then
22408                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22409 echo "configure:22410: checking for SLPOpen in -lslp" >&5
22410 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22412   echo $ac_n "(cached) $ac_c" 1>&6
22413 else
22414   ac_save_LIBS="$LIBS"
22415 LIBS="-lslp  $LIBS"
22416 cat > conftest.$ac_ext <<EOF
22417 #line 22418 "configure"
22418 #include "confdefs.h"
22419 /* Override any gcc2 internal prototype to avoid an error.  */
22420 /* We use char because int might match the return type of a gcc2
22421     builtin and then its argument prototype would still apply.  */
22422 char SLPOpen();
22423
22424 int main() {
22425 SLPOpen()
22426 ; return 0; }
22427 EOF
22428 if { (eval echo configure:22429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22429   rm -rf conftest*
22430   eval "ac_cv_lib_$ac_lib_var=yes"
22431 else
22432   echo "configure: failed program was:" >&5
22433   cat conftest.$ac_ext >&5
22434   rm -rf conftest*
22435   eval "ac_cv_lib_$ac_lib_var=no"
22436 fi
22437 rm -f conftest*
22438 LIBS="$ac_save_LIBS"
22439
22440 fi
22441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22442   echo "$ac_t""yes" 1>&6
22443   have_slp=yes
22444 else
22445   echo "$ac_t""no" 1>&6
22446 have_slp=no
22447 fi
22448
22449                 if test $have_slp = yes ; then
22450                         cat >> confdefs.h <<\EOF
22451 #define HAVE_SLP 1
22452 EOF
22453
22454                         SLAPD_SLP_LIBS=-lslp
22455                 fi
22456
22457         elif test $ol_enable_slp = yes ; then
22458                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22459         fi
22460 fi
22461
22462 if test "$ol_with_multiple_precision" != "no" ; then
22463         ol_have_bignum=no
22464         ol_have_gmp=no
22465
22466         for ac_hdr in openssl/bn.h bn.h
22467 do
22468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22470 echo "configure:22471: checking for $ac_hdr" >&5
22471 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22472   echo $ac_n "(cached) $ac_c" 1>&6
22473 else
22474   cat > conftest.$ac_ext <<EOF
22475 #line 22476 "configure"
22476 #include "confdefs.h"
22477 #include <$ac_hdr>
22478 EOF
22479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22480 { (eval echo configure:22481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22482 if test -z "$ac_err"; then
22483   rm -rf conftest*
22484   eval "ac_cv_header_$ac_safe=yes"
22485 else
22486   echo "$ac_err" >&5
22487   echo "configure: failed program was:" >&5
22488   cat conftest.$ac_ext >&5
22489   rm -rf conftest*
22490   eval "ac_cv_header_$ac_safe=no"
22491 fi
22492 rm -f conftest*
22493 fi
22494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22495   echo "$ac_t""yes" 1>&6
22496     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22497   cat >> confdefs.h <<EOF
22498 #define $ac_tr_hdr 1
22499 EOF
22500  
22501 else
22502   echo "$ac_t""no" 1>&6
22503 fi
22504 done
22505
22506         for ac_hdr in openssl/crypto.h crypto.h
22507 do
22508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22510 echo "configure:22511: checking for $ac_hdr" >&5
22511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22512   echo $ac_n "(cached) $ac_c" 1>&6
22513 else
22514   cat > conftest.$ac_ext <<EOF
22515 #line 22516 "configure"
22516 #include "confdefs.h"
22517 #include <$ac_hdr>
22518 EOF
22519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22520 { (eval echo configure:22521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22522 if test -z "$ac_err"; then
22523   rm -rf conftest*
22524   eval "ac_cv_header_$ac_safe=yes"
22525 else
22526   echo "$ac_err" >&5
22527   echo "configure: failed program was:" >&5
22528   cat conftest.$ac_ext >&5
22529   rm -rf conftest*
22530   eval "ac_cv_header_$ac_safe=no"
22531 fi
22532 rm -f conftest*
22533 fi
22534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22535   echo "$ac_t""yes" 1>&6
22536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22537   cat >> confdefs.h <<EOF
22538 #define $ac_tr_hdr 1
22539 EOF
22540  
22541 else
22542   echo "$ac_t""no" 1>&6
22543 fi
22544 done
22545
22546         for ac_hdr in gmp.h 
22547 do
22548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22550 echo "configure:22551: checking for $ac_hdr" >&5
22551 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22552   echo $ac_n "(cached) $ac_c" 1>&6
22553 else
22554   cat > conftest.$ac_ext <<EOF
22555 #line 22556 "configure"
22556 #include "confdefs.h"
22557 #include <$ac_hdr>
22558 EOF
22559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22560 { (eval echo configure:22561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22562 if test -z "$ac_err"; then
22563   rm -rf conftest*
22564   eval "ac_cv_header_$ac_safe=yes"
22565 else
22566   echo "$ac_err" >&5
22567   echo "configure: failed program was:" >&5
22568   cat conftest.$ac_ext >&5
22569   rm -rf conftest*
22570   eval "ac_cv_header_$ac_safe=no"
22571 fi
22572 rm -f conftest*
22573 fi
22574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22575   echo "$ac_t""yes" 1>&6
22576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22577   cat >> confdefs.h <<EOF
22578 #define $ac_tr_hdr 1
22579 EOF
22580  
22581 else
22582   echo "$ac_t""no" 1>&6
22583 fi
22584 done
22585
22586
22587         if test "$ol_with_tls" = "found" ; then
22588                 ol_have_bn_h=no
22589                 ol_have_crypto_h=no
22590
22591                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22592                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22593                         ol_have_bn_h=yes
22594                 fi
22595
22596                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22597                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22598                         ol_have_crypto_h=yes
22599                 fi
22600
22601                 if test "$ol_have_bn_h" = "yes" \
22602                                 -a "$ol_have_crypto_h" = "yes" ; then
22603                         ol_have_bignum=yes
22604                 fi
22605         fi
22606
22607         if test $ac_cv_header_gmp_h = yes ; then
22608                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22609 echo "configure:22610: checking for __gmpz_add_ui in -lgmp" >&5
22610 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22611 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22612   echo $ac_n "(cached) $ac_c" 1>&6
22613 else
22614   ac_save_LIBS="$LIBS"
22615 LIBS="-lgmp  $LIBS"
22616 cat > conftest.$ac_ext <<EOF
22617 #line 22618 "configure"
22618 #include "confdefs.h"
22619 /* Override any gcc2 internal prototype to avoid an error.  */
22620 /* We use char because int might match the return type of a gcc2
22621     builtin and then its argument prototype would still apply.  */
22622 char __gmpz_add_ui();
22623
22624 int main() {
22625 __gmpz_add_ui()
22626 ; return 0; }
22627 EOF
22628 if { (eval echo configure:22629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22629   rm -rf conftest*
22630   eval "ac_cv_lib_$ac_lib_var=yes"
22631 else
22632   echo "configure: failed program was:" >&5
22633   cat conftest.$ac_ext >&5
22634   rm -rf conftest*
22635   eval "ac_cv_lib_$ac_lib_var=no"
22636 fi
22637 rm -f conftest*
22638 LIBS="$ac_save_LIBS"
22639
22640 fi
22641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22642   echo "$ac_t""yes" 1>&6
22643   have_gmp=yes
22644 else
22645   echo "$ac_t""no" 1>&6
22646 have_gmp=no
22647 fi
22648
22649                 if test $have_gmp = yes ; then
22650                         ol_have_gmp=yes
22651                 fi
22652         fi
22653
22654         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22655 echo "configure:22656: checking for multiple precision support" >&5
22656
22657         ol_mp_support="none"
22658         case "$ol_with_multiple_precision" in
22659         auto)
22660                                                                                 if test "$ol_have_bignum" = "yes" ; then
22661                         ol_mp_support="bignum"
22662                 else
22663                         if test "$ol_have_gmp" = "yes" ; then
22664                                 ol_mp_support="gmp"
22665                         fi
22666                 fi
22667                 ;;
22668         bignum)
22669                 if test "$ol_have_bignum" != "yes" ; then
22670                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22671                 fi
22672                 ol_mp_support="bignum"
22673                 ;;
22674         gmp)
22675                 if test "$ol_have_gmp" != "yes" ; then
22676                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22677                 fi
22678                 ol_mp_support="gmp"
22679                 ;;
22680         yes)
22681                 if test "$ol_have_bignum" = "yes" ; then
22682                         ol_mp_support="bignum"
22683                 elif test "$ol_have_gmp" = "yes" ; then
22684                         ol_mp_support="gmp"
22685                 else
22686                         { echo "configure: error: not available" 1>&2; exit 1; }
22687                 fi
22688                 ;;
22689         esac
22690
22691         case "$ol_mp_support" in
22692         bignum)
22693                 cat >> confdefs.h <<\EOF
22694 #define HAVE_BIGNUM 1
22695 EOF
22696
22697                 ;;
22698         gmp)
22699                 cat >> confdefs.h <<\EOF
22700 #define HAVE_GMP 1
22701 EOF
22702
22703                 SLAPD_GMP_LIBS=-lgmp
22704                 ;;
22705         none)
22706                 ;;
22707         esac
22708
22709         echo "$ac_t""$ol_mp_support" 1>&6
22710 fi
22711
22712
22713 echo $ac_n "checking long long""... $ac_c" 1>&6
22714 echo "configure:22715: checking long long" >&5
22715 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22716   echo $ac_n "(cached) $ac_c" 1>&6
22717 else
22718   
22719         cat > conftest.$ac_ext <<EOF
22720 #line 22721 "configure"
22721 #include "confdefs.h"
22722
22723 int main() {
22724 long long x;
22725 ; return 0; }
22726 EOF
22727 if { (eval echo configure:22728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22728   rm -rf conftest*
22729   ol_cv_type_long_long=yes
22730 else
22731   echo "configure: failed program was:" >&5
22732   cat conftest.$ac_ext >&5
22733   rm -rf conftest*
22734   ol_cv_type_long_long=no
22735 fi
22736 rm -f conftest*
22737 fi
22738
22739 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22740 if test $ol_cv_type_long_long = yes; then
22741         cat >> confdefs.h <<\EOF
22742 #define HAVE_LONG_LONG 1
22743 EOF
22744
22745 fi
22746
22747 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22748 echo "configure:22749: checking for ANSI C header files" >&5
22749 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22750   echo $ac_n "(cached) $ac_c" 1>&6
22751 else
22752   cat > conftest.$ac_ext <<EOF
22753 #line 22754 "configure"
22754 #include "confdefs.h"
22755 #include <stdlib.h>
22756 #include <stdarg.h>
22757 #include <string.h>
22758 #include <float.h>
22759 EOF
22760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22761 { (eval echo configure:22762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22763 if test -z "$ac_err"; then
22764   rm -rf conftest*
22765   ac_cv_header_stdc=yes
22766 else
22767   echo "$ac_err" >&5
22768   echo "configure: failed program was:" >&5
22769   cat conftest.$ac_ext >&5
22770   rm -rf conftest*
22771   ac_cv_header_stdc=no
22772 fi
22773 rm -f conftest*
22774
22775 if test $ac_cv_header_stdc = yes; then
22776   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22777 cat > conftest.$ac_ext <<EOF
22778 #line 22779 "configure"
22779 #include "confdefs.h"
22780 #include <string.h>
22781 EOF
22782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22783   egrep "memchr" >/dev/null 2>&1; then
22784   :
22785 else
22786   rm -rf conftest*
22787   ac_cv_header_stdc=no
22788 fi
22789 rm -f conftest*
22790
22791 fi
22792
22793 if test $ac_cv_header_stdc = yes; then
22794   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22795 cat > conftest.$ac_ext <<EOF
22796 #line 22797 "configure"
22797 #include "confdefs.h"
22798 #include <stdlib.h>
22799 EOF
22800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22801   egrep "free" >/dev/null 2>&1; then
22802   :
22803 else
22804   rm -rf conftest*
22805   ac_cv_header_stdc=no
22806 fi
22807 rm -f conftest*
22808
22809 fi
22810
22811 if test $ac_cv_header_stdc = yes; then
22812   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22813 if test "$cross_compiling" = yes; then
22814   :
22815 else
22816   cat > conftest.$ac_ext <<EOF
22817 #line 22818 "configure"
22818 #include "confdefs.h"
22819 #include <ctype.h>
22820 #if ((' ' & 0x0FF) == 0x020)
22821 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22822 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22823 #else
22824 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22825  || ('j' <= (c) && (c) <= 'r') \
22826  || ('s' <= (c) && (c) <= 'z'))
22827 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22828 #endif
22829 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22830 int main () { int i; for (i = 0; i < 256; i++)
22831 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22832 exit (0); }
22833
22834 EOF
22835 if { (eval echo configure:22836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22836 then
22837   :
22838 else
22839   echo "configure: failed program was:" >&5
22840   cat conftest.$ac_ext >&5
22841   rm -fr conftest*
22842   ac_cv_header_stdc=no
22843 fi
22844 rm -fr conftest*
22845 fi
22846
22847 fi
22848 fi
22849
22850 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22851 if test $ac_cv_header_stdc = yes; then
22852   cat >> confdefs.h <<\EOF
22853 #define STDC_HEADERS 1
22854 EOF
22855
22856 fi
22857
22858 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22859 echo "configure:22860: checking for mode_t" >&5
22860 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22861   echo $ac_n "(cached) $ac_c" 1>&6
22862 else
22863   cat > conftest.$ac_ext <<EOF
22864 #line 22865 "configure"
22865 #include "confdefs.h"
22866 #include <sys/types.h>
22867 #if STDC_HEADERS
22868 #include <stdlib.h>
22869 #include <stddef.h>
22870 #endif
22871
22872 EOF
22873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22874   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22875   rm -rf conftest*
22876   eval "ac_cv_type_mode_t=yes"
22877 else
22878   rm -rf conftest*
22879   eval "ac_cv_type_mode_t=no"
22880 fi
22881 rm -f conftest*
22882
22883 fi
22884 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22885   echo "$ac_t""yes" 1>&6
22886 else
22887   echo "$ac_t""no" 1>&6
22888   cat >> confdefs.h <<EOF
22889 #define mode_t int
22890 EOF
22891
22892 fi
22893
22894 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22895 echo "configure:22896: checking for off_t" >&5
22896 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22897   echo $ac_n "(cached) $ac_c" 1>&6
22898 else
22899   cat > conftest.$ac_ext <<EOF
22900 #line 22901 "configure"
22901 #include "confdefs.h"
22902 #include <sys/types.h>
22903 #if STDC_HEADERS
22904 #include <stdlib.h>
22905 #include <stddef.h>
22906 #endif
22907
22908 EOF
22909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22910   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22911   rm -rf conftest*
22912   eval "ac_cv_type_off_t=yes"
22913 else
22914   rm -rf conftest*
22915   eval "ac_cv_type_off_t=no"
22916 fi
22917 rm -f conftest*
22918
22919 fi
22920 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22921   echo "$ac_t""yes" 1>&6
22922 else
22923   echo "$ac_t""no" 1>&6
22924   cat >> confdefs.h <<EOF
22925 #define off_t long
22926 EOF
22927
22928 fi
22929
22930 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22931 echo "configure:22932: checking for pid_t" >&5
22932 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22933   echo $ac_n "(cached) $ac_c" 1>&6
22934 else
22935   cat > conftest.$ac_ext <<EOF
22936 #line 22937 "configure"
22937 #include "confdefs.h"
22938 #include <sys/types.h>
22939 #if STDC_HEADERS
22940 #include <stdlib.h>
22941 #include <stddef.h>
22942 #endif
22943
22944 EOF
22945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22946   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22947   rm -rf conftest*
22948   eval "ac_cv_type_pid_t=yes"
22949 else
22950   rm -rf conftest*
22951   eval "ac_cv_type_pid_t=no"
22952 fi
22953 rm -f conftest*
22954
22955 fi
22956 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22957   echo "$ac_t""yes" 1>&6
22958 else
22959   echo "$ac_t""no" 1>&6
22960   cat >> confdefs.h <<EOF
22961 #define pid_t int
22962 EOF
22963
22964 fi
22965
22966 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22967 echo "configure:22968: checking for ptrdiff_t" >&5
22968 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22969   echo $ac_n "(cached) $ac_c" 1>&6
22970 else
22971   cat > conftest.$ac_ext <<EOF
22972 #line 22973 "configure"
22973 #include "confdefs.h"
22974 #include <stddef.h>
22975 int main() {
22976 ptrdiff_t p
22977 ; return 0; }
22978 EOF
22979 if { (eval echo configure:22980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22980   rm -rf conftest*
22981   am_cv_type_ptrdiff_t=yes
22982 else
22983   echo "configure: failed program was:" >&5
22984   cat conftest.$ac_ext >&5
22985   rm -rf conftest*
22986   am_cv_type_ptrdiff_t=no
22987 fi
22988 rm -f conftest*
22989 fi
22990
22991 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22992    if test $am_cv_type_ptrdiff_t = yes; then
22993      cat >> confdefs.h <<\EOF
22994 #define HAVE_PTRDIFF_T 1
22995 EOF
22996
22997    fi
22998
22999 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23000 echo "configure:23001: checking return type of signal handlers" >&5
23001 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23002   echo $ac_n "(cached) $ac_c" 1>&6
23003 else
23004   cat > conftest.$ac_ext <<EOF
23005 #line 23006 "configure"
23006 #include "confdefs.h"
23007 #include <sys/types.h>
23008 #include <signal.h>
23009 #ifdef signal
23010 #undef signal
23011 #endif
23012 #ifdef __cplusplus
23013 extern "C" void (*signal (int, void (*)(int)))(int);
23014 #else
23015 void (*signal ()) ();
23016 #endif
23017
23018 int main() {
23019 int i;
23020 ; return 0; }
23021 EOF
23022 if { (eval echo configure:23023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23023   rm -rf conftest*
23024   ac_cv_type_signal=void
23025 else
23026   echo "configure: failed program was:" >&5
23027   cat conftest.$ac_ext >&5
23028   rm -rf conftest*
23029   ac_cv_type_signal=int
23030 fi
23031 rm -f conftest*
23032 fi
23033
23034 echo "$ac_t""$ac_cv_type_signal" 1>&6
23035 cat >> confdefs.h <<EOF
23036 #define RETSIGTYPE $ac_cv_type_signal
23037 EOF
23038
23039
23040 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23041 echo "configure:23042: checking for size_t" >&5
23042 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23043   echo $ac_n "(cached) $ac_c" 1>&6
23044 else
23045   cat > conftest.$ac_ext <<EOF
23046 #line 23047 "configure"
23047 #include "confdefs.h"
23048 #include <sys/types.h>
23049 #if STDC_HEADERS
23050 #include <stdlib.h>
23051 #include <stddef.h>
23052 #endif
23053
23054 EOF
23055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23056   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23057   rm -rf conftest*
23058   eval "ac_cv_type_size_t=yes"
23059 else
23060   rm -rf conftest*
23061   eval "ac_cv_type_size_t=no"
23062 fi
23063 rm -f conftest*
23064
23065 fi
23066 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23067   echo "$ac_t""yes" 1>&6
23068 else
23069   echo "$ac_t""no" 1>&6
23070   cat >> confdefs.h <<EOF
23071 #define size_t unsigned
23072 EOF
23073
23074 fi
23075
23076
23077 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23078 echo "configure:23079: checking for ssize_t" >&5
23079 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23080   echo $ac_n "(cached) $ac_c" 1>&6
23081 else
23082   cat > conftest.$ac_ext <<EOF
23083 #line 23084 "configure"
23084 #include "confdefs.h"
23085 #include <sys/types.h>
23086 #if STDC_HEADERS
23087 #include <stdlib.h>
23088 #include <stddef.h>
23089 #endif
23090
23091 EOF
23092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23093   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23094   rm -rf conftest*
23095   eval "ac_cv_type_ssize_t=yes"
23096 else
23097   rm -rf conftest*
23098   eval "ac_cv_type_ssize_t=no"
23099 fi
23100 rm -f conftest*
23101
23102 fi
23103 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23104   echo "$ac_t""yes" 1>&6
23105 else
23106   echo "$ac_t""no" 1>&6
23107   cat >> confdefs.h <<EOF
23108 #define ssize_t signed int
23109 EOF
23110
23111 fi
23112
23113 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23114 echo "configure:23115: checking for caddr_t" >&5
23115 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23116   echo $ac_n "(cached) $ac_c" 1>&6
23117 else
23118   cat > conftest.$ac_ext <<EOF
23119 #line 23120 "configure"
23120 #include "confdefs.h"
23121 #include <sys/types.h>
23122 #if STDC_HEADERS
23123 #include <stdlib.h>
23124 #include <stddef.h>
23125 #endif
23126
23127 EOF
23128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23129   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23130   rm -rf conftest*
23131   eval "ac_cv_type_caddr_t=yes"
23132 else
23133   rm -rf conftest*
23134   eval "ac_cv_type_caddr_t=no"
23135 fi
23136 rm -f conftest*
23137
23138 fi
23139 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23140   echo "$ac_t""yes" 1>&6
23141 else
23142   echo "$ac_t""no" 1>&6
23143   cat >> confdefs.h <<EOF
23144 #define caddr_t char *
23145 EOF
23146
23147 fi
23148
23149
23150 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23151 echo "configure:23152: checking for socklen_t" >&5
23152 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23153   echo $ac_n "(cached) $ac_c" 1>&6
23154 else
23155   cat > conftest.$ac_ext <<EOF
23156 #line 23157 "configure"
23157 #include "confdefs.h"
23158
23159 #ifdef HAVE_SYS_TYPES_H
23160 #include <sys/types.h>
23161 #endif
23162 #ifdef HAVE_SYS_SOCKET_H
23163 #include <sys/socket.h>
23164 #endif
23165
23166 int main() {
23167 socklen_t len;
23168 ; return 0; }
23169 EOF
23170 if { (eval echo configure:23171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23171   rm -rf conftest*
23172   ol_cv_type_socklen_t=yes
23173 else
23174   echo "configure: failed program was:" >&5
23175   cat conftest.$ac_ext >&5
23176   rm -rf conftest*
23177   ol_cv_type_socklen_t=no
23178 fi
23179 rm -f conftest*
23180 fi
23181
23182 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23183   if test $ol_cv_type_socklen_t = no; then
23184     cat >> confdefs.h <<\EOF
23185 #define socklen_t int
23186 EOF
23187
23188   fi
23189  
23190 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23191 echo "configure:23192: checking for member st_blksize in aggregate type struct stat" >&5
23192 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23193   echo $ac_n "(cached) $ac_c" 1>&6
23194 else
23195   cat > conftest.$ac_ext <<EOF
23196 #line 23197 "configure"
23197 #include "confdefs.h"
23198 #include <sys/types.h>
23199 #include <sys/stat.h>
23200 int main() {
23201 struct stat foo; foo.st_blksize;
23202 ; return 0; }
23203 EOF
23204 if { (eval echo configure:23205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23205   rm -rf conftest*
23206   ac_cv_c_struct_member_st_blksize=yes
23207 else
23208   echo "configure: failed program was:" >&5
23209   cat conftest.$ac_ext >&5
23210   rm -rf conftest*
23211   ac_cv_c_struct_member_st_blksize=no
23212 fi
23213 rm -f conftest*
23214 fi
23215
23216 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23217 st_blksize="$ac_cv_c_struct_member_st_blksize"
23218 if test $ac_cv_c_struct_member_st_blksize = yes; then
23219   cat >> confdefs.h <<\EOF
23220 #define HAVE_ST_BLKSIZE 1
23221 EOF
23222
23223 fi
23224
23225 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23226 echo "configure:23227: checking whether time.h and sys/time.h may both be included" >&5
23227 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23228   echo $ac_n "(cached) $ac_c" 1>&6
23229 else
23230   cat > conftest.$ac_ext <<EOF
23231 #line 23232 "configure"
23232 #include "confdefs.h"
23233 #include <sys/types.h>
23234 #include <sys/time.h>
23235 #include <time.h>
23236 int main() {
23237 struct tm *tp;
23238 ; return 0; }
23239 EOF
23240 if { (eval echo configure:23241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23241   rm -rf conftest*
23242   ac_cv_header_time=yes
23243 else
23244   echo "configure: failed program was:" >&5
23245   cat conftest.$ac_ext >&5
23246   rm -rf conftest*
23247   ac_cv_header_time=no
23248 fi
23249 rm -f conftest*
23250 fi
23251
23252 echo "$ac_t""$ac_cv_header_time" 1>&6
23253 if test $ac_cv_header_time = yes; then
23254   cat >> confdefs.h <<\EOF
23255 #define TIME_WITH_SYS_TIME 1
23256 EOF
23257
23258 fi
23259
23260 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23261 echo "configure:23262: checking whether struct tm is in sys/time.h or time.h" >&5
23262 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23263   echo $ac_n "(cached) $ac_c" 1>&6
23264 else
23265   cat > conftest.$ac_ext <<EOF
23266 #line 23267 "configure"
23267 #include "confdefs.h"
23268 #include <sys/types.h>
23269 #include <time.h>
23270 int main() {
23271 struct tm *tp; tp->tm_sec;
23272 ; return 0; }
23273 EOF
23274 if { (eval echo configure:23275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23275   rm -rf conftest*
23276   ac_cv_struct_tm=time.h
23277 else
23278   echo "configure: failed program was:" >&5
23279   cat conftest.$ac_ext >&5
23280   rm -rf conftest*
23281   ac_cv_struct_tm=sys/time.h
23282 fi
23283 rm -f conftest*
23284 fi
23285
23286 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23287 if test $ac_cv_struct_tm = sys/time.h; then
23288   cat >> confdefs.h <<\EOF
23289 #define TM_IN_SYS_TIME 1
23290 EOF
23291
23292 fi
23293
23294 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23295 echo "configure:23296: checking for uid_t in sys/types.h" >&5
23296 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23297   echo $ac_n "(cached) $ac_c" 1>&6
23298 else
23299   cat > conftest.$ac_ext <<EOF
23300 #line 23301 "configure"
23301 #include "confdefs.h"
23302 #include <sys/types.h>
23303 EOF
23304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23305   egrep "uid_t" >/dev/null 2>&1; then
23306   rm -rf conftest*
23307   ac_cv_type_uid_t=yes
23308 else
23309   rm -rf conftest*
23310   ac_cv_type_uid_t=no
23311 fi
23312 rm -f conftest*
23313
23314 fi
23315
23316 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23317 if test $ac_cv_type_uid_t = no; then
23318   cat >> confdefs.h <<\EOF
23319 #define uid_t int
23320 EOF
23321
23322   cat >> confdefs.h <<\EOF
23323 #define gid_t int
23324 EOF
23325
23326 fi
23327
23328 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23329 echo "configure:23330: checking for sig_atomic_t" >&5
23330 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23331   echo $ac_n "(cached) $ac_c" 1>&6
23332 else
23333   cat > conftest.$ac_ext <<EOF
23334 #line 23335 "configure"
23335 #include "confdefs.h"
23336 #include <signal.h>
23337 int main() {
23338 sig_atomic_t atomic;
23339 ; return 0; }
23340 EOF
23341 if { (eval echo configure:23342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23342   rm -rf conftest*
23343   ol_cv_type_sig_atomic_t=yes
23344 else
23345   echo "configure: failed program was:" >&5
23346   cat conftest.$ac_ext >&5
23347   rm -rf conftest*
23348   ol_cv_type_sig_atomic_t=no
23349 fi
23350 rm -f conftest*
23351 fi
23352
23353 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23354   if test $ol_cv_type_sig_atomic_t = no; then
23355     cat >> confdefs.h <<\EOF
23356 #define sig_atomic_t int
23357 EOF
23358
23359   fi
23360  
23361
23362
23363 # test for pw_gecos in struct passwd
23364 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23365 echo "configure:23366: checking struct passwd for pw_gecos" >&5
23366 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23367   echo $ac_n "(cached) $ac_c" 1>&6
23368 else
23369   
23370         cat > conftest.$ac_ext <<EOF
23371 #line 23372 "configure"
23372 #include "confdefs.h"
23373 #include <pwd.h>
23374 int main() {
23375
23376         struct passwd pwd;
23377         pwd.pw_gecos = pwd.pw_name;
23378
23379 ; return 0; }
23380 EOF
23381 if { (eval echo configure:23382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23382   rm -rf conftest*
23383   ol_cv_struct_passwd_pw_gecos=yes
23384 else
23385   echo "configure: failed program was:" >&5
23386   cat conftest.$ac_ext >&5
23387   rm -rf conftest*
23388   ol_cv_struct_passwd_pw_gecos=no
23389 fi
23390 rm -f conftest*
23391 fi
23392
23393 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23394 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23395         cat >> confdefs.h <<\EOF
23396 #define HAVE_PW_GECOS 1
23397 EOF
23398
23399 fi
23400
23401 # test for pw_passwd in struct passwd
23402 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23403 echo "configure:23404: checking struct passwd for pw_passwd" >&5
23404 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23405   echo $ac_n "(cached) $ac_c" 1>&6
23406 else
23407   
23408         cat > conftest.$ac_ext <<EOF
23409 #line 23410 "configure"
23410 #include "confdefs.h"
23411 #include <pwd.h>
23412 int main() {
23413
23414         struct passwd pwd;
23415         pwd.pw_passwd = pwd.pw_name;
23416
23417 ; return 0; }
23418 EOF
23419 if { (eval echo configure:23420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23420   rm -rf conftest*
23421   ol_cv_struct_passwd_pw_passwd=yes
23422 else
23423   echo "configure: failed program was:" >&5
23424   cat conftest.$ac_ext >&5
23425   rm -rf conftest*
23426   ol_cv_struct_passwd_pw_passwd=no
23427 fi
23428 rm -f conftest*
23429 fi
23430
23431 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23432 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23433         cat >> confdefs.h <<\EOF
23434 #define HAVE_PW_PASSWD 1
23435 EOF
23436
23437 fi
23438
23439
23440 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23441 echo "configure:23442: checking if toupper() requires islower()" >&5
23442 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23443   echo $ac_n "(cached) $ac_c" 1>&6
23444 else
23445   
23446         if test "$cross_compiling" = yes; then
23447   ol_cv_c_upper_lower=safe
23448 else
23449   cat > conftest.$ac_ext <<EOF
23450 #line 23451 "configure"
23451 #include "confdefs.h"
23452
23453 #include <ctype.h>
23454 main()
23455 {
23456         if ('C' == toupper('C'))
23457                 exit(0);
23458         else
23459                 exit(1);
23460 }
23461 EOF
23462 if { (eval echo configure:23463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23463 then
23464   ol_cv_c_upper_lower=no
23465 else
23466   echo "configure: failed program was:" >&5
23467   cat conftest.$ac_ext >&5
23468   rm -fr conftest*
23469   ol_cv_c_upper_lower=yes
23470 fi
23471 rm -fr conftest*
23472 fi
23473
23474 fi
23475
23476 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23477 if test $ol_cv_c_upper_lower != no ; then
23478         cat >> confdefs.h <<\EOF
23479 #define C_UPPER_LOWER 1
23480 EOF
23481
23482 fi
23483
23484 echo $ac_n "checking for working const""... $ac_c" 1>&6
23485 echo "configure:23486: checking for working const" >&5
23486 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23487   echo $ac_n "(cached) $ac_c" 1>&6
23488 else
23489   cat > conftest.$ac_ext <<EOF
23490 #line 23491 "configure"
23491 #include "confdefs.h"
23492
23493 int main() {
23494
23495 /* Ultrix mips cc rejects this.  */
23496 typedef int charset[2]; const charset x;
23497 /* SunOS 4.1.1 cc rejects this.  */
23498 char const *const *ccp;
23499 char **p;
23500 /* NEC SVR4.0.2 mips cc rejects this.  */
23501 struct point {int x, y;};
23502 static struct point const zero = {0,0};
23503 /* AIX XL C 1.02.0.0 rejects this.
23504    It does not let you subtract one const X* pointer from another in an arm
23505    of an if-expression whose if-part is not a constant expression */
23506 const char *g = "string";
23507 ccp = &g + (g ? g-g : 0);
23508 /* HPUX 7.0 cc rejects these. */
23509 ++ccp;
23510 p = (char**) ccp;
23511 ccp = (char const *const *) p;
23512 { /* SCO 3.2v4 cc rejects this.  */
23513   char *t;
23514   char const *s = 0 ? (char *) 0 : (char const *) 0;
23515
23516   *t++ = 0;
23517 }
23518 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23519   int x[] = {25, 17};
23520   const int *foo = &x[0];
23521   ++foo;
23522 }
23523 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23524   typedef const int *iptr;
23525   iptr p = 0;
23526   ++p;
23527 }
23528 { /* AIX XL C 1.02.0.0 rejects this saying
23529      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23530   struct s { int j; const int *ap[3]; };
23531   struct s *b; b->j = 5;
23532 }
23533 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23534   const int foo = 10;
23535 }
23536
23537 ; return 0; }
23538 EOF
23539 if { (eval echo configure:23540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23540   rm -rf conftest*
23541   ac_cv_c_const=yes
23542 else
23543   echo "configure: failed program was:" >&5
23544   cat conftest.$ac_ext >&5
23545   rm -rf conftest*
23546   ac_cv_c_const=no
23547 fi
23548 rm -f conftest*
23549 fi
23550
23551 echo "$ac_t""$ac_cv_c_const" 1>&6
23552 if test $ac_cv_c_const = no; then
23553   cat >> confdefs.h <<\EOF
23554 #define const 
23555 EOF
23556
23557 fi
23558
23559 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23560 echo "configure:23561: checking if compiler understands volatile" >&5
23561 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23562   echo $ac_n "(cached) $ac_c" 1>&6
23563 else
23564   cat > conftest.$ac_ext <<EOF
23565 #line 23566 "configure"
23566 #include "confdefs.h"
23567 int x, y, z;
23568 int main() {
23569 volatile int a; int * volatile b = x ? &y : &z;
23570       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23571       *b = 0;
23572 ; return 0; }
23573 EOF
23574 if { (eval echo configure:23575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23575   rm -rf conftest*
23576   ol_cv_c_volatile=yes
23577 else
23578   echo "configure: failed program was:" >&5
23579   cat conftest.$ac_ext >&5
23580   rm -rf conftest*
23581   ol_cv_c_volatile=no
23582 fi
23583 rm -f conftest*
23584 fi
23585
23586 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23587   if test $ol_cv_c_volatile = yes; then
23588     : 
23589   else
23590     cat >> confdefs.h <<\EOF
23591 #define volatile 
23592 EOF
23593
23594   fi
23595  
23596
23597 if test $cross_compiling = yes ; then
23598         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23599         cat >> confdefs.h <<\EOF
23600 #define CROSS_COMPILING 1
23601 EOF
23602
23603 else
23604         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23605 echo "configure:23606: checking whether byte ordering is bigendian" >&5
23606 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23607   echo $ac_n "(cached) $ac_c" 1>&6
23608 else
23609   ac_cv_c_bigendian=unknown
23610 # See if sys/param.h defines the BYTE_ORDER macro.
23611 cat > conftest.$ac_ext <<EOF
23612 #line 23613 "configure"
23613 #include "confdefs.h"
23614 #include <sys/types.h>
23615 #include <sys/param.h>
23616 int main() {
23617
23618 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23619  bogus endian macros
23620 #endif
23621 ; return 0; }
23622 EOF
23623 if { (eval echo configure:23624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23624   rm -rf conftest*
23625   # It does; now see whether it defined to BIG_ENDIAN or not.
23626 cat > conftest.$ac_ext <<EOF
23627 #line 23628 "configure"
23628 #include "confdefs.h"
23629 #include <sys/types.h>
23630 #include <sys/param.h>
23631 int main() {
23632
23633 #if BYTE_ORDER != BIG_ENDIAN
23634  not big endian
23635 #endif
23636 ; return 0; }
23637 EOF
23638 if { (eval echo configure:23639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23639   rm -rf conftest*
23640   ac_cv_c_bigendian=yes
23641 else
23642   echo "configure: failed program was:" >&5
23643   cat conftest.$ac_ext >&5
23644   rm -rf conftest*
23645   ac_cv_c_bigendian=no
23646 fi
23647 rm -f conftest*
23648 else
23649   echo "configure: failed program was:" >&5
23650   cat conftest.$ac_ext >&5
23651 fi
23652 rm -f conftest*
23653 if test $ac_cv_c_bigendian = unknown; then
23654 if test "$cross_compiling" = yes; then
23655     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23656 else
23657   cat > conftest.$ac_ext <<EOF
23658 #line 23659 "configure"
23659 #include "confdefs.h"
23660 main () {
23661   /* Are we little or big endian?  From Harbison&Steele.  */
23662   union
23663   {
23664     long l;
23665     char c[sizeof (long)];
23666   } u;
23667   u.l = 1;
23668   exit (u.c[sizeof (long) - 1] == 1);
23669 }
23670 EOF
23671 if { (eval echo configure:23672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23672 then
23673   ac_cv_c_bigendian=no
23674 else
23675   echo "configure: failed program was:" >&5
23676   cat conftest.$ac_ext >&5
23677   rm -fr conftest*
23678   ac_cv_c_bigendian=yes
23679 fi
23680 rm -fr conftest*
23681 fi
23682
23683 fi
23684 fi
23685
23686 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23687 if test $ac_cv_c_bigendian = yes; then
23688   cat >> confdefs.h <<\EOF
23689 #define WORDS_BIGENDIAN 1
23690 EOF
23691
23692 fi
23693
23694 fi
23695
23696 echo $ac_n "checking size of short""... $ac_c" 1>&6
23697 echo "configure:23698: checking size of short" >&5 
23698 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23699   echo $ac_n "(cached) $ac_c" 1>&6
23700 else
23701   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23702   cat > conftest.$ac_ext <<EOF
23703 #line 23704 "configure"
23704 #include "confdefs.h"
23705 #include "confdefs.h" 
23706 #include <stdlib.h>
23707 #include <sys/types.h> 
23708  
23709
23710 int main() {
23711 switch (0) case 0: case (sizeof (short) == $ac_size):;
23712 ; return 0; }
23713 EOF
23714 if { (eval echo configure:23715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23715   rm -rf conftest*
23716   ac_cv_sizeof_short=$ac_size
23717 else
23718   echo "configure: failed program was:" >&5
23719   cat conftest.$ac_ext >&5
23720 fi
23721 rm -f conftest* 
23722   if test x$ac_cv_sizeof_short != x ; then break; fi 
23723 done 
23724
23725 fi
23726  
23727 if test x$ac_cv_sizeof_short = x ; then 
23728   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23729 fi 
23730 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23731 cat >> confdefs.h <<EOF
23732 #define SIZEOF_SHORT $ac_cv_sizeof_short
23733 EOF
23734  
23735  
23736 echo $ac_n "checking size of int""... $ac_c" 1>&6
23737 echo "configure:23738: checking size of int" >&5 
23738 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23739   echo $ac_n "(cached) $ac_c" 1>&6
23740 else
23741   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23742   cat > conftest.$ac_ext <<EOF
23743 #line 23744 "configure"
23744 #include "confdefs.h"
23745 #include "confdefs.h" 
23746 #include <stdlib.h>
23747 #include <sys/types.h> 
23748  
23749
23750 int main() {
23751 switch (0) case 0: case (sizeof (int) == $ac_size):;
23752 ; return 0; }
23753 EOF
23754 if { (eval echo configure:23755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23755   rm -rf conftest*
23756   ac_cv_sizeof_int=$ac_size
23757 else
23758   echo "configure: failed program was:" >&5
23759   cat conftest.$ac_ext >&5
23760 fi
23761 rm -f conftest* 
23762   if test x$ac_cv_sizeof_int != x ; then break; fi 
23763 done 
23764
23765 fi
23766  
23767 if test x$ac_cv_sizeof_int = x ; then 
23768   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23769 fi 
23770 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23771 cat >> confdefs.h <<EOF
23772 #define SIZEOF_INT $ac_cv_sizeof_int
23773 EOF
23774  
23775  
23776 echo $ac_n "checking size of long""... $ac_c" 1>&6
23777 echo "configure:23778: checking size of long" >&5 
23778 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23779   echo $ac_n "(cached) $ac_c" 1>&6
23780 else
23781   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23782   cat > conftest.$ac_ext <<EOF
23783 #line 23784 "configure"
23784 #include "confdefs.h"
23785 #include "confdefs.h" 
23786 #include <stdlib.h>
23787 #include <sys/types.h> 
23788  
23789
23790 int main() {
23791 switch (0) case 0: case (sizeof (long) == $ac_size):;
23792 ; return 0; }
23793 EOF
23794 if { (eval echo configure:23795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23795   rm -rf conftest*
23796   ac_cv_sizeof_long=$ac_size
23797 else
23798   echo "configure: failed program was:" >&5
23799   cat conftest.$ac_ext >&5
23800 fi
23801 rm -f conftest* 
23802   if test x$ac_cv_sizeof_long != x ; then break; fi 
23803 done 
23804
23805 fi
23806  
23807 if test x$ac_cv_sizeof_long = x ; then 
23808   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23809 fi 
23810 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23811 cat >> confdefs.h <<EOF
23812 #define SIZEOF_LONG $ac_cv_sizeof_long
23813 EOF
23814  
23815
23816 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23817 echo "configure:23818: checking size of wchar_t" >&5 
23818 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23819   echo $ac_n "(cached) $ac_c" 1>&6
23820 else
23821   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23822   cat > conftest.$ac_ext <<EOF
23823 #line 23824 "configure"
23824 #include "confdefs.h"
23825 #include "confdefs.h" 
23826 #include <stdlib.h>
23827 #include <sys/types.h> 
23828  
23829
23830 int main() {
23831 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23832 ; return 0; }
23833 EOF
23834 if { (eval echo configure:23835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23835   rm -rf conftest*
23836   ac_cv_sizeof_wchar_t=$ac_size
23837 else
23838   echo "configure: failed program was:" >&5
23839   cat conftest.$ac_ext >&5
23840 fi
23841 rm -f conftest* 
23842   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23843 done 
23844
23845 fi
23846  
23847 if test x$ac_cv_sizeof_wchar_t = x ; then 
23848   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23849 fi 
23850 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23851 cat >> confdefs.h <<EOF
23852 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23853 EOF
23854  
23855
23856
23857 if test "$ac_cv_sizeof_int" -lt 4 ; then
23858         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23859
23860         cat >> confdefs.h <<\EOF
23861 #define LBER_INT_T long
23862 EOF
23863
23864 else
23865         cat >> confdefs.h <<\EOF
23866 #define LBER_INT_T int
23867 EOF
23868
23869 fi
23870
23871 cat >> confdefs.h <<\EOF
23872 #define LBER_LEN_T long
23873 EOF
23874
23875 cat >> confdefs.h <<\EOF
23876 #define LBER_SOCKET_T int
23877 EOF
23878
23879 cat >> confdefs.h <<\EOF
23880 #define LBER_TAG_T long
23881 EOF
23882
23883
23884 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23885 echo "configure:23886: checking for 8-bit clean memcmp" >&5
23886 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23887   echo $ac_n "(cached) $ac_c" 1>&6
23888 else
23889   if test "$cross_compiling" = yes; then
23890   ac_cv_func_memcmp_clean=no
23891 else
23892   cat > conftest.$ac_ext <<EOF
23893 #line 23894 "configure"
23894 #include "confdefs.h"
23895
23896 main()
23897 {
23898   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23899   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23900 }
23901
23902 EOF
23903 if { (eval echo configure:23904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23904 then
23905   ac_cv_func_memcmp_clean=yes
23906 else
23907   echo "configure: failed program was:" >&5
23908   cat conftest.$ac_ext >&5
23909   rm -fr conftest*
23910   ac_cv_func_memcmp_clean=no
23911 fi
23912 rm -fr conftest*
23913 fi
23914
23915 fi
23916
23917 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23918 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23919
23920
23921 if test $ac_cv_func_memcmp_clean = no ; then
23922         cat >> confdefs.h <<\EOF
23923 #define NEED_MEMCMP_REPLACEMENT 1
23924 EOF
23925
23926 fi
23927
23928 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23929 echo "configure:23930: checking for strftime" >&5
23930 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23931   echo $ac_n "(cached) $ac_c" 1>&6
23932 else
23933   cat > conftest.$ac_ext <<EOF
23934 #line 23935 "configure"
23935 #include "confdefs.h"
23936 /* System header to define __stub macros and hopefully few prototypes,
23937     which can conflict with char strftime(); below.  */
23938 #include <assert.h>
23939 /* Override any gcc2 internal prototype to avoid an error.  */
23940 /* We use char because int might match the return type of a gcc2
23941     builtin and then its argument prototype would still apply.  */
23942 char strftime();
23943 char (*f)();
23944
23945 int main() {
23946
23947 /* The GNU C library defines this for functions which it implements
23948     to always fail with ENOSYS.  Some functions are actually named
23949     something starting with __ and the normal name is an alias.  */
23950 #if defined (__stub_strftime) || defined (__stub___strftime)
23951 choke me
23952 #else
23953 f = strftime;
23954 #endif
23955
23956 ; return 0; }
23957 EOF
23958 if { (eval echo configure:23959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23959   rm -rf conftest*
23960   eval "ac_cv_func_strftime=yes"
23961 else
23962   echo "configure: failed program was:" >&5
23963   cat conftest.$ac_ext >&5
23964   rm -rf conftest*
23965   eval "ac_cv_func_strftime=no"
23966 fi
23967 rm -f conftest*
23968 fi
23969
23970 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23971   echo "$ac_t""yes" 1>&6
23972   cat >> confdefs.h <<\EOF
23973 #define HAVE_STRFTIME 1
23974 EOF
23975
23976 else
23977   echo "$ac_t""no" 1>&6
23978 # strftime is in -lintl on SCO UNIX.
23979 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23980 echo "configure:23981: checking for strftime in -lintl" >&5
23981 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23983   echo $ac_n "(cached) $ac_c" 1>&6
23984 else
23985   ac_save_LIBS="$LIBS"
23986 LIBS="-lintl  $LIBS"
23987 cat > conftest.$ac_ext <<EOF
23988 #line 23989 "configure"
23989 #include "confdefs.h"
23990 /* Override any gcc2 internal prototype to avoid an error.  */
23991 /* We use char because int might match the return type of a gcc2
23992     builtin and then its argument prototype would still apply.  */
23993 char strftime();
23994
23995 int main() {
23996 strftime()
23997 ; return 0; }
23998 EOF
23999 if { (eval echo configure:24000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24000   rm -rf conftest*
24001   eval "ac_cv_lib_$ac_lib_var=yes"
24002 else
24003   echo "configure: failed program was:" >&5
24004   cat conftest.$ac_ext >&5
24005   rm -rf conftest*
24006   eval "ac_cv_lib_$ac_lib_var=no"
24007 fi
24008 rm -f conftest*
24009 LIBS="$ac_save_LIBS"
24010
24011 fi
24012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24013   echo "$ac_t""yes" 1>&6
24014   cat >> confdefs.h <<\EOF
24015 #define HAVE_STRFTIME 1
24016 EOF
24017
24018 LIBS="-lintl $LIBS"
24019 else
24020   echo "$ac_t""no" 1>&6
24021 fi
24022
24023 fi
24024
24025
24026 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24027 echo "configure:24028: checking for inet_aton()" >&5
24028 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24029   echo $ac_n "(cached) $ac_c" 1>&6
24030 else
24031   cat > conftest.$ac_ext <<EOF
24032 #line 24033 "configure"
24033 #include "confdefs.h"
24034
24035 #ifdef HAVE_SYS_TYPES_H
24036 #       include <sys/types.h>
24037 #endif
24038 #ifdef HAVE_SYS_SOCKET_H
24039 #       include <sys/socket.h>
24040 #       ifdef HAVE_SYS_SELECT_H
24041 #               include <sys/select.h>
24042 #       endif
24043 #       include <netinet/in.h>
24044 #       ifdef HAVE_ARPA_INET_H
24045 #               include <arpa/inet.h>
24046 #       endif
24047 #endif
24048
24049 int main() {
24050 struct in_addr in;
24051 int rc = inet_aton( "255.255.255.255", &in );
24052 ; return 0; }
24053 EOF
24054 if { (eval echo configure:24055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24055   rm -rf conftest*
24056   ol_cv_func_inet_aton=yes
24057 else
24058   echo "configure: failed program was:" >&5
24059   cat conftest.$ac_ext >&5
24060   rm -rf conftest*
24061   ol_cv_func_inet_aton=no
24062 fi
24063 rm -f conftest*
24064 fi
24065
24066 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24067   if test $ol_cv_func_inet_aton != no; then
24068     cat >> confdefs.h <<\EOF
24069 #define HAVE_INET_ATON 1
24070 EOF
24071
24072   fi
24073  
24074
24075 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24076 echo "configure:24077: checking for _spawnlp" >&5
24077 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24078   echo $ac_n "(cached) $ac_c" 1>&6
24079 else
24080   cat > conftest.$ac_ext <<EOF
24081 #line 24082 "configure"
24082 #include "confdefs.h"
24083 /* System header to define __stub macros and hopefully few prototypes,
24084     which can conflict with char _spawnlp(); below.  */
24085 #include <assert.h>
24086 /* Override any gcc2 internal prototype to avoid an error.  */
24087 /* We use char because int might match the return type of a gcc2
24088     builtin and then its argument prototype would still apply.  */
24089 char _spawnlp();
24090 char (*f)();
24091
24092 int main() {
24093
24094 /* The GNU C library defines this for functions which it implements
24095     to always fail with ENOSYS.  Some functions are actually named
24096     something starting with __ and the normal name is an alias.  */
24097 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24098 choke me
24099 #else
24100 f = _spawnlp;
24101 #endif
24102
24103 ; return 0; }
24104 EOF
24105 if { (eval echo configure:24106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24106   rm -rf conftest*
24107   eval "ac_cv_func__spawnlp=yes"
24108 else
24109   echo "configure: failed program was:" >&5
24110   cat conftest.$ac_ext >&5
24111   rm -rf conftest*
24112   eval "ac_cv_func__spawnlp=no"
24113 fi
24114 rm -f conftest*
24115 fi
24116
24117 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24118   echo "$ac_t""yes" 1>&6
24119   cat >> confdefs.h <<\EOF
24120 #define HAVE_SPAWNLP 1
24121 EOF
24122
24123 else
24124   echo "$ac_t""no" 1>&6
24125 fi
24126
24127
24128 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24129 echo "configure:24130: checking for _snprintf" >&5
24130 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24131   echo $ac_n "(cached) $ac_c" 1>&6
24132 else
24133   cat > conftest.$ac_ext <<EOF
24134 #line 24135 "configure"
24135 #include "confdefs.h"
24136 /* System header to define __stub macros and hopefully few prototypes,
24137     which can conflict with char _snprintf(); below.  */
24138 #include <assert.h>
24139 /* Override any gcc2 internal prototype to avoid an error.  */
24140 /* We use char because int might match the return type of a gcc2
24141     builtin and then its argument prototype would still apply.  */
24142 char _snprintf();
24143 char (*f)();
24144
24145 int main() {
24146
24147 /* The GNU C library defines this for functions which it implements
24148     to always fail with ENOSYS.  Some functions are actually named
24149     something starting with __ and the normal name is an alias.  */
24150 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24151 choke me
24152 #else
24153 f = _snprintf;
24154 #endif
24155
24156 ; return 0; }
24157 EOF
24158 if { (eval echo configure:24159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24159   rm -rf conftest*
24160   eval "ac_cv_func__snprintf=yes"
24161 else
24162   echo "configure: failed program was:" >&5
24163   cat conftest.$ac_ext >&5
24164   rm -rf conftest*
24165   eval "ac_cv_func__snprintf=no"
24166 fi
24167 rm -f conftest*
24168 fi
24169
24170 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24171   echo "$ac_t""yes" 1>&6
24172   ac_cv_func_snprintf=yes
24173         cat >> confdefs.h <<\EOF
24174 #define snprintf _snprintf
24175 EOF
24176
24177
24178 else
24179   echo "$ac_t""no" 1>&6
24180 fi
24181
24182
24183 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24184 echo "configure:24185: checking for _vsnprintf" >&5
24185 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24186   echo $ac_n "(cached) $ac_c" 1>&6
24187 else
24188   cat > conftest.$ac_ext <<EOF
24189 #line 24190 "configure"
24190 #include "confdefs.h"
24191 /* System header to define __stub macros and hopefully few prototypes,
24192     which can conflict with char _vsnprintf(); below.  */
24193 #include <assert.h>
24194 /* Override any gcc2 internal prototype to avoid an error.  */
24195 /* We use char because int might match the return type of a gcc2
24196     builtin and then its argument prototype would still apply.  */
24197 char _vsnprintf();
24198 char (*f)();
24199
24200 int main() {
24201
24202 /* The GNU C library defines this for functions which it implements
24203     to always fail with ENOSYS.  Some functions are actually named
24204     something starting with __ and the normal name is an alias.  */
24205 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24206 choke me
24207 #else
24208 f = _vsnprintf;
24209 #endif
24210
24211 ; return 0; }
24212 EOF
24213 if { (eval echo configure:24214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24214   rm -rf conftest*
24215   eval "ac_cv_func__vsnprintf=yes"
24216 else
24217   echo "configure: failed program was:" >&5
24218   cat conftest.$ac_ext >&5
24219   rm -rf conftest*
24220   eval "ac_cv_func__vsnprintf=no"
24221 fi
24222 rm -f conftest*
24223 fi
24224
24225 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24226   echo "$ac_t""yes" 1>&6
24227   ac_cv_func_vsnprintf=yes
24228         cat >> confdefs.h <<\EOF
24229 #define vsnprintf _vsnprintf
24230 EOF
24231
24232
24233 else
24234   echo "$ac_t""no" 1>&6
24235 fi
24236
24237
24238 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24239 echo "configure:24240: checking for vprintf" >&5
24240 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24241   echo $ac_n "(cached) $ac_c" 1>&6
24242 else
24243   cat > conftest.$ac_ext <<EOF
24244 #line 24245 "configure"
24245 #include "confdefs.h"
24246 /* System header to define __stub macros and hopefully few prototypes,
24247     which can conflict with char vprintf(); below.  */
24248 #include <assert.h>
24249 /* Override any gcc2 internal prototype to avoid an error.  */
24250 /* We use char because int might match the return type of a gcc2
24251     builtin and then its argument prototype would still apply.  */
24252 char vprintf();
24253 char (*f)();
24254
24255 int main() {
24256
24257 /* The GNU C library defines this for functions which it implements
24258     to always fail with ENOSYS.  Some functions are actually named
24259     something starting with __ and the normal name is an alias.  */
24260 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24261 choke me
24262 #else
24263 f = vprintf;
24264 #endif
24265
24266 ; return 0; }
24267 EOF
24268 if { (eval echo configure:24269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24269   rm -rf conftest*
24270   eval "ac_cv_func_vprintf=yes"
24271 else
24272   echo "configure: failed program was:" >&5
24273   cat conftest.$ac_ext >&5
24274   rm -rf conftest*
24275   eval "ac_cv_func_vprintf=no"
24276 fi
24277 rm -f conftest*
24278 fi
24279
24280 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24281   echo "$ac_t""yes" 1>&6
24282   cat >> confdefs.h <<\EOF
24283 #define HAVE_VPRINTF 1
24284 EOF
24285
24286 else
24287   echo "$ac_t""no" 1>&6
24288 fi
24289
24290 if test "$ac_cv_func_vprintf" != yes; then
24291 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24292 echo "configure:24293: checking for _doprnt" >&5
24293 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24294   echo $ac_n "(cached) $ac_c" 1>&6
24295 else
24296   cat > conftest.$ac_ext <<EOF
24297 #line 24298 "configure"
24298 #include "confdefs.h"
24299 /* System header to define __stub macros and hopefully few prototypes,
24300     which can conflict with char _doprnt(); below.  */
24301 #include <assert.h>
24302 /* Override any gcc2 internal prototype to avoid an error.  */
24303 /* We use char because int might match the return type of a gcc2
24304     builtin and then its argument prototype would still apply.  */
24305 char _doprnt();
24306 char (*f)();
24307
24308 int main() {
24309
24310 /* The GNU C library defines this for functions which it implements
24311     to always fail with ENOSYS.  Some functions are actually named
24312     something starting with __ and the normal name is an alias.  */
24313 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24314 choke me
24315 #else
24316 f = _doprnt;
24317 #endif
24318
24319 ; return 0; }
24320 EOF
24321 if { (eval echo configure:24322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24322   rm -rf conftest*
24323   eval "ac_cv_func__doprnt=yes"
24324 else
24325   echo "configure: failed program was:" >&5
24326   cat conftest.$ac_ext >&5
24327   rm -rf conftest*
24328   eval "ac_cv_func__doprnt=no"
24329 fi
24330 rm -f conftest*
24331 fi
24332
24333 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24334   echo "$ac_t""yes" 1>&6
24335   cat >> confdefs.h <<\EOF
24336 #define HAVE_DOPRNT 1
24337 EOF
24338
24339 else
24340   echo "$ac_t""no" 1>&6
24341 fi
24342
24343 fi
24344
24345
24346 if test $ac_cv_func_vprintf = yes ; then
24347                 for ac_func in snprintf vsnprintf
24348 do
24349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24350 echo "configure:24351: checking for $ac_func" >&5
24351 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24352   echo $ac_n "(cached) $ac_c" 1>&6
24353 else
24354   cat > conftest.$ac_ext <<EOF
24355 #line 24356 "configure"
24356 #include "confdefs.h"
24357 /* System header to define __stub macros and hopefully few prototypes,
24358     which can conflict with char $ac_func(); below.  */
24359 #include <assert.h>
24360 /* Override any gcc2 internal prototype to avoid an error.  */
24361 /* We use char because int might match the return type of a gcc2
24362     builtin and then its argument prototype would still apply.  */
24363 char $ac_func();
24364 char (*f)();
24365
24366 int main() {
24367
24368 /* The GNU C library defines this for functions which it implements
24369     to always fail with ENOSYS.  Some functions are actually named
24370     something starting with __ and the normal name is an alias.  */
24371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24372 choke me
24373 #else
24374 f = $ac_func;
24375 #endif
24376
24377 ; return 0; }
24378 EOF
24379 if { (eval echo configure:24380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24380   rm -rf conftest*
24381   eval "ac_cv_func_$ac_func=yes"
24382 else
24383   echo "configure: failed program was:" >&5
24384   cat conftest.$ac_ext >&5
24385   rm -rf conftest*
24386   eval "ac_cv_func_$ac_func=no"
24387 fi
24388 rm -f conftest*
24389 fi
24390
24391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24392   echo "$ac_t""yes" 1>&6
24393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24394   cat >> confdefs.h <<EOF
24395 #define $ac_tr_func 1
24396 EOF
24397  
24398 else
24399   echo "$ac_t""no" 1>&6
24400 fi
24401 done
24402
24403 fi
24404
24405 for ac_func in \
24406         bcopy                   \
24407         closesocket             \
24408         chroot                  \
24409         endgrent                \
24410         endpwent                \
24411         fcntl                   \
24412         flock                   \
24413         fstat                   \
24414         getdtablesize   \
24415         getgrgid                \
24416         gethostname             \
24417         getpass                 \
24418         getpassphrase   \
24419         getpwuid                \
24420         getpwnam                \
24421         getspnam                \
24422         gettimeofday    \
24423         initgroups              \
24424         lockf                   \
24425         memcpy                  \
24426         memmove                 \
24427         mkstemp                 \
24428         mktemp                  \
24429         pipe                    \
24430         read                    \
24431         recv                    \
24432         recvfrom                \
24433         setpwfile               \
24434         setgid                  \
24435         setegid                 \
24436         setsid                  \
24437         setuid                  \
24438         seteuid                 \
24439         signal                  \
24440         strdup                  \
24441         strpbrk                 \
24442         strrchr                 \
24443         strsep                  \
24444         strstr                  \
24445         strtol                  \
24446         strtoul                 \
24447         strtoq                  \
24448         strtouq                 \
24449         strtoll                 \
24450         strspn                  \
24451         sysconf                 \
24452         usleep                  \
24453         waitpid                 \
24454         wait4                   \
24455         write                   \
24456         send                    \
24457         sendmsg                 \
24458         sendto                  \
24459
24460 do
24461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24462 echo "configure:24463: checking for $ac_func" >&5
24463 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24464   echo $ac_n "(cached) $ac_c" 1>&6
24465 else
24466   cat > conftest.$ac_ext <<EOF
24467 #line 24468 "configure"
24468 #include "confdefs.h"
24469 /* System header to define __stub macros and hopefully few prototypes,
24470     which can conflict with char $ac_func(); below.  */
24471 #include <assert.h>
24472 /* Override any gcc2 internal prototype to avoid an error.  */
24473 /* We use char because int might match the return type of a gcc2
24474     builtin and then its argument prototype would still apply.  */
24475 char $ac_func();
24476 char (*f)();
24477
24478 int main() {
24479
24480 /* The GNU C library defines this for functions which it implements
24481     to always fail with ENOSYS.  Some functions are actually named
24482     something starting with __ and the normal name is an alias.  */
24483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24484 choke me
24485 #else
24486 f = $ac_func;
24487 #endif
24488
24489 ; return 0; }
24490 EOF
24491 if { (eval echo configure:24492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24492   rm -rf conftest*
24493   eval "ac_cv_func_$ac_func=yes"
24494 else
24495   echo "configure: failed program was:" >&5
24496   cat conftest.$ac_ext >&5
24497   rm -rf conftest*
24498   eval "ac_cv_func_$ac_func=no"
24499 fi
24500 rm -f conftest*
24501 fi
24502
24503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24504   echo "$ac_t""yes" 1>&6
24505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24506   cat >> confdefs.h <<EOF
24507 #define $ac_tr_func 1
24508 EOF
24509  
24510 else
24511   echo "$ac_t""no" 1>&6
24512 fi
24513 done
24514
24515
24516 for ac_func in getopt getpeereid
24517 do
24518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24519 echo "configure:24520: checking for $ac_func" >&5
24520 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24521   echo $ac_n "(cached) $ac_c" 1>&6
24522 else
24523   cat > conftest.$ac_ext <<EOF
24524 #line 24525 "configure"
24525 #include "confdefs.h"
24526 /* System header to define __stub macros and hopefully few prototypes,
24527     which can conflict with char $ac_func(); below.  */
24528 #include <assert.h>
24529 /* Override any gcc2 internal prototype to avoid an error.  */
24530 /* We use char because int might match the return type of a gcc2
24531     builtin and then its argument prototype would still apply.  */
24532 char $ac_func();
24533 char (*f)();
24534
24535 int main() {
24536
24537 /* The GNU C library defines this for functions which it implements
24538     to always fail with ENOSYS.  Some functions are actually named
24539     something starting with __ and the normal name is an alias.  */
24540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24541 choke me
24542 #else
24543 f = $ac_func;
24544 #endif
24545
24546 ; return 0; }
24547 EOF
24548 if { (eval echo configure:24549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24549   rm -rf conftest*
24550   eval "ac_cv_func_$ac_func=yes"
24551 else
24552   echo "configure: failed program was:" >&5
24553   cat conftest.$ac_ext >&5
24554   rm -rf conftest*
24555   eval "ac_cv_func_$ac_func=no"
24556 fi
24557 rm -f conftest*
24558 fi
24559
24560 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24561   echo "$ac_t""yes" 1>&6
24562     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24563   cat >> confdefs.h <<EOF
24564 #define $ac_tr_func 1
24565 EOF
24566  
24567 else
24568   echo "$ac_t""no" 1>&6
24569 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24570 fi
24571 done
24572
24573
24574
24575 if test "$ac_cv_func_getopt" != yes; then
24576         LIBSRCS="$LIBSRCS getopt.c"
24577 fi
24578 if test "$ac_cv_func_getpeereid" != yes; then
24579         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24580 echo "configure:24581: checking for msg_accrights in msghdr" >&5
24581 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24582   echo $ac_n "(cached) $ac_c" 1>&6
24583 else
24584   cat > conftest.$ac_ext <<EOF
24585 #line 24586 "configure"
24586 #include "confdefs.h"
24587 #include <sys/socket.h>
24588 int main() {
24589 struct msghdr m; m.msg_accrightslen=0
24590 ; return 0; }
24591 EOF
24592 if { (eval echo configure:24593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24593   rm -rf conftest*
24594   ol_cv_msghdr_msg_accrights=yes
24595 else
24596   echo "configure: failed program was:" >&5
24597   cat conftest.$ac_ext >&5
24598   rm -rf conftest*
24599   ol_cv_msghdr_msg_accrights=no
24600 fi
24601 rm -f conftest*
24602         
24603 fi
24604
24605 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24606   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24607         cat >> confdefs.h <<\EOF
24608 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24609 EOF
24610
24611   fi
24612
24613         if test "$ac_cv_func_getpeereid" != yes; then
24614                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24615 echo "configure:24616: checking for msg_control in msghdr" >&5
24616 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24617   echo $ac_n "(cached) $ac_c" 1>&6
24618 else
24619   cat > conftest.$ac_ext <<EOF
24620 #line 24621 "configure"
24621 #include "confdefs.h"
24622 #include <sys/socket.h>
24623 int main() {
24624 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24625 ; return 0; }
24626 EOF
24627 if { (eval echo configure:24628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24628   rm -rf conftest*
24629   ol_cv_msghdr_msg_control=yes
24630 else
24631   echo "configure: failed program was:" >&5
24632   cat conftest.$ac_ext >&5
24633   rm -rf conftest*
24634   ol_cv_msghdr_msg_control=no
24635 fi
24636 rm -f conftest*
24637         
24638 fi
24639
24640 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24641   if test $ol_cv_msghdr_msg_control = "yes" ; then
24642         cat >> confdefs.h <<\EOF
24643 #define HAVE_MSGHDR_MSG_CONTROL 1
24644 EOF
24645
24646   fi
24647
24648         fi
24649         LIBSRCS="$LIBSRCS getpeereid.c"
24650 fi
24651 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24652         if test "$ac_cv_func_snprintf" != yes; then
24653                 cat >> confdefs.h <<\EOF
24654 #define snprintf ber_pvt_snprintf
24655 EOF
24656
24657         fi
24658         if test "$ac_cv_func_vsnprintf" != yes; then
24659                 cat >> confdefs.h <<\EOF
24660 #define vsnprintf ber_pvt_vsnprintf
24661 EOF
24662
24663         fi
24664 fi
24665
24666
24667 if test "$ol_enable_slapi" != no ; then
24668                         for ac_hdr in ltdl.h
24669 do
24670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24672 echo "configure:24673: checking for $ac_hdr" >&5
24673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24674   echo $ac_n "(cached) $ac_c" 1>&6
24675 else
24676   cat > conftest.$ac_ext <<EOF
24677 #line 24678 "configure"
24678 #include "confdefs.h"
24679 #include <$ac_hdr>
24680 EOF
24681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24682 { (eval echo configure:24683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24684 if test -z "$ac_err"; then
24685   rm -rf conftest*
24686   eval "ac_cv_header_$ac_safe=yes"
24687 else
24688   echo "$ac_err" >&5
24689   echo "configure: failed program was:" >&5
24690   cat conftest.$ac_ext >&5
24691   rm -rf conftest*
24692   eval "ac_cv_header_$ac_safe=no"
24693 fi
24694 rm -f conftest*
24695 fi
24696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24697   echo "$ac_t""yes" 1>&6
24698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24699   cat >> confdefs.h <<EOF
24700 #define $ac_tr_hdr 1
24701 EOF
24702  
24703 else
24704   echo "$ac_t""no" 1>&6
24705 fi
24706 done
24707
24708
24709         if test $ac_cv_header_ltdl_h != yes ; then
24710                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24711         fi
24712         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24713 echo "configure:24714: checking for lt_dlinit in -lltdl" >&5
24714 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24716   echo $ac_n "(cached) $ac_c" 1>&6
24717 else
24718   ac_save_LIBS="$LIBS"
24719 LIBS="-lltdl  $LIBS"
24720 cat > conftest.$ac_ext <<EOF
24721 #line 24722 "configure"
24722 #include "confdefs.h"
24723 /* Override any gcc2 internal prototype to avoid an error.  */
24724 /* We use char because int might match the return type of a gcc2
24725     builtin and then its argument prototype would still apply.  */
24726 char lt_dlinit();
24727
24728 int main() {
24729 lt_dlinit()
24730 ; return 0; }
24731 EOF
24732 if { (eval echo configure:24733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24733   rm -rf conftest*
24734   eval "ac_cv_lib_$ac_lib_var=yes"
24735 else
24736   echo "configure: failed program was:" >&5
24737   cat conftest.$ac_ext >&5
24738   rm -rf conftest*
24739   eval "ac_cv_lib_$ac_lib_var=no"
24740 fi
24741 rm -f conftest*
24742 LIBS="$ac_save_LIBS"
24743
24744 fi
24745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24746   echo "$ac_t""yes" 1>&6
24747   
24748                 SLAPI_LIBS=-lltdl
24749                 LIBSLAPI=libslapi.a
24750                 LIBSLAPITOOLS=../libslapi.a
24751                 cat >> confdefs.h <<\EOF
24752 #define HAVE_LIBLTDL 1
24753 EOF
24754
24755         
24756 else
24757   echo "$ac_t""no" 1>&6
24758 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24759 fi
24760
24761
24762         cat >> confdefs.h <<\EOF
24763 #define LDAP_SLAPI 1
24764 EOF
24765
24766 fi
24767
24768 if test "$ol_enable_debug" != no ; then
24769         cat >> confdefs.h <<\EOF
24770 #define LDAP_DEBUG 1
24771 EOF
24772
24773 fi
24774 if test "$ol_enable_syslog" = yes ; then
24775         cat >> confdefs.h <<\EOF
24776 #define LDAP_SYSLOG 1
24777 EOF
24778
24779 fi
24780 if test "$ol_link_kbind" != no ; then
24781         cat >> confdefs.h <<\EOF
24782 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24783 EOF
24784
24785 fi
24786 if test "$ol_enable_proctitle" != no ; then
24787         cat >> confdefs.h <<\EOF
24788 #define LDAP_PROCTITLE 1
24789 EOF
24790
24791 fi
24792 if test "$ol_enable_referrals" != no ; then
24793         cat >> confdefs.h <<\EOF
24794 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24795 EOF
24796
24797 fi
24798 if test "$ol_enable_local" != no; then
24799         cat >> confdefs.h <<\EOF
24800 #define LDAP_PF_LOCAL 1
24801 EOF
24802
24803 fi
24804 if test "$ol_link_ipv6" != no; then
24805         cat >> confdefs.h <<\EOF
24806 #define LDAP_PF_INET6 1
24807 EOF
24808
24809 fi
24810 if test "$ol_enable_cleartext" != no ; then
24811         cat >> confdefs.h <<\EOF
24812 #define SLAPD_CLEARTEXT 1
24813 EOF
24814
24815 fi
24816 if test "$ol_enable_crypt" != no ; then
24817         cat >> confdefs.h <<\EOF
24818 #define SLAPD_CRYPT 1
24819 EOF
24820
24821 fi
24822 if test "$ol_link_spasswd" != no ; then
24823         cat >> confdefs.h <<\EOF
24824 #define SLAPD_SPASSWD 1
24825 EOF
24826
24827 fi
24828 if test "$ol_enable_multimaster" != no ; then
24829         cat >> confdefs.h <<\EOF
24830 #define SLAPD_MULTIMASTER 1
24831 EOF
24832
24833 fi
24834 if test "$ol_enable_rlookups" != no ; then
24835         cat >> confdefs.h <<\EOF
24836 #define SLAPD_RLOOKUPS 1
24837 EOF
24838
24839 fi
24840 if test "$ol_enable_aci" != no ; then
24841         cat >> confdefs.h <<\EOF
24842 #define SLAPD_ACI_ENABLED 1
24843 EOF
24844
24845 fi
24846
24847 if test "$ol_link_modules" != no ; then
24848         cat >> confdefs.h <<\EOF
24849 #define SLAPD_MODULES 1
24850 EOF
24851
24852         BUILD_SLAPD=yes
24853         SLAPD_MODULES_LDFLAGS="-dlopen self"
24854 fi
24855
24856 cat >> confdefs.h <<\EOF
24857 #define SLAPD_MOD_STATIC 1
24858 EOF
24859
24860 cat >> confdefs.h <<\EOF
24861 #define SLAPD_MOD_DYNAMIC 2
24862 EOF
24863
24864
24865 if test "$ol_enable_bdb" != no ; then
24866         BUILD_SLAPD=yes
24867         BUILD_BDB=$ol_enable_bdb
24868         if test "$ol_enable_bdb" = mod ; then
24869                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24870                 MFLAG=SLAPD_MOD_DYNAMIC
24871         else
24872                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24873                 MFLAG=SLAPD_MOD_STATIC
24874         fi
24875         cat >> confdefs.h <<EOF
24876 #define SLAPD_BDB $MFLAG
24877 EOF
24878
24879 fi
24880
24881 if test "$ol_enable_dnssrv" != no ; then
24882         BUILD_SLAPD=yes
24883         BUILD_DNSSRV=$ol_enable_dnssrv
24884         if test "$ol_enable_dnssrv" = mod ; then
24885                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24886                 MFLAG=SLAPD_MOD_DYNAMIC
24887         else
24888                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24889                 MFLAG=SLAPD_MOD_STATIC
24890         fi
24891         cat >> confdefs.h <<EOF
24892 #define SLAPD_DNSSRV $MFLAG
24893 EOF
24894
24895 fi
24896
24897 if test "$ol_enable_hdb" != no ; then
24898         BUILD_SLAPD=yes
24899         BUILD_HDB=$ol_enable_hdb
24900         if test "$ol_enable_hdb" = mod ; then
24901                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24902                 MFLAG=SLAPD_MOD_DYNAMIC
24903         else
24904                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24905                 MFLAG=SLAPD_MOD_STATIC
24906         fi
24907         cat >> confdefs.h <<EOF
24908 #define SLAPD_HDB $MFLAG
24909 EOF
24910
24911 fi
24912
24913 if test "$ol_enable_ldap" != no ; then
24914         BUILD_SLAPD=yes
24915         BUILD_LDAP=$ol_enable_ldap
24916         if test "$ol_enable_ldap" = mod ; then
24917                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24918                 MFLAG=SLAPD_MOD_DYNAMIC
24919         else
24920                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24921                 MFLAG=SLAPD_MOD_STATIC
24922         fi
24923         cat >> confdefs.h <<EOF
24924 #define SLAPD_LDAP $MFLAG
24925 EOF
24926
24927 fi
24928
24929 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24930         BUILD_SLAPD=yes
24931         BUILD_LDBM=$ol_enable_ldbm
24932         if test "$ol_enable_ldbm" = mod ; then
24933                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24934                 MFLAG=SLAPD_MOD_DYNAMIC
24935         else
24936                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24937                 MFLAG=SLAPD_MOD_STATIC
24938         fi
24939         cat >> confdefs.h <<EOF
24940 #define SLAPD_LDBM $MFLAG
24941 EOF
24942
24943 fi
24944
24945 if test "$ol_enable_meta" != no ; then
24946         BUILD_SLAPD=yes
24947         BUILD_META=$ol_enable_meta
24948         BUILD_REWRITE=yes
24949         if test "$ol_enable_meta" = mod ; then
24950                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24951                 MFLAG=SLAPD_MOD_DYNAMIC
24952         else
24953                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24954                 MFLAG=SLAPD_MOD_STATIC
24955         fi
24956         cat >> confdefs.h <<EOF
24957 #define SLAPD_META $MFLAG
24958 EOF
24959
24960 fi
24961
24962 if test "$ol_enable_monitor" != no ; then
24963         BUILD_SLAPD=yes
24964         BUILD_MONITOR=$ol_enable_monitor
24965         if test "$ol_enable_monitor" = mod ; then
24966                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24967                 MFLAG=SLAPD_MOD_DYNAMIC
24968         else
24969                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24970                 MFLAG=SLAPD_MOD_STATIC
24971         fi
24972         cat >> confdefs.h <<EOF
24973 #define SLAPD_MONITOR $MFLAG
24974 EOF
24975
24976 fi
24977
24978 if test "$ol_enable_null" != no ; then
24979         BUILD_SLAPD=yes
24980         BUILD_NULL=$ol_enable_null
24981         if test "$ol_enable_null" = mod ; then
24982                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24983                 MFLAG=SLAPD_MOD_DYNAMIC
24984         else
24985                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24986                 MFLAG=SLAPD_MOD_STATIC
24987         fi
24988         cat >> confdefs.h <<EOF
24989 #define SLAPD_NULL $MFLAG
24990 EOF
24991
24992 fi
24993
24994 if test "$ol_enable_passwd" != no ; then
24995         BUILD_SLAPD=yes
24996         BUILD_PASSWD=$ol_enable_passwd
24997         if test "$ol_enable_passwd" = mod ; then
24998                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24999                 MFLAG=SLAPD_MOD_DYNAMIC
25000         else
25001                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25002                 MFLAG=SLAPD_MOD_STATIC
25003         fi
25004         cat >> confdefs.h <<EOF
25005 #define SLAPD_PASSWD $MFLAG
25006 EOF
25007
25008 fi
25009
25010 if test "$ol_link_perl" != no ; then
25011         BUILD_SLAPD=yes
25012         BUILD_PERL=$ol_enable_perl
25013         if test "$ol_enable_perl" = mod ; then
25014                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25015                 MFLAG=SLAPD_MOD_DYNAMIC
25016         else
25017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25018                 MFLAG=SLAPD_MOD_STATIC
25019         fi
25020         cat >> confdefs.h <<EOF
25021 #define SLAPD_PERL $MFLAG
25022 EOF
25023
25024 fi
25025
25026 if test "$ol_enable_relay" != no ; then
25027         BUILD_SLAPD=yes
25028         BUILD_RELAY=$ol_enable_relay
25029         if test "$ol_enable_relay" = mod ; then
25030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25031                 MFLAG=SLAPD_MOD_DYNAMIC
25032         else
25033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25034                 MFLAG=SLAPD_MOD_STATIC
25035         fi
25036         cat >> confdefs.h <<EOF
25037 #define SLAPD_RELAY $MFLAG
25038 EOF
25039
25040 fi
25041
25042 if test "$ol_enable_shell" != no ; then
25043         if test "$ol_link_thread" != no ; then
25044                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25045         fi
25046         BUILD_SLAPD=yes
25047         BUILD_SHELL=$ol_enable_shell
25048         if test "$ol_enable_shell" = mod ; then
25049                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25050                 MFLAG=SLAPD_MOD_DYNAMIC
25051         else
25052                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25053                 MFLAG=SLAPD_MOD_STATIC
25054         fi
25055         cat >> confdefs.h <<EOF
25056 #define SLAPD_SHELL $MFLAG
25057 EOF
25058
25059 fi
25060
25061 if test "$ol_link_sql" != no ; then
25062         BUILD_SLAPD=yes
25063         BUILD_SQL=$ol_enable_sql
25064         if test "$ol_enable_sql" = mod; then
25065                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25066                 MFLAG=SLAPD_MOD_DYNAMIC
25067         else
25068                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25069                 MFLAG=SLAPD_MOD_STATIC
25070         fi
25071         cat >> confdefs.h <<EOF
25072 #define SLAPD_SQL $MFLAG
25073 EOF
25074
25075 fi
25076
25077 if test "$ol_enable_accesslog" != no ; then
25078         BUILD_ACCESSLOG=$ol_enable_accesslog
25079         if test "$ol_enable_accesslog" = mod ; then
25080                 MFLAG=SLAPD_MOD_DYNAMIC
25081                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25082         else
25083                 MFLAG=SLAPD_MOD_STATIC
25084                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25085         fi
25086         cat >> confdefs.h <<EOF
25087 #define SLAPD_OVER_ACCESSLOG $MFLAG
25088 EOF
25089
25090 fi
25091
25092 if test "$ol_enable_denyop" != no ; then
25093         BUILD_DENYOP=$ol_enable_denyop
25094         if test "$ol_enable_denyop" = mod ; then
25095                 MFLAG=SLAPD_MOD_DYNAMIC
25096                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25097         else
25098                 MFLAG=SLAPD_MOD_STATIC
25099                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25100         fi
25101         cat >> confdefs.h <<EOF
25102 #define SLAPD_OVER_DENYOP $MFLAG
25103 EOF
25104
25105 fi
25106
25107 if test "$ol_enable_dyngroup" != no ; then
25108         BUILD_DYNGROUP=$ol_enable_dyngroup
25109         if test "$ol_enable_dyngroup" = mod ; then
25110                 MFLAG=SLAPD_MOD_DYNAMIC
25111                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25112         else
25113                 MFLAG=SLAPD_MOD_STATIC
25114                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25115         fi
25116         cat >> confdefs.h <<EOF
25117 #define SLAPD_OVER_DYNGROUP $MFLAG
25118 EOF
25119
25120 fi
25121
25122 if test "$ol_enable_dynlist" != no ; then
25123         BUILD_DYNLIST=$ol_enable_dynlist
25124         if test "$ol_enable_dynlist" = mod ; then
25125                 MFLAG=SLAPD_MOD_DYNAMIC
25126                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25127         else
25128                 MFLAG=SLAPD_MOD_STATIC
25129                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25130         fi
25131         cat >> confdefs.h <<EOF
25132 #define SLAPD_OVER_DYNLIST $MFLAG
25133 EOF
25134
25135 fi
25136
25137 if test "$ol_enable_glue" != no ; then
25138         BUILD_GLUE=$ol_enable_glue
25139         if test "$ol_enable_glue" = mod ; then
25140                 MFLAG=SLAPD_MOD_DYNAMIC
25141                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25142         else
25143                 MFLAG=SLAPD_MOD_STATIC
25144                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25145         fi
25146         cat >> confdefs.h <<EOF
25147 #define SLAPD_OVER_GLUE $MFLAG
25148 EOF
25149
25150 fi
25151
25152 if test "$ol_enable_lastmod" != no ; then
25153         BUILD_LASTMOD=$ol_enable_lastmod
25154         if test "$ol_enable_lastmod" = mod ; then
25155                 MFLAG=SLAPD_MOD_DYNAMIC
25156                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25157         else
25158                 MFLAG=SLAPD_MOD_STATIC
25159                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25160         fi
25161         cat >> confdefs.h <<EOF
25162 #define SLAPD_OVER_LASTMOD $MFLAG
25163 EOF
25164
25165 fi
25166
25167 if test "$ol_enable_ppolicy" != no ; then
25168         BUILD_PPOLICY=$ol_enable_ppolicy
25169         if test "$ol_enable_ppolicy" = mod ; then
25170                 MFLAG=SLAPD_MOD_DYNAMIC
25171                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25172         else
25173                 MFLAG=SLAPD_MOD_STATIC
25174                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25175         fi
25176         cat >> confdefs.h <<EOF
25177 #define SLAPD_OVER_PPOLICY $MFLAG
25178 EOF
25179
25180 fi
25181
25182 if test "$ol_enable_proxycache" != no ; then
25183         BUILD_PROXYCACHE=$ol_enable_proxycache
25184         if test "$ol_enable_proxycache" = mod ; then
25185                 MFLAG=SLAPD_MOD_DYNAMIC
25186                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25187         else
25188                 MFLAG=SLAPD_MOD_STATIC
25189                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25190         fi
25191         cat >> confdefs.h <<EOF
25192 #define SLAPD_OVER_PROXYCACHE $MFLAG
25193 EOF
25194
25195 fi
25196
25197 if test "$ol_enable_refint" != no ; then
25198         BUILD_REFINT=$ol_enable_refint
25199         if test "$ol_enable_refint" = mod ; then
25200                 MFLAG=SLAPD_MOD_DYNAMIC
25201                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25202         else
25203                 MFLAG=SLAPD_MOD_STATIC
25204                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25205         fi
25206         cat >> confdefs.h <<EOF
25207 #define SLAPD_OVER_REFINT $MFLAG
25208 EOF
25209
25210 fi
25211
25212 if test "$ol_enable_retcode" != no ; then
25213         BUILD_RETCODE=$ol_enable_retcode
25214         if test "$ol_enable_retcode" = mod ; then
25215                 MFLAG=SLAPD_MOD_DYNAMIC
25216                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
25217         else
25218                 MFLAG=SLAPD_MOD_STATIC
25219                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
25220         fi
25221         cat >> confdefs.h <<EOF
25222 #define SLAPD_OVER_RETCODE $MFLAG
25223 EOF
25224
25225 fi
25226
25227 if test "$ol_enable_rwm" != no ; then
25228         BUILD_REWRITE=yes
25229         BUILD_RWM=$ol_enable_rwm
25230         if test "$ol_enable_rwm" = mod ; then
25231                 MFLAG=SLAPD_MOD_DYNAMIC
25232                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25233         else
25234                 MFLAG=SLAPD_MOD_STATIC
25235                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25236         fi
25237         cat >> confdefs.h <<EOF
25238 #define SLAPD_OVER_RWM $MFLAG
25239 EOF
25240
25241 fi
25242
25243 if test "$ol_enable_syncprov" != no ; then
25244         BUILD_SYNCPROV=$ol_enable_syncprov
25245         if test "$ol_enable_syncprov" = mod ; then
25246                 MFLAG=SLAPD_MOD_DYNAMIC
25247                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25248         else
25249                 MFLAG=SLAPD_MOD_STATIC
25250                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25251         fi
25252         cat >> confdefs.h <<EOF
25253 #define SLAPD_OVER_SYNCPROV $MFLAG
25254 EOF
25255
25256 fi
25257
25258 if test "$ol_enable_translucent" != no ; then
25259         BUILD_TRANSLUCENT=$ol_enable_translucent
25260         if test "$ol_enable_translucent" = mod ; then
25261                 MFLAG=SLAPD_MOD_DYNAMIC
25262                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25263         else
25264                 MFLAG=SLAPD_MOD_STATIC
25265                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25266         fi
25267         cat >> confdefs.h <<EOF
25268 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25269 EOF
25270
25271 fi
25272
25273 if test "$ol_enable_unique" != no ; then
25274         BUILD_UNIQUE=$ol_enable_unique
25275         if test "$ol_enable_unique" = mod ; then
25276                 MFLAG=SLAPD_MOD_DYNAMIC
25277                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25278         else
25279                 MFLAG=SLAPD_MOD_STATIC
25280                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25281         fi
25282         cat >> confdefs.h <<EOF
25283 #define SLAPD_OVER_UNIQUE $MFLAG
25284 EOF
25285
25286 fi
25287
25288 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25289         $BUILD_SLAPD = yes ; then
25290         BUILD_SLURPD=yes
25291 fi
25292
25293 if test "$ol_enable_rewrite" != no ; then
25294         cat >> confdefs.h <<\EOF
25295 #define ENABLE_REWRITE 1
25296 EOF
25297
25298         BUILD_REWRITE=yes
25299 fi
25300
25301 if test "$ol_enable_slapi" != no ; then
25302         cat >> confdefs.h <<\EOF
25303 #define ENABLE_SLAPI 1
25304 EOF
25305
25306         BUILD_SLAPI=yes
25307         SLAPD_SLAPI_DEPEND=libslapi.a
25308 fi
25309
25310
25311
25312 if test "$ac_cv_mingw32" = yes ; then
25313         PLAT=NT
25314         SLAPD_MODULES_LDFLAGS=
25315 else
25316         PLAT=UNIX
25317 fi
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327   
25328   
25329   
25330   
25331   
25332   
25333   
25334   
25335   
25336   
25337   
25338   
25339   
25340   
25341   
25342   
25343   
25344   
25345   
25346   
25347   
25348   
25349   
25350   
25351   
25352   
25353   
25354   
25355   
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396 # Check whether --with-xxinstall or --without-xxinstall was given.
25397 if test "${with_xxinstall+set}" = set; then
25398   withval="$with_xxinstall"
25399   :
25400 fi
25401
25402
25403
25404 trap '' 1 2 15
25405
25406 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25407
25408 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25409 # Let make expand exec_prefix.
25410 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25411
25412 # Any assignment to VPATH causes Sun make to only execute
25413 # the first set of double-colon rules, so remove it if not needed.
25414 # If there is a colon in the path, we need to keep it.
25415 if test "x$srcdir" = x.; then
25416   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25417 fi
25418
25419 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25420
25421 DEFS=-DHAVE_CONFIG_H
25422
25423 # Without the "./", some shells look in PATH for config.status.
25424 : ${CONFIG_STATUS=./config.status}
25425
25426 echo creating $CONFIG_STATUS
25427 rm -f $CONFIG_STATUS
25428 cat > $CONFIG_STATUS <<EOF
25429 #! /bin/sh
25430 # Generated automatically by configure.
25431 # Run this file to recreate the current configuration.
25432 # This directory was configured as follows,
25433 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25434 #
25435 # $0 $ac_configure_args
25436 #
25437 # Compiler output produced by configure, useful for debugging
25438 # configure, is in ./config.log if it exists.
25439
25440 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25441 for ac_option
25442 do
25443   case "\$ac_option" in
25444   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25445     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25446     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25447   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25448     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25449     exit 0 ;;
25450   -help | --help | --hel | --he | --h)
25451     echo "\$ac_cs_usage"; exit 0 ;;
25452   *) echo "\$ac_cs_usage"; exit 1 ;;
25453   esac
25454 done
25455
25456 ac_given_srcdir=$srcdir
25457 ac_given_INSTALL="$INSTALL"
25458
25459 trap 'rm -fr `echo "\
25460 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25461 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25462 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25463 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25464 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25465 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25466 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25467 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25468 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25469 include/Makefile:build/top.mk:include/Makefile.in \
25470 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25471 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25472 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25473 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25474 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25475 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25476 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25477 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25478 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25479 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25480 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25481 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25482 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25483 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25484 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25485 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25486 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25487 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25488 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25489 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25490 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25491 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25492 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25493 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25494 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25495 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25496 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25497 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25498 tests/run \
25499 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25500  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25501 EOF
25502 cat >> $CONFIG_STATUS <<EOF
25503
25504 # Protect against being on the right side of a sed subst in config.status.
25505 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25506  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25507 $ac_vpsub
25508 $extrasub
25509 s%@SHELL@%$SHELL%g
25510 s%@CFLAGS@%$CFLAGS%g
25511 s%@CPPFLAGS@%$CPPFLAGS%g
25512 s%@CXXFLAGS@%$CXXFLAGS%g
25513 s%@FFLAGS@%$FFLAGS%g
25514 s%@DEFS@%$DEFS%g
25515 s%@LDFLAGS@%$LDFLAGS%g
25516 s%@LIBS@%$LIBS%g
25517 s%@exec_prefix@%$exec_prefix%g
25518 s%@prefix@%$prefix%g
25519 s%@program_transform_name@%$program_transform_name%g
25520 s%@bindir@%$bindir%g
25521 s%@sbindir@%$sbindir%g
25522 s%@libexecdir@%$libexecdir%g
25523 s%@datadir@%$datadir%g
25524 s%@sysconfdir@%$sysconfdir%g
25525 s%@sharedstatedir@%$sharedstatedir%g
25526 s%@localstatedir@%$localstatedir%g
25527 s%@libdir@%$libdir%g
25528 s%@includedir@%$includedir%g
25529 s%@oldincludedir@%$oldincludedir%g
25530 s%@infodir@%$infodir%g
25531 s%@mandir@%$mandir%g
25532 s%@host@%$host%g
25533 s%@host_alias@%$host_alias%g
25534 s%@host_cpu@%$host_cpu%g
25535 s%@host_vendor@%$host_vendor%g
25536 s%@host_os@%$host_os%g
25537 s%@target@%$target%g
25538 s%@target_alias@%$target_alias%g
25539 s%@target_cpu@%$target_cpu%g
25540 s%@target_vendor@%$target_vendor%g
25541 s%@target_os@%$target_os%g
25542 s%@build@%$build%g
25543 s%@build_alias@%$build_alias%g
25544 s%@build_cpu@%$build_cpu%g
25545 s%@build_vendor@%$build_vendor%g
25546 s%@build_os@%$build_os%g
25547 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25548 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25549 s%@INSTALL_DATA@%$INSTALL_DATA%g
25550 s%@PACKAGE@%$PACKAGE%g
25551 s%@VERSION@%$VERSION%g
25552 s%@ACLOCAL@%$ACLOCAL%g
25553 s%@AUTOCONF@%$AUTOCONF%g
25554 s%@AUTOMAKE@%$AUTOMAKE%g
25555 s%@AUTOHEADER@%$AUTOHEADER%g
25556 s%@MAKEINFO@%$MAKEINFO%g
25557 s%@install_sh@%$install_sh%g
25558 s%@AMTAR@%$AMTAR%g
25559 s%@AWK@%$AWK%g
25560 s%@AMTARFLAGS@%$AMTARFLAGS%g
25561 s%@SET_MAKE@%$SET_MAKE%g
25562 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25563 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25564 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25565 s%@top_builddir@%$top_builddir%g
25566 s%@ldap_subdir@%$ldap_subdir%g
25567 s%@CC@%$CC%g
25568 s%@AR@%$AR%g
25569 s%@LN_S@%$LN_S%g
25570 s%@OBJEXT@%$OBJEXT%g
25571 s%@EXEEXT@%$EXEEXT%g
25572 s%@ECHO@%$ECHO%g
25573 s%@RANLIB@%$RANLIB%g
25574 s%@STRIP@%$STRIP%g
25575 s%@DLLTOOL@%$DLLTOOL%g
25576 s%@AS@%$AS%g
25577 s%@OBJDUMP@%$OBJDUMP%g
25578 s%@CPP@%$CPP%g
25579 s%@LIBTOOL@%$LIBTOOL%g
25580 s%@PERLBIN@%$PERLBIN%g
25581 s%@OL_MKDEP@%$OL_MKDEP%g
25582 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25583 s%@LTSTATIC@%$LTSTATIC%g
25584 s%@LIBOBJS@%$LIBOBJS%g
25585 s%@LIBSRCS@%$LIBSRCS%g
25586 s%@PLAT@%$PLAT%g
25587 s%@WITH_SASL@%$WITH_SASL%g
25588 s%@WITH_TLS@%$WITH_TLS%g
25589 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25590 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25591 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25592 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25593 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25594 s%@BUILD_BDB@%$BUILD_BDB%g
25595 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25596 s%@BUILD_HDB@%$BUILD_HDB%g
25597 s%@BUILD_LDAP@%$BUILD_LDAP%g
25598 s%@BUILD_LDBM@%$BUILD_LDBM%g
25599 s%@BUILD_META@%$BUILD_META%g
25600 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25601 s%@BUILD_NULL@%$BUILD_NULL%g
25602 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25603 s%@BUILD_RELAY@%$BUILD_RELAY%g
25604 s%@BUILD_PERL@%$BUILD_PERL%g
25605 s%@BUILD_SHELL@%$BUILD_SHELL%g
25606 s%@BUILD_SQL@%$BUILD_SQL%g
25607 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25608 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25609 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25610 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25611 s%@BUILD_GLUE@%$BUILD_GLUE%g
25612 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25613 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25614 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25615 s%@BUILD_REFINT@%$BUILD_REFINT%g
25616 s%@BUILD_RETCODE@%$BUILD_RETCODE%g
25617 s%@BUILD_RWM@%$BUILD_RWM%g
25618 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25619 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25620 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25621 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25622 s%@LDAP_LIBS@%$LDAP_LIBS%g
25623 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25624 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25625 s%@LDBM_LIBS@%$LDBM_LIBS%g
25626 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25627 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25628 s%@WRAP_LIBS@%$WRAP_LIBS%g
25629 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25630 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25631 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25632 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25633 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25634 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25635 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25636 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25637 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25638 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25639 s%@KRB4_LIBS@%$KRB4_LIBS%g
25640 s%@KRB5_LIBS@%$KRB5_LIBS%g
25641 s%@SASL_LIBS@%$SASL_LIBS%g
25642 s%@TLS_LIBS@%$TLS_LIBS%g
25643 s%@MODULES_LIBS@%$MODULES_LIBS%g
25644 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25645 s%@LIBSLAPI@%$LIBSLAPI%g
25646 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25647 s%@AUTH_LIBS@%$AUTH_LIBS%g
25648 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25649 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25650 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25651 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25652 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25653
25654 CEOF
25655 EOF
25656
25657 cat >> $CONFIG_STATUS <<\EOF
25658
25659 # Split the substitutions into bite-sized pieces for seds with
25660 # small command number limits, like on Digital OSF/1 and HP-UX.
25661 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25662 ac_file=1 # Number of current file.
25663 ac_beg=1 # First line for current file.
25664 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25665 ac_more_lines=:
25666 ac_sed_cmds=""
25667 while $ac_more_lines; do
25668   if test $ac_beg -gt 1; then
25669     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25670   else
25671     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25672   fi
25673   if test ! -s conftest.s$ac_file; then
25674     ac_more_lines=false
25675     rm -f conftest.s$ac_file
25676   else
25677     if test -z "$ac_sed_cmds"; then
25678       ac_sed_cmds="sed -f conftest.s$ac_file"
25679     else
25680       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25681     fi
25682     ac_file=`expr $ac_file + 1`
25683     ac_beg=$ac_end
25684     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25685   fi
25686 done
25687 if test -z "$ac_sed_cmds"; then
25688   ac_sed_cmds=cat
25689 fi
25690 EOF
25691
25692 cat >> $CONFIG_STATUS <<EOF
25693
25694 CONFIG_FILES=\${CONFIG_FILES-"\
25695 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25696 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25697 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25698 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25699 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25700 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25701 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25702 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25703 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25704 include/Makefile:build/top.mk:include/Makefile.in \
25705 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25706 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25707 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25708 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25709 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25710 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25711 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25712 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25713 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25714 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25715 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25716 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25717 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25718 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25719 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25720 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25721 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25722 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25723 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25724 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25725 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25726 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25727 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25728 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25729 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25730 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25731 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25732 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25733 tests/run \
25734 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25735 "}
25736 EOF
25737 cat >> $CONFIG_STATUS <<\EOF
25738 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25739   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25740   case "$ac_file" in
25741   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25742        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25743   *) ac_file_in="${ac_file}.in" ;;
25744   esac
25745
25746   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25747
25748   # Remove last slash and all that follows it.  Not all systems have dirname.
25749   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25750   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25751     # The file is in a subdirectory.
25752     test ! -d "$ac_dir" && mkdir "$ac_dir"
25753     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25754     # A "../" for each directory in $ac_dir_suffix.
25755     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25756   else
25757     ac_dir_suffix= ac_dots=
25758   fi
25759
25760   case "$ac_given_srcdir" in
25761   .)  srcdir=.
25762       if test -z "$ac_dots"; then top_srcdir=.
25763       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25764   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25765   *) # Relative path.
25766     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25767     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25768   esac
25769
25770   case "$ac_given_INSTALL" in
25771   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25772   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25773   esac
25774
25775   echo creating "$ac_file"
25776   rm -f "$ac_file"
25777   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25778   case "$ac_file" in
25779   *[Mm]akefile*) ac_comsub="1i\\
25780 # $configure_input" ;;
25781   *) ac_comsub= ;;
25782   esac
25783
25784   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25785   sed -e "$ac_comsub
25786 s%@configure_input@%$configure_input%g
25787 s%@srcdir@%$srcdir%g
25788 s%@top_srcdir@%$top_srcdir%g
25789 s%@INSTALL@%$INSTALL%g
25790 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25791 fi; done
25792 rm -f conftest.s*
25793
25794 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25795 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25796 #
25797 # ac_d sets the value in "#define NAME VALUE" lines.
25798 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25799 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25800 ac_dC='\3'
25801 ac_dD='%g'
25802 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25803 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25804 ac_uB='\([      ]\)%\1#\2define\3'
25805 ac_uC=' '
25806 ac_uD='\4%g'
25807 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25808 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25809 ac_eB='$%\1#\2define\3'
25810 ac_eC=' '
25811 ac_eD='%g'
25812
25813 if test "${CONFIG_HEADERS+set}" != set; then
25814 EOF
25815 cat >> $CONFIG_STATUS <<EOF
25816   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25817 EOF
25818 cat >> $CONFIG_STATUS <<\EOF
25819 fi
25820 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25821   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25822   case "$ac_file" in
25823   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25824        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25825   *) ac_file_in="${ac_file}.in" ;;
25826   esac
25827
25828   echo creating $ac_file
25829
25830   rm -f conftest.frag conftest.in conftest.out
25831   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25832   cat $ac_file_inputs > conftest.in
25833
25834 EOF
25835
25836 # Transform confdefs.h into a sed script conftest.vals that substitutes
25837 # the proper values into config.h.in to produce config.h.  And first:
25838 # Protect against being on the right side of a sed subst in config.status.
25839 # Protect against being in an unquoted here document in config.status.
25840 rm -f conftest.vals
25841 cat > conftest.hdr <<\EOF
25842 s/[\\&%]/\\&/g
25843 s%[\\$`]%\\&%g
25844 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25845 s%ac_d%ac_u%gp
25846 s%ac_u%ac_e%gp
25847 EOF
25848 sed -n -f conftest.hdr confdefs.h > conftest.vals
25849 rm -f conftest.hdr
25850
25851 # This sed command replaces #undef with comments.  This is necessary, for
25852 # example, in the case of _POSIX_SOURCE, which is predefined and required
25853 # on some systems where configure will not decide to define it.
25854 cat >> conftest.vals <<\EOF
25855 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25856 EOF
25857
25858 # Break up conftest.vals because some shells have a limit on
25859 # the size of here documents, and old seds have small limits too.
25860
25861 rm -f conftest.tail
25862 while :
25863 do
25864   ac_lines=`grep -c . conftest.vals`
25865   # grep -c gives empty output for an empty file on some AIX systems.
25866   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25867   # Write a limited-size here document to conftest.frag.
25868   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25869   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25870   echo 'CEOF
25871   sed -f conftest.frag conftest.in > conftest.out
25872   rm -f conftest.in
25873   mv conftest.out conftest.in
25874 ' >> $CONFIG_STATUS
25875   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25876   rm -f conftest.vals
25877   mv conftest.tail conftest.vals
25878 done
25879 rm -f conftest.vals
25880
25881 cat >> $CONFIG_STATUS <<\EOF
25882   rm -f conftest.frag conftest.h
25883   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25884   cat conftest.in >> conftest.h
25885   rm -f conftest.in
25886   if cmp -s $ac_file conftest.h 2>/dev/null; then
25887     echo "$ac_file is unchanged"
25888     rm -f conftest.h
25889   else
25890     # Remove last slash and all that follows it.  Not all systems have dirname.
25891       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25892       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25893       # The file is in a subdirectory.
25894       test ! -d "$ac_dir" && mkdir "$ac_dir"
25895     fi
25896     rm -f $ac_file
25897     mv conftest.h $ac_file
25898   fi
25899 fi; done
25900
25901 EOF
25902 cat >> $CONFIG_STATUS <<EOF
25903 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25904 EOF
25905 cat >> $CONFIG_STATUS <<\EOF
25906
25907 chmod +x tests/run
25908 date > stamp-h
25909 BACKENDSC="servers/slapd/backends.c"
25910 echo "Making $BACKENDSC"
25911 rm -f $BACKENDSC
25912 cat > $BACKENDSC << ENDX
25913 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25914  *
25915  * Copyright 1998-2005 The OpenLDAP Foundation.
25916  * All rights reserved.
25917  *
25918  * Redistribution and use in source and binary forms, with or without
25919  * modification, are permitted only as authorized by the OpenLDAP
25920  * Public License.
25921  *
25922  * A copy of this license is available in the file LICENSE in the
25923  * top-level directory of the distribution or, alternatively, at
25924  * <http://www.OpenLDAP.org/license.html>.
25925  */
25926 /* This file is automatically generated by configure; please do not edit. */
25927
25928 #include "portable.h"
25929 #include "slap.h"
25930
25931 ENDX
25932 if test "${STATIC_BACKENDS}"; then
25933         for b in config ${STATIC_BACKENDS}; do
25934                 bb=`echo "${b}" | sed -e 's/back-//'`
25935                 cat >> $BACKENDSC << ENDX
25936 extern BI_init ${bb}_back_initialize;
25937 ENDX
25938         done
25939
25940         cat >> $BACKENDSC << ENDX
25941
25942 BackendInfo slap_binfo[] = {
25943 ENDX
25944
25945         for b in config ${STATIC_BACKENDS}; do
25946                 bb=`echo "${b}" | sed -e 's/back-//'`
25947                 echo "    Add ${bb} ..."
25948                 cat >> $BACKENDSC << ENDX
25949         { "${bb}", ${bb}_back_initialize },
25950 ENDX
25951         done
25952
25953         cat >> $BACKENDSC << ENDX
25954         { NULL, NULL },
25955 };
25956
25957 /* end of generated file */
25958 ENDX
25959 fi
25960
25961 echo Please run \"make depend\" to build dependencies
25962
25963 exit 0
25964 EOF
25965 chmod +x $CONFIG_STATUS
25966 rm -fr confdefs* $ac_clean_files
25967 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25968