]> git.sur5r.net Git - openldap/blob - configure
ITS#3616 don't index the dummy context entry
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.577 2005/04/08 16:46:18 ando 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 the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dynlist      Dynamic List overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
136 ac_help="$ac_help
137     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
146 ac_help="$ac_help
147     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]"
148 ac_help="$ac_help
149     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]"
150 ac_help="$ac_help
151     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
152 ac_help="$ac_help
153
154 SLURPD (Replication Daemon) Options:"
155 ac_help="$ac_help
156   --enable-slurpd         enable building slurpd [auto]"
157 ac_help="$ac_help
158
159 Library Generation & Linking Options"
160 ac_help="$ac_help
161   --enable-static[=PKGS]  build static libraries [default=yes]"
162 ac_help="$ac_help
163   --enable-shared[=PKGS]  build shared libraries [default=yes]"
164 ac_help="$ac_help
165   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
166 ac_help="$ac_help
167   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
168
169 # Find the correct PATH separator.  Usually this is `:', but
170 # DJGPP uses `;' like DOS.
171 if test "X${PATH_SEPARATOR+set}" != Xset; then
172   UNAME=${UNAME-`uname 2>/dev/null`}
173   case X$UNAME in
174     *-DOS) lt_cv_sys_path_separator=';' ;;
175     *)     lt_cv_sys_path_separator=':' ;;
176   esac
177   PATH_SEPARATOR=$lt_cv_sys_path_separator
178 fi
179
180
181 # Check that we are running under the correct shell.
182 SHELL=${CONFIG_SHELL-/bin/sh}
183
184 case X$ECHO in
185 X*--fallback-echo)
186   # Remove one level of quotation (which was required for Make).
187   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
188   ;;
189 esac
190
191 echo=${ECHO-echo}
192 if test "X$1" = X--no-reexec; then
193   # Discard the --no-reexec flag, and continue.
194   shift
195 elif test "X$1" = X--fallback-echo; then
196   # Avoid inline document here, it may be left over
197   :
198 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
199   # Yippee, $echo works!
200   :
201 else
202   # Restart under the correct shell.
203   exec $SHELL "$0" --no-reexec ${1+"$@"}
204 fi
205
206 if test "X$1" = X--fallback-echo; then
207   # used as fallback echo
208   shift
209   cat <<EOF
210
211 EOF
212   exit 0
213 fi
214
215 # The HP-UX ksh and POSIX shell print the target directory to stdout
216 # if CDPATH is set.
217 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
218
219 if test -z "$ECHO"; then
220 if test "X${echo_test_string+set}" != Xset; then
221 # find a string as large as possible, as long as the shell can cope with it
222   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
223     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
224     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
225        echo_test_string="`eval $cmd`" &&
226        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
227     then
228       break
229     fi
230   done
231 fi
232
233 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
234    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
235    test "X$echo_testing_string" = "X$echo_test_string"; then
236   :
237 else
238   # The Solaris, AIX, and Digital Unix default echo programs unquote
239   # backslashes.  This makes it impossible to quote backslashes using
240   #   echo "$something" | sed 's/\\/\\\\/g'
241   #
242   # So, first we look for a working echo in the user's PATH.
243
244   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
245   for dir in $PATH /usr/ucb; do
246     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
247        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       echo="$dir/echo"
251       break
252     fi
253   done
254   IFS="$save_ifs"
255
256   if test "X$echo" = Xecho; then
257     # We didn't find a better echo, so look for alternatives.
258     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
259        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
260        test "X$echo_testing_string" = "X$echo_test_string"; then
261       # This shell has a builtin print -r that does the trick.
262       echo='print -r'
263     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
264          test "X$CONFIG_SHELL" != X/bin/ksh; then
265       # If we have ksh, try running configure again with it.
266       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
267       export ORIGINAL_CONFIG_SHELL
268       CONFIG_SHELL=/bin/ksh
269       export CONFIG_SHELL
270       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
271     else
272       # Try using printf.
273       echo='printf %s\n'
274       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
275          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
276          test "X$echo_testing_string" = "X$echo_test_string"; then
277         # Cool, printf works
278         :
279       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
284         export CONFIG_SHELL
285         SHELL="$CONFIG_SHELL"
286         export SHELL
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
289            test "X$echo_testing_string" = 'X\t' &&
290            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
291            test "X$echo_testing_string" = "X$echo_test_string"; then
292         echo="$CONFIG_SHELL $0 --fallback-echo"
293       else
294         # maybe with a smaller string...
295         prev=:
296
297         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
298           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
299           then
300             break
301           fi
302           prev="$cmd"
303         done
304
305         if test "$prev" != 'sed 50q "$0"'; then
306           echo_test_string=`eval $prev`
307           export echo_test_string
308           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
309         else
310           # Oops.  We lost completely, so just stick with echo.
311           echo=echo
312         fi
313       fi
314     fi
315   fi
316 fi
317 fi
318
319 # Copy echo and quote the copy suitably for passing to libtool from
320 # the Makefile, instead of quoting the original, which is used later.
321 ECHO=$echo
322 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
323    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
324 fi
325
326
327 ac_help="$ac_help
328   --disable-libtool-lock  avoid locking (might break parallel builds)"
329 ac_help="$ac_help
330   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
331 ac_help="$ac_help
332
333 See INSTALL file for further details."
334
335 # Initialize some variables set by options.
336 # The variables have the same names as the options, with
337 # dashes changed to underlines.
338 build=NONE
339 cache_file=./config.cache
340 exec_prefix=NONE
341 host=NONE
342 no_create=
343 nonopt=NONE
344 no_recursion=
345 prefix=NONE
346 program_prefix=NONE
347 program_suffix=NONE
348 program_transform_name=s,x,x,
349 silent=
350 site=
351 srcdir=
352 target=NONE
353 verbose=
354 x_includes=NONE
355 x_libraries=NONE
356 bindir='${exec_prefix}/bin'
357 sbindir='${exec_prefix}/sbin'
358 libexecdir='${exec_prefix}/libexec'
359 datadir='${prefix}/share'
360 sysconfdir='${prefix}/etc'
361 sharedstatedir='${prefix}/com'
362 localstatedir='${prefix}/var'
363 libdir='${exec_prefix}/lib'
364 includedir='${prefix}/include'
365 oldincludedir='/usr/include'
366 infodir='${prefix}/info'
367 mandir='${prefix}/man'
368
369 # Initialize some other variables.
370 subdirs=
371 MFLAGS= MAKEFLAGS=
372 SHELL=${CONFIG_SHELL-/bin/sh}
373 # Maximum number of lines to put in a shell here document.
374 ac_max_here_lines=12
375
376 ac_prev=
377 for ac_option
378 do
379
380   # If the previous option needs an argument, assign it.
381   if test -n "$ac_prev"; then
382     eval "$ac_prev=\$ac_option"
383     ac_prev=
384     continue
385   fi
386
387   case "$ac_option" in
388   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
389   *) ac_optarg= ;;
390   esac
391
392   # Accept the important Cygnus configure options, so we can diagnose typos.
393
394   case "$ac_option" in
395
396   -bindir | --bindir | --bindi | --bind | --bin | --bi)
397     ac_prev=bindir ;;
398   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
399     bindir="$ac_optarg" ;;
400
401   -build | --build | --buil | --bui | --bu)
402     ac_prev=build ;;
403   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
404     build="$ac_optarg" ;;
405
406   -cache-file | --cache-file | --cache-fil | --cache-fi \
407   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
408     ac_prev=cache_file ;;
409   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
410   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
411     cache_file="$ac_optarg" ;;
412
413   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
414     ac_prev=datadir ;;
415   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
416   | --da=*)
417     datadir="$ac_optarg" ;;
418
419   -disable-* | --disable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     eval "enable_${ac_feature}=no" ;;
427
428   -enable-* | --enable-*)
429     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
430     # Reject names that are not valid shell variable names.
431     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
432       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
433     fi
434     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
435     case "$ac_option" in
436       *=*) ;;
437       *) ac_optarg=yes ;;
438     esac
439     eval "enable_${ac_feature}='$ac_optarg'" ;;
440
441   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
442   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
443   | --exec | --exe | --ex)
444     ac_prev=exec_prefix ;;
445   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
446   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
447   | --exec=* | --exe=* | --ex=*)
448     exec_prefix="$ac_optarg" ;;
449
450   -gas | --gas | --ga | --g)
451     # Obsolete; use --with-gas.
452     with_gas=yes ;;
453
454   -help | --help | --hel | --he)
455     # Omit some internal or obsolete options to make the list less imposing.
456     # This message is too long to be a string in the A/UX 3.1 sh.
457     cat << EOF
458 Usage: configure [options] [host]
459 Options: [defaults in brackets after descriptions]
460 Configuration:
461   --cache-file=FILE       cache test results in FILE
462   --help                  print this message
463   --no-create             do not create output files
464   --quiet, --silent       do not print \`checking...' messages
465   --version               print the version of autoconf that created configure
466 Directory and file names:
467   --prefix=PREFIX         install architecture-independent files in PREFIX
468                           [$ac_default_prefix]
469   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
470                           [same as prefix]
471   --bindir=DIR            user executables in DIR [EPREFIX/bin]
472   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
473   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
474   --datadir=DIR           read-only architecture-independent data in DIR
475                           [PREFIX/share]
476   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
477   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
478                           [PREFIX/com]
479   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
480   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
481   --includedir=DIR        C header files in DIR [PREFIX/include]
482   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
483   --infodir=DIR           info documentation in DIR [PREFIX/info]
484   --mandir=DIR            man documentation in DIR [PREFIX/man]
485   --srcdir=DIR            find the sources in DIR [configure dir or ..]
486   --program-prefix=PREFIX prepend PREFIX to installed program names
487   --program-suffix=SUFFIX append SUFFIX to installed program names
488   --program-transform-name=PROGRAM
489                           run sed PROGRAM on installed program names
490 EOF
491     cat << EOF
492 Host type:
493   --build=BUILD           configure for building on BUILD [BUILD=HOST]
494   --host=HOST             configure for HOST [guessed]
495   --target=TARGET         configure for TARGET [TARGET=HOST]
496 Features and packages:
497   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
498   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
499   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
500   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
501   --x-includes=DIR        X include files are in DIR
502   --x-libraries=DIR       X library files are in DIR
503 EOF
504     if test -n "$ac_help"; then
505       echo "--enable and --with options recognized:$ac_help"
506     fi
507     exit 0 ;;
508
509   -host | --host | --hos | --ho)
510     ac_prev=host ;;
511   -host=* | --host=* | --hos=* | --ho=*)
512     host="$ac_optarg" ;;
513
514   -includedir | --includedir | --includedi | --included | --include \
515   | --includ | --inclu | --incl | --inc)
516     ac_prev=includedir ;;
517   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
518   | --includ=* | --inclu=* | --incl=* | --inc=*)
519     includedir="$ac_optarg" ;;
520
521   -infodir | --infodir | --infodi | --infod | --info | --inf)
522     ac_prev=infodir ;;
523   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
524     infodir="$ac_optarg" ;;
525
526   -libdir | --libdir | --libdi | --libd)
527     ac_prev=libdir ;;
528   -libdir=* | --libdir=* | --libdi=* | --libd=*)
529     libdir="$ac_optarg" ;;
530
531   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
532   | --libexe | --libex | --libe)
533     ac_prev=libexecdir ;;
534   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
535   | --libexe=* | --libex=* | --libe=*)
536     libexecdir="$ac_optarg" ;;
537
538   -localstatedir | --localstatedir | --localstatedi | --localstated \
539   | --localstate | --localstat | --localsta | --localst \
540   | --locals | --local | --loca | --loc | --lo)
541     ac_prev=localstatedir ;;
542   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
543   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
544   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
545     localstatedir="$ac_optarg" ;;
546
547   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
548     ac_prev=mandir ;;
549   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
550     mandir="$ac_optarg" ;;
551
552   -nfp | --nfp | --nf)
553     # Obsolete; use --without-fp.
554     with_fp=no ;;
555
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c)
558     no_create=yes ;;
559
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
562     no_recursion=yes ;;
563
564   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
565   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
566   | --oldin | --oldi | --old | --ol | --o)
567     ac_prev=oldincludedir ;;
568   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
569   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
570   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
571     oldincludedir="$ac_optarg" ;;
572
573   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
574     ac_prev=prefix ;;
575   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
576     prefix="$ac_optarg" ;;
577
578   -program-prefix | --program-prefix | --program-prefi | --program-pref \
579   | --program-pre | --program-pr | --program-p)
580     ac_prev=program_prefix ;;
581   -program-prefix=* | --program-prefix=* | --program-prefi=* \
582   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
583     program_prefix="$ac_optarg" ;;
584
585   -program-suffix | --program-suffix | --program-suffi | --program-suff \
586   | --program-suf | --program-su | --program-s)
587     ac_prev=program_suffix ;;
588   -program-suffix=* | --program-suffix=* | --program-suffi=* \
589   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
590     program_suffix="$ac_optarg" ;;
591
592   -program-transform-name | --program-transform-name \
593   | --program-transform-nam | --program-transform-na \
594   | --program-transform-n | --program-transform- \
595   | --program-transform | --program-transfor \
596   | --program-transfo | --program-transf \
597   | --program-trans | --program-tran \
598   | --progr-tra | --program-tr | --program-t)
599     ac_prev=program_transform_name ;;
600   -program-transform-name=* | --program-transform-name=* \
601   | --program-transform-nam=* | --program-transform-na=* \
602   | --program-transform-n=* | --program-transform-=* \
603   | --program-transform=* | --program-transfor=* \
604   | --program-transfo=* | --program-transf=* \
605   | --program-trans=* | --program-tran=* \
606   | --progr-tra=* | --program-tr=* | --program-t=*)
607     program_transform_name="$ac_optarg" ;;
608
609   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
610   | -silent | --silent | --silen | --sile | --sil)
611     silent=yes ;;
612
613   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
614     ac_prev=sbindir ;;
615   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
616   | --sbi=* | --sb=*)
617     sbindir="$ac_optarg" ;;
618
619   -sharedstatedir | --sharedstatedir | --sharedstatedi \
620   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
621   | --sharedst | --shareds | --shared | --share | --shar \
622   | --sha | --sh)
623     ac_prev=sharedstatedir ;;
624   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
625   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
626   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
627   | --sha=* | --sh=*)
628     sharedstatedir="$ac_optarg" ;;
629
630   -site | --site | --sit)
631     ac_prev=site ;;
632   -site=* | --site=* | --sit=*)
633     site="$ac_optarg" ;;
634
635   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
636     ac_prev=srcdir ;;
637   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
638     srcdir="$ac_optarg" ;;
639
640   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
641   | --syscon | --sysco | --sysc | --sys | --sy)
642     ac_prev=sysconfdir ;;
643   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
644   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
645     sysconfdir="$ac_optarg" ;;
646
647   -target | --target | --targe | --targ | --tar | --ta | --t)
648     ac_prev=target ;;
649   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
650     target="$ac_optarg" ;;
651
652   -v | -verbose | --verbose | --verbos | --verbo | --verb)
653     verbose=yes ;;
654
655   -version | --version | --versio | --versi | --vers)
656     echo "configure generated by autoconf version 2.13.1"
657     exit 0 ;;
658
659   -with-* | --with-*)
660     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
661     # Reject names that are not valid shell variable names.
662     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
663       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
664     fi
665     ac_package=`echo $ac_package| sed 's/-/_/g'`
666     case "$ac_option" in
667       *=*) ;;
668       *) ac_optarg=yes ;;
669     esac
670     eval "with_${ac_package}='$ac_optarg'" ;;
671
672   -without-* | --without-*)
673     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
674     # Reject names that are not valid shell variable names.
675     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
676       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
677     fi
678     ac_package=`echo $ac_package| sed 's/-/_/g'`
679     eval "with_${ac_package}=no" ;;
680
681   --x)
682     # Obsolete; use --with-x.
683     with_x=yes ;;
684
685   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
686   | --x-incl | --x-inc | --x-in | --x-i)
687     ac_prev=x_includes ;;
688   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
689   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
690     x_includes="$ac_optarg" ;;
691
692   -x-libraries | --x-libraries | --x-librarie | --x-librari \
693   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
694     ac_prev=x_libraries ;;
695   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
696   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
697     x_libraries="$ac_optarg" ;;
698
699   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
700     ;;
701
702   *)
703     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
704       echo "configure: warning: $ac_option: invalid host type" 1>&2
705     fi
706     if test "x$nonopt" != xNONE; then
707       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
708     fi
709     nonopt="$ac_option"
710     ;;
711
712   esac
713 done
714
715 if test -n "$ac_prev"; then
716   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
717 fi
718
719 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
720
721 # File descriptor usage:
722 # 0 standard input
723 # 1 file creation
724 # 2 errors and warnings
725 # 3 some systems may open it to /dev/tty
726 # 4 used on the Kubota Titan
727 # 6 checking for... messages and results
728 # 5 compiler messages saved in config.log
729 if test "$silent" = yes; then
730   exec 6>/dev/null
731 else
732   exec 6>&1
733 fi
734 exec 5>./config.log
735
736 echo "\
737 This file contains any messages produced by compilers while
738 running configure, to aid debugging if configure makes a mistake.
739 " 1>&5
740
741 # Strip out --no-create and --no-recursion so they do not pile up.
742 # Also quote any args containing shell metacharacters.
743 ac_configure_args=
744 for ac_arg
745 do
746   case "$ac_arg" in
747   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
748   | --no-cr | --no-c) ;;
749   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
750   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
751   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
752   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
753   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
754   esac
755 done
756
757 # NLS nuisances.
758 # Only set these to C if already set.  These must not be set unconditionally
759 # because not all systems understand e.g. LANG=C (notably SCO).
760 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
761 # Non-C LC_CTYPE values break the ctype check.
762 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
763 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
764 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
765 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
766
767 # confdefs.h avoids OS command line length limits that DEFS can exceed.
768 rm -rf conftest* confdefs.h
769 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
770 echo > confdefs.h
771
772 # A filename unique to this package, relative to the directory that
773 # configure is in, which we can look for to find out if srcdir is correct.
774 ac_unique_file=build/version.sh
775
776 # Find the source files, if location was not specified.
777 if test -z "$srcdir"; then
778   ac_srcdir_defaulted=yes
779   # Try the directory containing this script, then its parent.
780   ac_prog=$0
781   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
782   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
783   srcdir=$ac_confdir
784   if test ! -r $srcdir/$ac_unique_file; then
785     srcdir=..
786   fi
787 else
788   ac_srcdir_defaulted=no
789 fi
790 if test ! -r $srcdir/$ac_unique_file; then
791   if test "$ac_srcdir_defaulted" = yes; then
792     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
793   else
794     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
795   fi
796 fi
797 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
798
799 # Prefer explicitly selected file to automatically selected ones.
800 if test -z "$CONFIG_SITE"; then
801   if test "x$prefix" != xNONE; then
802     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
803   else
804     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
805   fi
806 fi
807 for ac_site_file in $CONFIG_SITE; do
808   if test -r "$ac_site_file"; then
809     echo "loading site script $ac_site_file"
810     . "$ac_site_file"
811   fi
812 done
813
814
815 ac_ext=c
816 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817 ac_cpp='$CPP $CPPFLAGS'
818 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820 cross_compiling=$ac_cv_prog_cc_cross
821
822 ac_exeext=
823 ac_objext=o
824 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
825   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
826   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
827     ac_n= ac_c='
828 ' ac_t='        '
829   else
830     ac_n=-n ac_c= ac_t=
831   fi
832 else
833   ac_n= ac_c='\c' ac_t=
834 fi
835
836
837 # set unset (borrowed from autoconf 2.49c)
838 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
839   ol_unset=unset
840 else
841   ol_unset=false
842 fi
843 # unset CDPATH
844 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
845
846 ac_aux_dir=
847 for ac_dir in build $srcdir/build; do
848   if test -f $ac_dir/install-sh; then
849     ac_aux_dir=$ac_dir
850     ac_install_sh="$ac_aux_dir/install-sh -c"
851     break
852   elif 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/shtool; then
857     ac_aux_dir=$ac_dir
858     ac_install_sh="$ac_aux_dir/shtool install -c"
859     break
860   fi
861 done
862 if test -z "$ac_aux_dir"; then
863   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
864 fi
865 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
866 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
867 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
868
869 eval `$ac_aux_dir/version.sh`
870 if test -z "$OL_STRING"; then
871         { echo "configure: error: could not determine version" 1>&2; exit 1; }
872 fi
873
874 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
875         ac_cv_shtool="$ac_aux_dir/shtool"
876 else
877         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
878 fi
879
880 SHTOOL="$ac_cv_shtool"
881
882 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
883 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
884
885 OPENLDAP_CVS=""
886 if test -d $ac_aux_dir/CVS; then
887         OPENLDAP_CVS="(from CVS sources) "
888 fi
889
890 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
891
892
893 echo $ac_n "checking host system type""... $ac_c" 1>&6
894 echo "configure:895: checking host system type" >&5
895 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
896
897 # Make sure we can run config.sub.
898   if $ac_config_sub sun4 >/dev/null 2>&1; then :
899     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
900   fi
901
902   ac_cv_host_alias=$host
903   case "$ac_cv_host_alias" in
904   NONE)
905     case $nonopt in
906     NONE)
907       if ac_cv_host_alias=`$ac_config_guess`; then :
908       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
909       fi ;;
910     *) ac_cv_host_alias=$nonopt ;;
911     esac ;;
912   esac
913
914   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
915   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
916   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
917   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
918 else
919   echo $ac_n "(cached) $ac_c" 1>&6
920 fi
921
922 echo "$ac_t""$ac_cv_host" 1>&6
923
924 host=$ac_cv_host
925 host_alias=$ac_cv_host_alias
926 host_cpu=$ac_cv_host_cpu
927 host_vendor=$ac_cv_host_vendor
928 host_os=$ac_cv_host_os
929
930
931
932
933
934 echo $ac_n "checking target system type""... $ac_c" 1>&6
935 echo "configure:936: checking target system type" >&5
936 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
937
938 # Make sure we can run config.sub.
939   if $ac_config_sub sun4 >/dev/null 2>&1; then :
940     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
941   fi
942
943   ac_cv_target_alias=$target
944   case "$ac_cv_target_alias" in
945   NONE)
946     case $nonopt in
947     NONE)
948       ac_cv_target_alias=$host_alias ;;
949
950     *) ac_cv_target_alias=$nonopt ;;
951     esac ;;
952   esac
953
954   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
955   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
956   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
957   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
958 else
959   echo $ac_n "(cached) $ac_c" 1>&6
960 fi
961
962 echo "$ac_t""$ac_cv_target" 1>&6
963
964 target=$ac_cv_target
965 target_alias=$ac_cv_target_alias
966 target_cpu=$ac_cv_target_cpu
967 target_vendor=$ac_cv_target_vendor
968 target_os=$ac_cv_target_os
969
970
971
972
973
974 echo $ac_n "checking build system type""... $ac_c" 1>&6
975 echo "configure:976: checking build system type" >&5
976 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
977
978 # Make sure we can run config.sub.
979   if $ac_config_sub sun4 >/dev/null 2>&1; then :
980     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
981   fi
982
983   ac_cv_build_alias=$build
984   case "$ac_cv_build_alias" in
985   NONE)
986     case $nonopt in
987     NONE)
988       ac_cv_build_alias=$host_alias ;;
989
990     *) ac_cv_build_alias=$nonopt ;;
991     esac ;;
992   esac
993
994   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
995   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
996   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
997   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
998 else
999   echo $ac_n "(cached) $ac_c" 1>&6
1000 fi
1001
1002 echo "$ac_t""$ac_cv_build" 1>&6
1003
1004 build=$ac_cv_build
1005 build_alias=$ac_cv_build_alias
1006 build_cpu=$ac_cv_build_cpu
1007 build_vendor=$ac_cv_build_vendor
1008 build_os=$ac_cv_build_os
1009
1010
1011
1012
1013
1014 # Do some error checking and defaulting for the host and target type.
1015 # The inputs are:
1016 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1017 #
1018 # The rules are:
1019 # 1. You are not allowed to specify --host, --target, and nonopt at the
1020 #    same time.
1021 # 2. Host defaults to nonopt.
1022 # 3. If nonopt is not specified, then host defaults to the current host,
1023 #    as determined by config.guess.
1024 # 4. Target and build default to nonopt.
1025 # 5. If nonopt is not specified, then target and build default to host.
1026
1027 # The aliases save the names the user supplied, while $host etc.
1028 # will get canonicalized.
1029 case $host---$target---$nonopt in
1030 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1031 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1032 esac
1033
1034 test "$host_alias" != "$target_alias" &&
1035   test "$program_prefix$program_suffix$program_transform_name" = \
1036     NONENONEs,x,x, &&
1037   program_prefix=${target_alias}-
1038
1039
1040 # Find a good install program.  We prefer a C program (faster),
1041 # so one script is as good as another.  But avoid the broken or
1042 # incompatible versions:
1043 # SysV /etc/install, /usr/sbin/install
1044 # SunOS /usr/etc/install
1045 # IRIX /sbin/install
1046 # AIX /bin/install
1047 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1048 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1049 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1050 # ./install, which can be erroneously created by make from ./install.sh.
1051 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1052 echo "configure:1053: checking for a BSD compatible install" >&5
1053 if test -z "$INSTALL"; then
1054 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1055   echo $ac_n "(cached) $ac_c" 1>&6
1056 else
1057     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1058   for ac_dir in $PATH; do
1059     # Account for people who put trailing slashes in PATH elements.
1060     case "$ac_dir/" in
1061     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1062     *)
1063       # OSF1 and SCO ODT 3.0 have their own names for install.
1064       # Don't use installbsd from OSF since it installs stuff as root
1065       # by default.
1066       for ac_prog in ginstall scoinst install; do
1067         if test -f $ac_dir/$ac_prog; then
1068           if test $ac_prog = install &&
1069             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1070             # AIX install.  It has an incompatible calling convention.
1071             :
1072           elif test $ac_prog = install &&
1073             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1074             # program-specific install script used by HP pwplus--don't use.
1075             :
1076           else
1077             ac_cv_path_install="$ac_dir/$ac_prog -c"
1078             break 2
1079           fi
1080         fi
1081       done
1082       ;;
1083     esac
1084   done
1085   IFS="$ac_save_IFS"
1086
1087 fi
1088   if test "${ac_cv_path_install+set}" = set; then
1089     INSTALL="$ac_cv_path_install"
1090   else
1091     # As a last resort, use the slow shell script.  We don't cache a
1092     # path for INSTALL within a source directory, because that will
1093     # break other packages using the cache if that directory is
1094     # removed, or if the path is relative.
1095     INSTALL="$ac_install_sh"
1096   fi
1097 fi
1098 echo "$ac_t""$INSTALL" 1>&6
1099
1100 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1101 # It thinks the first close brace ends the variable substitution.
1102 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1103
1104 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1105
1106 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1107
1108 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1109 echo "configure:1110: checking whether build environment is sane" >&5
1110 # Just in case
1111 sleep 1
1112 echo timestamp > conftestfile
1113 # Do `set' in a subshell so we don't clobber the current shell's
1114 # arguments.  Must try -L first in case configure is actually a
1115 # symlink; some systems play weird games with the mod time of symlinks
1116 # (eg FreeBSD returns the mod time of the symlink's containing
1117 # directory).
1118 if (
1119    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1120    if test "$*" = "X"; then
1121       # -L didn't work.
1122       set X `ls -t $srcdir/configure conftestfile`
1123    fi
1124    if test "$*" != "X $srcdir/configure conftestfile" \
1125       && test "$*" != "X conftestfile $srcdir/configure"; then
1126
1127       # If neither matched, then we have a broken ls.  This can happen
1128       # if, for instance, CONFIG_SHELL is bash and it inherits a
1129       # broken ls alias from the environment.  This has actually
1130       # happened.  Such a system could not be considered "sane".
1131       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1132 alias in your environment" 1>&2; exit 1; }
1133    fi
1134
1135    test "$2" = conftestfile
1136    )
1137 then
1138    # Ok.
1139    :
1140 else
1141    { echo "configure: error: newly created file is older than distributed files!
1142 Check your system clock" 1>&2; exit 1; }
1143 fi
1144 rm -f conftest*
1145 echo "$ac_t""yes" 1>&6
1146 if test "$program_transform_name" = s,x,x,; then
1147   program_transform_name=
1148 else
1149   # Double any \ or $.  echo might interpret backslashes.
1150   cat <<\EOF_SED > conftestsed
1151 s,\\,\\\\,g; s,\$,$$,g
1152 EOF_SED
1153   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1154   rm -f conftestsed
1155 fi
1156 test "$program_prefix" != NONE &&
1157   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1158 # Use a double $ so make ignores it.
1159 test "$program_suffix" != NONE &&
1160   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1161
1162 # sed with no file args requires a program.
1163 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1164
1165 for ac_prog in mawk gawk nawk awk
1166 do
1167 # Extract the first word of "$ac_prog", so it can be a program name with args.
1168 set dummy $ac_prog; ac_word=$2
1169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1170 echo "configure:1171: checking for $ac_word" >&5
1171 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   if test -n "$AWK"; then
1175   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1176 else
1177   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1178   ac_dummy="$PATH"
1179   for ac_dir in $ac_dummy; do
1180     test -z "$ac_dir" && ac_dir=.
1181     if test -f $ac_dir/$ac_word; then
1182       ac_cv_prog_AWK="$ac_prog"
1183       break
1184     fi
1185   done
1186   IFS="$ac_save_ifs"
1187 fi
1188 fi
1189 AWK="$ac_cv_prog_AWK"
1190 if test -n "$AWK"; then
1191   echo "$ac_t""$AWK" 1>&6
1192 else
1193   echo "$ac_t""no" 1>&6
1194 fi
1195
1196 test -n "$AWK" && break
1197 done
1198
1199 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1200 echo "configure:1201: checking whether ${MAKE-make} sets \${MAKE}" >&5
1201 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1202 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1203   echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205   cat > conftestmake <<\EOF
1206 all:
1207         @echo 'ac_maketemp="${MAKE}"'
1208 EOF
1209 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1210 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1211 if test -n "$ac_maketemp"; then
1212   eval ac_cv_prog_make_${ac_make}_set=yes
1213 else
1214   eval ac_cv_prog_make_${ac_make}_set=no
1215 fi
1216 rm -f conftestmake
1217 fi
1218 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1219   echo "$ac_t""yes" 1>&6
1220   SET_MAKE=
1221 else
1222   echo "$ac_t""no" 1>&6
1223   SET_MAKE="MAKE=${MAKE-make}"
1224 fi
1225
1226
1227
1228 PACKAGE=$OL_PACKAGE
1229
1230 VERSION=$OL_VERSION
1231
1232 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1233   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1234 fi
1235
1236
1237
1238 missing_dir=`cd $ac_aux_dir && pwd`
1239 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1240 echo "configure:1241: checking for working aclocal" >&5
1241 # Run test in a subshell; some versions of sh will print an error if
1242 # an executable is not found, even if stderr is redirected.
1243 # Redirect stdin to placate older versions of autoconf.  Sigh.
1244 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1245    ACLOCAL=aclocal
1246    echo "$ac_t""found" 1>&6
1247 else
1248    ACLOCAL="$missing_dir/missing aclocal"
1249    echo "$ac_t""missing" 1>&6
1250 fi
1251
1252 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1253 echo "configure:1254: checking for working autoconf" >&5
1254 # Run test in a subshell; some versions of sh will print an error if
1255 # an executable is not found, even if stderr is redirected.
1256 # Redirect stdin to placate older versions of autoconf.  Sigh.
1257 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1258    AUTOCONF=autoconf
1259    echo "$ac_t""found" 1>&6
1260 else
1261    AUTOCONF="$missing_dir/missing autoconf"
1262    echo "$ac_t""missing" 1>&6
1263 fi
1264
1265 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1266 echo "configure:1267: checking for working automake" >&5
1267 # Run test in a subshell; some versions of sh will print an error if
1268 # an executable is not found, even if stderr is redirected.
1269 # Redirect stdin to placate older versions of autoconf.  Sigh.
1270 if (automake --version) < /dev/null > /dev/null 2>&1; then
1271    AUTOMAKE=automake
1272    echo "$ac_t""found" 1>&6
1273 else
1274    AUTOMAKE="$missing_dir/missing automake"
1275    echo "$ac_t""missing" 1>&6
1276 fi
1277
1278 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1279 echo "configure:1280: checking for working autoheader" >&5
1280 # Run test in a subshell; some versions of sh will print an error if
1281 # an executable is not found, even if stderr is redirected.
1282 # Redirect stdin to placate older versions of autoconf.  Sigh.
1283 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1284    AUTOHEADER=autoheader
1285    echo "$ac_t""found" 1>&6
1286 else
1287    AUTOHEADER="$missing_dir/missing autoheader"
1288    echo "$ac_t""missing" 1>&6
1289 fi
1290
1291 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1292 echo "configure:1293: checking for working makeinfo" >&5
1293 # Run test in a subshell; some versions of sh will print an error if
1294 # an executable is not found, even if stderr is redirected.
1295 # Redirect stdin to placate older versions of autoconf.  Sigh.
1296 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1297    MAKEINFO=makeinfo
1298    echo "$ac_t""found" 1>&6
1299 else
1300    MAKEINFO="$missing_dir/missing makeinfo"
1301    echo "$ac_t""missing" 1>&6
1302 fi
1303
1304 install_sh="$missing_dir/install-sh"
1305 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1306
1307 for ac_prog in gnutar gtar tar
1308 do
1309 # Extract the first word of "$ac_prog", so it can be a program name with args.
1310 set dummy $ac_prog; ac_word=$2
1311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1312 echo "configure:1313: checking for $ac_word" >&5
1313 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1314   echo $ac_n "(cached) $ac_c" 1>&6
1315 else
1316   if test -n "$AMTAR"; then
1317   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1318 else
1319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1320   ac_dummy="$PATH"
1321   for ac_dir in $ac_dummy; do
1322     test -z "$ac_dir" && ac_dir=.
1323     if test -f $ac_dir/$ac_word; then
1324       ac_cv_prog_AMTAR="$ac_prog"
1325       break
1326     fi
1327   done
1328   IFS="$ac_save_ifs"
1329 fi
1330 fi
1331 AMTAR="$ac_cv_prog_AMTAR"
1332 if test -n "$AMTAR"; then
1333   echo "$ac_t""$AMTAR" 1>&6
1334 else
1335   echo "$ac_t""no" 1>&6
1336 fi
1337
1338 test -n "$AMTAR" && break
1339 done
1340
1341
1342 AMTARFLAGS=
1343 if test -n "$AMTAR"; then
1344   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1345         AMTARFLAGS=o
1346   fi
1347 fi
1348
1349 cat >> confdefs.h <<EOF
1350 #define OPENLDAP_PACKAGE "$PACKAGE"
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define OPENLDAP_VERSION "$VERSION"
1355 EOF
1356
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION $OL_API_INC
1360 EOF
1361
1362 cat >> confdefs.h <<EOF
1363 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1368 EOF
1369
1370 cat >> confdefs.h <<EOF
1371 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1372 EOF
1373
1374
1375 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1376
1377 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1378
1379 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1380
1381
1382
1383 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1384 echo "configure:1385: checking configure arguments" >&5
1385
1386
1387 top_builddir=`pwd`
1388
1389 ldap_subdir="/openldap"
1390
1391 # Check whether --with-subdir or --without-subdir was given.
1392 if test "${with_subdir+set}" = set; then
1393   withval="$with_subdir"
1394   case "$withval" in
1395         no) ldap_subdir=""
1396                 ;;
1397         yes)
1398                 ;;
1399         /*|\\*)
1400                 ldap_subdir="$withval"
1401                 ;;
1402         *)
1403                 ldap_subdir="/$withval"
1404                 ;;
1405 esac
1406
1407 fi
1408
1409
1410 # OpenLDAP --enable-debug
1411         # Check whether --enable-debug or --disable-debug was given.
1412 if test "${enable_debug+set}" = set; then
1413   enableval="$enable_debug"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto yes no ; do
1417                 if test "$enableval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1423         fi
1424         ol_enable_debug="$ol_arg"
1425
1426 else
1427         ol_enable_debug="yes"
1428 fi
1429 # end --enable-debug
1430 # OpenLDAP --enable-dynamic
1431         # Check whether --enable-dynamic or --disable-dynamic was given.
1432 if test "${enable_dynamic+set}" = set; then
1433   enableval="$enable_dynamic"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1443         fi
1444         ol_enable_dynamic="$ol_arg"
1445
1446 else
1447         ol_enable_dynamic="no"
1448 fi
1449 # end --enable-dynamic
1450 # OpenLDAP --enable-syslog
1451         # Check whether --enable-syslog or --disable-syslog was given.
1452 if test "${enable_syslog+set}" = set; then
1453   enableval="$enable_syslog"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto yes no ; do
1457                 if test "$enableval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1463         fi
1464         ol_enable_syslog="$ol_arg"
1465
1466 else
1467         ol_enable_syslog="auto"
1468 fi
1469 # end --enable-syslog
1470 # OpenLDAP --enable-proctitle
1471         # Check whether --enable-proctitle or --disable-proctitle was given.
1472 if test "${enable_proctitle+set}" = set; then
1473   enableval="$enable_proctitle"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no ; do
1477                 if test "$enableval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1483         fi
1484         ol_enable_proctitle="$ol_arg"
1485
1486 else
1487         ol_enable_proctitle="yes"
1488 fi
1489 # end --enable-proctitle
1490 ol_enable_referrals=${ol_enable_referrals-no}
1491 ol_enable_kbind=${ol_enable_kbind-no}
1492 # OpenLDAP --enable-ipv6
1493         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1494 if test "${enable_ipv6+set}" = set; then
1495   enableval="$enable_ipv6"
1496   
1497         ol_arg=invalid
1498         for ol_val in auto yes no ; do
1499                 if test "$enableval" = "$ol_val" ; then
1500                         ol_arg="$ol_val"
1501                 fi
1502         done
1503         if test "$ol_arg" = "invalid" ; then
1504                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1505         fi
1506         ol_enable_ipv6="$ol_arg"
1507
1508 else
1509         ol_enable_ipv6="auto"
1510 fi
1511 # end --enable-ipv6
1512 # OpenLDAP --enable-local
1513         # Check whether --enable-local or --disable-local was given.
1514 if test "${enable_local+set}" = set; then
1515   enableval="$enable_local"
1516   
1517         ol_arg=invalid
1518         for ol_val in auto yes no ; do
1519                 if test "$enableval" = "$ol_val" ; then
1520                         ol_arg="$ol_val"
1521                 fi
1522         done
1523         if test "$ol_arg" = "invalid" ; then
1524                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1525         fi
1526         ol_enable_local="$ol_arg"
1527
1528 else
1529         ol_enable_local="auto"
1530 fi
1531 # end --enable-local
1532
1533
1534 # OpenLDAP --with-cyrus_sasl
1535         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1536 if test "${with_cyrus_sasl+set}" = set; then
1537   withval="$with_cyrus_sasl"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no  ; do
1541                 if test "$withval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1547         fi
1548         ol_with_cyrus_sasl="$ol_arg"
1549
1550 else
1551         ol_with_cyrus_sasl="auto"
1552 fi
1553 # end --with-cyrus_sasl
1554
1555 # OpenLDAP --with-fetch
1556         # Check whether --with-fetch or --without-fetch was given.
1557 if test "${with_fetch+set}" = set; then
1558   withval="$with_fetch"
1559   
1560         ol_arg=invalid
1561         for ol_val in auto yes no  ; do
1562                 if test "$withval" = "$ol_val" ; then
1563                         ol_arg="$ol_val"
1564                 fi
1565         done
1566         if test "$ol_arg" = "invalid" ; then
1567                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1568         fi
1569         ol_with_fetch="$ol_arg"
1570
1571 else
1572         ol_with_fetch="auto"
1573 fi
1574 # end --with-fetch
1575
1576 ol_with_kerberos=${ol_with_kerberos-auto}
1577 # OpenLDAP --with-threads
1578         # Check whether --with-threads or --without-threads was given.
1579 if test "${with_threads+set}" = set; then
1580   withval="$with_threads"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1584                 if test "$withval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1590         fi
1591         ol_with_threads="$ol_arg"
1592
1593 else
1594         ol_with_threads="auto"
1595 fi
1596 # end --with-threads
1597
1598 # OpenLDAP --with-tls
1599         # Check whether --with-tls or --without-tls was given.
1600 if test "${with_tls+set}" = set; then
1601   withval="$with_tls"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto ssleay openssl yes no  ; do
1605                 if test "$withval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1611         fi
1612         ol_with_tls="$ol_arg"
1613
1614 else
1615         ol_with_tls="auto"
1616 fi
1617 # end --with-tls
1618
1619 # OpenLDAP --with-yielding_select
1620         # Check whether --with-yielding_select or --without-yielding_select was given.
1621 if test "${with_yielding_select+set}" = set; then
1622   withval="$with_yielding_select"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no manual  ; do
1626                 if test "$withval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1632         fi
1633         ol_with_yielding_select="$ol_arg"
1634
1635 else
1636         ol_with_yielding_select="auto"
1637 fi
1638 # end --with-yielding_select
1639
1640 # OpenLDAP --with-multiple_precision
1641         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1642 if test "${with_multiple_precision+set}" = set; then
1643   withval="$with_multiple_precision"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto bignum gmp yes no  ; do
1647                 if test "$withval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1653         fi
1654         ol_with_multiple_precision="$ol_arg"
1655
1656 else
1657         ol_with_multiple_precision="auto"
1658 fi
1659 # end --with-multiple_precision
1660
1661
1662
1663 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1664 if test "${with_xxslapdoptions+set}" = set; then
1665   withval="$with_xxslapdoptions"
1666   :
1667 fi
1668
1669 # OpenLDAP --enable-slapd
1670         # Check whether --enable-slapd or --disable-slapd was given.
1671 if test "${enable_slapd+set}" = set; then
1672   enableval="$enable_slapd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_slapd="$ol_arg"
1684
1685 else
1686         ol_enable_slapd="yes"
1687 fi
1688 # end --enable-slapd
1689 # OpenLDAP --enable-aci
1690         # Check whether --enable-aci or --disable-aci was given.
1691 if test "${enable_aci+set}" = set; then
1692   enableval="$enable_aci"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1702         fi
1703         ol_enable_aci="$ol_arg"
1704
1705 else
1706         ol_enable_aci="no"
1707 fi
1708 # end --enable-aci
1709 # OpenLDAP --enable-cleartext
1710         # Check whether --enable-cleartext or --disable-cleartext was given.
1711 if test "${enable_cleartext+set}" = set; then
1712   enableval="$enable_cleartext"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1722         fi
1723         ol_enable_cleartext="$ol_arg"
1724
1725 else
1726         ol_enable_cleartext="yes"
1727 fi
1728 # end --enable-cleartext
1729 # OpenLDAP --enable-crypt
1730         # Check whether --enable-crypt or --disable-crypt was given.
1731 if test "${enable_crypt+set}" = set; then
1732   enableval="$enable_crypt"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1742         fi
1743         ol_enable_crypt="$ol_arg"
1744
1745 else
1746         ol_enable_crypt="no"
1747 fi
1748 # end --enable-crypt
1749 # OpenLDAP --enable-lmpasswd
1750         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1751 if test "${enable_lmpasswd+set}" = set; then
1752   enableval="$enable_lmpasswd"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1762         fi
1763         ol_enable_lmpasswd="$ol_arg"
1764
1765 else
1766         ol_enable_lmpasswd="no"
1767 fi
1768 # end --enable-lmpasswd
1769 # OpenLDAP --enable-spasswd
1770         # Check whether --enable-spasswd or --disable-spasswd was given.
1771 if test "${enable_spasswd+set}" = set; then
1772   enableval="$enable_spasswd"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1782         fi
1783         ol_enable_spasswd="$ol_arg"
1784
1785 else
1786         ol_enable_spasswd="no"
1787 fi
1788 # end --enable-spasswd
1789 # OpenLDAP --enable-modules
1790         # Check whether --enable-modules or --disable-modules was given.
1791 if test "${enable_modules+set}" = set; then
1792   enableval="$enable_modules"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1802         fi
1803         ol_enable_modules="$ol_arg"
1804
1805 else
1806         ol_enable_modules="no"
1807 fi
1808 # end --enable-modules
1809 ol_enable_multimaster=${ol_enable_multimaster-no}
1810 # OpenLDAP --enable-rewrite
1811         # Check whether --enable-rewrite or --disable-rewrite was given.
1812 if test "${enable_rewrite+set}" = set; then
1813   enableval="$enable_rewrite"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1823         fi
1824         ol_enable_rewrite="$ol_arg"
1825
1826 else
1827         ol_enable_rewrite="auto"
1828 fi
1829 # end --enable-rewrite
1830 # OpenLDAP --enable-rlookups
1831         # Check whether --enable-rlookups or --disable-rlookups was given.
1832 if test "${enable_rlookups+set}" = set; then
1833   enableval="$enable_rlookups"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1843         fi
1844         ol_enable_rlookups="$ol_arg"
1845
1846 else
1847         ol_enable_rlookups="no"
1848 fi
1849 # end --enable-rlookups
1850 # OpenLDAP --enable-slapi
1851         # Check whether --enable-slapi or --disable-slapi was given.
1852 if test "${enable_slapi+set}" = set; then
1853   enableval="$enable_slapi"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1863         fi
1864         ol_enable_slapi="$ol_arg"
1865
1866 else
1867         ol_enable_slapi="no"
1868 fi
1869 # end --enable-slapi
1870 # OpenLDAP --enable-slp
1871         # Check whether --enable-slp or --disable-slp was given.
1872 if test "${enable_slp+set}" = set; then
1873   enableval="$enable_slp"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto yes no ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1883         fi
1884         ol_enable_slp="$ol_arg"
1885
1886 else
1887         ol_enable_slp="no"
1888 fi
1889 # end --enable-slp
1890 # OpenLDAP --enable-wrappers
1891         # Check whether --enable-wrappers or --disable-wrappers was given.
1892 if test "${enable_wrappers+set}" = set; then
1893   enableval="$enable_wrappers"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1903         fi
1904         ol_enable_wrappers="$ol_arg"
1905
1906 else
1907         ol_enable_wrappers="no"
1908 fi
1909 # end --enable-wrappers
1910
1911 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1912         passwd perl relay shell sql"
1913
1914 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1915 if test "${with_xxslapbackends+set}" = set; then
1916   withval="$with_xxslapbackends"
1917   :
1918 fi
1919
1920
1921 # OpenLDAP --enable-backends
1922         # Check whether --enable-backends or --disable-backends was given.
1923 if test "${enable_backends+set}" = set; then
1924   enableval="$enable_backends"
1925   
1926         ol_arg=invalid
1927         for ol_val in no yes mod ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1934         fi
1935         ol_enable_backends="$ol_arg"
1936
1937 else
1938         ol_enable_backends="no"
1939 fi
1940 # end --enable-backends
1941 # OpenLDAP --enable-bdb
1942         # Check whether --enable-bdb or --disable-bdb was given.
1943 if test "${enable_bdb+set}" = set; then
1944   enableval="$enable_bdb"
1945   
1946         ol_arg=invalid
1947         for ol_val in no yes mod ; do
1948                 if test "$enableval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1954         fi
1955         ol_enable_bdb="$ol_arg"
1956
1957 else
1958         ol_enable_bdb="yes"
1959 fi
1960 # end --enable-bdb
1961 # OpenLDAP --enable-dnssrv
1962         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1963 if test "${enable_dnssrv+set}" = set; then
1964   enableval="$enable_dnssrv"
1965   
1966         ol_arg=invalid
1967         for ol_val in no yes mod ; do
1968                 if test "$enableval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1974         fi
1975         ol_enable_dnssrv="$ol_arg"
1976
1977 else
1978         ol_enable_dnssrv="no"
1979 fi
1980 # end --enable-dnssrv
1981 # OpenLDAP --enable-hdb
1982         # Check whether --enable-hdb or --disable-hdb was given.
1983 if test "${enable_hdb+set}" = set; then
1984   enableval="$enable_hdb"
1985   
1986         ol_arg=invalid
1987         for ol_val in no yes mod ; do
1988                 if test "$enableval" = "$ol_val" ; then
1989                         ol_arg="$ol_val"
1990                 fi
1991         done
1992         if test "$ol_arg" = "invalid" ; then
1993                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1994         fi
1995         ol_enable_hdb="$ol_arg"
1996
1997 else
1998         ol_enable_hdb="yes"
1999 fi
2000 # end --enable-hdb
2001 # OpenLDAP --enable-ldap
2002         # Check whether --enable-ldap or --disable-ldap was given.
2003 if test "${enable_ldap+set}" = set; then
2004   enableval="$enable_ldap"
2005   
2006         ol_arg=invalid
2007         for ol_val in no yes mod ; do
2008                 if test "$enableval" = "$ol_val" ; then
2009                         ol_arg="$ol_val"
2010                 fi
2011         done
2012         if test "$ol_arg" = "invalid" ; then
2013                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2014         fi
2015         ol_enable_ldap="$ol_arg"
2016
2017 else
2018         ol_enable_ldap="no"
2019 fi
2020 # end --enable-ldap
2021 # OpenLDAP --enable-ldbm
2022         # Check whether --enable-ldbm or --disable-ldbm was given.
2023 if test "${enable_ldbm+set}" = set; then
2024   enableval="$enable_ldbm"
2025   
2026         ol_arg=invalid
2027         for ol_val in no yes mod ; do
2028                 if test "$enableval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2034         fi
2035         ol_enable_ldbm="$ol_arg"
2036
2037 else
2038         ol_enable_ldbm="no"
2039 fi
2040 # end --enable-ldbm
2041 # OpenLDAP --with-ldbm_api
2042         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2043 if test "${with_ldbm_api+set}" = set; then
2044   withval="$with_ldbm_api"
2045   
2046         ol_arg=invalid
2047         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2048                 if test "$withval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2054         fi
2055         ol_with_ldbm_api="$ol_arg"
2056
2057 else
2058         ol_with_ldbm_api="auto"
2059 fi
2060 # end --with-ldbm_api
2061
2062 # OpenLDAP --with-ldbm_type
2063         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2064 if test "${with_ldbm_type+set}" = set; then
2065   withval="$with_ldbm_type"
2066   
2067         ol_arg=invalid
2068         for ol_val in auto btree hash ; do
2069                 if test "$withval" = "$ol_val" ; then
2070                         ol_arg="$ol_val"
2071                 fi
2072         done
2073         if test "$ol_arg" = "invalid" ; then
2074                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2075         fi
2076         ol_with_ldbm_type="$ol_arg"
2077
2078 else
2079         ol_with_ldbm_type="auto"
2080 fi
2081 # end --with-ldbm_type
2082
2083 # OpenLDAP --enable-meta
2084         # Check whether --enable-meta or --disable-meta was given.
2085 if test "${enable_meta+set}" = set; then
2086   enableval="$enable_meta"
2087   
2088         ol_arg=invalid
2089         for ol_val in no yes mod ; do
2090                 if test "$enableval" = "$ol_val" ; then
2091                         ol_arg="$ol_val"
2092                 fi
2093         done
2094         if test "$ol_arg" = "invalid" ; then
2095                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2096         fi
2097         ol_enable_meta="$ol_arg"
2098
2099 else
2100         ol_enable_meta="no"
2101 fi
2102 # end --enable-meta
2103 # OpenLDAP --enable-monitor
2104         # Check whether --enable-monitor or --disable-monitor was given.
2105 if test "${enable_monitor+set}" = set; then
2106   enableval="$enable_monitor"
2107   
2108         ol_arg=invalid
2109         for ol_val in no yes mod ; do
2110                 if test "$enableval" = "$ol_val" ; then
2111                         ol_arg="$ol_val"
2112                 fi
2113         done
2114         if test "$ol_arg" = "invalid" ; then
2115                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2116         fi
2117         ol_enable_monitor="$ol_arg"
2118
2119 else
2120         ol_enable_monitor="yes"
2121 fi
2122 # end --enable-monitor
2123 # OpenLDAP --enable-null
2124         # Check whether --enable-null or --disable-null was given.
2125 if test "${enable_null+set}" = set; then
2126   enableval="$enable_null"
2127   
2128         ol_arg=invalid
2129         for ol_val in no yes mod ; do
2130                 if test "$enableval" = "$ol_val" ; then
2131                         ol_arg="$ol_val"
2132                 fi
2133         done
2134         if test "$ol_arg" = "invalid" ; then
2135                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2136         fi
2137         ol_enable_null="$ol_arg"
2138
2139 else
2140         ol_enable_null="no"
2141 fi
2142 # end --enable-null
2143 # OpenLDAP --enable-passwd
2144         # Check whether --enable-passwd or --disable-passwd was given.
2145 if test "${enable_passwd+set}" = set; then
2146   enableval="$enable_passwd"
2147   
2148         ol_arg=invalid
2149         for ol_val in no yes mod ; do
2150                 if test "$enableval" = "$ol_val" ; then
2151                         ol_arg="$ol_val"
2152                 fi
2153         done
2154         if test "$ol_arg" = "invalid" ; then
2155                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2156         fi
2157         ol_enable_passwd="$ol_arg"
2158
2159 else
2160         ol_enable_passwd="no"
2161 fi
2162 # end --enable-passwd
2163 # OpenLDAP --enable-perl
2164         # Check whether --enable-perl or --disable-perl was given.
2165 if test "${enable_perl+set}" = set; then
2166   enableval="$enable_perl"
2167   
2168         ol_arg=invalid
2169         for ol_val in no yes mod ; do
2170                 if test "$enableval" = "$ol_val" ; then
2171                         ol_arg="$ol_val"
2172                 fi
2173         done
2174         if test "$ol_arg" = "invalid" ; then
2175                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2176         fi
2177         ol_enable_perl="$ol_arg"
2178
2179 else
2180         ol_enable_perl="no"
2181 fi
2182 # end --enable-perl
2183 # OpenLDAP --enable-relay
2184         # Check whether --enable-relay or --disable-relay was given.
2185 if test "${enable_relay+set}" = set; then
2186   enableval="$enable_relay"
2187   
2188         ol_arg=invalid
2189         for ol_val in no yes mod ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2196         fi
2197         ol_enable_relay="$ol_arg"
2198
2199 else
2200         ol_enable_relay="yes"
2201 fi
2202 # end --enable-relay
2203 # OpenLDAP --enable-shell
2204         # Check whether --enable-shell or --disable-shell was given.
2205 if test "${enable_shell+set}" = set; then
2206   enableval="$enable_shell"
2207   
2208         ol_arg=invalid
2209         for ol_val in no yes mod ; do
2210                 if test "$enableval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2216         fi
2217         ol_enable_shell="$ol_arg"
2218
2219 else
2220         ol_enable_shell="no"
2221 fi
2222 # end --enable-shell
2223 # OpenLDAP --enable-sql
2224         # Check whether --enable-sql or --disable-sql was given.
2225 if test "${enable_sql+set}" = set; then
2226   enableval="$enable_sql"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2236         fi
2237         ol_enable_sql="$ol_arg"
2238
2239 else
2240         ol_enable_sql="no"
2241 fi
2242 # end --enable-sql
2243
2244 Overlays="denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2245         refint rwm syncprov translucent unique"
2246
2247 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2248 if test "${with_xxslapoverlays+set}" = set; then
2249   withval="$with_xxslapoverlays"
2250   :
2251 fi
2252
2253
2254 # OpenLDAP --enable-overlays
2255         # Check whether --enable-overlays or --disable-overlays was given.
2256 if test "${enable_overlays+set}" = set; then
2257   enableval="$enable_overlays"
2258   
2259         ol_arg=invalid
2260         for ol_val in no yes mod ; do
2261                 if test "$enableval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2267         fi
2268         ol_enable_overlays="$ol_arg"
2269
2270 else
2271         ol_enable_overlays="no"
2272 fi
2273 # end --enable-overlays
2274 # OpenLDAP --enable-denyop
2275         # Check whether --enable-denyop or --disable-denyop was given.
2276 if test "${enable_denyop+set}" = set; then
2277   enableval="$enable_denyop"
2278   
2279         ol_arg=invalid
2280         for ol_val in no yes mod ; do
2281                 if test "$enableval" = "$ol_val" ; then
2282                         ol_arg="$ol_val"
2283                 fi
2284         done
2285         if test "$ol_arg" = "invalid" ; then
2286                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2287         fi
2288         ol_enable_denyop="$ol_arg"
2289
2290 else
2291         ol_enable_denyop="no"
2292 fi
2293 # end --enable-denyop
2294
2295 # OpenLDAP --enable-dyngroup
2296         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2297 if test "${enable_dyngroup+set}" = set; then
2298   enableval="$enable_dyngroup"
2299   
2300         ol_arg=invalid
2301         for ol_val in no yes mod ; do
2302                 if test "$enableval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2308         fi
2309         ol_enable_dyngroup="$ol_arg"
2310
2311 else
2312         ol_enable_dyngroup="no"
2313 fi
2314 # end --enable-dyngroup
2315
2316 # OpenLDAP --enable-dynlist
2317         # Check whether --enable-dynlist or --disable-dynlist was given.
2318 if test "${enable_dynlist+set}" = set; then
2319   enableval="$enable_dynlist"
2320   
2321         ol_arg=invalid
2322         for ol_val in no yes mod ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2329         fi
2330         ol_enable_dynlist="$ol_arg"
2331
2332 else
2333         ol_enable_dynlist="no"
2334 fi
2335 # end --enable-dynlist
2336
2337 # OpenLDAP --enable-glue
2338         # Check whether --enable-glue or --disable-glue was given.
2339 if test "${enable_glue+set}" = set; then
2340   enableval="$enable_glue"
2341   
2342         ol_arg=invalid
2343         for ol_val in no yes mod ; do
2344                 if test "$enableval" = "$ol_val" ; then
2345                         ol_arg="$ol_val"
2346                 fi
2347         done
2348         if test "$ol_arg" = "invalid" ; then
2349                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2350         fi
2351         ol_enable_glue="$ol_arg"
2352
2353 else
2354         ol_enable_glue="yes"
2355 fi
2356 # end --enable-glue
2357
2358 # OpenLDAP --enable-lastmod
2359         # Check whether --enable-lastmod or --disable-lastmod was given.
2360 if test "${enable_lastmod+set}" = set; then
2361   enableval="$enable_lastmod"
2362   
2363         ol_arg=invalid
2364         for ol_val in no yes mod ; do
2365                 if test "$enableval" = "$ol_val" ; then
2366                         ol_arg="$ol_val"
2367                 fi
2368         done
2369         if test "$ol_arg" = "invalid" ; then
2370                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2371         fi
2372         ol_enable_lastmod="$ol_arg"
2373
2374 else
2375         ol_enable_lastmod="no"
2376 fi
2377 # end --enable-lastmod
2378
2379 # OpenLDAP --enable-ppolicy
2380         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2381 if test "${enable_ppolicy+set}" = set; then
2382   enableval="$enable_ppolicy"
2383   
2384         ol_arg=invalid
2385         for ol_val in no yes mod ; do
2386                 if test "$enableval" = "$ol_val" ; then
2387                         ol_arg="$ol_val"
2388                 fi
2389         done
2390         if test "$ol_arg" = "invalid" ; then
2391                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2392         fi
2393         ol_enable_ppolicy="$ol_arg"
2394
2395 else
2396         ol_enable_ppolicy="no"
2397 fi
2398 # end --enable-ppolicy
2399
2400 # OpenLDAP --enable-proxycache
2401         # Check whether --enable-proxycache or --disable-proxycache was given.
2402 if test "${enable_proxycache+set}" = set; then
2403   enableval="$enable_proxycache"
2404   
2405         ol_arg=invalid
2406         for ol_val in no yes mod ; do
2407                 if test "$enableval" = "$ol_val" ; then
2408                         ol_arg="$ol_val"
2409                 fi
2410         done
2411         if test "$ol_arg" = "invalid" ; then
2412                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2413         fi
2414         ol_enable_proxycache="$ol_arg"
2415
2416 else
2417         ol_enable_proxycache="no"
2418 fi
2419 # end --enable-proxycache
2420
2421 # OpenLDAP --enable-refint
2422         # Check whether --enable-refint or --disable-refint was given.
2423 if test "${enable_refint+set}" = set; then
2424   enableval="$enable_refint"
2425   
2426         ol_arg=invalid
2427         for ol_val in no yes mod ; do
2428                 if test "$enableval" = "$ol_val" ; then
2429                         ol_arg="$ol_val"
2430                 fi
2431         done
2432         if test "$ol_arg" = "invalid" ; then
2433                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2434         fi
2435         ol_enable_refint="$ol_arg"
2436
2437 else
2438         ol_enable_refint="no"
2439 fi
2440 # end --enable-refint
2441
2442 # OpenLDAP --enable-rwm
2443         # Check whether --enable-rwm or --disable-rwm was given.
2444 if test "${enable_rwm+set}" = set; then
2445   enableval="$enable_rwm"
2446   
2447         ol_arg=invalid
2448         for ol_val in no yes mod ; do
2449                 if test "$enableval" = "$ol_val" ; then
2450                         ol_arg="$ol_val"
2451                 fi
2452         done
2453         if test "$ol_arg" = "invalid" ; then
2454                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2455         fi
2456         ol_enable_rwm="$ol_arg"
2457
2458 else
2459         ol_enable_rwm="no"
2460 fi
2461 # end --enable-rwm
2462
2463 # OpenLDAP --enable-syncprov
2464         # Check whether --enable-syncprov or --disable-syncprov was given.
2465 if test "${enable_syncprov+set}" = set; then
2466   enableval="$enable_syncprov"
2467   
2468         ol_arg=invalid
2469         for ol_val in no yes mod ; do
2470                 if test "$enableval" = "$ol_val" ; then
2471                         ol_arg="$ol_val"
2472                 fi
2473         done
2474         if test "$ol_arg" = "invalid" ; then
2475                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2476         fi
2477         ol_enable_syncprov="$ol_arg"
2478
2479 else
2480         ol_enable_syncprov="yes"
2481 fi
2482 # end --enable-syncprov
2483
2484 # OpenLDAP --enable-translucent
2485         # Check whether --enable-translucent or --disable-translucent was given.
2486 if test "${enable_translucent+set}" = set; then
2487   enableval="$enable_translucent"
2488   
2489         ol_arg=invalid
2490         for ol_val in no yes mod ; do
2491                 if test "$enableval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2497         fi
2498         ol_enable_translucent="$ol_arg"
2499
2500 else
2501         ol_enable_translucent="no"
2502 fi
2503 # end --enable-translucent
2504
2505 # OpenLDAP --enable-unique
2506         # Check whether --enable-unique or --disable-unique was given.
2507 if test "${enable_unique+set}" = set; then
2508   enableval="$enable_unique"
2509   
2510         ol_arg=invalid
2511         for ol_val in no yes mod ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2518         fi
2519         ol_enable_unique="$ol_arg"
2520
2521 else
2522         ol_enable_unique="no"
2523 fi
2524 # end --enable-unique
2525
2526
2527
2528 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2529 if test "${with_xxslurpdoptions+set}" = set; then
2530   withval="$with_xxslurpdoptions"
2531   :
2532 fi
2533
2534 # OpenLDAP --enable-slurpd
2535         # Check whether --enable-slurpd or --disable-slurpd was given.
2536 if test "${enable_slurpd+set}" = set; then
2537   enableval="$enable_slurpd"
2538   
2539         ol_arg=invalid
2540         for ol_val in auto yes no ; do
2541                 if test "$enableval" = "$ol_val" ; then
2542                         ol_arg="$ol_val"
2543                 fi
2544         done
2545         if test "$ol_arg" = "invalid" ; then
2546                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2547         fi
2548         ol_enable_slurpd="$ol_arg"
2549
2550 else
2551         ol_enable_slurpd="auto"
2552 fi
2553 # end --enable-slurpd
2554
2555 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2556 if test "${with_xxliboptions+set}" = set; then
2557   withval="$with_xxliboptions"
2558   :
2559 fi
2560
2561 # Check whether --enable-static or --disable-static was given.
2562 if test "${enable_static+set}" = set; then
2563   enableval="$enable_static"
2564   p=${PACKAGE-default}
2565 case $enableval in
2566 yes) enable_static=yes ;;
2567 no) enable_static=no ;;
2568 *)
2569   enable_static=no
2570   # Look at the argument we got.  We use all the common list separators.
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2572   for pkg in $enableval; do
2573     if test "X$pkg" = "X$p"; then
2574       enable_static=yes
2575     fi
2576   done
2577   IFS="$ac_save_ifs"
2578   ;;
2579 esac
2580 else
2581   enable_static=yes
2582 fi
2583
2584 # Check whether --enable-shared or --disable-shared was given.
2585 if test "${enable_shared+set}" = set; then
2586   enableval="$enable_shared"
2587   p=${PACKAGE-default}
2588 case $enableval in
2589 yes) enable_shared=yes ;;
2590 no) enable_shared=no ;;
2591 *)
2592   enable_shared=no
2593   # Look at the argument we got.  We use all the common list separators.
2594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2595   for pkg in $enableval; do
2596     if test "X$pkg" = "X$p"; then
2597       enable_shared=yes
2598     fi
2599   done
2600   IFS="$ac_save_ifs"
2601   ;;
2602 esac
2603 else
2604   enable_shared=yes
2605 fi
2606
2607
2608
2609 # Activate any backends that were not explicitly enabled.
2610 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2611 if test $ol_enable_backends != no ; then
2612         for i in $Backends; do
2613                 eval "ol_tmp=\$ol_enable_$i"
2614                 if test $ol_tmp = no ; then
2615                         eval "ol_enable_$i=$ol_enable_backends"
2616                 fi
2617         done
2618 fi
2619 # Activate the overlays
2620 if test $ol_enable_overlays != no ; then
2621         for i in $Overlays; do
2622                 eval "ol_tmp=\$ol_enable_$i"
2623                 if test $ol_tmp = no ; then
2624                         eval "ol_enable_$i=$ol_enable_overlays"
2625                 fi
2626         done
2627 fi
2628
2629 # validate options
2630 if test $ol_enable_slapd = no ; then
2631                 if test $ol_enable_slapi = yes ; then
2632                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2633         fi
2634         if test $ol_enable_backends != no ; then
2635                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2636         fi
2637         for i in $Backends; do
2638                 eval "ol_tmp=\$ol_enable_$i"
2639                 if test $ol_tmp != no ; then
2640                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2641                         eval "ol_enable_$i=no"
2642                 fi
2643         done
2644         if test $ol_enable_modules = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2646         fi
2647         if test $ol_enable_multimaster = yes ; then
2648                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2649         fi
2650         if test $ol_enable_wrappers = yes ; then
2651                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2652         fi
2653         if test $ol_enable_rlookups = yes ; then
2654                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2655         fi
2656         if test $ol_enable_aci = yes ; then
2657                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2658         fi
2659         if test $ol_with_ldbm_api != auto ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2661         fi
2662         if test $ol_with_ldbm_type != auto ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2664         fi
2665         if test $ol_enable_slurpd = yes ; then
2666                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2667         fi
2668         if test $ol_enable_rewrite = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2670         fi
2671                 if test $ol_enable_overlays != no ; then
2672                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2673         fi
2674         for i in $Overlays; do
2675                 eval "ol_tmp=\$ol_enable_$i"
2676                 if test $ol_tmp != no ; then
2677                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2678                         eval "ol_enable_$i=no"
2679                 fi
2680         done
2681
2682         # force settings to no
2683         ol_enable_slapi=no
2684
2685         ol_enable_backends=no
2686         ol_enable_overlays=no
2687         ol_enable_modules=no
2688         ol_enable_multimaster=no
2689         ol_enable_rlookups=no
2690         ol_enable_aci=no
2691         ol_enable_wrappers=no
2692
2693         ol_with_ldbm_api=no
2694         ol_with_ldbm_type=no
2695
2696         ol_enable_slurpd=no
2697
2698         ol_enable_rewrite=no
2699
2700 elif test $ol_enable_ldbm = no ; then
2701         
2702         if test $ol_with_ldbm_api != auto ; then
2703                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2704         fi
2705
2706         if test $ol_with_ldbm_type != auto ; then
2707                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2708         fi
2709
2710         if test $ol_enable_modules != yes -a \
2711                 $ol_enable_bdb = no -a \
2712                 $ol_enable_dnssrv = no -a \
2713                 $ol_enable_hdb = no -a \
2714                 $ol_enable_ldap = no -a \
2715                 $ol_enable_meta = no -a \
2716                 $ol_enable_monitor = no -a \
2717                 $ol_enable_null = no -a \
2718                 $ol_enable_passwd = no -a \
2719                 $ol_enable_perl = no -a \
2720                 $ol_enable_relay = no -a \
2721                 $ol_enable_shell = no -a \
2722                 $ol_enable_sql = no ; then
2723
2724                 if test $ol_enable_slapd = yes ; then
2725                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2726                 else
2727                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2728                         ol_enable_slapd=no
2729                 fi
2730         fi
2731
2732         ol_with_ldbm_api=no
2733         ol_with_ldbm_type=no
2734
2735         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2736                 ol_with_ldbm_api=berkeley
2737         fi
2738
2739 else
2740                 if test $ol_with_ldbm_api = gdbm -a \
2741                 $ol_with_ldbm_type = btree ; then
2742                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2743         fi
2744         if test $ol_with_ldbm_api = mdbm -a \
2745                 $ol_with_ldbm_type = btree ; then
2746                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2747         fi
2748         if test $ol_with_ldbm_api = ndbm -a \
2749                 $ol_with_ldbm_type = btree ; then
2750                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2751         fi
2752
2753         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2754                 if test $ol_with_ldbm_api = auto ; then
2755                         ol_with_ldbm_api=berkeley
2756                 elif test $ol_with_ldbm_api != berkeley ; then
2757                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2758                 fi
2759         fi
2760 fi
2761
2762 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2763         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2764 fi
2765
2766 if test $ol_enable_slurpd = yes ; then
2767                 if test $ol_with_threads = no ; then
2768                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2769         fi
2770 fi
2771
2772 if test $ol_enable_lmpasswd = yes ; then
2773         if test $ol_with_tls = no ; then
2774                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2775         fi
2776 fi
2777
2778 if test $ol_enable_kbind = yes ; then
2779         if test $ol_with_kerberos = no ; then
2780                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2781         elif test $ol_with_kerberos = auto ; then
2782                 ol_with_kerberos=yes
2783         fi
2784
2785 elif test $ol_enable_kbind = no ; then
2786         if test $ol_with_kerberos = auto ; then
2787                 ol_with_kerberos=no
2788         elif test $ol_with_kerberos != no ; then
2789                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2790                 ol_with_kerberos=no
2791         fi
2792 fi
2793
2794 if test $ol_enable_spasswd = yes ; then
2795         if test $ol_with_cyrus_sasl = no ; then
2796                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2797         fi
2798         ol_with_cyrus_sasl=yes
2799 fi
2800
2801 echo "$ac_t""done" 1>&6
2802
2803 LDAP_LIBS=
2804 LDBM_LIBS=
2805 LTHREAD_LIBS=
2806 LUTIL_LIBS=
2807
2808 SLAPD_LIBS=
2809 SLURPD_LIBS=
2810
2811 BUILD_SLAPD=no
2812 BUILD_SLURPD=no
2813
2814 BUILD_THREAD=no
2815
2816 BUILD_SLAPI=no
2817 SLAPD_SLAPI_DEPEND=
2818
2819 BUILD_BDB=no
2820 BUILD_DNSSRV=no
2821 BUILD_HDB=no
2822 BUILD_LDAP=no
2823 BUILD_LDBM=no
2824 BUILD_META=no
2825 BUILD_MONITOR=no
2826 BUILD_NULL=no
2827 BUILD_PASSWD=no
2828 BUILD_PERL=no
2829 BUILD_RELAY=no
2830 BUILD_SHELL=no
2831 BUILD_SQL=no
2832
2833 BUILD_CHAIN=no
2834 BUILD_DENYOP=no
2835 BUILD_DYNGROUP=no
2836 BUILD_DYNLIST=no
2837 BUILD_GLUE=no
2838 BUILD_LASTMOD=no
2839 BUILD_PPOLICY=no
2840 BUILD_PROXYCACHE=no
2841 BUILD_REFINT=no
2842 BUILD_RWM=no
2843 BUILD_SYNCPROV=no
2844 BUILD_TRANSLUCENT=no
2845 BUILD_UNIQUE=no
2846
2847 SLAPD_DYNAMIC_OVERLAYS=
2848
2849 SLAPD_MODULES_LDFLAGS=
2850 SLAPD_MODULES_CPPFLAGS=
2851
2852 SLAPD_STATIC_BACKENDS=back-ldif
2853 SLAPD_DYNAMIC_BACKENDS=
2854
2855 SLAPD_PERL_LDFLAGS=
2856 MOD_PERL_LDFLAGS=
2857 PERL_CPPFLAGS=
2858
2859 SLAPD_SQL_LDFLAGS=
2860 SLAPD_SQL_LIBS=
2861 SLAPD_SQL_INCLUDES=
2862
2863 KRB4_LIBS=
2864 KRB5_LIBS=
2865 SASL_LIBS=
2866 TLS_LIBS=
2867 MODULES_LIBS=
2868 SLAPI_LIBS=
2869 LIBSLAPI=
2870 LIBSLAPITOOLS=
2871 AUTH_LIBS=
2872
2873 SLAPD_SLP_LIBS=
2874 SLAPD_GMP_LIBS=
2875
2876
2877 cat >> confdefs.h <<\EOF
2878 #define HAVE_MKVERSION 1
2879 EOF
2880
2881
2882
2883
2884 ol_aix_threads=no
2885 case "$target" in
2886 *-*-aix*)       if test -z "$CC" ; then
2887                 case "$ol_with_threads" in
2888                 auto | yes |  posix) ol_aix_threads=yes ;;
2889                 esac
2890         fi
2891 ;;
2892 esac
2893
2894 if test $ol_aix_threads = yes ; then
2895         if test -z "${CC}" ; then
2896                 for ac_prog in cc_r xlc_r cc
2897 do
2898 # Extract the first word of "$ac_prog", so it can be a program name with args.
2899 set dummy $ac_prog; ac_word=$2
2900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2901 echo "configure:2902: checking for $ac_word" >&5
2902 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2903   echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905   if test -n "$CC"; then
2906   ac_cv_prog_CC="$CC" # Let the user override the test.
2907 else
2908   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2909   ac_dummy="$PATH"
2910   for ac_dir in $ac_dummy; do
2911     test -z "$ac_dir" && ac_dir=.
2912     if test -f $ac_dir/$ac_word; then
2913       ac_cv_prog_CC="$ac_prog"
2914       break
2915     fi
2916   done
2917   IFS="$ac_save_ifs"
2918 fi
2919 fi
2920 CC="$ac_cv_prog_CC"
2921 if test -n "$CC"; then
2922   echo "$ac_t""$CC" 1>&6
2923 else
2924   echo "$ac_t""no" 1>&6
2925 fi
2926
2927 test -n "$CC" && break
2928 done
2929
2930
2931                 if test "$CC" = cc ; then
2932                                                 if test $ol_with_threads != auto ; then
2933                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2934                         else
2935                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2936                         fi
2937                         ol_with_threads=no
2938                 fi
2939         fi
2940
2941         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2942                 ol_with_threads=posix
2943                 ol_cv_pthread_create=yes
2944         fi
2945 fi
2946
2947 if test -z "${CC}"; then
2948         for ac_prog in cc gcc
2949 do
2950 # Extract the first word of "$ac_prog", so it can be a program name with args.
2951 set dummy $ac_prog; ac_word=$2
2952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2953 echo "configure:2954: checking for $ac_word" >&5
2954 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2955   echo $ac_n "(cached) $ac_c" 1>&6
2956 else
2957   if test -n "$CC"; then
2958   ac_cv_prog_CC="$CC" # Let the user override the test.
2959 else
2960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2961   ac_dummy="$PATH"
2962   for ac_dir in $ac_dummy; do
2963     test -z "$ac_dir" && ac_dir=.
2964     if test -f $ac_dir/$ac_word; then
2965       ac_cv_prog_CC="$ac_prog"
2966       break
2967     fi
2968   done
2969   IFS="$ac_save_ifs"
2970 fi
2971 fi
2972 CC="$ac_cv_prog_CC"
2973 if test -n "$CC"; then
2974   echo "$ac_t""$CC" 1>&6
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978
2979 test -n "$CC" && break
2980 done
2981 test -n "$CC" || CC="missing"
2982
2983
2984         if test "${CC}" = "missing" ; then
2985                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2986         fi
2987 fi
2988
2989 if test -z "${AR}"; then
2990         for ac_prog in ar gar
2991 do
2992 # Extract the first word of "$ac_prog", so it can be a program name with args.
2993 set dummy $ac_prog; ac_word=$2
2994 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2995 echo "configure:2996: checking for $ac_word" >&5
2996 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   if test -n "$AR"; then
3000   ac_cv_prog_AR="$AR" # Let the user override the test.
3001 else
3002   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3003   ac_dummy="$PATH"
3004   for ac_dir in $ac_dummy; do
3005     test -z "$ac_dir" && ac_dir=.
3006     if test -f $ac_dir/$ac_word; then
3007       ac_cv_prog_AR="$ac_prog"
3008       break
3009     fi
3010   done
3011   IFS="$ac_save_ifs"
3012 fi
3013 fi
3014 AR="$ac_cv_prog_AR"
3015 if test -n "$AR"; then
3016   echo "$ac_t""$AR" 1>&6
3017 else
3018   echo "$ac_t""no" 1>&6
3019 fi
3020
3021 test -n "$AR" && break
3022 done
3023 test -n "$AR" || AR="missing"
3024
3025
3026         if test "${AR}" = "missing" ; then
3027                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3028         fi
3029 fi
3030
3031
3032
3033 # Find the correct PATH separator.  Usually this is `:', but
3034 # DJGPP uses `;' like DOS.
3035 if test "X${PATH_SEPARATOR+set}" != Xset; then
3036   UNAME=${UNAME-`uname 2>/dev/null`}
3037   case X$UNAME in
3038     *-DOS) lt_cv_sys_path_separator=';' ;;
3039     *)     lt_cv_sys_path_separator=':' ;;
3040   esac
3041   PATH_SEPARATOR=$lt_cv_sys_path_separator
3042 fi
3043
3044 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3045 echo "configure:3046: checking for Cygwin environment" >&5
3046 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3047   echo $ac_n "(cached) $ac_c" 1>&6
3048 else
3049   cat > conftest.$ac_ext <<EOF
3050 #line 3051 "configure"
3051 #include "confdefs.h"
3052
3053 int main() {
3054
3055 #ifndef __CYGWIN__
3056 #define __CYGWIN__ __CYGWIN32__
3057 #endif
3058 return __CYGWIN__;
3059 ; return 0; }
3060 EOF
3061 if { (eval echo configure:3062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3062   rm -rf conftest*
3063   ac_cv_cygwin=yes
3064 else
3065   echo "configure: failed program was:" >&5
3066   cat conftest.$ac_ext >&5
3067   rm -rf conftest*
3068   ac_cv_cygwin=no
3069 fi
3070 rm -f conftest*
3071 fi
3072
3073 echo "$ac_t""$ac_cv_cygwin" 1>&6
3074 CYGWIN=
3075 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3076 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3077 echo "configure:3078: checking for mingw32 environment" >&5
3078 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084
3085 int main() {
3086 return __MINGW32__;
3087 ; return 0; }
3088 EOF
3089 if { (eval echo configure:3090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3090   rm -rf conftest*
3091   ac_cv_mingw32=yes
3092 else
3093   echo "configure: failed program was:" >&5
3094   cat conftest.$ac_ext >&5
3095   rm -rf conftest*
3096   ac_cv_mingw32=no
3097 fi
3098 rm -f conftest*
3099 fi
3100
3101 echo "$ac_t""$ac_cv_mingw32" 1>&6
3102 MINGW32=
3103 test "$ac_cv_mingw32" = yes && MINGW32=yes
3104 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3105 echo "configure:3106: checking for EMX OS/2 environment" >&5
3106 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3107   echo $ac_n "(cached) $ac_c" 1>&6
3108 else
3109   cat > conftest.$ac_ext <<EOF
3110 #line 3111 "configure"
3111 #include "confdefs.h"
3112
3113 int main() {
3114 return __EMX__;
3115 ; return 0; }
3116 EOF
3117 if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3118   rm -rf conftest*
3119   ac_cv_emxos2=yes
3120 else
3121   echo "configure: failed program was:" >&5
3122   cat conftest.$ac_ext >&5
3123   rm -rf conftest*
3124   ac_cv_emxos2=no
3125 fi
3126 rm -f conftest*
3127 fi
3128
3129 echo "$ac_t""$ac_cv_emxos2" 1>&6
3130 EMXOS2=
3131 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3132 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3133 echo "configure:3134: checking how to run the C preprocessor" >&5
3134 # On Suns, sometimes $CPP names a directory.
3135 if test -n "$CPP" && test -d "$CPP"; then
3136   CPP=
3137 fi
3138 if test -z "$CPP"; then
3139 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3140   echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142     # This must be in double quotes, not single quotes, because CPP may get
3143   # substituted into the Makefile and "${CC-cc}" will confuse make.
3144   CPP="${CC-cc} -E"
3145   # On the NeXT, cc -E runs the code through the compiler's parser,
3146   # not just through cpp.
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 #include <assert.h>
3151 Syntax Error
3152 EOF
3153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3154 { (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3156 if test -z "$ac_err"; then
3157   :
3158 else
3159   echo "$ac_err" >&5
3160   echo "configure: failed program was:" >&5
3161   cat conftest.$ac_ext >&5
3162   rm -rf conftest*
3163   CPP="${CC-cc} -E -traditional-cpp"
3164   cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <assert.h>
3168 Syntax Error
3169 EOF
3170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3171 { (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3173 if test -z "$ac_err"; then
3174   :
3175 else
3176   echo "$ac_err" >&5
3177   echo "configure: failed program was:" >&5
3178   cat conftest.$ac_ext >&5
3179   rm -rf conftest*
3180   CPP="${CC-cc} -nologo -E"
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 #include <assert.h>
3185 Syntax Error
3186 EOF
3187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3188 { (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3190 if test -z "$ac_err"; then
3191   :
3192 else
3193   echo "$ac_err" >&5
3194   echo "configure: failed program was:" >&5
3195   cat conftest.$ac_ext >&5
3196   rm -rf conftest*
3197   CPP=/lib/cpp
3198 fi
3199 rm -f conftest*
3200 fi
3201 rm -f conftest*
3202 fi
3203 rm -f conftest*
3204   ac_cv_prog_CPP="$CPP"
3205 fi
3206   CPP="$ac_cv_prog_CPP"
3207 else
3208   ac_cv_prog_CPP="$CPP"
3209 fi
3210 echo "$ac_t""$CPP" 1>&6
3211
3212 # Check whether --enable-fast-install or --disable-fast-install was given.
3213 if test "${enable_fast_install+set}" = set; then
3214   enableval="$enable_fast_install"
3215   p=${PACKAGE-default}
3216 case $enableval in
3217 yes) enable_fast_install=yes ;;
3218 no) enable_fast_install=no ;;
3219 *)
3220   enable_fast_install=no
3221   # Look at the argument we got.  We use all the common list separators.
3222   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3223   for pkg in $enableval; do
3224     if test "X$pkg" = "X$p"; then
3225       enable_fast_install=yes
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229   ;;
3230 esac
3231 else
3232   enable_fast_install=yes
3233 fi
3234
3235 # Extract the first word of "gcc", so it can be a program name with args.
3236 set dummy gcc; ac_word=$2
3237 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3238 echo "configure:3239: checking for $ac_word" >&5
3239 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3240   echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242   if test -n "$CC"; then
3243   ac_cv_prog_CC="$CC" # Let the user override the test.
3244 else
3245   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3246   ac_dummy="$PATH"
3247   for ac_dir in $ac_dummy; do
3248     test -z "$ac_dir" && ac_dir=.
3249     if test -f $ac_dir/$ac_word; then
3250       ac_cv_prog_CC="gcc"
3251       break
3252     fi
3253   done
3254   IFS="$ac_save_ifs"
3255 fi
3256 fi
3257 CC="$ac_cv_prog_CC"
3258 if test -n "$CC"; then
3259   echo "$ac_t""$CC" 1>&6
3260 else
3261   echo "$ac_t""no" 1>&6
3262 fi
3263
3264 if test -z "$CC"; then
3265   # Extract the first word of "cc", so it can be a program name with args.
3266 set dummy cc; ac_word=$2
3267 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3268 echo "configure:3269: checking for $ac_word" >&5
3269 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3270   echo $ac_n "(cached) $ac_c" 1>&6
3271 else
3272   if test -n "$CC"; then
3273   ac_cv_prog_CC="$CC" # Let the user override the test.
3274 else
3275   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3276   ac_prog_rejected=no
3277   ac_dummy="$PATH"
3278   for ac_dir in $ac_dummy; do
3279     test -z "$ac_dir" && ac_dir=.
3280     if test -f $ac_dir/$ac_word; then
3281       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3282         ac_prog_rejected=yes
3283         continue
3284       fi
3285       ac_cv_prog_CC="cc"
3286       break
3287     fi
3288   done
3289   IFS="$ac_save_ifs"
3290 if test $ac_prog_rejected = yes; then
3291   # We found a bogon in the path, so make sure we never use it.
3292   set dummy $ac_cv_prog_CC
3293   shift
3294   if test $# -gt 0; then
3295     # We chose a different compiler from the bogus one.
3296     # However, it has the same basename, so the bogon will be chosen
3297     # first if we set CC to just the basename; use the full file name.
3298     shift
3299     set dummy "$ac_dir/$ac_word" "$@"
3300     shift
3301     ac_cv_prog_CC="$@"
3302   fi
3303 fi
3304 fi
3305 fi
3306 CC="$ac_cv_prog_CC"
3307 if test -n "$CC"; then
3308   echo "$ac_t""$CC" 1>&6
3309 else
3310   echo "$ac_t""no" 1>&6
3311 fi
3312
3313   if test -z "$CC"; then
3314     case "`uname -s`" in
3315     *win32* | *WIN32* | *CYGWIN*)
3316       # Extract the first word of "cl", so it can be a program name with args.
3317 set dummy cl; ac_word=$2
3318 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3319 echo "configure:3320: checking for $ac_word" >&5
3320 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3321   echo $ac_n "(cached) $ac_c" 1>&6
3322 else
3323   if test -n "$CC"; then
3324   ac_cv_prog_CC="$CC" # Let the user override the test.
3325 else
3326   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3327   ac_dummy="$PATH"
3328   for ac_dir in $ac_dummy; do
3329     test -z "$ac_dir" && ac_dir=.
3330     if test -f $ac_dir/$ac_word; then
3331       ac_cv_prog_CC="cl"
3332       break
3333     fi
3334   done
3335   IFS="$ac_save_ifs"
3336 fi
3337 fi
3338 CC="$ac_cv_prog_CC"
3339 if test -n "$CC"; then
3340   echo "$ac_t""$CC" 1>&6
3341 else
3342   echo "$ac_t""no" 1>&6
3343 fi
3344  ;;
3345     esac
3346   fi
3347   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3348 fi
3349
3350 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3351 echo "configure:3352: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3352
3353 ac_ext=c
3354 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3355 ac_cpp='$CPP $CPPFLAGS'
3356 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3357 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3358 cross_compiling=$ac_cv_prog_cc_cross
3359
3360 cat > conftest.$ac_ext << EOF
3361
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364
3365 main(){return(0);}
3366 EOF
3367 if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3368   ac_cv_prog_cc_works=yes
3369   # If we can't run a trivial program, we are probably using a cross compiler.
3370   if (./conftest; exit) 2>/dev/null; then
3371     ac_cv_prog_cc_cross=no
3372   else
3373     ac_cv_prog_cc_cross=yes
3374   fi
3375 else
3376   echo "configure: failed program was:" >&5
3377   cat conftest.$ac_ext >&5
3378   ac_cv_prog_cc_works=no
3379 fi
3380 rm -fr conftest*
3381 ac_ext=c
3382 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3383 ac_cpp='$CPP $CPPFLAGS'
3384 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3385 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3386 cross_compiling=$ac_cv_prog_cc_cross
3387
3388 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3389 if test $ac_cv_prog_cc_works = no; then
3390   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3391 fi
3392 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3393 echo "configure:3394: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3394 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3395 cross_compiling=$ac_cv_prog_cc_cross
3396
3397 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3398 echo "configure:3399: checking whether we are using GNU C" >&5
3399 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3400   echo $ac_n "(cached) $ac_c" 1>&6
3401 else
3402   cat > conftest.c <<EOF
3403 #ifdef __GNUC__
3404   yes;
3405 #endif
3406 EOF
3407 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3408   ac_cv_prog_gcc=yes
3409 else
3410   ac_cv_prog_gcc=no
3411 fi
3412 fi
3413
3414 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3415
3416 if test $ac_cv_prog_gcc = yes; then
3417   GCC=yes
3418 else
3419   GCC=
3420 fi
3421
3422 ac_test_CFLAGS="${CFLAGS+set}"
3423 ac_save_CFLAGS="$CFLAGS"
3424 CFLAGS=
3425 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3426 echo "configure:3427: checking whether ${CC-cc} accepts -g" >&5
3427 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3428   echo $ac_n "(cached) $ac_c" 1>&6
3429 else
3430   echo 'void f(){}' > conftest.c
3431 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3432   ac_cv_prog_cc_g=yes
3433 else
3434   ac_cv_prog_cc_g=no
3435 fi
3436 rm -f conftest*
3437
3438 fi
3439
3440 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3441 if test "$ac_test_CFLAGS" = set; then
3442   CFLAGS="$ac_save_CFLAGS"
3443 elif test $ac_cv_prog_cc_g = yes; then
3444   if test "$GCC" = yes; then
3445     CFLAGS="-g -O2"
3446   else
3447     CFLAGS="-g"
3448   fi
3449 else
3450   if test "$GCC" = yes; then
3451     CFLAGS="-O2"
3452   else
3453     CFLAGS=
3454   fi
3455 fi
3456
3457 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3458 if test "${with_gnu_ld+set}" = set; then
3459   withval="$with_gnu_ld"
3460   test "$withval" = no || with_gnu_ld=yes
3461 else
3462   with_gnu_ld=no
3463 fi
3464
3465 ac_prog=ld
3466 if test "$GCC" = yes; then
3467   # Check if gcc -print-prog-name=ld gives a path.
3468   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3469 echo "configure:3470: checking for ld used by GCC" >&5
3470   case $host in
3471   *-*-mingw*)
3472     # gcc leaves a trailing carriage return which upsets mingw
3473     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3474   *)
3475     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3476   esac
3477   case $ac_prog in
3478     # Accept absolute paths.
3479     [\\/]* | [A-Za-z]:[\\/]*)
3480       re_direlt='/[^/][^/]*/\.\./'
3481       # Canonicalize the path of ld
3482       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3483       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3484         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3485       done
3486       test -z "$LD" && LD="$ac_prog"
3487       ;;
3488   "")
3489     # If it fails, then pretend we aren't using GCC.
3490     ac_prog=ld
3491     ;;
3492   *)
3493     # If it is relative, then search for the first ld in PATH.
3494     with_gnu_ld=unknown
3495     ;;
3496   esac
3497 elif test "$with_gnu_ld" = yes; then
3498   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3499 echo "configure:3500: checking for GNU ld" >&5
3500 else
3501   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3502 echo "configure:3503: checking for non-GNU ld" >&5
3503 fi
3504 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   if test -z "$LD"; then
3508   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3509   for ac_dir in $PATH; do
3510     test -z "$ac_dir" && ac_dir=.
3511     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3512       lt_cv_path_LD="$ac_dir/$ac_prog"
3513       # Check to see if the program is GNU ld.  I'd rather use --version,
3514       # but apparently some GNU ld's only accept -v.
3515       # Break only if it was the GNU/non-GNU ld that we prefer.
3516       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3517         test "$with_gnu_ld" != no && break
3518       else
3519         test "$with_gnu_ld" != yes && break
3520       fi
3521     fi
3522   done
3523   IFS="$ac_save_ifs"
3524 else
3525   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3526 fi
3527 fi
3528
3529 LD="$lt_cv_path_LD"
3530 if test -n "$LD"; then
3531   echo "$ac_t""$LD" 1>&6
3532 else
3533   echo "$ac_t""no" 1>&6
3534 fi
3535 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3536 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3537 echo "configure:3538: checking if the linker ($LD) is GNU ld" >&5
3538 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3542 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3543   lt_cv_prog_gnu_ld=yes
3544 else
3545   lt_cv_prog_gnu_ld=no
3546 fi
3547 fi
3548
3549 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3550 with_gnu_ld=$lt_cv_prog_gnu_ld
3551
3552
3553 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3554 echo "configure:3555: checking for $LD option to reload object files" >&5
3555 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3556   echo $ac_n "(cached) $ac_c" 1>&6
3557 else
3558   lt_cv_ld_reload_flag='-r'
3559 fi
3560
3561 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3562 reload_flag=$lt_cv_ld_reload_flag
3563 test -n "$reload_flag" && reload_flag=" $reload_flag"
3564
3565 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3566 echo "configure:3567: checking for BSD-compatible nm" >&5
3567 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   if test -n "$NM"; then
3571   # Let the user override the test.
3572   lt_cv_path_NM="$NM"
3573 else
3574   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3575   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3576     test -z "$ac_dir" && ac_dir=.
3577     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3578     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3579       # Check to see if the nm accepts a BSD-compat flag.
3580       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3581       #   nm: unknown option "B" ignored
3582       # Tru64's nm complains that /dev/null is an invalid object file
3583       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3584         lt_cv_path_NM="$tmp_nm -B"
3585         break
3586       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3587         lt_cv_path_NM="$tmp_nm -p"
3588         break
3589       else
3590         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3591         continue # so that we can try to find one that supports BSD flags
3592       fi
3593     fi
3594   done
3595   IFS="$ac_save_ifs"
3596   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3597 fi
3598 fi
3599
3600 NM="$lt_cv_path_NM"
3601 echo "$ac_t""$NM" 1>&6
3602
3603 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3604 echo "configure:3605: checking for a sed that does not truncate output" >&5
3605 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3606   echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608   # Loop through the user's path and test for sed and gsed.
3609 # Then use that list of sed's as ones to test for truncation.
3610 as_executable_p="test -f"
3611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612 for as_dir in $PATH
3613 do
3614   IFS=$as_save_IFS
3615   test -z "$as_dir" && as_dir=.
3616   for ac_prog in sed gsed; do
3617     for ac_exec_ext in '' $ac_executable_extensions; do
3618       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3619         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3620       fi
3621     done
3622   done
3623 done
3624
3625   # Create a temporary directory, and hook for its removal unless debugging.
3626 $debug ||
3627 {
3628   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3629   trap '{ (exit 1); exit 1; }' 1 2 13 15
3630 }
3631
3632 # Create a (secure) tmp directory for tmp files.
3633 : ${TMPDIR=/tmp}
3634 {
3635   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3636   test -n "$tmp" && test -d "$tmp"
3637 }  ||
3638 {
3639   tmp=$TMPDIR/sed$$-$RANDOM
3640   (umask 077 && mkdir $tmp)
3641 } ||
3642 {
3643    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3644    { (exit 1); exit 1; }
3645 }
3646   _max=0
3647   _count=0
3648   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3649   # along with /bin/sed that truncates output.
3650   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3651     test ! -f ${_sed} && break
3652     cat /dev/null > "$tmp/sed.in"
3653     _count=0
3654     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3655     # Check for GNU sed and select it if it is found.
3656     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3657       lt_cv_path_SED=${_sed}
3658       break
3659     fi
3660     while true; do
3661       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3662       mv "$tmp/sed.tmp" "$tmp/sed.in"
3663       cp "$tmp/sed.in" "$tmp/sed.nl"
3664       echo >>"$tmp/sed.nl"
3665       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3666       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3667       # 40000 chars as input seems more than enough
3668       test $_count -gt 10 && break
3669       _count=`expr $_count + 1`
3670       if test $_count -gt $_max; then
3671         _max=$_count
3672         lt_cv_path_SED=$_sed
3673       fi
3674     done
3675   done
3676   rm -rf "$tmp"
3677
3678 fi
3679
3680 if test "X$SED" != "X"; then
3681   lt_cv_path_SED=$SED
3682 else
3683   SED=$lt_cv_path_SED
3684 fi
3685 echo "$ac_t""$SED" 1>&6
3686
3687 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3688 echo "configure:3689: checking whether ln -s works" >&5
3689 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   rm -f conftestdata
3693 if ln -s X conftestdata 2>/dev/null
3694 then
3695   rm -f conftestdata
3696   ac_cv_prog_LN_S="ln -s"
3697 else
3698   ac_cv_prog_LN_S=ln
3699 fi
3700 fi
3701 LN_S="$ac_cv_prog_LN_S"
3702 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3703   echo "$ac_t""yes" 1>&6
3704 else
3705   echo "$ac_t""no" 1>&6
3706 fi
3707
3708 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3709 echo "configure:3710: checking how to recognise dependent libraries" >&5
3710 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3711   echo $ac_n "(cached) $ac_c" 1>&6
3712 else
3713   lt_cv_file_magic_cmd='$MAGIC_CMD'
3714 lt_cv_file_magic_test_file=
3715 lt_cv_deplibs_check_method='unknown'
3716 # Need to set the preceding variable on all platforms that support
3717 # interlibrary dependencies.
3718 # 'none' -- dependencies not supported.
3719 # `unknown' -- same as none, but documents that we really don't know.
3720 # 'pass_all' -- all dependencies passed with no checks.
3721 # 'test_compile' -- check by making test program.
3722 # 'file_magic [[regex]]' -- check by looking for files in library path
3723 # which responds to the $file_magic_cmd with a given egrep regex.
3724 # If you have `file' or equivalent on your system and you're not sure
3725 # whether `pass_all' will *always* work, you probably want this one.
3726
3727 case $host_os in
3728 aix4* | aix5*)
3729   lt_cv_deplibs_check_method=pass_all
3730   ;;
3731
3732 beos*)
3733   lt_cv_deplibs_check_method=pass_all
3734   ;;
3735
3736 bsdi4*)
3737   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3738   lt_cv_file_magic_cmd='/usr/bin/file -L'
3739   lt_cv_file_magic_test_file=/shlib/libc.so
3740   ;;
3741
3742 cygwin* | mingw* | pw32*)
3743   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3744   lt_cv_file_magic_cmd='$OBJDUMP -f'
3745   ;;
3746
3747 darwin* | rhapsody*)
3748   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3749   lt_cv_file_magic_cmd='/usr/bin/file -L'
3750   case "$host_os" in
3751   rhapsody* | darwin1.[012])
3752     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3753     ;;
3754   *) # Darwin 1.3 on
3755     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3756     ;;
3757   esac
3758   ;;
3759
3760 freebsd*)
3761   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3762     case $host_cpu in
3763     i*86 )
3764       # Not sure whether the presence of OpenBSD here was a mistake.
3765       # Let's accept both of them until this is cleared up.
3766       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3767       lt_cv_file_magic_cmd=/usr/bin/file
3768       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3769       ;;
3770     esac
3771   else
3772     lt_cv_deplibs_check_method=pass_all
3773   fi
3774   ;;
3775
3776 gnu*)
3777   lt_cv_deplibs_check_method=pass_all
3778   ;;
3779
3780 hpux10.20*|hpux11*)
3781   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3782   lt_cv_file_magic_cmd=/usr/bin/file
3783   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3784   ;;
3785
3786 irix5* | irix6* | nonstopux*)
3787   case $host_os in
3788   irix5* | nonstopux*)
3789     # this will be overridden with pass_all, but let us keep it just in case
3790     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3791     ;;
3792   *)
3793     case $LD in
3794     *-32|*"-32 ") libmagic=32-bit;;
3795     *-n32|*"-n32 ") libmagic=N32;;
3796     *-64|*"-64 ") libmagic=64-bit;;
3797     *) libmagic=never-match;;
3798     esac
3799     # this will be overridden with pass_all, but let us keep it just in case
3800     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3801     ;;
3802   esac
3803   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3804   lt_cv_deplibs_check_method=pass_all
3805   ;;
3806
3807 # This must be Linux ELF.
3808 linux-gnu*)
3809   case $host_cpu in
3810   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3811     lt_cv_deplibs_check_method=pass_all ;;
3812   *)
3813     # glibc up to 2.1.1 does not perform some relocations on ARM
3814     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3815   esac
3816   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3817   ;;
3818
3819 netbsd*)
3820   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3821     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3822   else
3823     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3824   fi
3825   ;;
3826
3827 newos6*)
3828   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3829   lt_cv_file_magic_cmd=/usr/bin/file
3830   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3831   ;;
3832
3833 openbsd*)
3834   lt_cv_file_magic_cmd=/usr/bin/file
3835   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3836   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3837     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3838   else
3839     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3840   fi
3841   ;;
3842
3843 openedition*)
3844   lt_cv_deplibs_check_method=pass_all
3845   ;;
3846
3847 osf3* | osf4* | osf5*)
3848   # this will be overridden with pass_all, but let us keep it just in case
3849   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3850   lt_cv_file_magic_test_file=/shlib/libc.so
3851   lt_cv_deplibs_check_method=pass_all
3852   ;;
3853
3854 sco3.2v5*)
3855   lt_cv_deplibs_check_method=pass_all
3856   ;;
3857
3858 solaris*)
3859   lt_cv_deplibs_check_method=pass_all
3860   lt_cv_file_magic_test_file=/lib/libc.so
3861   ;;
3862
3863 sysv5uw[78]* | sysv4*uw2*)
3864   lt_cv_deplibs_check_method=pass_all
3865   ;;
3866
3867 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3868   case $host_vendor in
3869   motorola)
3870     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]'
3871     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3872     ;;
3873   ncr)
3874     lt_cv_deplibs_check_method=pass_all
3875     ;;
3876   sequent)
3877     lt_cv_file_magic_cmd='/bin/file'
3878     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3879     ;;
3880   sni)
3881     lt_cv_file_magic_cmd='/bin/file'
3882     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3883     lt_cv_file_magic_test_file=/lib/libc.so
3884     ;;
3885   siemens)
3886     lt_cv_deplibs_check_method=pass_all
3887     ;;
3888   esac
3889   ;;
3890 esac
3891
3892 fi
3893
3894 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3895 file_magic_cmd=$lt_cv_file_magic_cmd
3896 deplibs_check_method=$lt_cv_deplibs_check_method
3897
3898 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3899 echo "configure:3900: checking for object suffix" >&5
3900 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3901   echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903   rm -f conftest*
3904 echo 'int i = 1;' > conftest.$ac_ext
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   for ac_file in conftest.*; do
3907     case $ac_file in
3908     *.c) ;;
3909     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3910     esac
3911   done
3912 else
3913   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3914 fi
3915 rm -f conftest*
3916 fi
3917
3918 echo "$ac_t""$ac_cv_objext" 1>&6
3919 OBJEXT=$ac_cv_objext
3920 ac_objext=$ac_cv_objext
3921
3922
3923
3924
3925 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3926 echo "configure:3927: checking for executable suffix" >&5
3927 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3931   ac_cv_exeext=.exe
3932 else
3933   rm -f conftest*
3934   echo 'int main () { return 0; }' > conftest.$ac_ext
3935   ac_cv_exeext=
3936   if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3937     for file in conftest.*; do
3938       case $file in
3939       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3940       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3941       esac
3942     done
3943   else
3944     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3945   fi
3946   rm -f conftest*
3947   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3948 fi
3949 fi
3950
3951 EXEEXT=""
3952 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3953 echo "$ac_t""${ac_cv_exeext}" 1>&6
3954 ac_exeext=$EXEEXT
3955
3956 if test $host != $build; then
3957   ac_tool_prefix=${host_alias}-
3958 else
3959   ac_tool_prefix=
3960 fi
3961
3962
3963
3964
3965 # Check for command to grab the raw symbol name followed by C symbol from nm.
3966 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3967 echo "configure:3968: checking command to parse $NM output" >&5
3968 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   
3972 # These are sane defaults that work on at least a few old systems.
3973 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3974
3975 # Character class describing NM global symbol codes.
3976 symcode='[BCDEGRST]'
3977
3978 # Regexp to match symbols that can be accessed directly from C.
3979 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3980
3981 # Transform the above into a raw symbol and a C symbol.
3982 symxfrm='\1 \2\3 \3'
3983
3984 # Transform an extracted symbol line into a proper C declaration
3985 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3986
3987 # Transform an extracted symbol line into symbol name and symbol address
3988 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'"
3989
3990 # Define system-specific variables.
3991 case $host_os in
3992 aix*)
3993   symcode='[BCDT]'
3994   ;;
3995 cygwin* | mingw* | pw32*)
3996   symcode='[ABCDGISTW]'
3997   ;;
3998 hpux*) # Its linker distinguishes data from code symbols
3999   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4000   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'"
4001   ;;
4002 irix* | nonstopux*)
4003   symcode='[BCDEGRST]'
4004   ;;
4005 osf*)
4006   symcode='[BCDEGQRST]'
4007   ;;
4008 solaris* | sysv5*)
4009   symcode='[BDT]'
4010   ;;
4011 sysv4)
4012   symcode='[DFNSTU]'
4013   ;;
4014 esac
4015
4016 # Handle CRLF in mingw tool chain
4017 opt_cr=
4018 case $host_os in
4019 mingw*)
4020   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4021   ;;
4022 esac
4023
4024 # If we're using GNU nm, then use its standard symbol codes.
4025 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4026   symcode='[ABCDGISTW]'
4027 fi
4028
4029 # Try without a prefix undercore, then with it.
4030 for ac_symprfx in "" "_"; do
4031
4032   # Write the raw and C identifiers.
4033 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4034
4035   # Check to see that the pipe works correctly.
4036   pipe_works=no
4037   rm -f conftest*
4038   cat > conftest.$ac_ext <<EOF
4039 #ifdef __cplusplus
4040 extern "C" {
4041 #endif
4042 char nm_test_var;
4043 void nm_test_func(){}
4044 #ifdef __cplusplus
4045 }
4046 #endif
4047 int main(){nm_test_var='a';nm_test_func();return(0);}
4048 EOF
4049
4050   if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4051     # Now try to grab the symbols.
4052     nlist=conftest.nm
4053     if { (eval echo configure:4054: \"$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
4054       # Try sorting and uniquifying the output.
4055       if sort "$nlist" | uniq > "$nlist"T; then
4056         mv -f "$nlist"T "$nlist"
4057       else
4058         rm -f "$nlist"T
4059       fi
4060
4061       # Make sure that we snagged all the symbols we need.
4062       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4063         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4064           cat <<EOF > conftest.$ac_ext
4065 #ifdef __cplusplus
4066 extern "C" {
4067 #endif
4068
4069 EOF
4070           # Now generate the symbol file.
4071           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4072
4073           cat <<EOF >> conftest.$ac_ext
4074 #if defined (__STDC__) && __STDC__
4075 # define lt_ptr void *
4076 #else
4077 # define lt_ptr char *
4078 # define const
4079 #endif
4080
4081 /* The mapping between symbol names and symbols. */
4082 const struct {
4083   const char *name;
4084   lt_ptr address;
4085 }
4086 lt_preloaded_symbols[] =
4087 {
4088 EOF
4089           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4090           cat <<\EOF >> conftest.$ac_ext
4091   {0, (lt_ptr) 0}
4092 };
4093
4094 #ifdef __cplusplus
4095 }
4096 #endif
4097 EOF
4098           # Now try linking the two files.
4099           mv conftest.$ac_objext conftstm.$ac_objext
4100           save_LIBS="$LIBS"
4101           save_CFLAGS="$CFLAGS"
4102           LIBS="conftstm.$ac_objext"
4103           CFLAGS="$CFLAGS$no_builtin_flag"
4104           if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4105             pipe_works=yes
4106           fi
4107           LIBS="$save_LIBS"
4108           CFLAGS="$save_CFLAGS"
4109         else
4110           echo "cannot find nm_test_func in $nlist" >&5
4111         fi
4112       else
4113         echo "cannot find nm_test_var in $nlist" >&5
4114       fi
4115     else
4116       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4117     fi
4118   else
4119     echo "$progname: failed program was:" >&5
4120     cat conftest.$ac_ext >&5
4121   fi
4122   rm -f conftest* conftst*
4123
4124   # Do not use the global_symbol_pipe unless it works.
4125   if test "$pipe_works" = yes; then
4126     break
4127   else
4128     lt_cv_sys_global_symbol_pipe=
4129   fi
4130 done
4131
4132 fi
4133
4134 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4135 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4136   global_symbol_to_cdecl=
4137   global_symbol_to_c_name_address=
4138 else
4139   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4140   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4141 fi
4142 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4143 then
4144   echo "$ac_t""failed" 1>&6
4145 else
4146   echo "$ac_t""ok" 1>&6
4147 fi
4148
4149 for ac_hdr in dlfcn.h
4150 do
4151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4153 echo "configure:4154: checking for $ac_hdr" >&5
4154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 #include <$ac_hdr>
4161 EOF
4162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4163 { (eval echo configure:4164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4165 if test -z "$ac_err"; then
4166   rm -rf conftest*
4167   eval "ac_cv_header_$ac_safe=yes"
4168 else
4169   echo "$ac_err" >&5
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_header_$ac_safe=no"
4174 fi
4175 rm -f conftest*
4176 fi
4177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4178   echo "$ac_t""yes" 1>&6
4179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4180   cat >> confdefs.h <<EOF
4181 #define $ac_tr_hdr 1
4182 EOF
4183  
4184 else
4185   echo "$ac_t""no" 1>&6
4186 fi
4187 done
4188
4189
4190
4191
4192
4193
4194 # Only perform the check for file, if the check method requires it
4195 case $deplibs_check_method in
4196 file_magic*)
4197   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4198     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4199 echo "configure:4200: checking for ${ac_tool_prefix}file" >&5
4200 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4201   echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203   case $MAGIC_CMD in
4204   /*)
4205   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4206   ;;
4207   ?:/*)
4208   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4209   ;;
4210   *)
4211   ac_save_MAGIC_CMD="$MAGIC_CMD"
4212   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4213   ac_dummy="/usr/bin:$PATH"
4214   for ac_dir in $ac_dummy; do
4215     test -z "$ac_dir" && ac_dir=.
4216     if test -f $ac_dir/${ac_tool_prefix}file; then
4217       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4218       if test -n "$file_magic_test_file"; then
4219         case $deplibs_check_method in
4220         "file_magic "*)
4221           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4222           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4223           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4224             egrep "$file_magic_regex" > /dev/null; then
4225             :
4226           else
4227             cat <<EOF 1>&2
4228
4229 *** Warning: the command libtool uses to detect shared libraries,
4230 *** $file_magic_cmd, produces output that libtool cannot recognize.
4231 *** The result is that libtool may fail to recognize shared libraries
4232 *** as such.  This will affect the creation of libtool libraries that
4233 *** depend on shared libraries, but programs linked with such libtool
4234 *** libraries will work regardless of this problem.  Nevertheless, you
4235 *** may want to report the problem to your system manager and/or to
4236 *** bug-libtool@gnu.org
4237
4238 EOF
4239           fi ;;
4240         esac
4241       fi
4242       break
4243     fi
4244   done
4245   IFS="$ac_save_ifs"
4246   MAGIC_CMD="$ac_save_MAGIC_CMD"
4247   ;;
4248 esac
4249 fi
4250
4251 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4252 if test -n "$MAGIC_CMD"; then
4253   echo "$ac_t""$MAGIC_CMD" 1>&6
4254 else
4255   echo "$ac_t""no" 1>&6
4256 fi
4257
4258 if test -z "$lt_cv_path_MAGIC_CMD"; then
4259   if test -n "$ac_tool_prefix"; then
4260     echo $ac_n "checking for file""... $ac_c" 1>&6
4261 echo "configure:4262: checking for file" >&5
4262 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4263   echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265   case $MAGIC_CMD in
4266   /*)
4267   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4268   ;;
4269   ?:/*)
4270   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4271   ;;
4272   *)
4273   ac_save_MAGIC_CMD="$MAGIC_CMD"
4274   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4275   ac_dummy="/usr/bin:$PATH"
4276   for ac_dir in $ac_dummy; do
4277     test -z "$ac_dir" && ac_dir=.
4278     if test -f $ac_dir/file; then
4279       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4280       if test -n "$file_magic_test_file"; then
4281         case $deplibs_check_method in
4282         "file_magic "*)
4283           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4284           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4285           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4286             egrep "$file_magic_regex" > /dev/null; then
4287             :
4288           else
4289             cat <<EOF 1>&2
4290
4291 *** Warning: the command libtool uses to detect shared libraries,
4292 *** $file_magic_cmd, produces output that libtool cannot recognize.
4293 *** The result is that libtool may fail to recognize shared libraries
4294 *** as such.  This will affect the creation of libtool libraries that
4295 *** depend on shared libraries, but programs linked with such libtool
4296 *** libraries will work regardless of this problem.  Nevertheless, you
4297 *** may want to report the problem to your system manager and/or to
4298 *** bug-libtool@gnu.org
4299
4300 EOF
4301           fi ;;
4302         esac
4303       fi
4304       break
4305     fi
4306   done
4307   IFS="$ac_save_ifs"
4308   MAGIC_CMD="$ac_save_MAGIC_CMD"
4309   ;;
4310 esac
4311 fi
4312
4313 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4314 if test -n "$MAGIC_CMD"; then
4315   echo "$ac_t""$MAGIC_CMD" 1>&6
4316 else
4317   echo "$ac_t""no" 1>&6
4318 fi
4319
4320   else
4321     MAGIC_CMD=:
4322   fi
4323 fi
4324
4325   fi
4326   ;;
4327 esac
4328
4329 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4330 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4331 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4332 echo "configure:4333: checking for $ac_word" >&5
4333 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   if test -n "$RANLIB"; then
4337   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4338 else
4339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4340   ac_dummy="$PATH"
4341   for ac_dir in $ac_dummy; do
4342     test -z "$ac_dir" && ac_dir=.
4343     if test -f $ac_dir/$ac_word; then
4344       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4345       break
4346     fi
4347   done
4348   IFS="$ac_save_ifs"
4349 fi
4350 fi
4351 RANLIB="$ac_cv_prog_RANLIB"
4352 if test -n "$RANLIB"; then
4353   echo "$ac_t""$RANLIB" 1>&6
4354 else
4355   echo "$ac_t""no" 1>&6
4356 fi
4357
4358
4359 if test -z "$ac_cv_prog_RANLIB"; then
4360 if test -n "$ac_tool_prefix"; then
4361   # Extract the first word of "ranlib", so it can be a program name with args.
4362 set dummy ranlib; ac_word=$2
4363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4364 echo "configure:4365: checking for $ac_word" >&5
4365 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   if test -n "$RANLIB"; then
4369   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4370 else
4371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4372   ac_dummy="$PATH"
4373   for ac_dir in $ac_dummy; do
4374     test -z "$ac_dir" && ac_dir=.
4375     if test -f $ac_dir/$ac_word; then
4376       ac_cv_prog_RANLIB="ranlib"
4377       break
4378     fi
4379   done
4380   IFS="$ac_save_ifs"
4381   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4382 fi
4383 fi
4384 RANLIB="$ac_cv_prog_RANLIB"
4385 if test -n "$RANLIB"; then
4386   echo "$ac_t""$RANLIB" 1>&6
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390
4391 else
4392   RANLIB=":"
4393 fi
4394 fi
4395
4396 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4397 set dummy ${ac_tool_prefix}strip; ac_word=$2
4398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4399 echo "configure:4400: checking for $ac_word" >&5
4400 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   if test -n "$STRIP"; then
4404   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4405 else
4406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4407   ac_dummy="$PATH"
4408   for ac_dir in $ac_dummy; do
4409     test -z "$ac_dir" && ac_dir=.
4410     if test -f $ac_dir/$ac_word; then
4411       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4412       break
4413     fi
4414   done
4415   IFS="$ac_save_ifs"
4416 fi
4417 fi
4418 STRIP="$ac_cv_prog_STRIP"
4419 if test -n "$STRIP"; then
4420   echo "$ac_t""$STRIP" 1>&6
4421 else
4422   echo "$ac_t""no" 1>&6
4423 fi
4424
4425
4426 if test -z "$ac_cv_prog_STRIP"; then
4427 if test -n "$ac_tool_prefix"; then
4428   # Extract the first word of "strip", so it can be a program name with args.
4429 set dummy strip; ac_word=$2
4430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4431 echo "configure:4432: checking for $ac_word" >&5
4432 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   if test -n "$STRIP"; then
4436   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4437 else
4438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4439   ac_dummy="$PATH"
4440   for ac_dir in $ac_dummy; do
4441     test -z "$ac_dir" && ac_dir=.
4442     if test -f $ac_dir/$ac_word; then
4443       ac_cv_prog_STRIP="strip"
4444       break
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4449 fi
4450 fi
4451 STRIP="$ac_cv_prog_STRIP"
4452 if test -n "$STRIP"; then
4453   echo "$ac_t""$STRIP" 1>&6
4454 else
4455   echo "$ac_t""no" 1>&6
4456 fi
4457
4458 else
4459   STRIP=":"
4460 fi
4461 fi
4462
4463
4464 enable_dlopen=yes
4465 enable_win32_dll=yes
4466
4467 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4468 if test "${enable_libtool_lock+set}" = set; then
4469   enableval="$enable_libtool_lock"
4470   :
4471 fi
4472
4473 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4474
4475 # Some flags need to be propagated to the compiler or linker for good
4476 # libtool support.
4477 case $host in
4478 *-*-irix6*)
4479   # Find out which ABI we are using.
4480   echo '#line 4481 "configure"' > conftest.$ac_ext
4481   if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4482     case `/usr/bin/file conftest.$ac_objext` in
4483     *32-bit*)
4484       LD="${LD-ld} -32"
4485       ;;
4486     *N32*)
4487       LD="${LD-ld} -n32"
4488       ;;
4489     *64-bit*)
4490       LD="${LD-ld} -64"
4491       ;;
4492     esac
4493   fi
4494   rm -rf conftest*
4495   ;;
4496
4497 *-*-sco3.2v5*)
4498   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4499   SAVE_CFLAGS="$CFLAGS"
4500   CFLAGS="$CFLAGS -belf"
4501   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4502 echo "configure:4503: checking whether the C compiler needs -belf" >&5
4503 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   
4507      ac_ext=c
4508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4509 ac_cpp='$CPP $CPPFLAGS'
4510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4512 cross_compiling=$ac_cv_prog_cc_cross
4513
4514      cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4517
4518 int main() {
4519
4520 ; return 0; }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4523   rm -rf conftest*
4524   lt_cv_cc_needs_belf=yes
4525 else
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   lt_cv_cc_needs_belf=no
4530 fi
4531 rm -f conftest*
4532      ac_ext=c
4533 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4534 ac_cpp='$CPP $CPPFLAGS'
4535 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4536 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4537 cross_compiling=$ac_cv_prog_cc_cross
4538
4539 fi
4540
4541 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4542   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4543     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4544     CFLAGS="$SAVE_CFLAGS"
4545   fi
4546   ;;
4547
4548 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4549   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4550 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4552 echo "configure:4553: checking for $ac_word" >&5
4553 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   if test -n "$DLLTOOL"; then
4557   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4558 else
4559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4560   ac_dummy="$PATH"
4561   for ac_dir in $ac_dummy; do
4562     test -z "$ac_dir" && ac_dir=.
4563     if test -f $ac_dir/$ac_word; then
4564       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4565       break
4566     fi
4567   done
4568   IFS="$ac_save_ifs"
4569 fi
4570 fi
4571 DLLTOOL="$ac_cv_prog_DLLTOOL"
4572 if test -n "$DLLTOOL"; then
4573   echo "$ac_t""$DLLTOOL" 1>&6
4574 else
4575   echo "$ac_t""no" 1>&6
4576 fi
4577
4578
4579 if test -z "$ac_cv_prog_DLLTOOL"; then
4580 if test -n "$ac_tool_prefix"; then
4581   # Extract the first word of "dlltool", so it can be a program name with args.
4582 set dummy dlltool; ac_word=$2
4583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4584 echo "configure:4585: checking for $ac_word" >&5
4585 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   if test -n "$DLLTOOL"; then
4589   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4590 else
4591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4592   ac_dummy="$PATH"
4593   for ac_dir in $ac_dummy; do
4594     test -z "$ac_dir" && ac_dir=.
4595     if test -f $ac_dir/$ac_word; then
4596       ac_cv_prog_DLLTOOL="dlltool"
4597       break
4598     fi
4599   done
4600   IFS="$ac_save_ifs"
4601   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4602 fi
4603 fi
4604 DLLTOOL="$ac_cv_prog_DLLTOOL"
4605 if test -n "$DLLTOOL"; then
4606   echo "$ac_t""$DLLTOOL" 1>&6
4607 else
4608   echo "$ac_t""no" 1>&6
4609 fi
4610
4611 else
4612   DLLTOOL="false"
4613 fi
4614 fi
4615
4616   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4617 set dummy ${ac_tool_prefix}as; ac_word=$2
4618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4619 echo "configure:4620: checking for $ac_word" >&5
4620 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   if test -n "$AS"; then
4624   ac_cv_prog_AS="$AS" # Let the user override the test.
4625 else
4626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4627   ac_dummy="$PATH"
4628   for ac_dir in $ac_dummy; do
4629     test -z "$ac_dir" && ac_dir=.
4630     if test -f $ac_dir/$ac_word; then
4631       ac_cv_prog_AS="${ac_tool_prefix}as"
4632       break
4633     fi
4634   done
4635   IFS="$ac_save_ifs"
4636 fi
4637 fi
4638 AS="$ac_cv_prog_AS"
4639 if test -n "$AS"; then
4640   echo "$ac_t""$AS" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645
4646 if test -z "$ac_cv_prog_AS"; then
4647 if test -n "$ac_tool_prefix"; then
4648   # Extract the first word of "as", so it can be a program name with args.
4649 set dummy as; ac_word=$2
4650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4651 echo "configure:4652: checking for $ac_word" >&5
4652 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$AS"; then
4656   ac_cv_prog_AS="$AS" # Let the user override the test.
4657 else
4658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4659   ac_dummy="$PATH"
4660   for ac_dir in $ac_dummy; do
4661     test -z "$ac_dir" && ac_dir=.
4662     if test -f $ac_dir/$ac_word; then
4663       ac_cv_prog_AS="as"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4669 fi
4670 fi
4671 AS="$ac_cv_prog_AS"
4672 if test -n "$AS"; then
4673   echo "$ac_t""$AS" 1>&6
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 else
4679   AS="false"
4680 fi
4681 fi
4682
4683   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4684 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4686 echo "configure:4687: checking for $ac_word" >&5
4687 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   if test -n "$OBJDUMP"; then
4691   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4692 else
4693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4694   ac_dummy="$PATH"
4695   for ac_dir in $ac_dummy; do
4696     test -z "$ac_dir" && ac_dir=.
4697     if test -f $ac_dir/$ac_word; then
4698       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4699       break
4700     fi
4701   done
4702   IFS="$ac_save_ifs"
4703 fi
4704 fi
4705 OBJDUMP="$ac_cv_prog_OBJDUMP"
4706 if test -n "$OBJDUMP"; then
4707   echo "$ac_t""$OBJDUMP" 1>&6
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711
4712
4713 if test -z "$ac_cv_prog_OBJDUMP"; then
4714 if test -n "$ac_tool_prefix"; then
4715   # Extract the first word of "objdump", so it can be a program name with args.
4716 set dummy objdump; ac_word=$2
4717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_word" >&5
4719 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   if test -n "$OBJDUMP"; then
4723   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4724 else
4725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4726   ac_dummy="$PATH"
4727   for ac_dir in $ac_dummy; do
4728     test -z "$ac_dir" && ac_dir=.
4729     if test -f $ac_dir/$ac_word; then
4730       ac_cv_prog_OBJDUMP="objdump"
4731       break
4732     fi
4733   done
4734   IFS="$ac_save_ifs"
4735   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4736 fi
4737 fi
4738 OBJDUMP="$ac_cv_prog_OBJDUMP"
4739 if test -n "$OBJDUMP"; then
4740   echo "$ac_t""$OBJDUMP" 1>&6
4741 else
4742   echo "$ac_t""no" 1>&6
4743 fi
4744
4745 else
4746   OBJDUMP="false"
4747 fi
4748 fi
4749
4750
4751   # recent cygwin and mingw systems supply a stub DllMain which the user
4752   # can override, but on older systems we have to supply one
4753   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4754 echo "configure:4755: checking if libtool should supply DllMain function" >&5
4755 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761
4762 int main() {
4763 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4764       DllMain (0, 0, 0);
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4768   rm -rf conftest*
4769   lt_cv_need_dllmain=no
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   lt_cv_need_dllmain=yes
4775 fi
4776 rm -f conftest*
4777 fi
4778
4779 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4780
4781   case $host/$CC in
4782   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4783     # old mingw systems require "-dll" to link a DLL, while more recent ones
4784     # require "-mdll"
4785     SAVE_CFLAGS="$CFLAGS"
4786     CFLAGS="$CFLAGS -mdll"
4787     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4788 echo "configure:4789: checking how to link DLLs" >&5
4789 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4790   echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792   cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795
4796 int main() {
4797
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   lt_cv_cc_dll_switch=-mdll
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   lt_cv_cc_dll_switch=-dll
4808 fi
4809 rm -f conftest*
4810 fi
4811
4812 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4813     CFLAGS="$SAVE_CFLAGS" ;;
4814   *-*-cygwin* | *-*-pw32*)
4815     # cygwin systems need to pass --dll to the linker, and not link
4816     # crt.o which will require a WinMain@16 definition.
4817     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4818   esac
4819   ;;
4820   
4821 esac
4822
4823 # Sed substitution that helps us do robust quoting.  It backslashifies
4824 # metacharacters that are still active within double-quoted strings.
4825 Xsed='sed -e s/^X//'
4826 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4827
4828 # Same as above, but do not quote variable references.
4829 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4830
4831 # Sed substitution to delay expansion of an escaped shell variable in a
4832 # double_quote_subst'ed string.
4833 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4834
4835 # Constants:
4836 rm="rm -f"
4837
4838 # Global variables:
4839 default_ofile=libtool
4840 can_build_shared=yes
4841
4842 # All known linkers require a `.a' archive for static linking (except M$VC,
4843 # which needs '.lib').
4844 libext=a
4845 ltmain="$ac_aux_dir/ltmain.sh"
4846 ofile="$default_ofile"
4847 with_gnu_ld="$lt_cv_prog_gnu_ld"
4848 need_locks="$enable_libtool_lock"
4849
4850 old_CC="$CC"
4851 old_CFLAGS="$CFLAGS"
4852
4853 # Set sane defaults for various variables
4854 test -z "$AR" && AR=ar
4855 test -z "$AR_FLAGS" && AR_FLAGS=cru
4856 test -z "$AS" && AS=as
4857 test -z "$CC" && CC=cc
4858 test -z "$DLLTOOL" && DLLTOOL=dlltool
4859 test -z "$LD" && LD=ld
4860 test -z "$LN_S" && LN_S="ln -s"
4861 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4862 test -z "$NM" && NM=nm
4863 test -z "$OBJDUMP" && OBJDUMP=objdump
4864 test -z "$RANLIB" && RANLIB=:
4865 test -z "$STRIP" && STRIP=:
4866 test -z "$ac_objext" && ac_objext=o
4867
4868 if test x"$host" != x"$build"; then
4869   ac_tool_prefix=${host_alias}-
4870 else
4871   ac_tool_prefix=
4872 fi
4873
4874 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4875 case $host_os in
4876 linux-gnu*) ;;
4877 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4878 esac
4879
4880 case $host_os in
4881 aix3*)
4882   # AIX sometimes has problems with the GCC collect2 program.  For some
4883   # reason, if we set the COLLECT_NAMES environment variable, the problems
4884   # vanish in a puff of smoke.
4885   if test "X${COLLECT_NAMES+set}" != Xset; then
4886     COLLECT_NAMES=
4887     export COLLECT_NAMES
4888   fi
4889   ;;
4890 esac
4891
4892 # Determine commands to create old-style static archives.
4893 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4894 old_postinstall_cmds='chmod 644 $oldlib'
4895 old_postuninstall_cmds=
4896
4897 if test -n "$RANLIB"; then
4898   case $host_os in
4899   openbsd*)
4900     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4901     ;;
4902   *)
4903     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4904     ;;
4905   esac
4906   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4907 fi
4908
4909 # Allow CC to be a program name with arguments.
4910 set dummy $CC
4911 compiler="$2"
4912
4913 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4914 echo "configure:4915: checking for objdir" >&5
4915 rm -f .libs 2>/dev/null
4916 mkdir .libs 2>/dev/null
4917 if test -d .libs; then
4918   objdir=.libs
4919 else
4920   # MS-DOS does not allow filenames that begin with a dot.
4921   objdir=_libs
4922 fi
4923 rmdir .libs 2>/dev/null
4924 echo "$ac_t""$objdir" 1>&6
4925
4926
4927 # Check whether --with-pic or --without-pic was given.
4928 if test "${with_pic+set}" = set; then
4929   withval="$with_pic"
4930   pic_mode="$withval"
4931 else
4932   pic_mode=default
4933 fi
4934
4935 test -z "$pic_mode" && pic_mode=default
4936
4937 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4938 # in isolation, and that seeing it set (from the cache) indicates that
4939 # the associated values are set (in the cache) correctly too.
4940 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4941 echo "configure:4942: checking for $compiler option to produce PIC" >&5
4942 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4943   echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945    lt_cv_prog_cc_pic=
4946   lt_cv_prog_cc_shlib=
4947   lt_cv_prog_cc_wl=
4948   lt_cv_prog_cc_static=
4949   lt_cv_prog_cc_no_builtin=
4950   lt_cv_prog_cc_can_build_shared=$can_build_shared
4951
4952   if test "$GCC" = yes; then
4953     lt_cv_prog_cc_wl='-Wl,'
4954     lt_cv_prog_cc_static='-static'
4955
4956     case $host_os in
4957     aix*)
4958       # Below there is a dirty hack to force normal static linking with -ldl
4959       # The problem is because libdl dynamically linked with both libc and
4960       # libC (AIX C++ library), which obviously doesn't included in libraries
4961       # list by gcc. This cause undefined symbols with -static flags.
4962       # This hack allows C programs to be linked with "-static -ldl", but
4963       # not sure about C++ programs.
4964       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4965       ;;
4966     amigaos*)
4967       # FIXME: we need at least 68020 code to build shared libraries, but
4968       # adding the `-m68020' flag to GCC prevents building anything better,
4969       # like `-m68040'.
4970       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4971       ;;
4972     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4973       # PIC is the default for these OSes.
4974       ;;
4975     darwin* | rhapsody*)
4976       # PIC is the default on this platform
4977       # Common symbols not allowed in MH_DYLIB files
4978       lt_cv_prog_cc_pic='-fno-common'
4979       ;;
4980     cygwin* | mingw* | pw32* | os2*)
4981       # This hack is so that the source file can tell whether it is being
4982       # built for inclusion in a dll (and should export symbols for example).
4983       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4984       ;;
4985     sysv4*MP*)
4986       if test -d /usr/nec; then
4987          lt_cv_prog_cc_pic=-Kconform_pic
4988       fi
4989       ;;
4990     *)
4991       lt_cv_prog_cc_pic='-fPIC'
4992       ;;
4993     esac
4994   else
4995     # PORTME Check for PIC flags for the system compiler.
4996     case $host_os in
4997     aix3* | aix4* | aix5*)
4998       lt_cv_prog_cc_wl='-Wl,'
4999       # All AIX code is PIC.
5000       if test "$host_cpu" = ia64; then
5001         # AIX 5 now supports IA64 processor
5002         lt_cv_prog_cc_static='-Bstatic'
5003       else
5004         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5005       fi
5006       ;;
5007
5008     hpux9* | hpux10* | hpux11*)
5009       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5010       lt_cv_prog_cc_wl='-Wl,'
5011       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5012       lt_cv_prog_cc_pic='+Z'
5013       ;;
5014
5015     irix5* | irix6* | nonstopux*)
5016       lt_cv_prog_cc_wl='-Wl,'
5017       lt_cv_prog_cc_static='-non_shared'
5018       # PIC (with -KPIC) is the default.
5019       ;;
5020
5021     cygwin* | mingw* | pw32* | os2*)
5022       # This hack is so that the source file can tell whether it is being
5023       # built for inclusion in a dll (and should export symbols for example).
5024       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5025       ;;
5026
5027     newsos6)
5028       lt_cv_prog_cc_pic='-KPIC'
5029       lt_cv_prog_cc_static='-Bstatic'
5030       ;;
5031     
5032     openedition)
5033       # XPLINK code is PIC by default
5034       ;;
5035
5036     osf3* | osf4* | osf5*)
5037       # All OSF/1 code is PIC.
5038       lt_cv_prog_cc_wl='-Wl,'
5039       lt_cv_prog_cc_static='-non_shared'
5040       ;;
5041
5042     sco3.2v5*)
5043       lt_cv_prog_cc_pic='-Kpic'
5044       lt_cv_prog_cc_static='-dn'
5045       lt_cv_prog_cc_shlib='-belf'
5046       ;;
5047
5048     solaris*)
5049       lt_cv_prog_cc_pic='-KPIC'
5050       lt_cv_prog_cc_static='-Bstatic'
5051       lt_cv_prog_cc_wl='-Wl,'
5052       ;;
5053
5054     sunos4*)
5055       lt_cv_prog_cc_pic='-PIC'
5056       lt_cv_prog_cc_static='-Bstatic'
5057       lt_cv_prog_cc_wl='-Qoption ld '
5058       ;;
5059
5060     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5061       lt_cv_prog_cc_pic='-KPIC'
5062       lt_cv_prog_cc_static='-Bstatic'
5063       lt_cv_prog_cc_wl='-Wl,'
5064       ;;
5065
5066     uts4*)
5067       lt_cv_prog_cc_pic='-pic'
5068       lt_cv_prog_cc_static='-Bstatic'
5069       ;;
5070
5071     sysv4*MP*)
5072       if test -d /usr/nec ;then
5073         lt_cv_prog_cc_pic='-Kconform_pic'
5074         lt_cv_prog_cc_static='-Bstatic'
5075       fi
5076       ;;
5077
5078     *)
5079       lt_cv_prog_cc_can_build_shared=no
5080       ;;
5081     esac
5082   fi
5083
5084 fi
5085
5086 if test -z "$lt_cv_prog_cc_pic"; then
5087   echo "$ac_t""none" 1>&6
5088 else
5089   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5090
5091   # Check to make sure the pic_flag actually works.
5092   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5093 echo "configure:5094: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5094   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097       save_CFLAGS="$CFLAGS"
5098     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5099     cat > conftest.$ac_ext <<EOF
5100 #line 5101 "configure"
5101 #include "confdefs.h"
5102
5103 int main() {
5104
5105 ; return 0; }
5106 EOF
5107 if { (eval echo configure:5108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5108   rm -rf conftest*
5109         case $host_os in
5110       hpux9* | hpux10* | hpux11*)
5111         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5112         # they create non-PIC objects.  So, if there were any warnings, we
5113         # assume that PIC is not supported.
5114         if test -s conftest.err; then
5115           lt_cv_prog_cc_pic_works=no
5116         else
5117           lt_cv_prog_cc_pic_works=yes
5118         fi
5119         ;;
5120       *)
5121         lt_cv_prog_cc_pic_works=yes
5122         ;;
5123       esac
5124     
5125 else
5126   echo "configure: failed program was:" >&5
5127   cat conftest.$ac_ext >&5
5128   rm -rf conftest*
5129         lt_cv_prog_cc_pic_works=no
5130     
5131 fi
5132 rm -f conftest*
5133     CFLAGS="$save_CFLAGS"
5134   
5135 fi
5136
5137
5138   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5139     lt_cv_prog_cc_pic=
5140     lt_cv_prog_cc_can_build_shared=no
5141   else
5142     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5143   fi
5144
5145   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5146 fi
5147
5148 # Check for any special shared library compilation flags.
5149 if test -n "$lt_cv_prog_cc_shlib"; then
5150   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5151   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5152   else
5153    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5154     lt_cv_prog_cc_can_build_shared=no
5155   fi
5156 fi
5157
5158 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5159 echo "configure:5160: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5160 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5161   echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163     lt_cv_prog_cc_static_works=no
5164   save_LDFLAGS="$LDFLAGS"
5165   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5166   cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169
5170 int main() {
5171
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175   rm -rf conftest*
5176   lt_cv_prog_cc_static_works=yes
5177 else
5178   echo "configure: failed program was:" >&5
5179   cat conftest.$ac_ext >&5
5180 fi
5181 rm -f conftest*
5182   LDFLAGS="$save_LDFLAGS"
5183
5184 fi
5185
5186
5187 # Belt *and* braces to stop my trousers falling down:
5188 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5189 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5190
5191 pic_flag="$lt_cv_prog_cc_pic"
5192 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5193 wl="$lt_cv_prog_cc_wl"
5194 link_static_flag="$lt_cv_prog_cc_static"
5195 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5196 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5197
5198
5199 # Check to see if options -o and -c are simultaneously supported by compiler
5200 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5201 echo "configure:5202: checking if $compiler supports -c -o file.$ac_objext" >&5
5202 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   
5206 $rm -r conftest 2>/dev/null
5207 mkdir conftest
5208 cd conftest
5209 echo "int some_variable = 0;" > conftest.$ac_ext
5210 mkdir out
5211 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5212 # that will create temporary files in the current directory regardless of
5213 # the output directory.  Thus, making CWD read-only will cause this test
5214 # to fail, enabling locking or at least warning the user not to do parallel
5215 # builds.
5216 chmod -w .
5217 save_CFLAGS="$CFLAGS"
5218 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5219 compiler_c_o=no
5220 if { (eval echo configure:5221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5221   # The compiler can only warn and ignore the option if not recognized
5222   # So say no if there are warnings
5223   if test -s out/conftest.err; then
5224     lt_cv_compiler_c_o=no
5225   else
5226     lt_cv_compiler_c_o=yes
5227   fi
5228 else
5229   # Append any errors to the config.log.
5230   cat out/conftest.err 1>&5
5231   lt_cv_compiler_c_o=no
5232 fi
5233 CFLAGS="$save_CFLAGS"
5234 chmod u+w .
5235 $rm conftest* out/*
5236 rmdir out
5237 cd ..
5238 rmdir conftest
5239 $rm -r conftest 2>/dev/null
5240
5241 fi
5242
5243 compiler_c_o=$lt_cv_compiler_c_o
5244 echo "$ac_t""$compiler_c_o" 1>&6
5245
5246 if test x"$compiler_c_o" = x"yes"; then
5247   # Check to see if we can write to a .lo
5248   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5249 echo "configure:5250: checking if $compiler supports -c -o file.lo" >&5
5250   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5251   echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253   
5254   lt_cv_compiler_o_lo=no
5255   save_CFLAGS="$CFLAGS"
5256   CFLAGS="$CFLAGS -c -o conftest.lo"
5257   save_objext="$ac_objext"
5258   ac_objext=lo
5259   cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262
5263 int main() {
5264 int some_variable = 0;
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5268   rm -rf conftest*
5269       # The compiler can only warn and ignore the option if not recognized
5270     # So say no if there are warnings
5271     if test -s conftest.err; then
5272       lt_cv_compiler_o_lo=no
5273     else
5274       lt_cv_compiler_o_lo=yes
5275     fi
5276   
5277 else
5278   echo "configure: failed program was:" >&5
5279   cat conftest.$ac_ext >&5
5280 fi
5281 rm -f conftest*
5282   ac_objext="$save_objext"
5283   CFLAGS="$save_CFLAGS"
5284   
5285 fi
5286
5287   compiler_o_lo=$lt_cv_compiler_o_lo
5288   echo "$ac_t""$compiler_o_lo" 1>&6
5289 else
5290   compiler_o_lo=no
5291 fi
5292
5293 # Check to see if we can do hard links to lock some files if needed
5294 hard_links="nottested"
5295 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5296   # do not overwrite the value of need_locks provided by the user
5297   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5298 echo "configure:5299: checking if we can lock with hard links" >&5
5299   hard_links=yes
5300   $rm conftest*
5301   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5302   touch conftest.a
5303   ln conftest.a conftest.b 2>&5 || hard_links=no
5304   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5305   echo "$ac_t""$hard_links" 1>&6
5306   if test "$hard_links" = no; then
5307     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5308     need_locks=warn
5309   fi
5310 else
5311   need_locks=no
5312 fi
5313
5314 if test "$GCC" = yes; then
5315   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5316   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5317 echo "configure:5318: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5318   echo "int some_variable = 0;" > conftest.$ac_ext
5319   save_CFLAGS="$CFLAGS"
5320   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5321   compiler_rtti_exceptions=no
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325
5326 int main() {
5327 int some_variable = 0;
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5331   rm -rf conftest*
5332       # The compiler can only warn and ignore the option if not recognized
5333     # So say no if there are warnings
5334     if test -s conftest.err; then
5335       compiler_rtti_exceptions=no
5336     else
5337       compiler_rtti_exceptions=yes
5338     fi
5339   
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343 fi
5344 rm -f conftest*
5345   CFLAGS="$save_CFLAGS"
5346   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5347
5348   if test "$compiler_rtti_exceptions" = "yes"; then
5349     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5350   else
5351     no_builtin_flag=' -fno-builtin'
5352   fi
5353 fi
5354
5355 # See if the linker supports building shared libraries.
5356 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5357 echo "configure:5358: checking whether the linker ($LD) supports shared libraries" >&5
5358
5359 allow_undefined_flag=
5360 no_undefined_flag=
5361 need_lib_prefix=unknown
5362 need_version=unknown
5363 # when you set need_version to no, make sure it does not cause -set_version
5364 # flags to be left without arguments
5365 archive_cmds=
5366 archive_expsym_cmds=
5367 old_archive_from_new_cmds=
5368 old_archive_from_expsyms_cmds=
5369 export_dynamic_flag_spec=
5370 whole_archive_flag_spec=
5371 thread_safe_flag_spec=
5372 hardcode_into_libs=no
5373 hardcode_libdir_flag_spec=
5374 hardcode_libdir_separator=
5375 hardcode_direct=no
5376 hardcode_minus_L=no
5377 hardcode_shlibpath_var=unsupported
5378 runpath_var=
5379 link_all_deplibs=unknown
5380 always_export_symbols=no
5381 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5382 # include_expsyms should be a list of space-separated symbols to be *always*
5383 # included in the symbol list
5384 include_expsyms=
5385 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5386 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5387 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5388 # as well as any symbol that contains `d'.
5389 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5390 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5391 # platforms (ab)use it in PIC code, but their linkers get confused if
5392 # the symbol is explicitly referenced.  Since portable code cannot
5393 # rely on this symbol name, it's probably fine to never include it in
5394 # preloaded symbol tables.
5395 extract_expsyms_cmds=
5396
5397 case $host_os in
5398 cygwin* | mingw* | pw32*)
5399   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5400   # When not using gcc, we currently assume that we are using
5401   # Microsoft Visual C++.
5402   if test "$GCC" != yes; then
5403     with_gnu_ld=no
5404   fi
5405   ;;
5406 openbsd*)
5407   with_gnu_ld=no
5408   ;;
5409 esac
5410
5411 ld_shlibs=yes
5412 if test "$with_gnu_ld" = yes; then
5413   # If archive_cmds runs LD, not CC, wlarc should be empty
5414   wlarc='${wl}'
5415
5416   # See if GNU ld supports shared libraries.
5417   case $host_os in
5418   aix3* | aix4* | aix5*)
5419     # On AIX, the GNU linker is very broken
5420     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5421     ld_shlibs=no
5422     cat <<EOF 1>&2
5423
5424 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5425 *** to be unable to reliably create shared libraries on AIX.
5426 *** Therefore, libtool is disabling shared libraries support.  If you
5427 *** really care for shared libraries, you may want to modify your PATH
5428 *** so that a non-GNU linker is found, and then restart.
5429
5430 EOF
5431     ;;
5432
5433   amigaos*)
5434     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)'
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     hardcode_minus_L=yes
5437
5438     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5439     # that the semantics of dynamic libraries on AmigaOS, at least up
5440     # to version 4, is to share data among multiple programs linked
5441     # with the same dynamic library.  Since this doesn't match the
5442     # behavior of shared libraries on other platforms, we can use
5443     # them.
5444     ld_shlibs=no
5445     ;;
5446
5447   beos*)
5448     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5449       allow_undefined_flag=unsupported
5450       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5451       # support --undefined.  This deserves some investigation.  FIXME
5452       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5453     else
5454       ld_shlibs=no
5455     fi
5456     ;;
5457
5458   cygwin* | mingw* | pw32*)
5459     # hardcode_libdir_flag_spec is actually meaningless, as there is
5460     # no search path for DLLs.
5461     hardcode_libdir_flag_spec='-L$libdir'
5462     allow_undefined_flag=unsupported
5463     always_export_symbols=yes
5464
5465     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5466       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5467       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5468       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5469       else $CC -o impgen impgen.c ; fi)~
5470       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5471
5472     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5473
5474     # cygwin and mingw dlls have different entry points and sets of symbols
5475     # to exclude.
5476     # FIXME: what about values for MSVC?
5477     dll_entry=__cygwin_dll_entry@12
5478     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5479     case $host_os in
5480     mingw*)
5481       # mingw values
5482       dll_entry=_DllMainCRTStartup@12
5483       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5484       ;;
5485     esac
5486
5487     # mingw and cygwin differ, and it's simplest to just exclude the union
5488     # of the two symbol sets.
5489     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5490
5491     # recent cygwin and mingw systems supply a stub DllMain which the user
5492     # can override, but on older systems we have to supply one (in ltdll.c)
5493     if test "x$lt_cv_need_dllmain" = "xyes"; then
5494       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5495       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~
5496         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5497     else
5498       ltdll_obj=
5499       ltdll_cmds=
5500     fi
5501
5502     # Extract the symbol export list from an `--export-all' def file,
5503     # then regenerate the def file from the symbol export list, so that
5504     # the compiled dll only exports the symbol export list.
5505     # Be careful not to strip the DATA tag left be newer dlltools.
5506     export_symbols_cmds="$ltdll_cmds"'
5507       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5508       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5509
5510     # If the export-symbols file already is a .def file (1st line
5511     # is EXPORTS), use it as is.
5512     # If DATA tags from a recent dlltool are present, honour them!
5513     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5514         cp $export_symbols $output_objdir/$soname-def;
5515       else
5516         echo EXPORTS > $output_objdir/$soname-def;
5517         _lt_hint=1;
5518         cat $export_symbols | while read symbol; do
5519          set dummy \$symbol;
5520          case \$# in
5521            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5522            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5523            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5524          esac;
5525          _lt_hint=`expr 1 + \$_lt_hint`;
5526         done;
5527       fi~
5528       '"$ltdll_cmds"'
5529       $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~
5530       $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~
5531       $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~
5532       $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~
5533       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5534     ;;
5535
5536   netbsd*)
5537     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5538       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5539       wlarc=
5540     else
5541       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5542       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5543     fi
5544     ;;
5545
5546   solaris* | sysv5*)
5547     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5548       ld_shlibs=no
5549       cat <<EOF 1>&2
5550
5551 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5552 *** create shared libraries on Solaris systems.  Therefore, libtool
5553 *** is disabling shared libraries support.  We urge you to upgrade GNU
5554 *** binutils to release 2.9.1 or newer.  Another option is to modify
5555 *** your PATH or compiler configuration so that the native linker is
5556 *** used, and then restart.
5557
5558 EOF
5559     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5560       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5561       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5562     else
5563       ld_shlibs=no
5564     fi
5565     ;;
5566
5567   sunos4*)
5568     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5569     wlarc=
5570     hardcode_direct=yes
5571     hardcode_shlibpath_var=no
5572     ;;
5573
5574   *)
5575     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5576       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5577       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5578     else
5579       ld_shlibs=no
5580     fi
5581     ;;
5582   esac
5583
5584   if test "$ld_shlibs" = yes; then
5585     runpath_var=LD_RUN_PATH
5586     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5587     export_dynamic_flag_spec='${wl}--export-dynamic'
5588     case $host_os in
5589     cygwin* | mingw* | pw32*)
5590       # dlltool doesn't understand --whole-archive et. al.
5591       whole_archive_flag_spec=
5592       ;;
5593     *)
5594       # ancient GNU ld didn't support --whole-archive et. al.
5595       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5596         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5597       else
5598         whole_archive_flag_spec=
5599       fi
5600       ;;
5601     esac
5602   fi
5603 else
5604   # PORTME fill in a description of your system's linker (not GNU ld)
5605   case $host_os in
5606   aix3*)
5607     allow_undefined_flag=unsupported
5608     always_export_symbols=yes
5609     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'
5610     # Note: this linker hardcodes the directories in LIBPATH if there
5611     # are no directories specified by -L.
5612     hardcode_minus_L=yes
5613     if test "$GCC" = yes && test -z "$link_static_flag"; then
5614       # Neither direct hardcoding nor static linking is supported with a
5615       # broken collect2.
5616       hardcode_direct=unsupported
5617     fi
5618     ;;
5619
5620   aix4* | aix5*)
5621     if test "$host_cpu" = ia64; then
5622       # On IA64, the linker does run time linking by default, so we don't
5623       # have to do anything special.
5624       aix_use_runtimelinking=no
5625       exp_sym_flag='-Bexport'
5626       no_entry_flag=""
5627     else
5628       aix_use_runtimelinking=no
5629
5630       # Test if we are trying to use run time linking or normal
5631       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5632       # need to do runtime linking.
5633       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5634         for ld_flag in $LDFLAGS; do
5635           case $ld_flag in
5636           *-brtl*)
5637             aix_use_runtimelinking=yes
5638             break
5639           ;;
5640           esac
5641         done
5642       esac
5643
5644       exp_sym_flag='-bexport'
5645       no_entry_flag='-bnoentry'
5646     fi
5647
5648     # When large executables or shared objects are built, AIX ld can
5649     # have problems creating the table of contents.  If linking a library
5650     # or program results in "error TOC overflow" add -mminimal-toc to
5651     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5652     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5653
5654     hardcode_direct=yes
5655     archive_cmds=''
5656     hardcode_libdir_separator=':'
5657     if test "$GCC" = yes; then
5658       case $host_os in aix4.[012]|aix4.[012].*)
5659         collect2name=`${CC} -print-prog-name=collect2`
5660         if test -f "$collect2name" && \
5661           strings "$collect2name" | grep resolve_lib_name >/dev/null
5662         then
5663           # We have reworked collect2
5664           hardcode_direct=yes
5665         else
5666           # We have old collect2
5667           hardcode_direct=unsupported
5668           # It fails to find uninstalled libraries when the uninstalled
5669           # path is not listed in the libpath.  Setting hardcode_minus_L
5670           # to unsupported forces relinking
5671           hardcode_minus_L=yes
5672           hardcode_libdir_flag_spec='-L$libdir'
5673           hardcode_libdir_separator=
5674         fi
5675       esac
5676
5677       shared_flag='-shared'
5678     else
5679       # not using gcc
5680       if test "$host_cpu" = ia64; then
5681         shared_flag='${wl}-G'
5682       else
5683         if test "$aix_use_runtimelinking" = yes; then
5684           shared_flag='${wl}-G'
5685         else
5686           shared_flag='${wl}-bM:SRE'
5687         fi
5688       fi
5689     fi
5690
5691     # It seems that -bexpall can do strange things, so it is better to
5692     # generate a list of symbols to export.
5693     always_export_symbols=yes
5694     if test "$aix_use_runtimelinking" = yes; then
5695       # Warning - without using the other runtime loading flags (-brtl),
5696       # -berok will link without error, but may produce a broken library.
5697       allow_undefined_flag='-berok'
5698       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5699       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"
5700     else
5701       if test "$host_cpu" = ia64; then
5702         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5703         allow_undefined_flag="-z nodefs"
5704         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"
5705       else
5706         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5707         # Warning - without using the other run time loading flags,
5708         # -berok will link without error, but may produce a broken library.
5709         allow_undefined_flag='${wl}-berok'
5710         # This is a bit strange, but is similar to how AIX traditionally builds
5711         # it's shared libraries.
5712         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'
5713       fi
5714     fi
5715     ;;
5716
5717   amigaos*)
5718     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)'
5719     hardcode_libdir_flag_spec='-L$libdir'
5720     hardcode_minus_L=yes
5721     # see comment about different semantics on the GNU ld section
5722     ld_shlibs=no
5723     ;;
5724
5725   cygwin* | mingw* | pw32*)
5726     # When not using gcc, we currently assume that we are using
5727     # Microsoft Visual C++.
5728     # hardcode_libdir_flag_spec is actually meaningless, as there is
5729     # no search path for DLLs.
5730     hardcode_libdir_flag_spec=' '
5731     allow_undefined_flag=unsupported
5732     # Tell ltmain to make .lib files, not .a files.
5733     libext=lib
5734     # FIXME: Setting linknames here is a bad hack.
5735     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5736     # The linker will automatically build a .lib file if we build a DLL.
5737     old_archive_from_new_cmds='true'
5738     # FIXME: Should let the user specify the lib program.
5739     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5740     fix_srcfile_path='`cygpath -w "$srcfile"`'
5741     ;;
5742
5743   darwin* | rhapsody*)
5744     case "$host_os" in
5745     rhapsody* | darwin1.[012])
5746       allow_undefined_flag='-undefined suppress'
5747       ;;
5748     *) # Darwin 1.3 on
5749       allow_undefined_flag='-flat_namespace -undefined suppress'
5750       ;;
5751     esac
5752     # FIXME: Relying on posixy $() will cause problems for
5753     #        cross-compilation, but unfortunately the echo tests do not
5754     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5755     #        `"' quotes if we put them in here... so don't!
5756     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)'
5757     # We need to add '_' to the symbols in $export_symbols first
5758     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5759     hardcode_direct=yes
5760     hardcode_shlibpath_var=no
5761     whole_archive_flag_spec='-all_load $convenience'
5762     ;;
5763
5764   freebsd1*)
5765     ld_shlibs=no
5766     ;;
5767
5768   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5769   # support.  Future versions do this automatically, but an explicit c++rt0.o
5770   # does not break anything, and helps significantly (at the cost of a little
5771   # extra space).
5772   freebsd2.2*)
5773     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5774     hardcode_libdir_flag_spec='-R$libdir'
5775     hardcode_direct=yes
5776     hardcode_shlibpath_var=no
5777     ;;
5778
5779   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5780   freebsd2*)
5781     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5782     hardcode_direct=yes
5783     hardcode_minus_L=yes
5784     hardcode_shlibpath_var=no
5785     ;;
5786
5787   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5788   freebsd*)
5789     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5790     hardcode_libdir_flag_spec='-R$libdir'
5791     hardcode_direct=yes
5792     hardcode_shlibpath_var=no
5793     ;;
5794
5795   hpux9* | hpux10* | hpux11*)
5796     case $host_os in
5797     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' ;;
5798     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5799     esac
5800     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5801     hardcode_libdir_separator=:
5802     hardcode_direct=yes
5803     hardcode_minus_L=yes # Not in the search PATH, but as the default
5804                          # location of the library.
5805     export_dynamic_flag_spec='${wl}-E'
5806     ;;
5807
5808   irix5* | irix6* | nonstopux*)
5809     if test "$GCC" = yes; then
5810       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'
5811       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5812     else
5813       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'
5814       hardcode_libdir_flag_spec='-rpath $libdir'
5815     fi
5816     hardcode_libdir_separator=:
5817     link_all_deplibs=yes
5818     ;;
5819
5820   netbsd*)
5821     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5822       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5823     else
5824       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5825     fi
5826     hardcode_libdir_flag_spec='-R$libdir'
5827     hardcode_direct=yes
5828     hardcode_shlibpath_var=no
5829     ;;
5830
5831   newsos6)
5832     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5833     hardcode_direct=yes
5834     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5835     hardcode_libdir_separator=:
5836     hardcode_shlibpath_var=no
5837     ;;
5838
5839   openbsd*)
5840     hardcode_direct=yes
5841     hardcode_shlibpath_var=no
5842     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5843       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5844       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5845       export_dynamic_flag_spec='${wl}-E'
5846     else
5847       case "$host_os" in
5848       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5849         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5850         hardcode_libdir_flag_spec='-R$libdir'
5851         ;;
5852       *)
5853         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5854         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5855         ;;
5856       esac
5857     fi
5858     ;;
5859
5860   openedition*)
5861     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5862         cp \$linknames \$output_objdir && linknames=''"
5863     export_dynamic_flag_spec="-Wl,DLL"
5864     ;;
5865
5866   os2*)
5867     hardcode_libdir_flag_spec='-L$libdir'
5868     hardcode_minus_L=yes
5869     allow_undefined_flag=unsupported
5870     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'
5871     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5872     ;;
5873
5874   osf3*)
5875     if test "$GCC" = yes; then
5876       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5877       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'
5878     else
5879       allow_undefined_flag=' -expect_unresolved \*'
5880       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'
5881     fi
5882     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5883     hardcode_libdir_separator=:
5884     ;;
5885
5886   osf4* | osf5*)        # as osf3* with the addition of -msym flag
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}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5890       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5891     else
5892       allow_undefined_flag=' -expect_unresolved \*'
5893       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'
5894       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5895       $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'
5896
5897       #Both c and cxx compiler support -rpath directly
5898       hardcode_libdir_flag_spec='-rpath $libdir'
5899     fi
5900     hardcode_libdir_separator=:
5901     ;;
5902
5903   sco3.2v5*)
5904     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5905     hardcode_shlibpath_var=no
5906     runpath_var=LD_RUN_PATH
5907     hardcode_runpath_var=yes
5908     export_dynamic_flag_spec='${wl}-Bexport'
5909     ;;
5910
5911   solaris*)
5912     # gcc --version < 3.0 without binutils cannot create self contained
5913     # shared libraries reliably, requiring libgcc.a to resolve some of
5914     # the object symbols generated in some cases.  Libraries that use
5915     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5916     # a copy of libgcc.a into every shared library to guarantee resolving
5917     # such symbols causes other problems:  According to Tim Van Holder
5918     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5919     # (to the application) exception stack for one thing.
5920     no_undefined_flag=' -z defs'
5921     if test "$GCC" = yes; then
5922       case `$CC --version 2>/dev/null` in
5923       [12].*)
5924         cat <<EOF 1>&2
5925
5926 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5927 *** create self contained shared libraries on Solaris systems, without
5928 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5929 *** -no-undefined support, which will at least allow you to build shared
5930 *** libraries.  However, you may find that when you link such libraries
5931 *** into an application without using GCC, you have to manually add
5932 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5933 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5934 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5935
5936 EOF
5937         no_undefined_flag=
5938         ;;
5939       esac
5940     fi
5941     # $CC -shared without GNU ld will not create a library from C++
5942     # object files and a static libstdc++, better avoid it by now
5943     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5944     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5945                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5946     hardcode_libdir_flag_spec='-R$libdir'
5947     hardcode_shlibpath_var=no
5948     case $host_os in
5949     solaris2.[0-5] | solaris2.[0-5].*) ;;
5950     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5951       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5952     esac
5953     link_all_deplibs=yes
5954     ;;
5955
5956   sunos4*)
5957     if test "x$host_vendor" = xsequent; then
5958       # Use $CC to link under sequent, because it throws in some extra .o
5959       # files that make .init and .fini sections work.
5960       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5961     else
5962       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5963     fi
5964     hardcode_libdir_flag_spec='-L$libdir'
5965     hardcode_direct=yes
5966     hardcode_minus_L=yes
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   sysv4)
5971     case $host_vendor in
5972       sni)
5973         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5974         hardcode_direct=yes # is this really true???
5975         ;;
5976       siemens)
5977         ## LD is ld it makes a PLAMLIB
5978         ## CC just makes a GrossModule.
5979         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5980         reload_cmds='$CC -r -o $output$reload_objs'
5981         hardcode_direct=no
5982         ;;
5983       motorola)
5984         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5985         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5986         ;;
5987     esac
5988     runpath_var='LD_RUN_PATH'
5989     hardcode_shlibpath_var=no
5990     ;;
5991
5992   sysv4.3*)
5993     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994     hardcode_shlibpath_var=no
5995     export_dynamic_flag_spec='-Bexport'
5996     ;;
5997
5998   sysv5*)
5999     no_undefined_flag=' -z text'
6000     # $CC -shared without GNU ld will not create a library from C++
6001     # object files and a static libstdc++, better avoid it by now
6002     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6003     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6004                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6005     hardcode_libdir_flag_spec=
6006     hardcode_shlibpath_var=no
6007     runpath_var='LD_RUN_PATH'
6008     ;;
6009
6010   uts4*)
6011     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6012     hardcode_libdir_flag_spec='-L$libdir'
6013     hardcode_shlibpath_var=no
6014     ;;
6015
6016   dgux*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_libdir_flag_spec='-L$libdir'
6019     hardcode_shlibpath_var=no
6020     ;;
6021
6022   sysv4*MP*)
6023     if test -d /usr/nec; then
6024       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6025       hardcode_shlibpath_var=no
6026       runpath_var=LD_RUN_PATH
6027       hardcode_runpath_var=yes
6028       ld_shlibs=yes
6029     fi
6030     ;;
6031
6032   sysv4.2uw2*)
6033     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6034     hardcode_direct=yes
6035     hardcode_minus_L=no
6036     hardcode_shlibpath_var=no
6037     hardcode_runpath_var=yes
6038     runpath_var=LD_RUN_PATH
6039     ;;
6040
6041   sysv5uw7* | unixware7*)
6042     no_undefined_flag='${wl}-z ${wl}text'
6043     if test "$GCC" = yes; then
6044       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6045     else
6046       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6047     fi
6048     runpath_var='LD_RUN_PATH'
6049     hardcode_shlibpath_var=no
6050     ;;
6051
6052   *)
6053     ld_shlibs=no
6054     ;;
6055   esac
6056 fi
6057 echo "$ac_t""$ld_shlibs" 1>&6
6058 test "$ld_shlibs" = no && can_build_shared=no
6059
6060 # Check hardcoding attributes.
6061 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6062 echo "configure:6063: checking how to hardcode library paths into programs" >&5
6063 hardcode_action=
6064 if test -n "$hardcode_libdir_flag_spec" || \
6065    test -n "$runpath_var"; then
6066
6067   # We can hardcode non-existant directories.
6068   if test "$hardcode_direct" != no &&
6069      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6070      # have to relink, otherwise we might link with an installed library
6071      # when we should be linking with a yet-to-be-installed one
6072      ## test "$hardcode_shlibpath_var" != no &&
6073      test "$hardcode_minus_L" != no; then
6074     # Linking always hardcodes the temporary library directory.
6075     hardcode_action=relink
6076   else
6077     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6078     hardcode_action=immediate
6079   fi
6080 else
6081   # We cannot hardcode anything, or else we can only hardcode existing
6082   # directories.
6083   hardcode_action=unsupported
6084 fi
6085 echo "$ac_t""$hardcode_action" 1>&6
6086
6087 striplib=
6088 old_striplib=
6089 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6090 echo "configure:6091: checking whether stripping libraries is possible" >&5
6091 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6092   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6093   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6094   echo "$ac_t""yes" 1>&6
6095 else
6096   echo "$ac_t""no" 1>&6
6097 fi
6098
6099 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6100 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6101
6102 # PORTME Fill in your ld.so characteristics
6103 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6104 echo "configure:6105: checking dynamic linker characteristics" >&5
6105 library_names_spec=
6106 libname_spec='lib$name'
6107 soname_spec=
6108 postinstall_cmds=
6109 postuninstall_cmds=
6110 finish_cmds=
6111 finish_eval=
6112 shlibpath_var=
6113 shlibpath_overrides_runpath=unknown
6114 version_type=none
6115 dynamic_linker="$host_os ld.so"
6116 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6117 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6118
6119 case $host_os in
6120 aix3*)
6121   version_type=linux
6122   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6123   shlibpath_var=LIBPATH
6124
6125   # AIX has no versioning support, so we append a major version to the name.
6126   soname_spec='${libname}${release}.so$major'
6127   ;;
6128
6129 aix4* | aix5*)
6130   version_type=linux
6131   need_lib_prefix=no
6132   need_version=no
6133   hardcode_into_libs=yes
6134   if test "$host_cpu" = ia64; then
6135     # AIX 5 supports IA64
6136     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6137     shlibpath_var=LD_LIBRARY_PATH
6138   else
6139     # With GCC up to 2.95.x, collect2 would create an import file
6140     # for dependence libraries.  The import file would start with
6141     # the line `#! .'.  This would cause the generated library to
6142     # depend on `.', always an invalid library.  This was fixed in
6143     # development snapshots of GCC prior to 3.0.
6144     case $host_os in
6145       aix4 | aix4.[01] | aix4.[01].*)
6146         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6147              echo ' yes '
6148              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6149           :
6150         else
6151           can_build_shared=no
6152         fi
6153         ;;
6154     esac
6155     # AIX (on Power*) has no versioning support, so currently we can
6156     # not hardcode correct soname into executable. Probably we can
6157     # add versioning support to collect2, so additional links can
6158     # be useful in future.
6159     if test "$aix_use_runtimelinking" = yes; then
6160       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6161       # instead of lib<name>.a to let people know that these are not
6162       # typical AIX shared libraries.
6163       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6164     else
6165       # We preserve .a as extension for shared libraries through AIX4.2
6166       # and later when we are not doing run time linking.
6167       library_names_spec='${libname}${release}.a $libname.a'
6168       soname_spec='${libname}${release}.so$major'
6169     fi
6170     shlibpath_var=LIBPATH
6171   fi
6172   hardcode_into_libs=yes
6173   ;;
6174
6175 amigaos*)
6176   library_names_spec='$libname.ixlibrary $libname.a'
6177   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6178   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'
6179   ;;
6180
6181 beos*)
6182   library_names_spec='${libname}.so'
6183   dynamic_linker="$host_os ld.so"
6184   shlibpath_var=LIBRARY_PATH
6185   ;;
6186
6187 bsdi4*)
6188   version_type=linux
6189   need_version=no
6190   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6191   soname_spec='${libname}${release}.so$major'
6192   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6193   shlibpath_var=LD_LIBRARY_PATH
6194   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6195   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6196   export_dynamic_flag_spec=-rdynamic
6197   # the default ld.so.conf also contains /usr/contrib/lib and
6198   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6199   # libtool to hard-code these into programs
6200   ;;
6201
6202 cygwin* | mingw* | pw32*)
6203   version_type=windows
6204   need_version=no
6205   need_lib_prefix=no
6206   case $GCC,$host_os in
6207   yes,cygwin*)
6208     library_names_spec='$libname.dll.a'
6209     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6210     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6211       dldir=$destdir/`dirname \$dlpath`~
6212       test -d \$dldir || mkdir -p \$dldir~
6213       $install_prog .libs/$dlname \$dldir/$dlname'
6214     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6215       dlpath=$dir/\$dldll~
6216        $rm \$dlpath'
6217     ;;
6218   yes,mingw*)
6219     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6220     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6221     ;;
6222   yes,pw32*)
6223     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6224     ;;
6225   *)
6226     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6227     ;;
6228   esac
6229   dynamic_linker='Win32 ld.exe'
6230   # FIXME: first we should search . and the directory the executable is in
6231   shlibpath_var=PATH
6232   ;;
6233
6234 darwin* | rhapsody*)
6235   dynamic_linker="$host_os dyld"
6236   version_type=darwin
6237   need_lib_prefix=no
6238   need_version=no
6239   # FIXME: Relying on posixy $() will cause problems for
6240   #        cross-compilation, but unfortunately the echo tests do not
6241   #        yet detect zsh echo's removal of \ escapes.
6242   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)'
6243   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6244   shlibpath_overrides_runpath=yes
6245   shlibpath_var=DYLD_LIBRARY_PATH
6246   ;;
6247
6248 freebsd1*)
6249   dynamic_linker=no
6250   ;;
6251
6252 freebsd*)
6253   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6254   version_type=freebsd-$objformat
6255   case $version_type in
6256     freebsd-elf*)
6257       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6258       need_version=no
6259       need_lib_prefix=no
6260       ;;
6261     freebsd-*)
6262       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6263       need_version=yes
6264       ;;
6265   esac
6266   shlibpath_var=LD_LIBRARY_PATH
6267   case $host_os in
6268   freebsd2*)
6269     shlibpath_overrides_runpath=yes
6270     ;;
6271   *)
6272     shlibpath_overrides_runpath=no
6273     hardcode_into_libs=yes
6274     ;;
6275   esac
6276   ;;
6277
6278 gnu*)
6279   version_type=linux
6280   need_lib_prefix=no
6281   need_version=no
6282   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6283   soname_spec='${libname}${release}.so$major'
6284   shlibpath_var=LD_LIBRARY_PATH
6285   hardcode_into_libs=yes
6286   ;;
6287
6288 hpux9* | hpux10* | hpux11*)
6289   # Give a soname corresponding to the major version so that dld.sl refuses to
6290   # link against other versions.
6291   dynamic_linker="$host_os dld.sl"
6292   version_type=sunos
6293   need_lib_prefix=no
6294   need_version=no
6295   shlibpath_var=SHLIB_PATH
6296   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6297   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6298   soname_spec='${libname}${release}.sl$major'
6299   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6300   postinstall_cmds='chmod 555 $lib'
6301   ;;
6302
6303 irix5* | irix6* | nonstopux*)
6304   case $host_os in
6305     nonstopux*) version_type=nonstopux ;;
6306     *)          version_type=irix ;;
6307   esac
6308   need_lib_prefix=no
6309   need_version=no
6310   soname_spec='${libname}${release}.so$major'
6311   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6312   case $host_os in
6313   irix5* | nonstopux*)
6314     libsuff= shlibsuff=
6315     ;;
6316   *)
6317     case $LD in # libtool.m4 will add one of these switches to LD
6318     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6319     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6320     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6321     *) libsuff= shlibsuff= libmagic=never-match;;
6322     esac
6323     ;;
6324   esac
6325   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6326   shlibpath_overrides_runpath=no
6327   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6328   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6329   ;;
6330
6331 # No shared lib support for Linux oldld, aout, or coff.
6332 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6333   dynamic_linker=no
6334   ;;
6335
6336 # This must be Linux ELF.
6337 linux-gnu*)
6338   version_type=linux
6339   need_lib_prefix=no
6340   need_version=no
6341   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6342   soname_spec='${libname}${release}.so$major'
6343   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6344   shlibpath_var=LD_LIBRARY_PATH
6345   shlibpath_overrides_runpath=no
6346   # This implies no fast_install, which is unacceptable.
6347   # Some rework will be needed to allow for fast_install
6348   # before this can be enabled.
6349   hardcode_into_libs=yes
6350
6351   # We used to test for /lib/ld.so.1 and disable shared libraries on
6352   # powerpc, because MkLinux only supported shared libraries with the
6353   # GNU dynamic linker.  Since this was broken with cross compilers,
6354   # most powerpc-linux boxes support dynamic linking these days and
6355   # people can always --disable-shared, the test was removed, and we
6356   # assume the GNU/Linux dynamic linker is in use.
6357   dynamic_linker='GNU/Linux ld.so'
6358   ;;
6359
6360 netbsd*)
6361   version_type=sunos
6362   need_lib_prefix=no
6363   need_version=no
6364   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6365     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6366     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6367     dynamic_linker='NetBSD (a.out) ld.so'
6368   else
6369     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6370     soname_spec='${libname}${release}.so$major'
6371     dynamic_linker='NetBSD ld.elf_so'
6372   fi
6373   shlibpath_var=LD_LIBRARY_PATH
6374   shlibpath_overrides_runpath=yes
6375   hardcode_into_libs=yes
6376   ;;
6377
6378 newsos6)
6379   version_type=linux
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   shlibpath_var=LD_LIBRARY_PATH
6382   shlibpath_overrides_runpath=yes
6383   ;;
6384
6385 openbsd*)
6386   version_type=sunos
6387   need_lib_prefix=no
6388   need_version=no
6389   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6390     case "$host_os" in
6391     openbsd2.[89] | openbsd2.[89].*)
6392       shlibpath_overrides_runpath=no
6393       ;;
6394     *)
6395       shlibpath_overrides_runpath=yes
6396       ;;
6397     esac
6398   else
6399     shlibpath_overrides_runpath=yes
6400   fi
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6402   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   ;;
6405
6406 openedition*)
6407   need_lib_prefix=no
6408   need_version=no
6409   shlibpath_overrides_runpath=yes
6410   shlibpath_var=LIBPATH
6411   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6412   # the library's exports are in libname.x; this is the file that must
6413   # actually be linked with to use a DLL.
6414   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6415   ;;
6416
6417 os2*)
6418   libname_spec='$name'
6419   need_lib_prefix=no
6420   library_names_spec='$libname.dll $libname.a'
6421   dynamic_linker='OS/2 ld.exe'
6422   shlibpath_var=LIBPATH
6423   ;;
6424
6425 osf3* | osf4* | osf5*)
6426   version_type=osf
6427   need_version=no
6428   soname_spec='${libname}${release}.so$major'
6429   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6432   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6433   hardcode_into_libs=yes
6434   ;;
6435
6436 sco3.2v5*)
6437   version_type=osf
6438   soname_spec='${libname}${release}.so$major'
6439   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6440   shlibpath_var=LD_LIBRARY_PATH
6441   ;;
6442
6443 solaris*)
6444   version_type=linux
6445   need_lib_prefix=no
6446   need_version=no
6447   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6448   soname_spec='${libname}${release}.so$major'
6449   shlibpath_var=LD_LIBRARY_PATH
6450   shlibpath_overrides_runpath=yes
6451   hardcode_into_libs=yes
6452   # ldd complains unless libraries are executable
6453   postinstall_cmds='chmod +x $lib'
6454   ;;
6455
6456 sunos4*)
6457   version_type=sunos
6458   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6459   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6460   shlibpath_var=LD_LIBRARY_PATH
6461   shlibpath_overrides_runpath=yes
6462   if test "$with_gnu_ld" = yes; then
6463     need_lib_prefix=no
6464   fi
6465   need_version=yes
6466   ;;
6467
6468 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6469   version_type=linux
6470   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6471   soname_spec='${libname}${release}.so$major'
6472   shlibpath_var=LD_LIBRARY_PATH
6473   case $host_vendor in
6474     sni)
6475       shlibpath_overrides_runpath=no
6476       need_lib_prefix=no
6477       export_dynamic_flag_spec='${wl}-Blargedynsym'
6478       runpath_var=LD_RUN_PATH
6479       ;;
6480     siemens)
6481       need_lib_prefix=no
6482       ;;
6483     motorola)
6484       need_lib_prefix=no
6485       need_version=no
6486       shlibpath_overrides_runpath=no
6487       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6488       ;;
6489   esac
6490   ;;
6491
6492 uts4*)
6493   version_type=linux
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   soname_spec='${libname}${release}.so$major'
6496   shlibpath_var=LD_LIBRARY_PATH
6497   ;;
6498
6499 dgux*)
6500   version_type=linux
6501   need_lib_prefix=no
6502   need_version=no
6503   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6504   soname_spec='${libname}${release}.so$major'
6505   shlibpath_var=LD_LIBRARY_PATH
6506   ;;
6507
6508 sysv4*MP*)
6509   if test -d /usr/nec ;then
6510     version_type=linux
6511     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6512     soname_spec='$libname.so.$major'
6513     shlibpath_var=LD_LIBRARY_PATH
6514   fi
6515   ;;
6516
6517 *)
6518   dynamic_linker=no
6519   ;;
6520 esac
6521 echo "$ac_t""$dynamic_linker" 1>&6
6522 test "$dynamic_linker" = no && can_build_shared=no
6523
6524 # Report the final consequences.
6525 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6526 echo "configure:6527: checking if libtool supports shared libraries" >&5
6527 echo "$ac_t""$can_build_shared" 1>&6
6528
6529 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6530 echo "configure:6531: checking whether to build shared libraries" >&5
6531 test "$can_build_shared" = "no" && enable_shared=no
6532
6533 # On AIX, shared libraries and static libraries use the same namespace, and
6534 # are all built from PIC.
6535 case "$host_os" in
6536 aix3*)
6537   test "$enable_shared" = yes && enable_static=no
6538   if test -n "$RANLIB"; then
6539     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6540     postinstall_cmds='$RANLIB $lib'
6541   fi
6542   ;;
6543
6544 aix4*)
6545   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6546     test "$enable_shared" = yes && enable_static=no
6547   fi
6548   ;;
6549 esac
6550 echo "$ac_t""$enable_shared" 1>&6
6551
6552 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6553 echo "configure:6554: checking whether to build static libraries" >&5
6554 # Make sure either enable_shared or enable_static is yes.
6555 test "$enable_shared" = yes || enable_static=yes
6556 echo "$ac_t""$enable_static" 1>&6
6557
6558 if test "$hardcode_action" = relink; then
6559   # Fast installation is not supported
6560   enable_fast_install=no
6561 elif test "$shlibpath_overrides_runpath" = yes ||
6562      test "$enable_shared" = no; then
6563   # Fast installation is not necessary
6564   enable_fast_install=needless
6565 fi
6566
6567 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6568 if test "$GCC" = yes; then
6569   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6570 fi
6571
6572 if test "x$enable_dlopen" != xyes; then
6573   enable_dlopen=unknown
6574   enable_dlopen_self=unknown
6575   enable_dlopen_self_static=unknown
6576 else
6577   lt_cv_dlopen=no
6578   lt_cv_dlopen_libs=
6579
6580   case $host_os in
6581   beos*)
6582     lt_cv_dlopen="load_add_on"
6583     lt_cv_dlopen_libs=
6584     lt_cv_dlopen_self=yes
6585     ;;
6586
6587   cygwin* | mingw* | pw32*)
6588     lt_cv_dlopen="LoadLibrary"
6589     lt_cv_dlopen_libs=
6590    ;;
6591
6592   *)
6593     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6594 echo "configure:6595: checking for dllload" >&5
6595 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6596   echo $ac_n "(cached) $ac_c" 1>&6
6597 else
6598   cat > conftest.$ac_ext <<EOF
6599 #line 6600 "configure"
6600 #include "confdefs.h"
6601 /* System header to define __stub macros and hopefully few prototypes,
6602     which can conflict with char dllload(); below.  */
6603 #include <assert.h>
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char dllload();
6608 char (*f)();
6609
6610 int main() {
6611
6612 /* The GNU C library defines this for functions which it implements
6613     to always fail with ENOSYS.  Some functions are actually named
6614     something starting with __ and the normal name is an alias.  */
6615 #if defined (__stub_dllload) || defined (__stub___dllload)
6616 choke me
6617 #else
6618 f = dllload;
6619 #endif
6620
6621 ; return 0; }
6622 EOF
6623 if { (eval echo configure:6624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6624   rm -rf conftest*
6625   eval "ac_cv_func_dllload=yes"
6626 else
6627   echo "configure: failed program was:" >&5
6628   cat conftest.$ac_ext >&5
6629   rm -rf conftest*
6630   eval "ac_cv_func_dllload=no"
6631 fi
6632 rm -f conftest*
6633 fi
6634
6635 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6636   echo "$ac_t""yes" 1>&6
6637   lt_cv_dlopen="dllload"
6638 else
6639   echo "$ac_t""no" 1>&6
6640 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6641 echo "configure:6642: checking for shl_load" >&5
6642 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* System header to define __stub macros and hopefully few prototypes,
6649     which can conflict with char shl_load(); below.  */
6650 #include <assert.h>
6651 /* Override any gcc2 internal prototype to avoid an error.  */
6652 /* We use char because int might match the return type of a gcc2
6653     builtin and then its argument prototype would still apply.  */
6654 char shl_load();
6655 char (*f)();
6656
6657 int main() {
6658
6659 /* The GNU C library defines this for functions which it implements
6660     to always fail with ENOSYS.  Some functions are actually named
6661     something starting with __ and the normal name is an alias.  */
6662 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6663 choke me
6664 #else
6665 f = shl_load;
6666 #endif
6667
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6671   rm -rf conftest*
6672   eval "ac_cv_func_shl_load=yes"
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   eval "ac_cv_func_shl_load=no"
6678 fi
6679 rm -f conftest*
6680 fi
6681
6682 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6683   echo "$ac_t""yes" 1>&6
6684   lt_cv_dlopen="shl_load"
6685 else
6686   echo "$ac_t""no" 1>&6
6687 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6688 echo "configure:6689: checking for shl_load in -ldld" >&5
6689 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6691   echo $ac_n "(cached) $ac_c" 1>&6
6692 else
6693   ac_save_LIBS="$LIBS"
6694 LIBS="-ldld  $LIBS"
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char shl_load();
6702
6703 int main() {
6704 shl_load()
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=no"
6715 fi
6716 rm -f conftest*
6717 LIBS="$ac_save_LIBS"
6718
6719 fi
6720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6721   echo "$ac_t""yes" 1>&6
6722   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6723 else
6724   echo "$ac_t""no" 1>&6
6725 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6726 echo "configure:6727: checking for dlopen" >&5
6727 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730   cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 /* System header to define __stub macros and hopefully few prototypes,
6734     which can conflict with char dlopen(); below.  */
6735 #include <assert.h>
6736 /* Override any gcc2 internal prototype to avoid an error.  */
6737 /* We use char because int might match the return type of a gcc2
6738     builtin and then its argument prototype would still apply.  */
6739 char dlopen();
6740 char (*f)();
6741
6742 int main() {
6743
6744 /* The GNU C library defines this for functions which it implements
6745     to always fail with ENOSYS.  Some functions are actually named
6746     something starting with __ and the normal name is an alias.  */
6747 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6748 choke me
6749 #else
6750 f = dlopen;
6751 #endif
6752
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_func_dlopen=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_func_dlopen=no"
6763 fi
6764 rm -f conftest*
6765 fi
6766
6767 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6768   echo "$ac_t""yes" 1>&6
6769   lt_cv_dlopen="dlopen"
6770 else
6771   echo "$ac_t""no" 1>&6
6772 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6773 echo "configure:6774: checking for dlopen in -ldl" >&5
6774 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6776   echo $ac_n "(cached) $ac_c" 1>&6
6777 else
6778   ac_save_LIBS="$LIBS"
6779 LIBS="-ldl  $LIBS"
6780 cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783 /* Override any gcc2 internal prototype to avoid an error.  */
6784 /* We use char because int might match the return type of a gcc2
6785     builtin and then its argument prototype would still apply.  */
6786 char dlopen();
6787
6788 int main() {
6789 dlopen()
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   eval "ac_cv_lib_$ac_lib_var=yes"
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798   rm -rf conftest*
6799   eval "ac_cv_lib_$ac_lib_var=no"
6800 fi
6801 rm -f conftest*
6802 LIBS="$ac_save_LIBS"
6803
6804 fi
6805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6806   echo "$ac_t""yes" 1>&6
6807   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6808 else
6809   echo "$ac_t""no" 1>&6
6810 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6811 echo "configure:6812: checking for dlopen in -lsvld" >&5
6812 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6813 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6814   echo $ac_n "(cached) $ac_c" 1>&6
6815 else
6816   ac_save_LIBS="$LIBS"
6817 LIBS="-lsvld  $LIBS"
6818 cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821 /* Override any gcc2 internal prototype to avoid an error.  */
6822 /* We use char because int might match the return type of a gcc2
6823     builtin and then its argument prototype would still apply.  */
6824 char dlopen();
6825
6826 int main() {
6827 dlopen()
6828 ; return 0; }
6829 EOF
6830 if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6831   rm -rf conftest*
6832   eval "ac_cv_lib_$ac_lib_var=yes"
6833 else
6834   echo "configure: failed program was:" >&5
6835   cat conftest.$ac_ext >&5
6836   rm -rf conftest*
6837   eval "ac_cv_lib_$ac_lib_var=no"
6838 fi
6839 rm -f conftest*
6840 LIBS="$ac_save_LIBS"
6841
6842 fi
6843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6844   echo "$ac_t""yes" 1>&6
6845   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6846 else
6847   echo "$ac_t""no" 1>&6
6848 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6849 echo "configure:6850: checking for dld_link in -ldld" >&5
6850 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6851 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6852   echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854   ac_save_LIBS="$LIBS"
6855 LIBS="-ldld  $LIBS"
6856 cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* Override any gcc2 internal prototype to avoid an error.  */
6860 /* We use char because int might match the return type of a gcc2
6861     builtin and then its argument prototype would still apply.  */
6862 char dld_link();
6863
6864 int main() {
6865 dld_link()
6866 ; return 0; }
6867 EOF
6868 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6869   rm -rf conftest*
6870   eval "ac_cv_lib_$ac_lib_var=yes"
6871 else
6872   echo "configure: failed program was:" >&5
6873   cat conftest.$ac_ext >&5
6874   rm -rf conftest*
6875   eval "ac_cv_lib_$ac_lib_var=no"
6876 fi
6877 rm -f conftest*
6878 LIBS="$ac_save_LIBS"
6879
6880 fi
6881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6884 else
6885   echo "$ac_t""no" 1>&6
6886 fi
6887
6888               
6889 fi
6890
6891             
6892 fi
6893
6894           
6895 fi
6896
6897         
6898 fi
6899
6900       
6901 fi
6902
6903     
6904 fi
6905
6906     ;;
6907   esac
6908
6909   if test "x$lt_cv_dlopen" != xno; then
6910     enable_dlopen=yes
6911   else
6912     enable_dlopen=no
6913   fi
6914
6915   case $lt_cv_dlopen in
6916   dlopen)
6917     save_CPPFLAGS="$CPPFLAGS"
6918         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6919
6920     save_LDFLAGS="$LDFLAGS"
6921     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6922
6923     save_LIBS="$LIBS"
6924     LIBS="$lt_cv_dlopen_libs $LIBS"
6925
6926     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6927 echo "configure:6928: checking whether a program can dlopen itself" >&5
6928 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931           if test "$cross_compiling" = yes; then :
6932   lt_cv_dlopen_self=cross
6933 else
6934     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6935   lt_status=$lt_dlunknown
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939
6940 #if HAVE_DLFCN_H
6941 #include <dlfcn.h>
6942 #endif
6943
6944 #include <stdio.h>
6945
6946 #ifdef RTLD_GLOBAL
6947 #  define LT_DLGLOBAL           RTLD_GLOBAL
6948 #else
6949 #  ifdef DL_GLOBAL
6950 #    define LT_DLGLOBAL         DL_GLOBAL
6951 #  else
6952 #    define LT_DLGLOBAL         0
6953 #  endif
6954 #endif
6955
6956 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6957    find out it does not work in some platform. */
6958 #ifndef LT_DLLAZY_OR_NOW
6959 #  ifdef RTLD_LAZY
6960 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6961 #  else
6962 #    ifdef DL_LAZY
6963 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6964 #    else
6965 #      ifdef RTLD_NOW
6966 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6967 #      else
6968 #        ifdef DL_NOW
6969 #          define LT_DLLAZY_OR_NOW      DL_NOW
6970 #        else
6971 #          define LT_DLLAZY_OR_NOW      0
6972 #        endif
6973 #      endif
6974 #    endif
6975 #  endif
6976 #endif
6977
6978 #ifdef __cplusplus
6979 extern "C" void exit (int);
6980 #endif
6981
6982 void fnord() { int i=42;}
6983 int main ()
6984 {
6985   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6986   int status = $lt_dlunknown;
6987
6988   if (self)
6989     {
6990       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6991       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6992       /* dlclose (self); */
6993     }
6994
6995     exit (status);
6996 }
6997 EOF
6998   if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6999     (./conftest; exit; ) 2>/dev/null
7000     lt_status=$?
7001     case x$lt_status in
7002       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7003       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7004       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7005     esac
7006   else :
7007     # compilation failed
7008     lt_cv_dlopen_self=no
7009   fi
7010 fi
7011 rm -fr conftest*
7012
7013     
7014 fi
7015
7016 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7017
7018     if test "x$lt_cv_dlopen_self" = xyes; then
7019       LDFLAGS="$LDFLAGS $link_static_flag"
7020       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7021 echo "configure:7022: checking whether a statically linked program can dlopen itself" >&5
7022 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7023   echo $ac_n "(cached) $ac_c" 1>&6
7024 else
7025           if test "$cross_compiling" = yes; then :
7026   lt_cv_dlopen_self_static=cross
7027 else
7028     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7029   lt_status=$lt_dlunknown
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033
7034 #if HAVE_DLFCN_H
7035 #include <dlfcn.h>
7036 #endif
7037
7038 #include <stdio.h>
7039
7040 #ifdef RTLD_GLOBAL
7041 #  define LT_DLGLOBAL           RTLD_GLOBAL
7042 #else
7043 #  ifdef DL_GLOBAL
7044 #    define LT_DLGLOBAL         DL_GLOBAL
7045 #  else
7046 #    define LT_DLGLOBAL         0
7047 #  endif
7048 #endif
7049
7050 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7051    find out it does not work in some platform. */
7052 #ifndef LT_DLLAZY_OR_NOW
7053 #  ifdef RTLD_LAZY
7054 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7055 #  else
7056 #    ifdef DL_LAZY
7057 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7058 #    else
7059 #      ifdef RTLD_NOW
7060 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7061 #      else
7062 #        ifdef DL_NOW
7063 #          define LT_DLLAZY_OR_NOW      DL_NOW
7064 #        else
7065 #          define LT_DLLAZY_OR_NOW      0
7066 #        endif
7067 #      endif
7068 #    endif
7069 #  endif
7070 #endif
7071
7072 #ifdef __cplusplus
7073 extern "C" void exit (int);
7074 #endif
7075
7076 void fnord() { int i=42;}
7077 int main ()
7078 {
7079   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7080   int status = $lt_dlunknown;
7081
7082   if (self)
7083     {
7084       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7085       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7086       /* dlclose (self); */
7087     }
7088
7089     exit (status);
7090 }
7091 EOF
7092   if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7093     (./conftest; exit; ) 2>/dev/null
7094     lt_status=$?
7095     case x$lt_status in
7096       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7097       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7098       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7099     esac
7100   else :
7101     # compilation failed
7102     lt_cv_dlopen_self_static=no
7103   fi
7104 fi
7105 rm -fr conftest*
7106
7107       
7108 fi
7109
7110 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7111     fi
7112
7113     CPPFLAGS="$save_CPPFLAGS"
7114     LDFLAGS="$save_LDFLAGS"
7115     LIBS="$save_LIBS"
7116     ;;
7117   esac
7118
7119   case $lt_cv_dlopen_self in
7120   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7121   *) enable_dlopen_self=unknown ;;
7122   esac
7123
7124   case $lt_cv_dlopen_self_static in
7125   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7126   *) enable_dlopen_self_static=unknown ;;
7127   esac
7128 fi
7129
7130
7131 if test "$enable_shared" = yes && test "$GCC" = yes; then
7132   case $archive_cmds in
7133   *'~'*)
7134     # FIXME: we may have to deal with multi-command sequences.
7135     ;;
7136   '$CC '*)
7137     # Test whether the compiler implicitly links with -lc since on some
7138     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7139     # to ld, don't add -lc before -lgcc.
7140     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7141 echo "configure:7142: checking whether -lc should be explicitly linked in" >&5
7142     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7143   echo $ac_n "(cached) $ac_c" 1>&6
7144 else
7145   $rm conftest*
7146     echo 'static int dummy;' > conftest.$ac_ext
7147
7148     if { (eval echo configure:7149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7149       soname=conftest
7150       lib=conftest
7151       libobjs=conftest.$ac_objext
7152       deplibs=
7153       wl=$lt_cv_prog_cc_wl
7154       compiler_flags=-v
7155       linker_flags=-v
7156       verstring=
7157       output_objdir=.
7158       libname=conftest
7159       save_allow_undefined_flag=$allow_undefined_flag
7160       allow_undefined_flag=
7161       if { (eval echo configure:7162: \"$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; }
7162       then
7163         lt_cv_archive_cmds_need_lc=no
7164       else
7165         lt_cv_archive_cmds_need_lc=yes
7166       fi
7167       allow_undefined_flag=$save_allow_undefined_flag
7168     else
7169       cat conftest.err 1>&5
7170     fi
7171 fi
7172
7173     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7174     ;;
7175   esac
7176 fi
7177 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7178
7179 # The second clause should only fire when bootstrapping the
7180 # libtool distribution, otherwise you forgot to ship ltmain.sh
7181 # with your package, and you will get complaints that there are
7182 # no rules to generate ltmain.sh.
7183 if test -f "$ltmain"; then
7184   :
7185 else
7186   # If there is no Makefile yet, we rely on a make rule to execute
7187   # `config.status --recheck' to rerun these tests and create the
7188   # libtool script then.
7189   test -f Makefile && make "$ltmain"
7190 fi
7191
7192 if test -f "$ltmain"; then
7193   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7194   $rm -f "${ofile}T"
7195
7196   echo creating $ofile
7197
7198   # Now quote all the things that may contain metacharacters while being
7199   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7200   # variables and quote the copies for generation of the libtool script.
7201   for var in echo old_CC old_CFLAGS SED \
7202     AR AR_FLAGS CC LD LN_S NM SHELL \
7203     reload_flag reload_cmds wl \
7204     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7205     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7206     library_names_spec soname_spec \
7207     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7208     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7209     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7210     old_striplib striplib file_magic_cmd export_symbols_cmds \
7211     deplibs_check_method allow_undefined_flag no_undefined_flag \
7212     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7213     global_symbol_to_c_name_address \
7214     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7215     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7216     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7217
7218     case $var in
7219     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7220     old_postinstall_cmds | old_postuninstall_cmds | \
7221     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7222     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7223     postinstall_cmds | postuninstall_cmds | \
7224     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7225       # Double-quote double-evaled strings.
7226       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7227       ;;
7228     *)
7229       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7230       ;;
7231     esac
7232   done
7233
7234   cat <<__EOF__ > "${ofile}T"
7235 #! $SHELL
7236
7237 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7238 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7239 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7240 #
7241 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7242 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7243 #
7244 # This program is free software; you can redistribute it and/or modify
7245 # it under the terms of the GNU General Public License as published by
7246 # the Free Software Foundation; either version 2 of the License, or
7247 # (at your option) any later version.
7248 #
7249 # This program is distributed in the hope that it will be useful, but
7250 # WITHOUT ANY WARRANTY; without even the implied warranty of
7251 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7252 # General Public License for more details.
7253 #
7254 # You should have received a copy of the GNU General Public License
7255 # along with this program; if not, write to the Free Software
7256 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7257 #
7258 # As a special exception to the GNU General Public License, if you
7259 # distribute this file as part of a program that contains a
7260 # configuration script generated by Autoconf, you may include it under
7261 # the same distribution terms that you use for the rest of that program.
7262
7263 # A sed that does not truncate output.
7264 SED=$lt_SED
7265
7266 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7267 Xsed="${SED} -e s/^X//"
7268
7269 # The HP-UX ksh and POSIX shell print the target directory to stdout
7270 # if CDPATH is set.
7271 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7272
7273 # ### BEGIN LIBTOOL CONFIG
7274
7275 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7276
7277 # Shell to use when invoking shell scripts.
7278 SHELL=$lt_SHELL
7279
7280 # Whether or not to build shared libraries.
7281 build_libtool_libs=$enable_shared
7282
7283 # Whether or not to build static libraries.
7284 build_old_libs=$enable_static
7285
7286 # Whether or not to add -lc for building shared libraries.
7287 build_libtool_need_lc=$need_lc
7288
7289 # Whether or not to optimize for fast installation.
7290 fast_install=$enable_fast_install
7291
7292 # The host system.
7293 host_alias=$host_alias
7294 host=$host
7295
7296 # An echo program that does not interpret backslashes.
7297 echo=$lt_echo
7298
7299 # The archiver.
7300 AR=$lt_AR
7301 AR_FLAGS=$lt_AR_FLAGS
7302
7303 # The default C compiler.
7304 CC=$lt_CC
7305
7306 # Is the compiler the GNU C compiler?
7307 with_gcc=$GCC
7308
7309 # The linker used to build libraries.
7310 LD=$lt_LD
7311
7312 # Whether we need hard or soft links.
7313 LN_S=$lt_LN_S
7314
7315 # A BSD-compatible nm program.
7316 NM=$lt_NM
7317
7318 # A symbol stripping program
7319 STRIP=$STRIP
7320
7321 # Used to examine libraries when file_magic_cmd begins "file"
7322 MAGIC_CMD=$MAGIC_CMD
7323
7324 # Used on cygwin: DLL creation program.
7325 DLLTOOL="$DLLTOOL"
7326
7327 # Used on cygwin: object dumper.
7328 OBJDUMP="$OBJDUMP"
7329
7330 # Used on cygwin: assembler.
7331 AS="$AS"
7332
7333 # The name of the directory that contains temporary libtool files.
7334 objdir=$objdir
7335
7336 # How to create reloadable object files.
7337 reload_flag=$lt_reload_flag
7338 reload_cmds=$lt_reload_cmds
7339
7340 # How to pass a linker flag through the compiler.
7341 wl=$lt_wl
7342
7343 # Object file suffix (normally "o").
7344 objext="$ac_objext"
7345
7346 # Old archive suffix (normally "a").
7347 libext="$libext"
7348
7349 # Executable file suffix (normally "").
7350 exeext="$exeext"
7351
7352 # Additional compiler flags for building library objects.
7353 pic_flag=$lt_pic_flag
7354 pic_mode=$pic_mode
7355
7356 # Does compiler simultaneously support -c and -o options?
7357 compiler_c_o=$lt_compiler_c_o
7358
7359 # Can we write directly to a .lo ?
7360 compiler_o_lo=$lt_compiler_o_lo
7361
7362 # Must we lock files when doing compilation ?
7363 need_locks=$lt_need_locks
7364
7365 # Do we need the lib prefix for modules?
7366 need_lib_prefix=$need_lib_prefix
7367
7368 # Do we need a version for libraries?
7369 need_version=$need_version
7370
7371 # Whether dlopen is supported.
7372 dlopen_support=$enable_dlopen
7373
7374 # Whether dlopen of programs is supported.
7375 dlopen_self=$enable_dlopen_self
7376
7377 # Whether dlopen of statically linked programs is supported.
7378 dlopen_self_static=$enable_dlopen_self_static
7379
7380 # Compiler flag to prevent dynamic linking.
7381 link_static_flag=$lt_link_static_flag
7382
7383 # Compiler flag to turn off builtin functions.
7384 no_builtin_flag=$lt_no_builtin_flag
7385
7386 # Compiler flag to allow reflexive dlopens.
7387 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7388
7389 # Compiler flag to generate shared objects directly from archives.
7390 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7391
7392 # Compiler flag to generate thread-safe objects.
7393 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7394
7395 # Library versioning type.
7396 version_type=$version_type
7397
7398 # Format of library name prefix.
7399 libname_spec=$lt_libname_spec
7400
7401 # List of archive names.  First name is the real one, the rest are links.
7402 # The last name is the one that the linker finds with -lNAME.
7403 library_names_spec=$lt_library_names_spec
7404
7405 # The coded name of the library, if different from the real name.
7406 soname_spec=$lt_soname_spec
7407
7408 # Commands used to build and install an old-style archive.
7409 RANLIB=$lt_RANLIB
7410 old_archive_cmds=$lt_old_archive_cmds
7411 old_postinstall_cmds=$lt_old_postinstall_cmds
7412 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7413
7414 # Create an old-style archive from a shared archive.
7415 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7416
7417 # Create a temporary old-style archive to link instead of a shared archive.
7418 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7419
7420 # Commands used to build and install a shared archive.
7421 archive_cmds=$lt_archive_cmds
7422 archive_expsym_cmds=$lt_archive_expsym_cmds
7423 postinstall_cmds=$lt_postinstall_cmds
7424 postuninstall_cmds=$lt_postuninstall_cmds
7425
7426 # Commands to strip libraries.
7427 old_striplib=$lt_old_striplib
7428 striplib=$lt_striplib
7429
7430 # Method to check whether dependent libraries are shared objects.
7431 deplibs_check_method=$lt_deplibs_check_method
7432
7433 # Command to use when deplibs_check_method == file_magic.
7434 file_magic_cmd=$lt_file_magic_cmd
7435
7436 # Flag that allows shared libraries with undefined symbols to be built.
7437 allow_undefined_flag=$lt_allow_undefined_flag
7438
7439 # Flag that forces no undefined symbols.
7440 no_undefined_flag=$lt_no_undefined_flag
7441
7442 # Commands used to finish a libtool library installation in a directory.
7443 finish_cmds=$lt_finish_cmds
7444
7445 # Same as above, but a single script fragment to be evaled but not shown.
7446 finish_eval=$lt_finish_eval
7447
7448 # Take the output of nm and produce a listing of raw symbols and C names.
7449 global_symbol_pipe=$lt_global_symbol_pipe
7450
7451 # Transform the output of nm in a proper C declaration
7452 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7453
7454 # Transform the output of nm in a C name address pair
7455 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7456
7457 # This is the shared library runtime path variable.
7458 runpath_var=$runpath_var
7459
7460 # This is the shared library path variable.
7461 shlibpath_var=$shlibpath_var
7462
7463 # Is shlibpath searched before the hard-coded library search path?
7464 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7465
7466 # How to hardcode a shared library path into an executable.
7467 hardcode_action=$hardcode_action
7468
7469 # Whether we should hardcode library paths into libraries.
7470 hardcode_into_libs=$hardcode_into_libs
7471
7472 # Flag to hardcode \$libdir into a binary during linking.
7473 # This must work even if \$libdir does not exist.
7474 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7475
7476 # Whether we need a single -rpath flag with a separated argument.
7477 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7478
7479 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7480 # resulting binary.
7481 hardcode_direct=$hardcode_direct
7482
7483 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7484 # resulting binary.
7485 hardcode_minus_L=$hardcode_minus_L
7486
7487 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7488 # the resulting binary.
7489 hardcode_shlibpath_var=$hardcode_shlibpath_var
7490
7491 # Variables whose values should be saved in libtool wrapper scripts and
7492 # restored at relink time.
7493 variables_saved_for_relink="$variables_saved_for_relink"
7494
7495 # Whether libtool must link a program against all its dependency libraries.
7496 link_all_deplibs=$link_all_deplibs
7497
7498 # Compile-time system search path for libraries
7499 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7500
7501 # Run-time system search path for libraries
7502 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7503
7504 # Fix the shell variable \$srcfile for the compiler.
7505 fix_srcfile_path="$fix_srcfile_path"
7506
7507 # Set to yes if exported symbols are required.
7508 always_export_symbols=$always_export_symbols
7509
7510 # The commands to list exported symbols.
7511 export_symbols_cmds=$lt_export_symbols_cmds
7512
7513 # The commands to extract the exported symbol list from a shared archive.
7514 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7515
7516 # Symbols that should not be listed in the preloaded symbols.
7517 exclude_expsyms=$lt_exclude_expsyms
7518
7519 # Symbols that must always be exported.
7520 include_expsyms=$lt_include_expsyms
7521
7522 # ### END LIBTOOL CONFIG
7523
7524 __EOF__
7525
7526   case $host_os in
7527   aix3*)
7528     cat <<\EOF >> "${ofile}T"
7529
7530 # AIX sometimes has problems with the GCC collect2 program.  For some
7531 # reason, if we set the COLLECT_NAMES environment variable, the problems
7532 # vanish in a puff of smoke.
7533 if test "X${COLLECT_NAMES+set}" != Xset; then
7534   COLLECT_NAMES=
7535   export COLLECT_NAMES
7536 fi
7537 EOF
7538     ;;
7539   esac
7540
7541   case $host_os in
7542   cygwin* | mingw* | pw32* | os2*)
7543     cat <<'EOF' >> "${ofile}T"
7544       # This is a source program that is used to create dlls on Windows
7545       # Don't remove nor modify the starting and closing comments
7546 # /* ltdll.c starts here */
7547 # #define WIN32_LEAN_AND_MEAN
7548 # #include <windows.h>
7549 # #undef WIN32_LEAN_AND_MEAN
7550 # #include <stdio.h>
7551 #
7552 # #ifndef __CYGWIN__
7553 # #  ifdef __CYGWIN32__
7554 # #    define __CYGWIN__ __CYGWIN32__
7555 # #  endif
7556 # #endif
7557 #
7558 # #ifdef __cplusplus
7559 # extern "C" {
7560 # #endif
7561 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7562 # #ifdef __cplusplus
7563 # }
7564 # #endif
7565 #
7566 # #ifdef __CYGWIN__
7567 # #include <cygwin/cygwin_dll.h>
7568 # DECLARE_CYGWIN_DLL( DllMain );
7569 # #endif
7570 # HINSTANCE __hDllInstance_base;
7571 #
7572 # BOOL APIENTRY
7573 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7574 # {
7575 #   __hDllInstance_base = hInst;
7576 #   return TRUE;
7577 # }
7578 # /* ltdll.c ends here */
7579         # This is a source program that is used to create import libraries
7580         # on Windows for dlls which lack them. Don't remove nor modify the
7581         # starting and closing comments
7582 # /* impgen.c starts here */
7583 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7584 #
7585 #  This file is part of GNU libtool.
7586 #
7587 #  This program is free software; you can redistribute it and/or modify
7588 #  it under the terms of the GNU General Public License as published by
7589 #  the Free Software Foundation; either version 2 of the License, or
7590 #  (at your option) any later version.
7591 #
7592 #  This program is distributed in the hope that it will be useful,
7593 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7594 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7595 #  GNU General Public License for more details.
7596 #
7597 #  You should have received a copy of the GNU General Public License
7598 #  along with this program; if not, write to the Free Software
7599 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7600 #  */
7601 #
7602 # #include <stdio.h>            /* for printf() */
7603 # #include <unistd.h>           /* for open(), lseek(), read() */
7604 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7605 # #include <string.h>           /* for strdup() */
7606 #
7607 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7608 # #ifndef O_BINARY
7609 # #define O_BINARY 0
7610 # #endif
7611 #
7612 # static unsigned int
7613 # pe_get16 (fd, offset)
7614 #      int fd;
7615 #      int offset;
7616 # {
7617 #   unsigned char b[2];
7618 #   lseek (fd, offset, SEEK_SET);
7619 #   read (fd, b, 2);
7620 #   return b[0] + (b[1]<<8);
7621 # }
7622 #
7623 # static unsigned int
7624 # pe_get32 (fd, offset)
7625 #     int fd;
7626 #     int offset;
7627 # {
7628 #   unsigned char b[4];
7629 #   lseek (fd, offset, SEEK_SET);
7630 #   read (fd, b, 4);
7631 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7632 # }
7633 #
7634 # static unsigned int
7635 # pe_as32 (ptr)
7636 #      void *ptr;
7637 # {
7638 #   unsigned char *b = ptr;
7639 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7640 # }
7641 #
7642 # int
7643 # main (argc, argv)
7644 #     int argc;
7645 #     char *argv[];
7646 # {
7647 #     int dll;
7648 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7649 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7650 #     unsigned long name_rvas, nexp;
7651 #     unsigned char *expdata, *erva;
7652 #     char *filename, *dll_name;
7653 #
7654 #     filename = argv[1];
7655 #
7656 #     dll = open(filename, O_RDONLY|O_BINARY);
7657 #     if (dll < 1)
7658 #       return 1;
7659 #
7660 #     dll_name = filename;
7661 #
7662 #     for (i=0; filename[i]; i++)
7663 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7664 #           dll_name = filename + i +1;
7665 #
7666 #     pe_header_offset = pe_get32 (dll, 0x3c);
7667 #     opthdr_ofs = pe_header_offset + 4 + 20;
7668 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7669 #
7670 #     if (num_entries < 1) /* no exports */
7671 #       return 1;
7672 #
7673 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7674 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7675 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7676 #     secptr = (pe_header_offset + 4 + 20 +
7677 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7678 #
7679 #     expptr = 0;
7680 #     for (i = 0; i < nsections; i++)
7681 #     {
7682 #       char sname[8];
7683 #       unsigned long secptr1 = secptr + 40 * i;
7684 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7685 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7686 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7687 #       lseek(dll, secptr1, SEEK_SET);
7688 #       read(dll, sname, 8);
7689 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7690 #       {
7691 #           expptr = fptr + (export_rva - vaddr);
7692 #           if (export_rva + export_size > vaddr + vsize)
7693 #               export_size = vsize - (export_rva - vaddr);
7694 #           break;
7695 #       }
7696 #     }
7697 #
7698 #     expdata = (unsigned char*)malloc(export_size);
7699 #     lseek (dll, expptr, SEEK_SET);
7700 #     read (dll, expdata, export_size);
7701 #     erva = expdata - export_rva;
7702 #
7703 #     nexp = pe_as32 (expdata+24);
7704 #     name_rvas = pe_as32 (expdata+32);
7705 #
7706 #     printf ("EXPORTS\n");
7707 #     for (i = 0; i<nexp; i++)
7708 #     {
7709 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7710 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7711 #     }
7712 #
7713 #     return 0;
7714 # }
7715 # /* impgen.c ends here */
7716
7717 EOF
7718     ;;
7719   esac
7720
7721   # We use sed instead of cat because bash on DJGPP gets confused if
7722   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7723   # text mode, it properly converts lines to CR/LF.  This bash problem
7724   # is reportedly fixed, but why not run on old versions too?
7725   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7726
7727   mv -f "${ofile}T" "$ofile" || \
7728     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7729   chmod +x "$ofile"
7730 fi
7731
7732
7733
7734
7735
7736 # This can be used to rebuild libtool when needed
7737 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7738
7739 # Always use our own libtool.
7740 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7741
7742 # Prevent multiple expansion
7743
7744
7745
7746 ol_link_perl=no
7747 if test $ol_enable_perl != no ; then
7748         # Extract the first word of "perl", so it can be a program name with args.
7749 set dummy perl; ac_word=$2
7750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7751 echo "configure:7752: checking for $ac_word" >&5
7752 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7753   echo $ac_n "(cached) $ac_c" 1>&6
7754 else
7755   case "$PERLBIN" in
7756   /*)
7757   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7758   ;;
7759   ?:/*)
7760   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7761   ;;
7762   *)
7763   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7764   ac_dummy="$PATH"
7765   for ac_dir in $ac_dummy; do 
7766     test -z "$ac_dir" && ac_dir=.
7767     if test -f $ac_dir/$ac_word; then
7768       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7769       break
7770     fi
7771   done
7772   IFS="$ac_save_ifs"
7773   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7774   ;;
7775 esac
7776 fi
7777 PERLBIN="$ac_cv_path_PERLBIN"
7778 if test -n "$PERLBIN"; then
7779   echo "$ac_t""$PERLBIN" 1>&6
7780 else
7781   echo "$ac_t""no" 1>&6
7782 fi
7783
7784
7785         if test "no$PERLBIN" = "no" ; then
7786                 if test $ol_enable_perl = yes ; then
7787                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7788                 fi
7789
7790         else
7791                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7792                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7793
7794                 if test x"$ol_enable_perl" = "xyes" ; then
7795                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7796                 else
7797                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7798                 fi
7799                                 ol_link_perl=yes
7800         fi
7801 fi
7802
7803 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7804 echo "configure:7805: checking how to run the C preprocessor" >&5
7805 # On Suns, sometimes $CPP names a directory.
7806 if test -n "$CPP" && test -d "$CPP"; then
7807   CPP=
7808 fi
7809 if test -z "$CPP"; then
7810 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7811   echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813     # This must be in double quotes, not single quotes, because CPP may get
7814   # substituted into the Makefile and "${CC-cc}" will confuse make.
7815   CPP="${CC-cc} -E"
7816   # On the NeXT, cc -E runs the code through the compiler's parser,
7817   # not just through cpp.
7818   cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 #include <assert.h>
7822 Syntax Error
7823 EOF
7824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7825 { (eval echo configure:7826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7827 if test -z "$ac_err"; then
7828   :
7829 else
7830   echo "$ac_err" >&5
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -rf conftest*
7834   CPP="${CC-cc} -E -traditional-cpp"
7835   cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 #include <assert.h>
7839 Syntax Error
7840 EOF
7841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7842 { (eval echo configure:7843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7844 if test -z "$ac_err"; then
7845   :
7846 else
7847   echo "$ac_err" >&5
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   CPP="${CC-cc} -nologo -E"
7852   cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 #include <assert.h>
7856 Syntax Error
7857 EOF
7858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7859 { (eval echo configure:7860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7861 if test -z "$ac_err"; then
7862   :
7863 else
7864   echo "$ac_err" >&5
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   CPP=/lib/cpp
7869 fi
7870 rm -f conftest*
7871 fi
7872 rm -f conftest*
7873 fi
7874 rm -f conftest*
7875   ac_cv_prog_CPP="$CPP"
7876 fi
7877   CPP="$ac_cv_prog_CPP"
7878 else
7879   ac_cv_prog_CPP="$CPP"
7880 fi
7881 echo "$ac_t""$CPP" 1>&6
7882
7883
7884
7885 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7886 echo "configure:7887: checking for Cygwin environment" >&5
7887 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893
7894 int main() {
7895
7896 #ifndef __CYGWIN__
7897 #define __CYGWIN__ __CYGWIN32__
7898 #endif
7899 return __CYGWIN__;
7900 ; return 0; }
7901 EOF
7902 if { (eval echo configure:7903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7903   rm -rf conftest*
7904   ac_cv_cygwin=yes
7905 else
7906   echo "configure: failed program was:" >&5
7907   cat conftest.$ac_ext >&5
7908   rm -rf conftest*
7909   ac_cv_cygwin=no
7910 fi
7911 rm -f conftest*
7912 fi
7913
7914 echo "$ac_t""$ac_cv_cygwin" 1>&6
7915 CYGWIN=
7916 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7917 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7918 echo "configure:7919: checking for mingw32 environment" >&5
7919 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7920   echo $ac_n "(cached) $ac_c" 1>&6
7921 else
7922   cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925
7926 int main() {
7927 return __MINGW32__;
7928 ; return 0; }
7929 EOF
7930 if { (eval echo configure:7931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7931   rm -rf conftest*
7932   ac_cv_mingw32=yes
7933 else
7934   echo "configure: failed program was:" >&5
7935   cat conftest.$ac_ext >&5
7936   rm -rf conftest*
7937   ac_cv_mingw32=no
7938 fi
7939 rm -f conftest*
7940 fi
7941
7942 echo "$ac_t""$ac_cv_mingw32" 1>&6
7943 MINGW32=
7944 test "$ac_cv_mingw32" = yes && MINGW32=yes
7945
7946
7947
7948 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7949 echo "configure:7950: checking for executable suffix" >&5
7950 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7954   ac_cv_exeext=.exe
7955 else
7956   rm -f conftest*
7957   echo 'int main () { return 0; }' > conftest.$ac_ext
7958   ac_cv_exeext=
7959   if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7960     for file in conftest.*; do
7961       case $file in
7962       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7963       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7964       esac
7965     done
7966   else
7967     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7968   fi
7969   rm -f conftest*
7970   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7971 fi
7972 fi
7973
7974 EXEEXT=""
7975 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7976 echo "$ac_t""${ac_cv_exeext}" 1>&6
7977 ac_exeext=$EXEEXT
7978
7979 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7980 echo "configure:7981: checking for object suffix" >&5
7981 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7982   echo $ac_n "(cached) $ac_c" 1>&6
7983 else
7984   rm -f conftest*
7985 echo 'int i = 1;' > conftest.$ac_ext
7986 if { (eval echo configure:7987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7987   for ac_file in conftest.*; do
7988     case $ac_file in
7989     *.c) ;;
7990     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7991     esac
7992   done
7993 else
7994   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7995 fi
7996 rm -f conftest*
7997 fi
7998
7999 echo "$ac_t""$ac_cv_objext" 1>&6
8000 OBJEXT=$ac_cv_objext
8001 ac_objext=$ac_cv_objext
8002
8003
8004 cat >> confdefs.h <<EOF
8005 #define EXEEXT "${EXEEXT}"
8006 EOF
8007
8008
8009 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8010 echo "configure:8011: checking for be_app in -lbe" >&5
8011 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   ac_save_LIBS="$LIBS"
8016 LIBS="-lbe -lroot -lnet $LIBS"
8017 cat > conftest.$ac_ext <<EOF
8018 #line 8019 "configure"
8019 #include "confdefs.h"
8020 /* Override any gcc2 internal prototype to avoid an error.  */
8021 /* We use char because int might match the return type of a gcc2
8022     builtin and then its argument prototype would still apply.  */
8023 char be_app();
8024
8025 int main() {
8026 be_app()
8027 ; return 0; }
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8030   rm -rf conftest*
8031   eval "ac_cv_lib_$ac_lib_var=yes"
8032 else
8033   echo "configure: failed program was:" >&5
8034   cat conftest.$ac_ext >&5
8035   rm -rf conftest*
8036   eval "ac_cv_lib_$ac_lib_var=no"
8037 fi
8038 rm -f conftest*
8039 LIBS="$ac_save_LIBS"
8040
8041 fi
8042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8043   echo "$ac_t""yes" 1>&6
8044   LIBS="$LIBS -lbe -lroot -lnet"
8045 else
8046   echo "$ac_t""no" 1>&6
8047 :
8048 fi
8049
8050
8051
8052
8053
8054 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8055 echo "configure:8056: checking for ${CC-cc} option to accept ANSI C" >&5
8056 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   am_cv_prog_cc_stdc=no
8060 ac_save_CC="$CC"
8061 # Don't try gcc -ansi; that turns off useful extensions and
8062 # breaks some systems' header files.
8063 # AIX                   -qlanglvl=ansi
8064 # Ultrix and OSF/1      -std1
8065 # HP-UX 10.20 and later -Ae
8066 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8067 # SVR4                  -Xc -D__EXTENSIONS__
8068 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8069 do
8070   CC="$ac_save_CC $ac_arg"
8071   cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 #include <stdarg.h>
8075 #include <stdio.h>
8076 #include <sys/types.h>
8077 #include <sys/stat.h>
8078 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8079 struct buf { int x; };
8080 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8081 static char *e (p, i)
8082      char **p;
8083      int i;
8084 {
8085   return p[i];
8086 }
8087 static char *f (char * (*g) (char **, int), char **p, ...)
8088 {
8089   char *s;
8090   va_list v;
8091   va_start (v,p);
8092   s = g (p, va_arg (v,int));
8093   va_end (v);
8094   return s;
8095 }
8096 int test (int i, double x);
8097 struct s1 {int (*f) (int a);};
8098 struct s2 {int (*f) (double a);};
8099 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8100 int argc;
8101 char **argv;
8102
8103 int main() {
8104
8105 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8106
8107 ; return 0; }
8108 EOF
8109 if { (eval echo configure:8110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8110   rm -rf conftest*
8111   am_cv_prog_cc_stdc="$ac_arg"; break
8112 else
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115 fi
8116 rm -f conftest*
8117 done
8118 CC="$ac_save_CC"
8119
8120 fi
8121
8122 if test -z "$am_cv_prog_cc_stdc"; then
8123   echo "$ac_t""none needed" 1>&6
8124 else
8125   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8126 fi
8127 case "x$am_cv_prog_cc_stdc" in
8128   x|xno) ;;
8129   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8130 esac
8131
8132 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8133         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8134 fi
8135
8136 # test for make depend flag
8137 OL_MKDEP=
8138 OL_MKDEP_FLAGS=
8139 if test -z "${MKDEP}"; then
8140         OL_MKDEP="${CC-cc}"
8141         if test -z "${MKDEP_FLAGS}"; then
8142                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8143 echo "configure:8144: checking for ${OL_MKDEP} depend flag" >&5
8144 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   
8148                         ol_cv_mkdep=no
8149                         for flag in "-M" "-xM"; do
8150                                 cat > conftest.c <<EOF
8151  noCode;
8152 EOF
8153                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8154                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8155                                 then
8156                                         if test ! -f conftest."${ac_object}" ; then
8157                                                 ol_cv_mkdep=$flag
8158                                                 OL_MKDEP_FLAGS="$flag"
8159                                                 break
8160                                         fi
8161                                 fi
8162                         done
8163                         rm -f conftest*
8164                 
8165 fi
8166
8167 echo "$ac_t""$ol_cv_mkdep" 1>&6
8168         else
8169                 cc_cv_mkdep=yes
8170                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8171         fi
8172 else
8173         cc_cv_mkdep=yes
8174         OL_MKDEP="${MKDEP}"
8175         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8176 fi
8177
8178
8179
8180 if test "${ol_cv_mkdep}" = no ; then
8181         # this will soon become an error
8182         echo "configure: warning: do not know how to generate dependencies" 1>&2
8183 fi
8184
8185 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8186 echo "configure:8187: checking for afopen in -ls" >&5
8187 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8188 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8189   echo $ac_n "(cached) $ac_c" 1>&6
8190 else
8191   ac_save_LIBS="$LIBS"
8192 LIBS="-ls  $LIBS"
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* Override any gcc2 internal prototype to avoid an error.  */
8197 /* We use char because int might match the return type of a gcc2
8198     builtin and then its argument prototype would still apply.  */
8199 char afopen();
8200
8201 int main() {
8202 afopen()
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   eval "ac_cv_lib_$ac_lib_var=yes"
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_lib_$ac_lib_var=no"
8213 fi
8214 rm -f conftest*
8215 LIBS="$ac_save_LIBS"
8216
8217 fi
8218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8219   echo "$ac_t""yes" 1>&6
8220   
8221         AUTH_LIBS=-ls
8222         cat >> confdefs.h <<\EOF
8223 #define HAVE_AIX_SECURITY 1
8224 EOF
8225
8226
8227 else
8228   echo "$ac_t""no" 1>&6
8229 fi
8230
8231
8232 case "$target" in
8233 *-ibm-openedition)
8234         ac_cv_func_getopt=no
8235         cat >> confdefs.h <<\EOF
8236 #define BOTH_STRINGS_H 1
8237 EOF
8238
8239         ;;
8240 esac
8241
8242 ol_link_modules=no
8243 WITH_MODULES_ENABLED=no
8244 if test $ol_enable_modules != no ; then
8245         for ac_hdr in ltdl.h
8246 do
8247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8249 echo "configure:8250: checking for $ac_hdr" >&5
8250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   cat > conftest.$ac_ext <<EOF
8254 #line 8255 "configure"
8255 #include "confdefs.h"
8256 #include <$ac_hdr>
8257 EOF
8258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8259 { (eval echo configure:8260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8261 if test -z "$ac_err"; then
8262   rm -rf conftest*
8263   eval "ac_cv_header_$ac_safe=yes"
8264 else
8265   echo "$ac_err" >&5
8266   echo "configure: failed program was:" >&5
8267   cat conftest.$ac_ext >&5
8268   rm -rf conftest*
8269   eval "ac_cv_header_$ac_safe=no"
8270 fi
8271 rm -f conftest*
8272 fi
8273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8274   echo "$ac_t""yes" 1>&6
8275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8276   cat >> confdefs.h <<EOF
8277 #define $ac_tr_hdr 1
8278 EOF
8279  
8280 else
8281   echo "$ac_t""no" 1>&6
8282 fi
8283 done
8284
8285
8286         if test $ac_cv_header_ltdl_h = no ; then
8287                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8288         fi
8289
8290         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8291 echo "configure:8292: checking for lt_dlinit in -lltdl" >&5
8292 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8294   echo $ac_n "(cached) $ac_c" 1>&6
8295 else
8296   ac_save_LIBS="$LIBS"
8297 LIBS="-lltdl  $LIBS"
8298 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8301 /* Override any gcc2 internal prototype to avoid an error.  */
8302 /* We use char because int might match the return type of a gcc2
8303     builtin and then its argument prototype would still apply.  */
8304 char lt_dlinit();
8305
8306 int main() {
8307 lt_dlinit()
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   eval "ac_cv_lib_$ac_lib_var=yes"
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   eval "ac_cv_lib_$ac_lib_var=no"
8318 fi
8319 rm -f conftest*
8320 LIBS="$ac_save_LIBS"
8321
8322 fi
8323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8324   echo "$ac_t""yes" 1>&6
8325   
8326                 MODULES_LIBS=-lltdl
8327                 cat >> confdefs.h <<\EOF
8328 #define HAVE_LIBLTDL 1
8329 EOF
8330
8331         
8332 else
8333   echo "$ac_t""no" 1>&6
8334 fi
8335
8336
8337         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8338                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8339         fi
8340         ol_link_modules=yes
8341         WITH_MODULES_ENABLED=yes
8342
8343 else
8344         for i in $Backends; do
8345                 eval "ol_tmp=\$ol_enable_$i"
8346                 if test $ol_tmp = mod ; then
8347                         echo "configure: warning: building static $i backend" 1>&2
8348                         eval "ol_enable_$i=yes"
8349                 fi
8350         done
8351         for i in $Overlays; do
8352                 eval "ol_tmp=\$ol_enable_$i"
8353                 if test $ol_tmp = mod ; then
8354                         echo "configure: warning: building static $i overlay" 1>&2
8355                         eval "ol_enable_$i=yes"
8356                 fi
8357         done
8358 fi
8359
8360 # test for EBCDIC
8361 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8362 echo "configure:8363: checking for EBCDIC" >&5
8363 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8364   echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8366   
8367         cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370
8371 #if !('M' == 0xd4)
8372 #include <__ASCII__/generate_error.h>
8373 #endif
8374
8375 EOF
8376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8377 { (eval echo configure:8378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8379 if test -z "$ac_err"; then
8380   rm -rf conftest*
8381   ol_cv_cpp_ebcdic=yes
8382 else
8383   echo "$ac_err" >&5
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   ol_cv_cpp_ebcdic=no
8388 fi
8389 rm -f conftest*
8390 fi
8391
8392 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8393 if test $ol_cv_cpp_ebcdic = yes ; then
8394         cat >> confdefs.h <<\EOF
8395 #define HAVE_EBCDIC 1
8396 EOF
8397
8398 fi
8399
8400 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8401 echo "configure:8402: checking for ANSI C header files" >&5
8402 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8403   echo $ac_n "(cached) $ac_c" 1>&6
8404 else
8405   cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 #include <stdlib.h>
8409 #include <stdarg.h>
8410 #include <string.h>
8411 #include <float.h>
8412 EOF
8413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8414 { (eval echo configure:8415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8416 if test -z "$ac_err"; then
8417   rm -rf conftest*
8418   ol_cv_header_stdc=yes
8419 else
8420   echo "$ac_err" >&5
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -rf conftest*
8424   ol_cv_header_stdc=no
8425 fi
8426 rm -f conftest*
8427
8428 if test $ol_cv_header_stdc = yes; then
8429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8430 cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 #include <string.h>
8434 EOF
8435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8436   egrep "memchr" >/dev/null 2>&1; then
8437   :
8438 else
8439   rm -rf conftest*
8440   ol_cv_header_stdc=no
8441 fi
8442 rm -f conftest*
8443
8444 fi
8445
8446 if test $ol_cv_header_stdc = yes; then
8447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 #include <stdlib.h>
8452 EOF
8453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8454   egrep "free" >/dev/null 2>&1; then
8455   :
8456 else
8457   rm -rf conftest*
8458   ol_cv_header_stdc=no
8459 fi
8460 rm -f conftest*
8461
8462 fi
8463
8464 if test $ol_cv_header_stdc = yes; then
8465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8466 if test "$cross_compiling" = yes; then
8467   :
8468 else
8469   cat > conftest.$ac_ext <<EOF
8470 #line 8471 "configure"
8471 #include "confdefs.h"
8472 #include <ctype.h>
8473 #ifndef HAVE_EBCDIC
8474 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8475 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8476 #else
8477 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8478                 || ('j' <= (c) && (c) <= 'r') \
8479                 || ('s' <= (c) && (c) <= 'z'))
8480 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8481 #endif
8482 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8483 int main () { int i; for (i = 0; i < 256; i++)
8484 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8485 exit (0); }
8486
8487 EOF
8488 if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8489 then
8490   :
8491 else
8492   echo "configure: failed program was:" >&5
8493   cat conftest.$ac_ext >&5
8494   rm -fr conftest*
8495   ol_cv_header_stdc=no
8496 fi
8497 rm -fr conftest*
8498 fi
8499
8500 fi
8501 fi
8502
8503 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8504 if test $ol_cv_header_stdc = yes; then
8505   cat >> confdefs.h <<\EOF
8506 #define STDC_HEADERS 1
8507 EOF
8508
8509 fi
8510 ac_cv_header_stdc=disable
8511
8512
8513 if test $ol_cv_header_stdc != yes; then
8514         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8515 fi
8516
8517 ac_header_dirent=no
8518 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8519 do
8520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8521 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8522 echo "configure:8523: checking for $ac_hdr that defines DIR" >&5
8523 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8524   echo $ac_n "(cached) $ac_c" 1>&6
8525 else
8526   cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 #include <sys/types.h>
8530 #include <$ac_hdr>
8531 int main() {
8532 DIR *dirp = 0;
8533 ; return 0; }
8534 EOF
8535 if { (eval echo configure:8536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8536   rm -rf conftest*
8537   eval "ac_cv_header_dirent_$ac_safe=yes"
8538 else
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -rf conftest*
8542   eval "ac_cv_header_dirent_$ac_safe=no"
8543 fi
8544 rm -f conftest*
8545 fi
8546 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8547   echo "$ac_t""yes" 1>&6
8548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8549   cat >> confdefs.h <<EOF
8550 #define $ac_tr_hdr 1
8551 EOF
8552  ac_header_dirent=$ac_hdr; break
8553 else
8554   echo "$ac_t""no" 1>&6
8555 fi
8556 done
8557 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8558 if test $ac_header_dirent = dirent.h; then
8559 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8560 echo "configure:8561: checking for opendir in -ldir" >&5
8561 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8563   echo $ac_n "(cached) $ac_c" 1>&6
8564 else
8565   ac_save_LIBS="$LIBS"
8566 LIBS="-ldir  $LIBS"
8567 cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 /* Override any gcc2 internal prototype to avoid an error.  */
8571 /* We use char because int might match the return type of a gcc2
8572     builtin and then its argument prototype would still apply.  */
8573 char opendir();
8574
8575 int main() {
8576 opendir()
8577 ; return 0; }
8578 EOF
8579 if { (eval echo configure:8580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8580   rm -rf conftest*
8581   eval "ac_cv_lib_$ac_lib_var=yes"
8582 else
8583   echo "configure: failed program was:" >&5
8584   cat conftest.$ac_ext >&5
8585   rm -rf conftest*
8586   eval "ac_cv_lib_$ac_lib_var=no"
8587 fi
8588 rm -f conftest*
8589 LIBS="$ac_save_LIBS"
8590
8591 fi
8592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8593   echo "$ac_t""yes" 1>&6
8594   LIBS="$LIBS -ldir"
8595 else
8596   echo "$ac_t""no" 1>&6
8597 fi
8598
8599 else
8600 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8601 echo "configure:8602: checking for opendir in -lx" >&5
8602 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8604   echo $ac_n "(cached) $ac_c" 1>&6
8605 else
8606   ac_save_LIBS="$LIBS"
8607 LIBS="-lx  $LIBS"
8608 cat > conftest.$ac_ext <<EOF
8609 #line 8610 "configure"
8610 #include "confdefs.h"
8611 /* Override any gcc2 internal prototype to avoid an error.  */
8612 /* We use char because int might match the return type of a gcc2
8613     builtin and then its argument prototype would still apply.  */
8614 char opendir();
8615
8616 int main() {
8617 opendir()
8618 ; return 0; }
8619 EOF
8620 if { (eval echo configure:8621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8621   rm -rf conftest*
8622   eval "ac_cv_lib_$ac_lib_var=yes"
8623 else
8624   echo "configure: failed program was:" >&5
8625   cat conftest.$ac_ext >&5
8626   rm -rf conftest*
8627   eval "ac_cv_lib_$ac_lib_var=no"
8628 fi
8629 rm -f conftest*
8630 LIBS="$ac_save_LIBS"
8631
8632 fi
8633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8634   echo "$ac_t""yes" 1>&6
8635   LIBS="$LIBS -lx"
8636 else
8637   echo "$ac_t""no" 1>&6
8638 fi
8639
8640 fi
8641
8642 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8643 echo "configure:8644: checking for sys/wait.h that is POSIX.1 compatible" >&5
8644 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8645   echo $ac_n "(cached) $ac_c" 1>&6
8646 else
8647   cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 #include <sys/wait.h>
8652 #ifndef WEXITSTATUS
8653 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8654 #endif
8655 #ifndef WIFEXITED
8656 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8657 #endif
8658 int main() {
8659 int s;
8660 wait (&s);
8661 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8662 ; return 0; }
8663 EOF
8664 if { (eval echo configure:8665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8665   rm -rf conftest*
8666   ac_cv_header_sys_wait_h=yes
8667 else
8668   echo "configure: failed program was:" >&5
8669   cat conftest.$ac_ext >&5
8670   rm -rf conftest*
8671   ac_cv_header_sys_wait_h=no
8672 fi
8673 rm -f conftest*
8674 fi
8675
8676 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8677 if test $ac_cv_header_sys_wait_h = yes; then
8678   cat >> confdefs.h <<\EOF
8679 #define HAVE_SYS_WAIT_H 1
8680 EOF
8681
8682 fi
8683
8684 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8685 echo "configure:8686: checking POSIX termios" >&5
8686 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8687   echo $ac_n "(cached) $ac_c" 1>&6
8688 else
8689   cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 #include <sys/types.h>
8693 #include <unistd.h>
8694 #include <termios.h>
8695 int main() {
8696 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8697    tcgetattr(0, 0);
8698 ; return 0; }
8699 EOF
8700 if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8701   rm -rf conftest*
8702   am_cv_sys_posix_termios=yes
8703 else
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -rf conftest*
8707   am_cv_sys_posix_termios=no
8708 fi
8709 rm -f conftest*
8710 fi
8711
8712 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8713
8714
8715  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8716 echo "configure:8717: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8717 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8718   echo $ac_n "(cached) $ac_c" 1>&6
8719 else
8720   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8721
8722   gwinsz_in_termios_h=no
8723   if test $am_cv_sys_posix_termios = yes; then
8724     cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 #include <sys/types.h>
8728 #     include <termios.h>
8729 #     ifdef TIOCGWINSZ
8730         yes
8731 #     endif
8732     
8733 EOF
8734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8735   egrep "yes" >/dev/null 2>&1; then
8736   rm -rf conftest*
8737   gwinsz_in_termios_h=yes
8738 fi
8739 rm -f conftest*
8740
8741   fi
8742
8743   if test $gwinsz_in_termios_h = no; then
8744     cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <sys/types.h>
8748 #     include <sys/ioctl.h>
8749 #     ifdef TIOCGWINSZ
8750         yes
8751 #     endif
8752     
8753 EOF
8754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8755   egrep "yes" >/dev/null 2>&1; then
8756   rm -rf conftest*
8757   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8758 fi
8759 rm -f conftest*
8760
8761   fi
8762   
8763 fi
8764
8765 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8766   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8767     cat >> confdefs.h <<\EOF
8768 #define GWINSZ_IN_SYS_IOCTL 1
8769 EOF
8770
8771   fi
8772
8773 if test $am_cv_sys_posix_termios = yes ; then
8774         cat >> confdefs.h <<\EOF
8775 #define HAVE_POSIX_TERMIOS 1
8776 EOF
8777
8778 fi
8779
8780 for ac_hdr in \
8781         arpa/inet.h             \
8782         arpa/nameser.h  \
8783         assert.h                \
8784         bits/types.h    \
8785         conio.h                 \
8786         crypt.h                 \
8787         direct.h                \
8788         errno.h                 \
8789         fcntl.h                 \
8790         filio.h                 \
8791         getopt.h                \
8792         grp.h                   \
8793         io.h                    \
8794         libutil.h               \
8795         limits.h                \
8796         locale.h                \
8797         netinet/tcp.h   \
8798         malloc.h                \
8799         memory.h                \
8800         psap.h                  \
8801         pwd.h                   \
8802         process.h               \
8803         resolv.h                \
8804         sgtty.h                 \
8805         shadow.h                \
8806         stddef.h                \
8807         string.h                \
8808         strings.h               \
8809         sysexits.h              \
8810         sys/file.h              \
8811         sys/filio.h             \
8812         sys/errno.h             \
8813         sys/ioctl.h             \
8814         sys/param.h             \
8815         sys/resource.h  \
8816         sys/select.h    \
8817         sys/socket.h    \
8818         sys/stat.h              \
8819         sys/syslog.h    \
8820         sys/time.h              \
8821         sys/types.h             \
8822         sys/ucred.h             \
8823         sys/uio.h               \
8824         syslog.h                \
8825         termios.h               \
8826         unistd.h                \
8827         winsock.h               \
8828         winsock2.h              \
8829
8830 do
8831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8833 echo "configure:8834: checking for $ac_hdr" >&5
8834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   cat > conftest.$ac_ext <<EOF
8838 #line 8839 "configure"
8839 #include "confdefs.h"
8840 #include <$ac_hdr>
8841 EOF
8842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8843 { (eval echo configure:8844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8845 if test -z "$ac_err"; then
8846   rm -rf conftest*
8847   eval "ac_cv_header_$ac_safe=yes"
8848 else
8849   echo "$ac_err" >&5
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   eval "ac_cv_header_$ac_safe=no"
8854 fi
8855 rm -f conftest*
8856 fi
8857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8858   echo "$ac_t""yes" 1>&6
8859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8860   cat >> confdefs.h <<EOF
8861 #define $ac_tr_hdr 1
8862 EOF
8863  
8864 else
8865   echo "$ac_t""no" 1>&6
8866 fi
8867 done
8868
8869
8870
8871 for ac_func in sigaction sigset 
8872 do
8873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8874 echo "configure:8875: checking for $ac_func" >&5
8875 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8876   echo $ac_n "(cached) $ac_c" 1>&6
8877 else
8878   cat > conftest.$ac_ext <<EOF
8879 #line 8880 "configure"
8880 #include "confdefs.h"
8881 /* System header to define __stub macros and hopefully few prototypes,
8882     which can conflict with char $ac_func(); below.  */
8883 #include <assert.h>
8884 /* Override any gcc2 internal prototype to avoid an error.  */
8885 /* We use char because int might match the return type of a gcc2
8886     builtin and then its argument prototype would still apply.  */
8887 char $ac_func();
8888 char (*f)();
8889
8890 int main() {
8891
8892 /* The GNU C library defines this for functions which it implements
8893     to always fail with ENOSYS.  Some functions are actually named
8894     something starting with __ and the normal name is an alias.  */
8895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8896 choke me
8897 #else
8898 f = $ac_func;
8899 #endif
8900
8901 ; return 0; }
8902 EOF
8903 if { (eval echo configure:8904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8904   rm -rf conftest*
8905   eval "ac_cv_func_$ac_func=yes"
8906 else
8907   echo "configure: failed program was:" >&5
8908   cat conftest.$ac_ext >&5
8909   rm -rf conftest*
8910   eval "ac_cv_func_$ac_func=no"
8911 fi
8912 rm -f conftest*
8913 fi
8914
8915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8916   echo "$ac_t""yes" 1>&6
8917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8918   cat >> confdefs.h <<EOF
8919 #define $ac_tr_func 1
8920 EOF
8921  
8922 else
8923   echo "$ac_t""no" 1>&6
8924 fi
8925 done
8926
8927
8928 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8929         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8930 echo "configure:8931: checking for sigset in -lV3" >&5
8931 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8932 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   ac_save_LIBS="$LIBS"
8936 LIBS="-lV3  $LIBS"
8937 cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940 /* Override any gcc2 internal prototype to avoid an error.  */
8941 /* We use char because int might match the return type of a gcc2
8942     builtin and then its argument prototype would still apply.  */
8943 char sigset();
8944
8945 int main() {
8946 sigset()
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8950   rm -rf conftest*
8951   eval "ac_cv_lib_$ac_lib_var=yes"
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_lib_$ac_lib_var=no"
8957 fi
8958 rm -f conftest*
8959 LIBS="$ac_save_LIBS"
8960
8961 fi
8962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8963   echo "$ac_t""yes" 1>&6
8964     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8966   cat >> confdefs.h <<EOF
8967 #define $ac_tr_lib 1
8968 EOF
8969
8970   LIBS="-lV3 $LIBS"
8971
8972 else
8973   echo "$ac_t""no" 1>&6
8974 fi
8975
8976 fi
8977
8978 if test "$ac_cv_header_winsock_h" = yes; then
8979 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8980 echo "configure:8981: checking for winsock" >&5
8981 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   save_LIBS="$LIBS"
8985 for curlib in ws2_32 wsock32; do
8986         LIBS="$LIBS -l$curlib"
8987         cat > conftest.$ac_ext <<EOF
8988 #line 8989 "configure"
8989 #include "confdefs.h"
8990 #include <winsock.h>
8991                         
8992 int main() {
8993
8994                         socket(0,0,0);
8995                         select(0,NULL,NULL,NULL,NULL);
8996                         closesocket(0);
8997                         gethostname(NULL,0);
8998                         
8999 ; return 0; }
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9002   rm -rf conftest*
9003   ol_cv_winsock=yes
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -rf conftest*
9008   ol_cv_winsock=no
9009 fi
9010 rm -f conftest*
9011
9012         if test $ol_cv_winsock = yes; then
9013                 cat >> confdefs.h <<\EOF
9014 #define HAVE_WINSOCK 1
9015 EOF
9016
9017                 ac_cv_func_socket=yes
9018                 ac_cv_func_select=yes
9019                 ac_cv_func_closesocket=yes
9020                 ac_cv_func_gethostname=yes
9021                 if test $curlib = ws2_32; then
9022                         ol_cv_winsock=winsock2
9023                         cat >> confdefs.h <<\EOF
9024 #define HAVE_WINSOCK2 1
9025 EOF
9026
9027                 fi
9028                 break
9029         fi
9030         LIBS="$save_LIBS"
9031 done
9032 fi
9033
9034 echo "$ac_t""$ol_cv_winsock" 1>&6
9035 fi
9036
9037
9038 echo $ac_n "checking for socket""... $ac_c" 1>&6
9039 echo "configure:9040: checking for socket" >&5
9040 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9041   echo $ac_n "(cached) $ac_c" 1>&6
9042 else
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046 /* System header to define __stub macros and hopefully few prototypes,
9047     which can conflict with char socket(); below.  */
9048 #include <assert.h>
9049 /* Override any gcc2 internal prototype to avoid an error.  */
9050 /* We use char because int might match the return type of a gcc2
9051     builtin and then its argument prototype would still apply.  */
9052 char socket();
9053 char (*f)();
9054
9055 int main() {
9056
9057 /* The GNU C library defines this for functions which it implements
9058     to always fail with ENOSYS.  Some functions are actually named
9059     something starting with __ and the normal name is an alias.  */
9060 #if defined (__stub_socket) || defined (__stub___socket)
9061 choke me
9062 #else
9063 f = socket;
9064 #endif
9065
9066 ; return 0; }
9067 EOF
9068 if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9069   rm -rf conftest*
9070   eval "ac_cv_func_socket=yes"
9071 else
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -rf conftest*
9075   eval "ac_cv_func_socket=no"
9076 fi
9077 rm -f conftest*
9078 fi
9079
9080 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9081   echo "$ac_t""yes" 1>&6
9082   :
9083 else
9084   echo "$ac_t""no" 1>&6
9085         
9086         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9087 echo "configure:9088: checking for main in -lsocket" >&5
9088 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   ac_save_LIBS="$LIBS"
9093 LIBS="-lsocket  $LIBS"
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097
9098 int main() {
9099 main()
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=yes"
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_lib_$ac_lib_var=no"
9110 fi
9111 rm -f conftest*
9112 LIBS="$ac_save_LIBS"
9113
9114 fi
9115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9116   echo "$ac_t""yes" 1>&6
9117     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9119   cat >> confdefs.h <<EOF
9120 #define $ac_tr_lib 1
9121 EOF
9122
9123   LIBS="-lsocket $LIBS"
9124
9125 else
9126   echo "$ac_t""no" 1>&6
9127 fi
9128
9129         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9130 echo "configure:9131: checking for main in -lnet" >&5
9131 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   ac_save_LIBS="$LIBS"
9136 LIBS="-lnet  $LIBS"
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140
9141 int main() {
9142 main()
9143 ; return 0; }
9144 EOF
9145 if { (eval echo configure:9146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9146   rm -rf conftest*
9147   eval "ac_cv_lib_$ac_lib_var=yes"
9148 else
9149   echo "configure: failed program was:" >&5
9150   cat conftest.$ac_ext >&5
9151   rm -rf conftest*
9152   eval "ac_cv_lib_$ac_lib_var=no"
9153 fi
9154 rm -f conftest*
9155 LIBS="$ac_save_LIBS"
9156
9157 fi
9158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9159   echo "$ac_t""yes" 1>&6
9160     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9162   cat >> confdefs.h <<EOF
9163 #define $ac_tr_lib 1
9164 EOF
9165
9166   LIBS="-lnet $LIBS"
9167
9168 else
9169   echo "$ac_t""no" 1>&6
9170 fi
9171
9172         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9173 echo "configure:9174: checking for main in -lnsl_s" >&5
9174 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9175 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9176   echo $ac_n "(cached) $ac_c" 1>&6
9177 else
9178   ac_save_LIBS="$LIBS"
9179 LIBS="-lnsl_s  $LIBS"
9180 cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9183
9184 int main() {
9185 main()
9186 ; return 0; }
9187 EOF
9188 if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9189   rm -rf conftest*
9190   eval "ac_cv_lib_$ac_lib_var=yes"
9191 else
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   eval "ac_cv_lib_$ac_lib_var=no"
9196 fi
9197 rm -f conftest*
9198 LIBS="$ac_save_LIBS"
9199
9200 fi
9201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9202   echo "$ac_t""yes" 1>&6
9203     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9205   cat >> confdefs.h <<EOF
9206 #define $ac_tr_lib 1
9207 EOF
9208
9209   LIBS="-lnsl_s $LIBS"
9210
9211 else
9212   echo "$ac_t""no" 1>&6
9213 fi
9214
9215         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9216 echo "configure:9217: checking for main in -lnsl" >&5
9217 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9219   echo $ac_n "(cached) $ac_c" 1>&6
9220 else
9221   ac_save_LIBS="$LIBS"
9222 LIBS="-lnsl  $LIBS"
9223 cat > conftest.$ac_ext <<EOF
9224 #line 9225 "configure"
9225 #include "confdefs.h"
9226
9227 int main() {
9228 main()
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232   rm -rf conftest*
9233   eval "ac_cv_lib_$ac_lib_var=yes"
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_lib_$ac_lib_var=no"
9239 fi
9240 rm -f conftest*
9241 LIBS="$ac_save_LIBS"
9242
9243 fi
9244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9245   echo "$ac_t""yes" 1>&6
9246     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9248   cat >> confdefs.h <<EOF
9249 #define $ac_tr_lib 1
9250 EOF
9251
9252   LIBS="-lnsl $LIBS"
9253
9254 else
9255   echo "$ac_t""no" 1>&6
9256 fi
9257
9258         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9259 echo "configure:9260: checking for socket in -linet" >&5
9260 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9261 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   ac_save_LIBS="$LIBS"
9265 LIBS="-linet  $LIBS"
9266 cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 /* Override any gcc2 internal prototype to avoid an error.  */
9270 /* We use char because int might match the return type of a gcc2
9271     builtin and then its argument prototype would still apply.  */
9272 char socket();
9273
9274 int main() {
9275 socket()
9276 ; return 0; }
9277 EOF
9278 if { (eval echo configure:9279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=yes"
9281 else
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   eval "ac_cv_lib_$ac_lib_var=no"
9286 fi
9287 rm -f conftest*
9288 LIBS="$ac_save_LIBS"
9289
9290 fi
9291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9292   echo "$ac_t""yes" 1>&6
9293     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9294     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9295   cat >> confdefs.h <<EOF
9296 #define $ac_tr_lib 1
9297 EOF
9298
9299   LIBS="-linet $LIBS"
9300
9301 else
9302   echo "$ac_t""no" 1>&6
9303 fi
9304
9305         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9306 echo "configure:9307: checking for main in -lgen" >&5
9307 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   ac_save_LIBS="$LIBS"
9312 LIBS="-lgen  $LIBS"
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316
9317 int main() {
9318 main()
9319 ; return 0; }
9320 EOF
9321 if { (eval echo configure:9322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9322   rm -rf conftest*
9323   eval "ac_cv_lib_$ac_lib_var=yes"
9324 else
9325   echo "configure: failed program was:" >&5
9326   cat conftest.$ac_ext >&5
9327   rm -rf conftest*
9328   eval "ac_cv_lib_$ac_lib_var=no"
9329 fi
9330 rm -f conftest*
9331 LIBS="$ac_save_LIBS"
9332
9333 fi
9334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9335   echo "$ac_t""yes" 1>&6
9336     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9338   cat >> confdefs.h <<EOF
9339 #define $ac_tr_lib 1
9340 EOF
9341
9342   LIBS="-lgen $LIBS"
9343
9344 else
9345   echo "$ac_t""no" 1>&6
9346 fi
9347
9348
9349 fi
9350
9351
9352 echo $ac_n "checking for select""... $ac_c" 1>&6
9353 echo "configure:9354: checking for select" >&5
9354 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 /* System header to define __stub macros and hopefully few prototypes,
9361     which can conflict with char select(); below.  */
9362 #include <assert.h>
9363 /* Override any gcc2 internal prototype to avoid an error.  */
9364 /* We use char because int might match the return type of a gcc2
9365     builtin and then its argument prototype would still apply.  */
9366 char select();
9367 char (*f)();
9368
9369 int main() {
9370
9371 /* The GNU C library defines this for functions which it implements
9372     to always fail with ENOSYS.  Some functions are actually named
9373     something starting with __ and the normal name is an alias.  */
9374 #if defined (__stub_select) || defined (__stub___select)
9375 choke me
9376 #else
9377 f = select;
9378 #endif
9379
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_func_select=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_func_select=no"
9390 fi
9391 rm -f conftest*
9392 fi
9393
9394 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396   :
9397 else
9398   echo "$ac_t""no" 1>&6
9399 { echo "configure: error: select() required." 1>&2; exit 1; }
9400 fi
9401
9402
9403 if test "${ac_cv_header_winsock_h}" != yes; then
9404                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9405 echo "configure:9406: checking types of arguments for select()" >&5
9406  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9410   echo $ac_n "(cached) $ac_c" 1>&6
9411 else
9412     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9413   echo $ac_n "(cached) $ac_c" 1>&6
9414 else
9415      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9416      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9417       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9418        cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 #ifdef HAVE_SYS_TYPES_H
9422 #include <sys/types.h>
9423 #endif
9424 #ifdef HAVE_SYS_TIME_H
9425 #include <sys/time.h>
9426 #endif
9427 #ifdef HAVE_SYS_SELECT_H
9428 #include <sys/select.h>
9429 #endif
9430 #ifdef HAVE_SYS_SOCKET_H
9431 #include <sys/socket.h>
9432 #endif
9433 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);
9434 int main() {
9435
9436 ; return 0; }
9437 EOF
9438 if { (eval echo configure:9439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9439   rm -rf conftest*
9440           ac_not_found=no ; break 3
9441 else
9442   echo "configure: failed program was:" >&5
9443   cat conftest.$ac_ext >&5
9444   rm -rf conftest*
9445   ac_not_found=yes
9446 fi
9447 rm -f conftest*
9448       done
9449      done
9450     done
9451    
9452 fi
9453   
9454 fi
9455  
9456 fi
9457  if test "$ac_not_found" = yes; then
9458   ac_cv_func_select_arg1=int 
9459   ac_cv_func_select_arg234='int *' 
9460   ac_cv_func_select_arg5='struct timeval *'
9461  fi
9462  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9463  cat >> confdefs.h <<EOF
9464 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9465 EOF
9466
9467  cat >> confdefs.h <<EOF
9468 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9469 EOF
9470
9471  cat >> confdefs.h <<EOF
9472 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9473 EOF
9474
9475
9476 fi
9477
9478
9479 for ac_func in poll 
9480 do
9481 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9482 echo "configure:9483: checking for $ac_func" >&5
9483 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9484   echo $ac_n "(cached) $ac_c" 1>&6
9485 else
9486   cat > conftest.$ac_ext <<EOF
9487 #line 9488 "configure"
9488 #include "confdefs.h"
9489 /* System header to define __stub macros and hopefully few prototypes,
9490     which can conflict with char $ac_func(); below.  */
9491 #include <assert.h>
9492 /* Override any gcc2 internal prototype to avoid an error.  */
9493 /* We use char because int might match the return type of a gcc2
9494     builtin and then its argument prototype would still apply.  */
9495 char $ac_func();
9496 char (*f)();
9497
9498 int main() {
9499
9500 /* The GNU C library defines this for functions which it implements
9501     to always fail with ENOSYS.  Some functions are actually named
9502     something starting with __ and the normal name is an alias.  */
9503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9504 choke me
9505 #else
9506 f = $ac_func;
9507 #endif
9508
9509 ; return 0; }
9510 EOF
9511 if { (eval echo configure:9512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9512   rm -rf conftest*
9513   eval "ac_cv_func_$ac_func=yes"
9514 else
9515   echo "configure: failed program was:" >&5
9516   cat conftest.$ac_ext >&5
9517   rm -rf conftest*
9518   eval "ac_cv_func_$ac_func=no"
9519 fi
9520 rm -f conftest*
9521 fi
9522
9523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9524   echo "$ac_t""yes" 1>&6
9525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9526   cat >> confdefs.h <<EOF
9527 #define $ac_tr_func 1
9528 EOF
9529  
9530 else
9531   echo "$ac_t""no" 1>&6
9532 fi
9533 done
9534
9535 for ac_hdr in poll.h 
9536 do
9537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9539 echo "configure:9540: checking for $ac_hdr" >&5
9540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 #include <$ac_hdr>
9547 EOF
9548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9549 { (eval echo configure:9550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9551 if test -z "$ac_err"; then
9552   rm -rf conftest*
9553   eval "ac_cv_header_$ac_safe=yes"
9554 else
9555   echo "$ac_err" >&5
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   eval "ac_cv_header_$ac_safe=no"
9560 fi
9561 rm -f conftest*
9562 fi
9563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9564   echo "$ac_t""yes" 1>&6
9565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9566   cat >> confdefs.h <<EOF
9567 #define $ac_tr_hdr 1
9568 EOF
9569  
9570 else
9571   echo "$ac_t""no" 1>&6
9572 fi
9573 done
9574
9575
9576 for ac_hdr in sys/epoll.h 
9577 do
9578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9580 echo "configure:9581: checking for $ac_hdr" >&5
9581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 #include <$ac_hdr>
9588 EOF
9589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9590 { (eval echo configure:9591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9592 if test -z "$ac_err"; then
9593   rm -rf conftest*
9594   eval "ac_cv_header_$ac_safe=yes"
9595 else
9596   echo "$ac_err" >&5
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   eval "ac_cv_header_$ac_safe=no"
9601 fi
9602 rm -f conftest*
9603 fi
9604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9607   cat >> confdefs.h <<EOF
9608 #define $ac_tr_hdr 1
9609 EOF
9610  
9611 else
9612   echo "$ac_t""no" 1>&6
9613 fi
9614 done
9615
9616 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9617 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9618 echo "configure:9619: checking for epoll system call" >&5
9619 if test "$cross_compiling" = yes; then
9620   echo "$ac_t""no" 1>&6
9621 else
9622   cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625 int main(int argc, char *argv)
9626 {
9627         int epfd = epoll_create(256);
9628         exit (epfd == -1 ? 1 : 0);
9629 }
9630 EOF
9631 if { (eval echo configure:9632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9632 then
9633   echo "$ac_t""yes" 1>&6
9634 cat >> confdefs.h <<\EOF
9635 #define HAVE_EPOLL 1
9636 EOF
9637
9638 else
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -fr conftest*
9642   echo "$ac_t""no" 1>&6
9643 fi
9644 rm -fr conftest*
9645 fi
9646
9647 fi
9648
9649 # strerror checks
9650 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9651 echo "configure:9652: checking declaration of sys_errlist" >&5
9652 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9653   echo $ac_n "(cached) $ac_c" 1>&6
9654 else
9655   
9656         cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659
9660 #include <stdio.h>
9661 #include <sys/types.h>
9662 #include <errno.h>
9663 #ifdef WINNT
9664 #include <stdlib.h>
9665 #endif 
9666 int main() {
9667 char *c = (char *) *sys_errlist
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9671   rm -rf conftest*
9672   ol_cv_dcl_sys_errlist=yes
9673         ol_cv_have_sys_errlist=yes
9674 else
9675   echo "configure: failed program was:" >&5
9676   cat conftest.$ac_ext >&5
9677   rm -rf conftest*
9678   ol_cv_dcl_sys_errlist=no
9679 fi
9680 rm -f conftest*
9681 fi
9682
9683 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9684 #
9685 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9686 if test $ol_cv_dcl_sys_errlist = no ; then
9687         cat >> confdefs.h <<\EOF
9688 #define DECL_SYS_ERRLIST 1
9689 EOF
9690
9691
9692         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9693 echo "configure:9694: checking existence of sys_errlist" >&5
9694 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9695   echo $ac_n "(cached) $ac_c" 1>&6
9696 else
9697   
9698                 cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701 #include <errno.h>
9702 int main() {
9703 char *c = (char *) *sys_errlist
9704 ; return 0; }
9705 EOF
9706 if { (eval echo configure:9707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9707   rm -rf conftest*
9708   ol_cv_have_sys_errlist=yes
9709 else
9710   echo "configure: failed program was:" >&5
9711   cat conftest.$ac_ext >&5
9712   rm -rf conftest*
9713   ol_cv_have_sys_errlist=no
9714 fi
9715 rm -f conftest*
9716 fi
9717
9718 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9719 fi
9720 if test $ol_cv_have_sys_errlist = yes ; then
9721         cat >> confdefs.h <<\EOF
9722 #define HAVE_SYS_ERRLIST 1
9723 EOF
9724
9725 fi
9726  for ac_func in strerror strerror_r
9727 do
9728 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9729 echo "configure:9730: checking for $ac_func" >&5
9730 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9731   echo $ac_n "(cached) $ac_c" 1>&6
9732 else
9733   cat > conftest.$ac_ext <<EOF
9734 #line 9735 "configure"
9735 #include "confdefs.h"
9736 /* System header to define __stub macros and hopefully few prototypes,
9737     which can conflict with char $ac_func(); below.  */
9738 #include <assert.h>
9739 /* Override any gcc2 internal prototype to avoid an error.  */
9740 /* We use char because int might match the return type of a gcc2
9741     builtin and then its argument prototype would still apply.  */
9742 char $ac_func();
9743 char (*f)();
9744
9745 int main() {
9746
9747 /* The GNU C library defines this for functions which it implements
9748     to always fail with ENOSYS.  Some functions are actually named
9749     something starting with __ and the normal name is an alias.  */
9750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9751 choke me
9752 #else
9753 f = $ac_func;
9754 #endif
9755
9756 ; return 0; }
9757 EOF
9758 if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9759   rm -rf conftest*
9760   eval "ac_cv_func_$ac_func=yes"
9761 else
9762   echo "configure: failed program was:" >&5
9763   cat conftest.$ac_ext >&5
9764   rm -rf conftest*
9765   eval "ac_cv_func_$ac_func=no"
9766 fi
9767 rm -f conftest*
9768 fi
9769
9770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9771   echo "$ac_t""yes" 1>&6
9772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9773   cat >> confdefs.h <<EOF
9774 #define $ac_tr_func 1
9775 EOF
9776  
9777 else
9778   echo "$ac_t""no" 1>&6
9779 fi
9780 done
9781
9782 ol_cv_func_strerror_r=no
9783 if test "${ac_cv_func_strerror_r}" = yes ; then
9784         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9785 echo "configure:9786: checking non-posix strerror_r" >&5
9786 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9787   echo $ac_n "(cached) $ac_c" 1>&6
9788 else
9789   
9790         cat > conftest.$ac_ext <<EOF
9791 #line 9792 "configure"
9792 #include "confdefs.h"
9793 #include <string.h>
9794 EOF
9795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9796   egrep "strerror_r" >/dev/null 2>&1; then
9797   rm -rf conftest*
9798   ol_decl_strerror_r=yes
9799 else
9800   rm -rf conftest*
9801   ol_decl_strerror_r=no
9802 fi
9803 rm -f conftest*
9804
9805         if test $ol_decl_strerror_r = yes ; then
9806                 cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 #include <string.h>
9810 int main() {
9811    /* from autoconf 2.59 */
9812                                 char buf[100];
9813                                 char x = *strerror_r (0, buf, sizeof buf);
9814                                 char *p = strerror_r (0, buf, sizeof buf);
9815                         
9816 ; return 0; }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9819   rm -rf conftest*
9820   ol_cv_nonposix_strerror_r=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -rf conftest*
9825   ol_cv_nonposix_strerror_r=no
9826 fi
9827 rm -f conftest*
9828         else
9829                 if test "$cross_compiling" = yes; then
9830   ol_cv_nonposix_strerror=no
9831 else
9832   cat > conftest.$ac_ext <<EOF
9833 #line 9834 "configure"
9834 #include "confdefs.h"
9835
9836                         main() {
9837                                 char buf[100];
9838                                 buf[0] = 0;
9839                                 strerror_r( 1, buf, sizeof buf );
9840                                 exit( buf[0] == 0 );
9841                         }
9842                         
9843 EOF
9844 if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9845 then
9846   ol_cv_nonposix_strerror_r=yes
9847 else
9848   echo "configure: failed program was:" >&5
9849   cat conftest.$ac_ext >&5
9850   rm -fr conftest*
9851   ol_cv_nonposix_strerror=no
9852 fi
9853 rm -fr conftest*
9854 fi
9855
9856         fi
9857         
9858 fi
9859
9860 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9861 if test $ol_cv_nonposix_strerror_r = yes ; then
9862         cat >> confdefs.h <<\EOF
9863 #define HAVE_NONPOSIX_STRERROR_R 1
9864 EOF
9865
9866 fi
9867
9868 elif test "${ac_cv_func_strerror}" = no ; then
9869         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9870 echo "configure:9871: checking declaration of sys_errlist" >&5
9871 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9872   echo $ac_n "(cached) $ac_c" 1>&6
9873 else
9874   
9875         cat > conftest.$ac_ext <<EOF
9876 #line 9877 "configure"
9877 #include "confdefs.h"
9878
9879 #include <stdio.h>
9880 #include <sys/types.h>
9881 #include <errno.h>
9882 #ifdef WINNT
9883 #include <stdlib.h>
9884 #endif 
9885 int main() {
9886 char *c = (char *) *sys_errlist
9887 ; return 0; }
9888 EOF
9889 if { (eval echo configure:9890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9890   rm -rf conftest*
9891   ol_cv_dcl_sys_errlist=yes
9892         ol_cv_have_sys_errlist=yes
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   ol_cv_dcl_sys_errlist=no
9898 fi
9899 rm -f conftest*
9900 fi
9901
9902 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9903 #
9904 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9905 if test $ol_cv_dcl_sys_errlist = no ; then
9906         cat >> confdefs.h <<\EOF
9907 #define DECL_SYS_ERRLIST 1
9908 EOF
9909
9910
9911         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9912 echo "configure:9913: checking existence of sys_errlist" >&5
9913 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9914   echo $ac_n "(cached) $ac_c" 1>&6
9915 else
9916   
9917                 cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 #include <errno.h>
9921 int main() {
9922 char *c = (char *) *sys_errlist
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9926   rm -rf conftest*
9927   ol_cv_have_sys_errlist=yes
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   ol_cv_have_sys_errlist=no
9933 fi
9934 rm -f conftest*
9935 fi
9936
9937 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9938 fi
9939 if test $ol_cv_have_sys_errlist = yes ; then
9940         cat >> confdefs.h <<\EOF
9941 #define HAVE_SYS_ERRLIST 1
9942 EOF
9943
9944 fi
9945
9946 fi
9947
9948
9949 for ac_hdr in regex.h 
9950 do
9951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9953 echo "configure:9954: checking for $ac_hdr" >&5
9954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 #include <$ac_hdr>
9961 EOF
9962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9963 { (eval echo configure:9964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9965 if test -z "$ac_err"; then
9966   rm -rf conftest*
9967   eval "ac_cv_header_$ac_safe=yes"
9968 else
9969   echo "$ac_err" >&5
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_header_$ac_safe=no"
9974 fi
9975 rm -f conftest*
9976 fi
9977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9978   echo "$ac_t""yes" 1>&6
9979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9980   cat >> confdefs.h <<EOF
9981 #define $ac_tr_hdr 1
9982 EOF
9983  
9984 else
9985   echo "$ac_t""no" 1>&6
9986 fi
9987 done
9988
9989 if test "$ac_cv_header_regex_h" != yes ; then
9990         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9991 fi
9992
9993 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9994 echo "configure:9995: checking for library containing regfree" >&5
9995 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   ac_func_search_save_LIBS="$LIBS"
9999 ac_cv_search_regfree="no"
10000 cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003 /* Override any gcc2 internal prototype to avoid an error.  */
10004 /* We use char because int might match the return type of a gcc2
10005     builtin and then its argument prototype would still apply.  */
10006 char regfree();
10007
10008 int main() {
10009 regfree()
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10013   rm -rf conftest*
10014   ac_cv_search_regfree="none required"
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018 fi
10019 rm -f conftest*
10020 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10021 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10022 cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 /* Override any gcc2 internal prototype to avoid an error.  */
10026 /* We use char because int might match the return type of a gcc2
10027     builtin and then its argument prototype would still apply.  */
10028 char regfree();
10029
10030 int main() {
10031 regfree()
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   ac_cv_search_regfree="-l$ac_lib"
10037 break
10038 else
10039   echo "configure: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041 fi
10042 rm -f conftest*
10043 done
10044 LIBS="$ac_func_search_save_LIBS"
10045 fi
10046
10047 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10048 if test "$ac_cv_search_regfree" != "no"; then
10049   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10050   :
10051 else :
10052   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10053 fi
10054
10055
10056 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10057 echo "configure:10058: checking for compatible POSIX regex" >&5
10058 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   
10062         if test "$cross_compiling" = yes; then
10063   ol_cv_c_posix_regex=cross
10064 else
10065   cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068
10069 #include <sys/types.h>
10070 #include <regex.h>
10071 static char *pattern, *string;
10072 main()
10073 {
10074         int rc;
10075         regex_t re;
10076
10077         pattern = "^A";
10078
10079         if(regcomp(&re, pattern, 0)) {
10080                 return -1;
10081         }
10082         
10083         string = "ALL MATCH";
10084         
10085         rc = regexec(&re, string, 0, (void*)0, 0);
10086
10087         regfree(&re);
10088
10089         return rc;
10090 }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10093 then
10094   ol_cv_c_posix_regex=yes
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -fr conftest*
10099   ol_cv_c_posix_regex=no
10100 fi
10101 rm -fr conftest*
10102 fi
10103
10104 fi
10105
10106 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10107
10108 if test "$ol_cv_c_posix_regex" = no ; then
10109         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10110 fi
10111
10112
10113 have_uuid=no
10114 for ac_hdr in sys/uuid.h
10115 do
10116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10118 echo "configure:10119: checking for $ac_hdr" >&5
10119 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10120   echo $ac_n "(cached) $ac_c" 1>&6
10121 else
10122   cat > conftest.$ac_ext <<EOF
10123 #line 10124 "configure"
10124 #include "confdefs.h"
10125 #include <$ac_hdr>
10126 EOF
10127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10128 { (eval echo configure:10129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10130 if test -z "$ac_err"; then
10131   rm -rf conftest*
10132   eval "ac_cv_header_$ac_safe=yes"
10133 else
10134   echo "$ac_err" >&5
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -rf conftest*
10138   eval "ac_cv_header_$ac_safe=no"
10139 fi
10140 rm -f conftest*
10141 fi
10142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10143   echo "$ac_t""yes" 1>&6
10144     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10145   cat >> confdefs.h <<EOF
10146 #define $ac_tr_hdr 1
10147 EOF
10148  
10149 else
10150   echo "$ac_t""no" 1>&6
10151 fi
10152 done
10153
10154 if test $ac_cv_header_sys_uuid_h = yes ; then
10155         save_LIBS="$LIBS"
10156         
10157 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10158 echo "configure:10159: checking for library containing uuid_to_str" >&5
10159 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10160   echo $ac_n "(cached) $ac_c" 1>&6
10161 else
10162   ac_func_search_save_LIBS="$LIBS"
10163 ac_cv_search_uuid_to_str="no"
10164 cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 /* Override any gcc2 internal prototype to avoid an error.  */
10168 /* We use char because int might match the return type of a gcc2
10169     builtin and then its argument prototype would still apply.  */
10170 char uuid_to_str();
10171
10172 int main() {
10173 uuid_to_str()
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   ac_cv_search_uuid_to_str="none required"
10179 else
10180   echo "configure: failed program was:" >&5
10181   cat conftest.$ac_ext >&5
10182 fi
10183 rm -f conftest*
10184 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10185 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10186 cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 /* Override any gcc2 internal prototype to avoid an error.  */
10190 /* We use char because int might match the return type of a gcc2
10191     builtin and then its argument prototype would still apply.  */
10192 char uuid_to_str();
10193
10194 int main() {
10195 uuid_to_str()
10196 ; return 0; }
10197 EOF
10198 if { (eval echo configure:10199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10199   rm -rf conftest*
10200   ac_cv_search_uuid_to_str="-l$ac_lib"
10201 break
10202 else
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205 fi
10206 rm -f conftest*
10207 done
10208 LIBS="$ac_func_search_save_LIBS"
10209 fi
10210
10211 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10212 if test "$ac_cv_search_uuid_to_str" != "no"; then
10213   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10214   have_uuid=yes
10215 else :
10216   :
10217 fi
10218         LIBS="$save_LIBS"
10219
10220         if test have_uuid = yes ; then
10221                 cat >> confdefs.h <<\EOF
10222 #define HAVE_UUID_TO_STR 1
10223 EOF
10224
10225
10226                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10227                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10228         fi
10229 fi
10230
10231 if test $have_uuid = no ; then
10232         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10233 echo "configure:10234: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10234         save_LIBS="$LIBS"
10235         LIBS="$LIBS -lrpcrt4"
10236         cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239
10240                 int __stdcall UuidCreate(void *);
10241                 int __stdcall UuidToStringA(void *,void **);
10242                 
10243 int main() {
10244
10245                 UuidCreate(0);
10246                 UuidToStringA(0,0);
10247                 
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   need_rpcrt=yes
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   need_rpcrt=no
10258 fi
10259 rm -f conftest*
10260         if test $need_rpcrt = yes; then
10261                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10262         fi
10263         LIBS="$save_LIBS"
10264         echo "$ac_t""$need_rpcrt" 1>&6
10265 fi
10266
10267 ol_cv_lib_resolver=no
10268 if test $ol_cv_lib_resolver = no ; then
10269         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10270 echo "configure:10271: checking for resolver link (default)" >&5
10271 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10272   echo $ac_n "(cached) $ac_c" 1>&6
10273 else
10274   
10275         ol_RESOLVER_LIB=
10276         ol_LIBS=$LIBS
10277         LIBS="$ol_RESOLVER_LIB $LIBS"
10278
10279         cat > conftest.$ac_ext <<EOF
10280 #line 10281 "configure"
10281 #include "confdefs.h"
10282
10283 #ifdef HAVE_SYS_TYPES_H
10284 #       include <sys/types.h>
10285 #endif
10286 #include <netinet/in.h>
10287 #ifdef HAVE_ARPA_NAMESER_H
10288 #       include <arpa/nameser.h>
10289 #endif
10290 #ifdef HAVE_RESOLV_H
10291 #       include <resolv.h>
10292 #endif
10293
10294 int main() {
10295 {
10296         int len, status;
10297         char *request = NULL;
10298         unsigned char reply[64*1024];
10299         unsigned char host[64*1024];
10300         unsigned char *p;
10301
10302 #ifdef NS_HFIXEDSZ
10303         /* Bind 8/9 interface */
10304         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10305 #else
10306         /* Bind 4 interface */
10307 # ifndef T_SRV
10308 #  define T_SRV 33
10309 # endif
10310         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10311 #endif
10312         p = reply;
10313 #ifdef NS_HFIXEDSZ
10314         /* Bind 8/9 interface */
10315         p += NS_HFIXEDSZ;
10316 #elif defined(HFIXEDSZ)
10317         /* Bind 4 interface w/ HFIXEDSZ */
10318         p += HFIXEDSZ;
10319 #else
10320         /* Bind 4 interface w/o HFIXEDSZ */
10321         p += sizeof(HEADER);
10322 #endif
10323         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10324 }
10325 ; return 0; }
10326 EOF
10327 if { (eval echo configure:10328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10328   rm -rf conftest*
10329   ol_cv_resolver_none=yes
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   ol_cv_resolver_none=no
10335 fi
10336 rm -f conftest*
10337
10338         LIBS="$ol_LIBS"
10339
10340 fi
10341
10342 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10343
10344         if test $ol_cv_resolver_none = yes ; then
10345                 ol_cv_lib_resolver=yes
10346         fi
10347 fi
10348
10349 if test $ol_cv_lib_resolver = no ; then
10350         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10351 echo "configure:10352: checking for resolver link (-lresolv)" >&5
10352 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   
10356         ol_RESOLVER_LIB=-lresolv
10357         ol_LIBS=$LIBS
10358         LIBS="$ol_RESOLVER_LIB $LIBS"
10359
10360         cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363
10364 #ifdef HAVE_SYS_TYPES_H
10365 #       include <sys/types.h>
10366 #endif
10367 #include <netinet/in.h>
10368 #ifdef HAVE_ARPA_NAMESER_H
10369 #       include <arpa/nameser.h>
10370 #endif
10371 #ifdef HAVE_RESOLV_H
10372 #       include <resolv.h>
10373 #endif
10374
10375 int main() {
10376 {
10377         int len, status;
10378         char *request = NULL;
10379         unsigned char reply[64*1024];
10380         unsigned char host[64*1024];
10381         unsigned char *p;
10382
10383 #ifdef NS_HFIXEDSZ
10384         /* Bind 8/9 interface */
10385         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10386 #else
10387         /* Bind 4 interface */
10388 # ifndef T_SRV
10389 #  define T_SRV 33
10390 # endif
10391         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10392 #endif
10393         p = reply;
10394 #ifdef NS_HFIXEDSZ
10395         /* Bind 8/9 interface */
10396         p += NS_HFIXEDSZ;
10397 #elif defined(HFIXEDSZ)
10398         /* Bind 4 interface w/ HFIXEDSZ */
10399         p += HFIXEDSZ;
10400 #else
10401         /* Bind 4 interface w/o HFIXEDSZ */
10402         p += sizeof(HEADER);
10403 #endif
10404         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10405 }
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   ol_cv_resolver_resolv=yes
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   ol_cv_resolver_resolv=no
10416 fi
10417 rm -f conftest*
10418
10419         LIBS="$ol_LIBS"
10420
10421 fi
10422
10423 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10424
10425         if test $ol_cv_resolver_resolv = yes ; then
10426                 ol_cv_lib_resolver=-lresolv
10427         fi
10428 fi
10429
10430 if test $ol_cv_lib_resolver = no ; then
10431         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10432 echo "configure:10433: checking for resolver link (-lbind)" >&5
10433 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10434   echo $ac_n "(cached) $ac_c" 1>&6
10435 else
10436   
10437         ol_RESOLVER_LIB=-lbind
10438         ol_LIBS=$LIBS
10439         LIBS="$ol_RESOLVER_LIB $LIBS"
10440
10441         cat > conftest.$ac_ext <<EOF
10442 #line 10443 "configure"
10443 #include "confdefs.h"
10444
10445 #ifdef HAVE_SYS_TYPES_H
10446 #       include <sys/types.h>
10447 #endif
10448 #include <netinet/in.h>
10449 #ifdef HAVE_ARPA_NAMESER_H
10450 #       include <arpa/nameser.h>
10451 #endif
10452 #ifdef HAVE_RESOLV_H
10453 #       include <resolv.h>
10454 #endif
10455
10456 int main() {
10457 {
10458         int len, status;
10459         char *request = NULL;
10460         unsigned char reply[64*1024];
10461         unsigned char host[64*1024];
10462         unsigned char *p;
10463
10464 #ifdef NS_HFIXEDSZ
10465         /* Bind 8/9 interface */
10466         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10467 #else
10468         /* Bind 4 interface */
10469 # ifndef T_SRV
10470 #  define T_SRV 33
10471 # endif
10472         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10473 #endif
10474         p = reply;
10475 #ifdef NS_HFIXEDSZ
10476         /* Bind 8/9 interface */
10477         p += NS_HFIXEDSZ;
10478 #elif defined(HFIXEDSZ)
10479         /* Bind 4 interface w/ HFIXEDSZ */
10480         p += HFIXEDSZ;
10481 #else
10482         /* Bind 4 interface w/o HFIXEDSZ */
10483         p += sizeof(HEADER);
10484 #endif
10485         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10486 }
10487 ; return 0; }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10490   rm -rf conftest*
10491   ol_cv_resolver_bind=yes
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   ol_cv_resolver_bind=no
10497 fi
10498 rm -f conftest*
10499
10500         LIBS="$ol_LIBS"
10501
10502 fi
10503
10504 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10505
10506         if test $ol_cv_resolver_bind = yes ; then
10507                 ol_cv_lib_resolver=-lbind
10508         fi
10509 fi
10510
10511
10512
10513 ol_link_dnssrv=no
10514 if test "$ol_cv_lib_resolver" != no ; then
10515         cat >> confdefs.h <<\EOF
10516 #define HAVE_RES_QUERY 1
10517 EOF
10518
10519
10520         if test "$ol_enable_dnssrv" != no ; then
10521                 ol_link_dnssrv=yes
10522         fi
10523
10524         if test "$ol_cv_lib_resolver" != yes ; then
10525                 LIBS="$ol_cv_lib_resolver $LIBS"
10526         fi
10527 fi
10528
10529 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10530         if test "$ol_link_dnssrv" = no ; then
10531                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10532         fi
10533 else
10534         ol_enable_dnssrv=no
10535 fi
10536
10537 for ac_func in hstrerror 
10538 do
10539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10540 echo "configure:10541: checking for $ac_func" >&5
10541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 /* System header to define __stub macros and hopefully few prototypes,
10548     which can conflict with char $ac_func(); below.  */
10549 #include <assert.h>
10550 /* Override any gcc2 internal prototype to avoid an error.  */
10551 /* We use char because int might match the return type of a gcc2
10552     builtin and then its argument prototype would still apply.  */
10553 char $ac_func();
10554 char (*f)();
10555
10556 int main() {
10557
10558 /* The GNU C library defines this for functions which it implements
10559     to always fail with ENOSYS.  Some functions are actually named
10560     something starting with __ and the normal name is an alias.  */
10561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10562 choke me
10563 #else
10564 f = $ac_func;
10565 #endif
10566
10567 ; return 0; }
10568 EOF
10569 if { (eval echo configure:10570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10570   rm -rf conftest*
10571   eval "ac_cv_func_$ac_func=yes"
10572 else
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -rf conftest*
10576   eval "ac_cv_func_$ac_func=no"
10577 fi
10578 rm -f conftest*
10579 fi
10580
10581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10582   echo "$ac_t""yes" 1>&6
10583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10584   cat >> confdefs.h <<EOF
10585 #define $ac_tr_func 1
10586 EOF
10587  
10588 else
10589   echo "$ac_t""no" 1>&6
10590 fi
10591 done
10592
10593
10594 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10595 do
10596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10597 echo "configure:10598: checking for $ac_func" >&5
10598 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10599   echo $ac_n "(cached) $ac_c" 1>&6
10600 else
10601   cat > conftest.$ac_ext <<EOF
10602 #line 10603 "configure"
10603 #include "confdefs.h"
10604 /* System header to define __stub macros and hopefully few prototypes,
10605     which can conflict with char $ac_func(); below.  */
10606 #include <assert.h>
10607 /* Override any gcc2 internal prototype to avoid an error.  */
10608 /* We use char because int might match the return type of a gcc2
10609     builtin and then its argument prototype would still apply.  */
10610 char $ac_func();
10611 char (*f)();
10612
10613 int main() {
10614
10615 /* The GNU C library defines this for functions which it implements
10616     to always fail with ENOSYS.  Some functions are actually named
10617     something starting with __ and the normal name is an alias.  */
10618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10619 choke me
10620 #else
10621 f = $ac_func;
10622 #endif
10623
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_func_$ac_func=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_func_$ac_func=no"
10634 fi
10635 rm -f conftest*
10636 fi
10637
10638 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10639   echo "$ac_t""yes" 1>&6
10640     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10641   cat >> confdefs.h <<EOF
10642 #define $ac_tr_func 1
10643 EOF
10644  
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648 done
10649
10650
10651 ol_link_ipv6=no
10652 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10653         if test $ol_enable_ipv6 = yes ; then
10654                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10655         fi
10656 elif test $ol_enable_ipv6 != no ; then
10657         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10658 echo "configure:10659: checking INET6_ADDRSTRLEN" >&5
10659 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10660   echo $ac_n "(cached) $ac_c" 1>&6
10661 else
10662   
10663                 cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666
10667 #                       include <netinet/in.h>
10668 #                       ifdef INET6_ADDRSTRLEN
10669                                 __has_inet6_addrstrlen__;
10670 #                       endif
10671                 
10672 EOF
10673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10674   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10675   rm -rf conftest*
10676   ol_cv_inet6_addrstrlen=yes
10677 else
10678   rm -rf conftest*
10679   ol_cv_inet6_addrstrlen=no
10680 fi
10681 rm -f conftest*
10682
10683 fi
10684
10685 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10686
10687
10688         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10689 echo "configure:10690: checking struct sockaddr_storage" >&5
10690 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10691   echo $ac_n "(cached) $ac_c" 1>&6
10692 else
10693   
10694                 cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697
10698 #include <sys/types.h>
10699 #include <sys/socket.h>
10700
10701 int main() {
10702
10703                         struct sockaddr_storage ss;
10704
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10708   rm -rf conftest*
10709   ol_cv_struct_sockaddr_storage=yes
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -rf conftest*
10714   ol_cv_struct_sockaddr_storage=no
10715 fi
10716 rm -f conftest*
10717 fi
10718
10719 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10720
10721         if test $ol_cv_inet6_addrstrlen = yes \
10722                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10723                 ol_link_ipv6=yes
10724         elif test $ol_enable_ipv6 = yes \
10725                         -a $ol_cv_inet6_addrstrlen = no ; then
10726                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10727         elif test $ol_enable_ipv6 = yes \
10728                         -a $ol_cv_struct_sockaddr_storage = no ; then
10729                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10730         fi
10731 fi
10732
10733 if test $ol_enable_local != no ; then
10734         for ac_hdr in sys/un.h 
10735 do
10736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10738 echo "configure:10739: checking for $ac_hdr" >&5
10739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 #include <$ac_hdr>
10746 EOF
10747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10748 { (eval echo configure:10749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10750 if test -z "$ac_err"; then
10751   rm -rf conftest*
10752   eval "ac_cv_header_$ac_safe=yes"
10753 else
10754   echo "$ac_err" >&5
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -rf conftest*
10758   eval "ac_cv_header_$ac_safe=no"
10759 fi
10760 rm -f conftest*
10761 fi
10762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10763   echo "$ac_t""yes" 1>&6
10764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10765   cat >> confdefs.h <<EOF
10766 #define $ac_tr_hdr 1
10767 EOF
10768  
10769 else
10770   echo "$ac_t""no" 1>&6
10771 fi
10772 done
10773
10774
10775         if test $ol_enable_local = auto ; then
10776                 ol_enable_local=$ac_cv_header_sys_un_h
10777         elif test $ac_cv_header_sys_un_h = no ; then
10778                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10779         fi
10780 fi
10781
10782 ol_link_kbind=no
10783 ol_link_krb5=no
10784 ol_link_krb4=no
10785
10786 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10787         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10788         -o $ol_with_kerberos = k425 ; then
10789
10790         for ac_hdr in krb5.h
10791 do
10792 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10793 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10794 echo "configure:10795: checking for $ac_hdr" >&5
10795 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   cat > conftest.$ac_ext <<EOF
10799 #line 10800 "configure"
10800 #include "confdefs.h"
10801 #include <$ac_hdr>
10802 EOF
10803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10804 { (eval echo configure:10805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10806 if test -z "$ac_err"; then
10807   rm -rf conftest*
10808   eval "ac_cv_header_$ac_safe=yes"
10809 else
10810   echo "$ac_err" >&5
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -rf conftest*
10814   eval "ac_cv_header_$ac_safe=no"
10815 fi
10816 rm -f conftest*
10817 fi
10818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10819   echo "$ac_t""yes" 1>&6
10820     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10821   cat >> confdefs.h <<EOF
10822 #define $ac_tr_hdr 1
10823 EOF
10824  
10825 else
10826   echo "$ac_t""no" 1>&6
10827 fi
10828 done
10829
10830
10831         if test $ac_cv_header_krb5_h = yes ; then
10832                                 for ac_hdr in heim_err.h
10833 do
10834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10836 echo "configure:10837: checking for $ac_hdr" >&5
10837 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843 #include <$ac_hdr>
10844 EOF
10845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10846 { (eval echo configure:10847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10848 if test -z "$ac_err"; then
10849   rm -rf conftest*
10850   eval "ac_cv_header_$ac_safe=yes"
10851 else
10852   echo "$ac_err" >&5
10853   echo "configure: failed program was:" >&5
10854   cat conftest.$ac_ext >&5
10855   rm -rf conftest*
10856   eval "ac_cv_header_$ac_safe=no"
10857 fi
10858 rm -f conftest*
10859 fi
10860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10861   echo "$ac_t""yes" 1>&6
10862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10863   cat >> confdefs.h <<EOF
10864 #define $ac_tr_hdr 1
10865 EOF
10866  
10867 else
10868   echo "$ac_t""no" 1>&6
10869 fi
10870 done
10871
10872                 if test $ac_cv_header_heim_err_h = yes ; then
10873                         krb5_impl=heimdal
10874                 else
10875                         krb5_impl=mit
10876                 fi
10877
10878                 if test $krb5_impl = mit; then
10879                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10880 echo "configure:10881: checking for main in -lk5crypto" >&5
10881 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10883   echo $ac_n "(cached) $ac_c" 1>&6
10884 else
10885   ac_save_LIBS="$LIBS"
10886 LIBS="-lk5crypto  $LIBS"
10887 cat > conftest.$ac_ext <<EOF
10888 #line 10889 "configure"
10889 #include "confdefs.h"
10890
10891 int main() {
10892 main()
10893 ; return 0; }
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10896   rm -rf conftest*
10897   eval "ac_cv_lib_$ac_lib_var=yes"
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -rf conftest*
10902   eval "ac_cv_lib_$ac_lib_var=no"
10903 fi
10904 rm -f conftest*
10905 LIBS="$ac_save_LIBS"
10906
10907 fi
10908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10909   echo "$ac_t""yes" 1>&6
10910   krb5crypto=k5crypto
10911 else
10912   echo "$ac_t""no" 1>&6
10913 krb5crypto=crypto
10914 fi
10915
10916
10917                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10918 echo "configure:10919: checking for main in -lkrb5" >&5
10919 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   ac_save_LIBS="$LIBS"
10924 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10925 cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928
10929 int main() {
10930 main()
10931 ; return 0; }
10932 EOF
10933 if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10934   rm -rf conftest*
10935   eval "ac_cv_lib_$ac_lib_var=yes"
10936 else
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -rf conftest*
10940   eval "ac_cv_lib_$ac_lib_var=no"
10941 fi
10942 rm -f conftest*
10943 LIBS="$ac_save_LIBS"
10944
10945 fi
10946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10947   echo "$ac_t""yes" 1>&6
10948   have_krb5=yes
10949                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10950 else
10951   echo "$ac_t""no" 1>&6
10952 have_krb5=no
10953 fi
10954
10955
10956                 elif test $krb5_impl = heimdal; then
10957                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10958 echo "configure:10959: checking for main in -ldes" >&5
10959 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   ac_save_LIBS="$LIBS"
10964 LIBS="-ldes  $LIBS"
10965 cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968
10969 int main() {
10970 main()
10971 ; return 0; }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10974   rm -rf conftest*
10975   eval "ac_cv_lib_$ac_lib_var=yes"
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -rf conftest*
10980   eval "ac_cv_lib_$ac_lib_var=no"
10981 fi
10982 rm -f conftest*
10983 LIBS="$ac_save_LIBS"
10984
10985 fi
10986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988   krb5crypto=des
10989 else
10990   echo "$ac_t""no" 1>&6
10991 krb5crypto=crypto
10992 fi
10993
10994
10995                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10996 echo "configure:10997: checking for main in -lkrb5" >&5
10997 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10998 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   ac_save_LIBS="$LIBS"
11002 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11003 cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006
11007 int main() {
11008 main()
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=yes"
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   eval "ac_cv_lib_$ac_lib_var=no"
11019 fi
11020 rm -f conftest*
11021 LIBS="$ac_save_LIBS"
11022
11023 fi
11024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11025   echo "$ac_t""yes" 1>&6
11026   have_krb5=yes
11027                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11028 else
11029   echo "$ac_t""no" 1>&6
11030 have_krb5=no
11031 fi
11032
11033
11034                         cat >> confdefs.h <<\EOF
11035 #define HAVE_HEIMDAL_KERBEROS 1
11036 EOF
11037
11038
11039                 else
11040                         have_krb5=no
11041                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11042                 fi
11043
11044                 if test $have_krb5 = yes ; then
11045                         ol_link_krb5=yes
11046
11047                         cat >> confdefs.h <<\EOF
11048 #define HAVE_KRB5 1
11049 EOF
11050
11051
11052                         if test $ol_with_kerberos = k5only ; then
11053                                 ol_with_kerberos=found
11054                         fi
11055
11056                 elif test $ol_with_kerberos != auto ; then
11057                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11058                 fi
11059
11060         fi
11061 fi
11062
11063 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11064         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11065
11066         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11067 do
11068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11070 echo "configure:11071: checking for $ac_hdr" >&5
11071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077 #include <$ac_hdr>
11078 EOF
11079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11080 { (eval echo configure:11081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11082 if test -z "$ac_err"; then
11083   rm -rf conftest*
11084   eval "ac_cv_header_$ac_safe=yes"
11085 else
11086   echo "$ac_err" >&5
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_header_$ac_safe=no"
11091 fi
11092 rm -f conftest*
11093 fi
11094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11097   cat >> confdefs.h <<EOF
11098 #define $ac_tr_hdr 1
11099 EOF
11100  
11101 else
11102   echo "$ac_t""no" 1>&6
11103 fi
11104 done
11105
11106
11107         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11108                 if test $krb5_impl = mit; then
11109                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11110 echo "configure:11111: checking for main in -lkrb4" >&5
11111 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11113   echo $ac_n "(cached) $ac_c" 1>&6
11114 else
11115   ac_save_LIBS="$LIBS"
11116 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120
11121 int main() {
11122 main()
11123 ; return 0; }
11124 EOF
11125 if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11126   rm -rf conftest*
11127   eval "ac_cv_lib_$ac_lib_var=yes"
11128 else
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -rf conftest*
11132   eval "ac_cv_lib_$ac_lib_var=no"
11133 fi
11134 rm -f conftest*
11135 LIBS="$ac_save_LIBS"
11136
11137 fi
11138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11139   echo "$ac_t""yes" 1>&6
11140   have_k425=yes
11141                                 KRB4_LIBS="-lkrb4 -ldes425"
11142 else
11143   echo "$ac_t""no" 1>&6
11144 have_k425=no
11145 fi
11146
11147
11148                 elif test $krb5_impl = heimdal; then
11149                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11150 echo "configure:11151: checking for main in -lkrb4" >&5
11151 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   ac_save_LIBS="$LIBS"
11156 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11157 cat > conftest.$ac_ext <<EOF
11158 #line 11159 "configure"
11159 #include "confdefs.h"
11160
11161 int main() {
11162 main()
11163 ; return 0; }
11164 EOF
11165 if { (eval echo configure:11166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11166   rm -rf conftest*
11167   eval "ac_cv_lib_$ac_lib_var=yes"
11168 else
11169   echo "configure: failed program was:" >&5
11170   cat conftest.$ac_ext >&5
11171   rm -rf conftest*
11172   eval "ac_cv_lib_$ac_lib_var=no"
11173 fi
11174 rm -f conftest*
11175 LIBS="$ac_save_LIBS"
11176
11177 fi
11178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11179   echo "$ac_t""yes" 1>&6
11180   have_k425=yes
11181                                 KRB4_LIBS="-lkrb4"
11182 else
11183   echo "$ac_t""no" 1>&6
11184 have_k425=no
11185 fi
11186
11187
11188                 else
11189                         have_425=no
11190                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11191                 fi
11192
11193                 if test $have_k425 = yes ; then
11194                         ol_with_kerberos=found
11195                         ol_link_krb4=yes
11196
11197                         cat >> confdefs.h <<\EOF
11198 #define HAVE_KRB425 1
11199 EOF
11200
11201                         cat >> confdefs.h <<\EOF
11202 #define HAVE_KRB4 1
11203 EOF
11204
11205
11206                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11207 echo "configure:11208: checking for des_debug in Kerberos libraries" >&5
11208 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   
11212                                                                 save_LIBS="$LIBS"
11213                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11214                                 cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217
11218 #include <kerberosIV/krb.h>
11219 #include <kerberosIV/des.h>
11220 extern int des_debug;
11221
11222 int main() {
11223
11224 des_debug = 1;
11225
11226 ; return 0; }
11227 EOF
11228 if { (eval echo configure:11229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11229   rm -rf conftest*
11230   ol_cv_var_des_debug=yes
11231 else
11232   echo "configure: failed program was:" >&5
11233   cat conftest.$ac_ext >&5
11234   rm -rf conftest*
11235   ol_cv_var_des_debug=no
11236 fi
11237 rm -f conftest*
11238                                                                 LIBS="$save_LIBS"
11239                         
11240 fi
11241
11242 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11243
11244                         if test $ol_cv_var_des_debug = yes ; then
11245                                 cat >> confdefs.h <<\EOF
11246 #define HAVE_DES_DEBUG 1
11247 EOF
11248
11249                         fi
11250
11251                         LIBS="$save_LIBS"
11252                 fi
11253         fi
11254 fi
11255
11256 if test $ol_link_krb5 = yes ; then
11257         ol_with_kerberos=found
11258 fi
11259
11260 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11261         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11262
11263         for ac_hdr in krb.h des.h krb-archaeology.h 
11264 do
11265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11267 echo "configure:11268: checking for $ac_hdr" >&5
11268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11269   echo $ac_n "(cached) $ac_c" 1>&6
11270 else
11271   cat > conftest.$ac_ext <<EOF
11272 #line 11273 "configure"
11273 #include "confdefs.h"
11274 #include <$ac_hdr>
11275 EOF
11276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11277 { (eval echo configure:11278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11279 if test -z "$ac_err"; then
11280   rm -rf conftest*
11281   eval "ac_cv_header_$ac_safe=yes"
11282 else
11283   echo "$ac_err" >&5
11284   echo "configure: failed program was:" >&5
11285   cat conftest.$ac_ext >&5
11286   rm -rf conftest*
11287   eval "ac_cv_header_$ac_safe=no"
11288 fi
11289 rm -f conftest*
11290 fi
11291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11292   echo "$ac_t""yes" 1>&6
11293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11294   cat >> confdefs.h <<EOF
11295 #define $ac_tr_hdr 1
11296 EOF
11297  
11298 else
11299   echo "$ac_t""no" 1>&6
11300 fi
11301 done
11302
11303
11304         if test $ac_cv_header_krb_h = yes ; then
11305                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11306 echo "configure:11307: checking for main in -lkrb" >&5
11307 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11309   echo $ac_n "(cached) $ac_c" 1>&6
11310 else
11311   ac_save_LIBS="$LIBS"
11312 LIBS="-lkrb -ldes $LIBS"
11313 cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316
11317 int main() {
11318 main()
11319 ; return 0; }
11320 EOF
11321 if { (eval echo configure:11322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11322   rm -rf conftest*
11323   eval "ac_cv_lib_$ac_lib_var=yes"
11324 else
11325   echo "configure: failed program was:" >&5
11326   cat conftest.$ac_ext >&5
11327   rm -rf conftest*
11328   eval "ac_cv_lib_$ac_lib_var=no"
11329 fi
11330 rm -f conftest*
11331 LIBS="$ac_save_LIBS"
11332
11333 fi
11334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11335   echo "$ac_t""yes" 1>&6
11336   have_k4=yes
11337 else
11338   echo "$ac_t""no" 1>&6
11339 have_k4=no
11340 fi
11341
11342
11343                 if test $have_k4 = yes ; then
11344                         ol_with_kerberos=found
11345                         ol_link_krb4=yes
11346
11347                         cat >> confdefs.h <<\EOF
11348 #define HAVE_KRB4 1
11349 EOF
11350
11351
11352                         KRB4_LIBS="-lkrb -ldes"
11353
11354                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11355                                 cat >> confdefs.h <<\EOF
11356 #define HAVE_KTH_KERBEROS 1
11357 EOF
11358
11359                         fi
11360                 fi
11361         fi
11362 fi
11363
11364 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11365         ol_link_kbind=yes
11366
11367 elif test $ol_enable_kbind = yes ; then
11368         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11369 fi
11370
11371 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11372         cat >> confdefs.h <<\EOF
11373 #define HAVE_KERBEROS 1
11374 EOF
11375
11376
11377 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11378         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11379 fi
11380
11381         
11382 ol_link_tls=no
11383 if test $ol_with_tls != no ; then
11384         for ac_hdr in openssl/ssl.h ssl.h
11385 do
11386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11388 echo "configure:11389: checking for $ac_hdr" >&5
11389 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11390   echo $ac_n "(cached) $ac_c" 1>&6
11391 else
11392   cat > conftest.$ac_ext <<EOF
11393 #line 11394 "configure"
11394 #include "confdefs.h"
11395 #include <$ac_hdr>
11396 EOF
11397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11398 { (eval echo configure:11399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11400 if test -z "$ac_err"; then
11401   rm -rf conftest*
11402   eval "ac_cv_header_$ac_safe=yes"
11403 else
11404   echo "$ac_err" >&5
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -rf conftest*
11408   eval "ac_cv_header_$ac_safe=no"
11409 fi
11410 rm -f conftest*
11411 fi
11412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11413   echo "$ac_t""yes" 1>&6
11414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11415   cat >> confdefs.h <<EOF
11416 #define $ac_tr_hdr 1
11417 EOF
11418  
11419 else
11420   echo "$ac_t""no" 1>&6
11421 fi
11422 done
11423
11424
11425         if test $ac_cv_header_openssl_ssl_h = yes \
11426                 -o $ac_cv_header_ssl_h = yes ; then
11427                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11428 echo "configure:11429: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11429 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   ac_save_LIBS="$LIBS"
11434 LIBS="-lssl -lcrypto $LIBS"
11435 cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 /* Override any gcc2 internal prototype to avoid an error.  */
11439 /* We use char because int might match the return type of a gcc2
11440     builtin and then its argument prototype would still apply.  */
11441 char SSLeay_add_ssl_algorithms();
11442
11443 int main() {
11444 SSLeay_add_ssl_algorithms()
11445 ; return 0; }
11446 EOF
11447 if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11448   rm -rf conftest*
11449   eval "ac_cv_lib_$ac_lib_var=yes"
11450 else
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   eval "ac_cv_lib_$ac_lib_var=no"
11455 fi
11456 rm -f conftest*
11457 LIBS="$ac_save_LIBS"
11458
11459 fi
11460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11461   echo "$ac_t""yes" 1>&6
11462   have_ssleay=yes
11463                         need_rsaref=no
11464 else
11465   echo "$ac_t""no" 1>&6
11466 have_ssleay=no
11467 fi
11468
11469                         
11470                 if test $have_ssleay = no ; then
11471                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11472 echo "configure:11473: checking for SSL_library_init in -lssl" >&5
11473 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11474 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11475   echo $ac_n "(cached) $ac_c" 1>&6
11476 else
11477   ac_save_LIBS="$LIBS"
11478 LIBS="-lssl -lcrypto $LIBS"
11479 cat > conftest.$ac_ext <<EOF
11480 #line 11481 "configure"
11481 #include "confdefs.h"
11482 /* Override any gcc2 internal prototype to avoid an error.  */
11483 /* We use char because int might match the return type of a gcc2
11484     builtin and then its argument prototype would still apply.  */
11485 char SSL_library_init();
11486
11487 int main() {
11488 SSL_library_init()
11489 ; return 0; }
11490 EOF
11491 if { (eval echo configure:11492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11492   rm -rf conftest*
11493   eval "ac_cv_lib_$ac_lib_var=yes"
11494 else
11495   echo "configure: failed program was:" >&5
11496   cat conftest.$ac_ext >&5
11497   rm -rf conftest*
11498   eval "ac_cv_lib_$ac_lib_var=no"
11499 fi
11500 rm -f conftest*
11501 LIBS="$ac_save_LIBS"
11502
11503 fi
11504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11505   echo "$ac_t""yes" 1>&6
11506   have_ssleay=yes
11507                                 need_rsaref=no
11508 else
11509   echo "$ac_t""no" 1>&6
11510 have_ssleay=no
11511 fi
11512
11513                 fi
11514
11515                 if test $have_ssleay = no ; then
11516                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11517 echo "configure:11518: checking for ssl3_accept in -lssl" >&5
11518 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11520   echo $ac_n "(cached) $ac_c" 1>&6
11521 else
11522   ac_save_LIBS="$LIBS"
11523 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 /* Override any gcc2 internal prototype to avoid an error.  */
11528 /* We use char because int might match the return type of a gcc2
11529     builtin and then its argument prototype would still apply.  */
11530 char ssl3_accept();
11531
11532 int main() {
11533 ssl3_accept()
11534 ; return 0; }
11535 EOF
11536 if { (eval echo configure:11537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11537   rm -rf conftest*
11538   eval "ac_cv_lib_$ac_lib_var=yes"
11539 else
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   eval "ac_cv_lib_$ac_lib_var=no"
11544 fi
11545 rm -f conftest*
11546 LIBS="$ac_save_LIBS"
11547
11548 fi
11549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11550   echo "$ac_t""yes" 1>&6
11551   have_ssleay=yes
11552                                 need_rsaref=yes
11553 else
11554   echo "$ac_t""no" 1>&6
11555 have_ssleay=no
11556 fi
11557
11558                 fi
11559
11560                 if test $have_ssleay = yes ; then
11561                         ol_with_tls=found
11562                         ol_link_tls=yes
11563
11564                         cat >> confdefs.h <<\EOF
11565 #define HAVE_SSLEAY 1
11566 EOF
11567
11568
11569                         if test $need_rsaref = yes; then
11570                                 cat >> confdefs.h <<\EOF
11571 #define HAVE_RSAREF 1
11572 EOF
11573
11574
11575                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11576                         else
11577                                 TLS_LIBS="-lssl -lcrypto"
11578                         fi
11579                 fi
11580                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11581 echo "configure:11582: checking OpenSSL library version (CRL checking capability)" >&5
11582 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   
11586         cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589
11590 #ifdef HAVE_OPENSSL_SSL_H
11591 #include <openssl/ssl.h>
11592 #else
11593 #include <ssl.h>
11594 #endif
11595
11596 /* Require 0.9.7d+ */
11597 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11598         char *__ssl_compat = "0.9.7d";
11599 #endif
11600         
11601 EOF
11602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11603   egrep "__ssl_compat" >/dev/null 2>&1; then
11604   rm -rf conftest*
11605   ol_cv_ssl_crl_compat=yes
11606 else
11607   rm -rf conftest*
11608   ol_cv_ssl_crl_compat=no
11609 fi
11610 rm -f conftest*
11611
11612 fi
11613
11614 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11615
11616                 if test $ol_cv_ssl_crl_compat = no ; then
11617                         ol_link_ssl=no
11618                 else 
11619                         cat >> confdefs.h <<\EOF
11620 #define HAVE_OPENSSL_CRL 1
11621 EOF
11622
11623                 fi
11624         fi
11625
11626 else
11627         echo "configure: warning: TLS data protection not supported!" 1>&2
11628 fi
11629
11630 WITH_TLS=no
11631 if test $ol_link_tls = yes ; then
11632         cat >> confdefs.h <<\EOF
11633 #define HAVE_TLS 1
11634 EOF
11635
11636         WITH_TLS=yes
11637
11638 elif test $ol_with_tls = auto ; then
11639         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11640         echo "configure: warning: TLS data protection not supported!" 1>&2
11641
11642 elif test $ol_with_tls != no ; then
11643         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11644 fi
11645
11646 if test $ol_enable_lmpasswd != no; then
11647         if test $ol_link_tls != yes ; then
11648                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11649         fi
11650
11651         cat >> confdefs.h <<\EOF
11652 #define SLAPD_LMHASH 1
11653 EOF
11654
11655 fi
11656
11657 ol_link_threads=no
11658
11659 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11660         -o $ol_with_threads = nt ; then
11661
11662         
11663         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11664 echo "configure:11665: checking for _beginthread" >&5
11665 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11666   echo $ac_n "(cached) $ac_c" 1>&6
11667 else
11668   cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671 /* System header to define __stub macros and hopefully few prototypes,
11672     which can conflict with char _beginthread(); below.  */
11673 #include <assert.h>
11674 /* Override any gcc2 internal prototype to avoid an error.  */
11675 /* We use char because int might match the return type of a gcc2
11676     builtin and then its argument prototype would still apply.  */
11677 char _beginthread();
11678 char (*f)();
11679
11680 int main() {
11681
11682 /* The GNU C library defines this for functions which it implements
11683     to always fail with ENOSYS.  Some functions are actually named
11684     something starting with __ and the normal name is an alias.  */
11685 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11686 choke me
11687 #else
11688 f = _beginthread;
11689 #endif
11690
11691 ; return 0; }
11692 EOF
11693 if { (eval echo configure:11694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11694   rm -rf conftest*
11695   eval "ac_cv_func__beginthread=yes"
11696 else
11697   echo "configure: failed program was:" >&5
11698   cat conftest.$ac_ext >&5
11699   rm -rf conftest*
11700   eval "ac_cv_func__beginthread=no"
11701 fi
11702 rm -f conftest*
11703 fi
11704
11705 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11706   echo "$ac_t""yes" 1>&6
11707   :
11708 else
11709   echo "$ac_t""no" 1>&6
11710 fi
11711
11712
11713         if test $ac_cv_func__beginthread = yes ; then
11714                 cat >> confdefs.h <<\EOF
11715 #define HAVE_NT_THREADS 1
11716 EOF
11717
11718                 ol_cv_nt_threads=yes
11719         fi
11720
11721
11722         if test "$ol_cv_nt_threads" = yes ; then
11723                 ol_link_threads=nt
11724                 ol_with_threads=found
11725                 ol_with_yielding_select=yes
11726
11727                 cat >> confdefs.h <<\EOF
11728 #define HAVE_NT_SERVICE_MANAGER 1
11729 EOF
11730
11731                 cat >> confdefs.h <<\EOF
11732 #define HAVE_NT_EVENT_LOG 1
11733 EOF
11734
11735         fi
11736
11737         if test $ol_with_threads = nt ; then
11738                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11739         fi
11740 fi
11741
11742 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11743         -o $ol_with_threads = posix ; then
11744
11745         for ac_hdr in pthread.h
11746 do
11747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11749 echo "configure:11750: checking for $ac_hdr" >&5
11750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11751   echo $ac_n "(cached) $ac_c" 1>&6
11752 else
11753   cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 #include <$ac_hdr>
11757 EOF
11758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11759 { (eval echo configure:11760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11761 if test -z "$ac_err"; then
11762   rm -rf conftest*
11763   eval "ac_cv_header_$ac_safe=yes"
11764 else
11765   echo "$ac_err" >&5
11766   echo "configure: failed program was:" >&5
11767   cat conftest.$ac_ext >&5
11768   rm -rf conftest*
11769   eval "ac_cv_header_$ac_safe=no"
11770 fi
11771 rm -f conftest*
11772 fi
11773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11774   echo "$ac_t""yes" 1>&6
11775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11776   cat >> confdefs.h <<EOF
11777 #define $ac_tr_hdr 1
11778 EOF
11779  
11780 else
11781   echo "$ac_t""no" 1>&6
11782 fi
11783 done
11784
11785
11786         if test $ac_cv_header_pthread_h = yes ; then
11787                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11788 echo "configure:11789: checking POSIX thread version" >&5
11789 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11790   echo $ac_n "(cached) $ac_c" 1>&6
11791 else
11792   
11793         cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796
11797 #               include <pthread.h>
11798         
11799 int main() {
11800
11801                 int i = PTHREAD_CREATE_JOINABLE;
11802         
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11806   rm -rf conftest*
11807   
11808         cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 #include <pthread.h>
11812 EOF
11813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11814   egrep "pthread_detach" >/dev/null 2>&1; then
11815   rm -rf conftest*
11816   ol_cv_pthread_version=10
11817 else
11818   rm -rf conftest*
11819   ol_cv_pthread_version=8
11820 fi
11821 rm -f conftest*
11822
11823 else
11824   echo "configure: failed program was:" >&5
11825   cat conftest.$ac_ext >&5
11826   rm -rf conftest*
11827   
11828         cat > conftest.$ac_ext <<EOF
11829 #line 11830 "configure"
11830 #include "confdefs.h"
11831
11832 #               include <pthread.h>
11833 #               ifdef PTHREAD_CREATE_UNDETACHED
11834                 draft7
11835 #               endif
11836         
11837 EOF
11838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11839   egrep "draft7" >/dev/null 2>&1; then
11840   rm -rf conftest*
11841   ol_cv_pthread_version=7
11842 else
11843   rm -rf conftest*
11844   
11845         cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 #include <pthread.h>
11849 EOF
11850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11851   egrep "pthread_attr_init" >/dev/null 2>&1; then
11852   rm -rf conftest*
11853   ol_cv_pthread_version=6
11854 else
11855   rm -rf conftest*
11856   
11857         cat > conftest.$ac_ext <<EOF
11858 #line 11859 "configure"
11859 #include "confdefs.h"
11860
11861 #               include <pthread.h>
11862 #ifdef          PTHREAD_MUTEX_INITIALIZER
11863                 draft5
11864 #endif
11865         
11866 EOF
11867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11868   egrep "draft5" >/dev/null 2>&1; then
11869   rm -rf conftest*
11870   ol_cv_pthread_version=5
11871 else
11872   rm -rf conftest*
11873   ol_cv_pthread_version=4
11874 fi
11875 rm -f conftest*
11876  
11877 fi
11878 rm -f conftest*
11879  
11880 fi
11881 rm -f conftest*
11882  
11883 fi
11884 rm -f conftest*
11885
11886 fi
11887
11888 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11889
11890
11891                 if test $ol_cv_pthread_version != 0 ; then
11892                         cat >> confdefs.h <<EOF
11893 #define HAVE_PTHREADS $ol_cv_pthread_version
11894 EOF
11895
11896                 else
11897                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11898                 fi
11899
11900                 # consider threads found
11901                 ol_with_threads=found
11902
11903                 
11904         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11905 echo "configure:11906: checking for LinuxThreads pthread.h" >&5
11906 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11907   echo $ac_n "(cached) $ac_c" 1>&6
11908 else
11909   cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912 #include <pthread.h>
11913 EOF
11914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11915   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11916   rm -rf conftest*
11917   ol_cv_header_linux_threads=yes
11918 else
11919   rm -rf conftest*
11920   ol_cv_header_linux_threads=no
11921 fi
11922 rm -f conftest*
11923
11924                 
11925 fi
11926
11927 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11928         if test $ol_cv_header_linux_threads = yes; then
11929                 cat >> confdefs.h <<\EOF
11930 #define HAVE_LINUX_THREADS 1
11931 EOF
11932
11933         fi
11934
11935                 
11936         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11937 echo "configure:11938: checking for GNU Pth pthread.h" >&5
11938 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11939   echo $ac_n "(cached) $ac_c" 1>&6
11940 else
11941   cat > conftest.$ac_ext <<EOF
11942 #line 11943 "configure"
11943 #include "confdefs.h"
11944 #include <pthread.h>
11945 #ifdef _POSIX_THREAD_IS_GNU_PTH
11946         __gnu_pth__;
11947 #endif
11948
11949 EOF
11950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11951   egrep "__gnu_pth__" >/dev/null 2>&1; then
11952   rm -rf conftest*
11953   ol_cv_header_gnu_pth_pthread_h=yes
11954 else
11955   rm -rf conftest*
11956   ol_cv_header_gnu_pth_pthread_h=no
11957 fi
11958 rm -f conftest*
11959
11960                 
11961 fi
11962
11963 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11964
11965
11966                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11967                         for ac_hdr in sched.h
11968 do
11969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11971 echo "configure:11972: checking for $ac_hdr" >&5
11972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11973   echo $ac_n "(cached) $ac_c" 1>&6
11974 else
11975   cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978 #include <$ac_hdr>
11979 EOF
11980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11981 { (eval echo configure:11982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11983 if test -z "$ac_err"; then
11984   rm -rf conftest*
11985   eval "ac_cv_header_$ac_safe=yes"
11986 else
11987   echo "$ac_err" >&5
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -rf conftest*
11991   eval "ac_cv_header_$ac_safe=no"
11992 fi
11993 rm -f conftest*
11994 fi
11995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11996   echo "$ac_t""yes" 1>&6
11997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11998   cat >> confdefs.h <<EOF
11999 #define $ac_tr_hdr 1
12000 EOF
12001  
12002 else
12003   echo "$ac_t""no" 1>&6
12004 fi
12005 done
12006
12007                 fi
12008
12009                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12010                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12011 echo "configure:12012: checking for pthread_create in default libraries" >&5
12012 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   
12016                 if test "$cross_compiling" = yes; then
12017   cat > conftest.$ac_ext <<EOF
12018 #line 12019 "configure"
12019 #include "confdefs.h"
12020 /* pthread test headers */
12021 #include <pthread.h>
12022 #if HAVE_PTHREADS < 7
12023 #include <errno.h>
12024 #endif
12025 #ifndef NULL
12026 #define NULL (void*)0
12027 #endif
12028
12029 static void *task(p)
12030         void *p;
12031 {
12032         return (void *) (p == NULL);
12033 }
12034
12035 int main() {
12036
12037         /* pthread test function */
12038 #ifndef PTHREAD_CREATE_DETACHED
12039 #define PTHREAD_CREATE_DETACHED 1
12040 #endif
12041         pthread_t t;
12042         int status;
12043         int detach = PTHREAD_CREATE_DETACHED;
12044
12045 #if HAVE_PTHREADS > 4
12046         /* Final pthreads */
12047         pthread_attr_t attr;
12048
12049         status = pthread_attr_init(&attr);
12050         if( status ) return status;
12051
12052 #if HAVE_PTHREADS < 7
12053         status = pthread_attr_setdetachstate(&attr, &detach);
12054         if( status < 0 ) status = errno;
12055 #else
12056         status = pthread_attr_setdetachstate(&attr, detach);
12057 #endif
12058         if( status ) return status;
12059         status = pthread_create( &t, &attr, task, NULL );
12060 #if HAVE_PTHREADS < 7
12061         if( status < 0 ) status = errno;
12062 #endif
12063         if( status ) return status;
12064 #else
12065         /* Draft 4 pthreads */
12066         status = pthread_create( &t, pthread_attr_default, task, NULL );
12067         if( status ) return errno;
12068
12069         /* give thread a chance to complete */
12070         /* it should remain joinable and hence detachable */
12071         sleep( 1 );
12072
12073         status = pthread_detach( &t );
12074         if( status ) return errno;
12075 #endif
12076
12077 #ifdef HAVE_LINUX_THREADS
12078         pthread_kill_other_threads_np();
12079 #endif
12080
12081         return 0;
12082
12083 ; return 0; }
12084 EOF
12085 if { (eval echo configure:12086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12086   rm -rf conftest*
12087   ol_cv_pthread_create=yes
12088 else
12089   echo "configure: failed program was:" >&5
12090   cat conftest.$ac_ext >&5
12091   rm -rf conftest*
12092   ol_cv_pthread_create=no
12093 fi
12094 rm -f conftest*
12095 else
12096   cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099 /* pthread test headers */
12100 #include <pthread.h>
12101 #if HAVE_PTHREADS < 7
12102 #include <errno.h>
12103 #endif
12104 #ifndef NULL
12105 #define NULL (void*)0
12106 #endif
12107
12108 static void *task(p)
12109         void *p;
12110 {
12111         return (void *) (p == NULL);
12112 }
12113
12114
12115 int main(argc, argv)
12116         int argc;
12117         char **argv;
12118 {
12119
12120         /* pthread test function */
12121 #ifndef PTHREAD_CREATE_DETACHED
12122 #define PTHREAD_CREATE_DETACHED 1
12123 #endif
12124         pthread_t t;
12125         int status;
12126         int detach = PTHREAD_CREATE_DETACHED;
12127
12128 #if HAVE_PTHREADS > 4
12129         /* Final pthreads */
12130         pthread_attr_t attr;
12131
12132         status = pthread_attr_init(&attr);
12133         if( status ) return status;
12134
12135 #if HAVE_PTHREADS < 7
12136         status = pthread_attr_setdetachstate(&attr, &detach);
12137         if( status < 0 ) status = errno;
12138 #else
12139         status = pthread_attr_setdetachstate(&attr, detach);
12140 #endif
12141         if( status ) return status;
12142         status = pthread_create( &t, &attr, task, NULL );
12143 #if HAVE_PTHREADS < 7
12144         if( status < 0 ) status = errno;
12145 #endif
12146         if( status ) return status;
12147 #else
12148         /* Draft 4 pthreads */
12149         status = pthread_create( &t, pthread_attr_default, task, NULL );
12150         if( status ) return errno;
12151
12152         /* give thread a chance to complete */
12153         /* it should remain joinable and hence detachable */
12154         sleep( 1 );
12155
12156         status = pthread_detach( &t );
12157         if( status ) return errno;
12158 #endif
12159
12160 #ifdef HAVE_LINUX_THREADS
12161         pthread_kill_other_threads_np();
12162 #endif
12163
12164         return 0;
12165
12166 }
12167
12168 EOF
12169 if { (eval echo configure:12170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12170 then
12171   ol_cv_pthread_create=yes
12172 else
12173   echo "configure: failed program was:" >&5
12174   cat conftest.$ac_ext >&5
12175   rm -fr conftest*
12176   ol_cv_pthread_create=no
12177 fi
12178 rm -fr conftest*
12179 fi
12180
12181 fi
12182
12183 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12184
12185                 if test $ol_cv_pthread_create != no ; then
12186                         ol_link_threads=posix
12187                         ol_link_pthreads=""
12188                 fi
12189                 
12190                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12191 if test "$ol_link_threads" = no ; then
12192         # try -kthread
12193         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12194 echo "configure:12195: checking for pthread link with -kthread" >&5
12195 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12196   echo $ac_n "(cached) $ac_c" 1>&6
12197 else
12198   
12199                 # save the flags
12200                 ol_LIBS="$LIBS"
12201                 LIBS="-kthread $LIBS"
12202
12203                 if test "$cross_compiling" = yes; then
12204   cat > conftest.$ac_ext <<EOF
12205 #line 12206 "configure"
12206 #include "confdefs.h"
12207 /* pthread test headers */
12208 #include <pthread.h>
12209 #if HAVE_PTHREADS < 7
12210 #include <errno.h>
12211 #endif
12212 #ifndef NULL
12213 #define NULL (void*)0
12214 #endif
12215
12216 static void *task(p)
12217         void *p;
12218 {
12219         return (void *) (p == NULL);
12220 }
12221
12222 int main() {
12223
12224         /* pthread test function */
12225 #ifndef PTHREAD_CREATE_DETACHED
12226 #define PTHREAD_CREATE_DETACHED 1
12227 #endif
12228         pthread_t t;
12229         int status;
12230         int detach = PTHREAD_CREATE_DETACHED;
12231
12232 #if HAVE_PTHREADS > 4
12233         /* Final pthreads */
12234         pthread_attr_t attr;
12235
12236         status = pthread_attr_init(&attr);
12237         if( status ) return status;
12238
12239 #if HAVE_PTHREADS < 7
12240         status = pthread_attr_setdetachstate(&attr, &detach);
12241         if( status < 0 ) status = errno;
12242 #else
12243         status = pthread_attr_setdetachstate(&attr, detach);
12244 #endif
12245         if( status ) return status;
12246         status = pthread_create( &t, &attr, task, NULL );
12247 #if HAVE_PTHREADS < 7
12248         if( status < 0 ) status = errno;
12249 #endif
12250         if( status ) return status;
12251 #else
12252         /* Draft 4 pthreads */
12253         status = pthread_create( &t, pthread_attr_default, task, NULL );
12254         if( status ) return errno;
12255
12256         /* give thread a chance to complete */
12257         /* it should remain joinable and hence detachable */
12258         sleep( 1 );
12259
12260         status = pthread_detach( &t );
12261         if( status ) return errno;
12262 #endif
12263
12264 #ifdef HAVE_LINUX_THREADS
12265         pthread_kill_other_threads_np();
12266 #endif
12267
12268         return 0;
12269
12270 ; return 0; }
12271 EOF
12272 if { (eval echo configure:12273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12273   rm -rf conftest*
12274   ol_cv_pthread_kthread=yes
12275 else
12276   echo "configure: failed program was:" >&5
12277   cat conftest.$ac_ext >&5
12278   rm -rf conftest*
12279   ol_cv_pthread_kthread=no
12280 fi
12281 rm -f conftest*
12282 else
12283   cat > conftest.$ac_ext <<EOF
12284 #line 12285 "configure"
12285 #include "confdefs.h"
12286 /* pthread test headers */
12287 #include <pthread.h>
12288 #if HAVE_PTHREADS < 7
12289 #include <errno.h>
12290 #endif
12291 #ifndef NULL
12292 #define NULL (void*)0
12293 #endif
12294
12295 static void *task(p)
12296         void *p;
12297 {
12298         return (void *) (p == NULL);
12299 }
12300
12301
12302 int main(argc, argv)
12303         int argc;
12304         char **argv;
12305 {
12306
12307         /* pthread test function */
12308 #ifndef PTHREAD_CREATE_DETACHED
12309 #define PTHREAD_CREATE_DETACHED 1
12310 #endif
12311         pthread_t t;
12312         int status;
12313         int detach = PTHREAD_CREATE_DETACHED;
12314
12315 #if HAVE_PTHREADS > 4
12316         /* Final pthreads */
12317         pthread_attr_t attr;
12318
12319         status = pthread_attr_init(&attr);
12320         if( status ) return status;
12321
12322 #if HAVE_PTHREADS < 7
12323         status = pthread_attr_setdetachstate(&attr, &detach);
12324         if( status < 0 ) status = errno;
12325 #else
12326         status = pthread_attr_setdetachstate(&attr, detach);
12327 #endif
12328         if( status ) return status;
12329         status = pthread_create( &t, &attr, task, NULL );
12330 #if HAVE_PTHREADS < 7
12331         if( status < 0 ) status = errno;
12332 #endif
12333         if( status ) return status;
12334 #else
12335         /* Draft 4 pthreads */
12336         status = pthread_create( &t, pthread_attr_default, task, NULL );
12337         if( status ) return errno;
12338
12339         /* give thread a chance to complete */
12340         /* it should remain joinable and hence detachable */
12341         sleep( 1 );
12342
12343         status = pthread_detach( &t );
12344         if( status ) return errno;
12345 #endif
12346
12347 #ifdef HAVE_LINUX_THREADS
12348         pthread_kill_other_threads_np();
12349 #endif
12350
12351         return 0;
12352
12353 }
12354
12355 EOF
12356 if { (eval echo configure:12357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12357 then
12358   ol_cv_pthread_kthread=yes
12359 else
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   rm -fr conftest*
12363   ol_cv_pthread_kthread=no
12364 fi
12365 rm -fr conftest*
12366 fi
12367
12368
12369                 # restore the LIBS
12370                 LIBS="$ol_LIBS"
12371         
12372 fi
12373
12374 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12375
12376         if test $ol_cv_pthread_kthread = yes ; then
12377                 ol_link_pthreads="-kthread"
12378                 ol_link_threads=posix
12379         fi
12380 fi
12381
12382                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12383 if test "$ol_link_threads" = no ; then
12384         # try -pthread
12385         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12386 echo "configure:12387: checking for pthread link with -pthread" >&5
12387 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12388   echo $ac_n "(cached) $ac_c" 1>&6
12389 else
12390   
12391                 # save the flags
12392                 ol_LIBS="$LIBS"
12393                 LIBS="-pthread $LIBS"
12394
12395                 if test "$cross_compiling" = yes; then
12396   cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 /* pthread test headers */
12400 #include <pthread.h>
12401 #if HAVE_PTHREADS < 7
12402 #include <errno.h>
12403 #endif
12404 #ifndef NULL
12405 #define NULL (void*)0
12406 #endif
12407
12408 static void *task(p)
12409         void *p;
12410 {
12411         return (void *) (p == NULL);
12412 }
12413
12414 int main() {
12415
12416         /* pthread test function */
12417 #ifndef PTHREAD_CREATE_DETACHED
12418 #define PTHREAD_CREATE_DETACHED 1
12419 #endif
12420         pthread_t t;
12421         int status;
12422         int detach = PTHREAD_CREATE_DETACHED;
12423
12424 #if HAVE_PTHREADS > 4
12425         /* Final pthreads */
12426         pthread_attr_t attr;
12427
12428         status = pthread_attr_init(&attr);
12429         if( status ) return status;
12430
12431 #if HAVE_PTHREADS < 7
12432         status = pthread_attr_setdetachstate(&attr, &detach);
12433         if( status < 0 ) status = errno;
12434 #else
12435         status = pthread_attr_setdetachstate(&attr, detach);
12436 #endif
12437         if( status ) return status;
12438         status = pthread_create( &t, &attr, task, NULL );
12439 #if HAVE_PTHREADS < 7
12440         if( status < 0 ) status = errno;
12441 #endif
12442         if( status ) return status;
12443 #else
12444         /* Draft 4 pthreads */
12445         status = pthread_create( &t, pthread_attr_default, task, NULL );
12446         if( status ) return errno;
12447
12448         /* give thread a chance to complete */
12449         /* it should remain joinable and hence detachable */
12450         sleep( 1 );
12451
12452         status = pthread_detach( &t );
12453         if( status ) return errno;
12454 #endif
12455
12456 #ifdef HAVE_LINUX_THREADS
12457         pthread_kill_other_threads_np();
12458 #endif
12459
12460         return 0;
12461
12462 ; return 0; }
12463 EOF
12464 if { (eval echo configure:12465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12465   rm -rf conftest*
12466   ol_cv_pthread_pthread=yes
12467 else
12468   echo "configure: failed program was:" >&5
12469   cat conftest.$ac_ext >&5
12470   rm -rf conftest*
12471   ol_cv_pthread_pthread=no
12472 fi
12473 rm -f conftest*
12474 else
12475   cat > conftest.$ac_ext <<EOF
12476 #line 12477 "configure"
12477 #include "confdefs.h"
12478 /* pthread test headers */
12479 #include <pthread.h>
12480 #if HAVE_PTHREADS < 7
12481 #include <errno.h>
12482 #endif
12483 #ifndef NULL
12484 #define NULL (void*)0
12485 #endif
12486
12487 static void *task(p)
12488         void *p;
12489 {
12490         return (void *) (p == NULL);
12491 }
12492
12493
12494 int main(argc, argv)
12495         int argc;
12496         char **argv;
12497 {
12498
12499         /* pthread test function */
12500 #ifndef PTHREAD_CREATE_DETACHED
12501 #define PTHREAD_CREATE_DETACHED 1
12502 #endif
12503         pthread_t t;
12504         int status;
12505         int detach = PTHREAD_CREATE_DETACHED;
12506
12507 #if HAVE_PTHREADS > 4
12508         /* Final pthreads */
12509         pthread_attr_t attr;
12510
12511         status = pthread_attr_init(&attr);
12512         if( status ) return status;
12513
12514 #if HAVE_PTHREADS < 7
12515         status = pthread_attr_setdetachstate(&attr, &detach);
12516         if( status < 0 ) status = errno;
12517 #else
12518         status = pthread_attr_setdetachstate(&attr, detach);
12519 #endif
12520         if( status ) return status;
12521         status = pthread_create( &t, &attr, task, NULL );
12522 #if HAVE_PTHREADS < 7
12523         if( status < 0 ) status = errno;
12524 #endif
12525         if( status ) return status;
12526 #else
12527         /* Draft 4 pthreads */
12528         status = pthread_create( &t, pthread_attr_default, task, NULL );
12529         if( status ) return errno;
12530
12531         /* give thread a chance to complete */
12532         /* it should remain joinable and hence detachable */
12533         sleep( 1 );
12534
12535         status = pthread_detach( &t );
12536         if( status ) return errno;
12537 #endif
12538
12539 #ifdef HAVE_LINUX_THREADS
12540         pthread_kill_other_threads_np();
12541 #endif
12542
12543         return 0;
12544
12545 }
12546
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12549 then
12550   ol_cv_pthread_pthread=yes
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -fr conftest*
12555   ol_cv_pthread_pthread=no
12556 fi
12557 rm -fr conftest*
12558 fi
12559
12560
12561                 # restore the LIBS
12562                 LIBS="$ol_LIBS"
12563         
12564 fi
12565
12566 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12567
12568         if test $ol_cv_pthread_pthread = yes ; then
12569                 ol_link_pthreads="-pthread"
12570                 ol_link_threads=posix
12571         fi
12572 fi
12573
12574                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12575 if test "$ol_link_threads" = no ; then
12576         # try -pthreads
12577         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12578 echo "configure:12579: checking for pthread link with -pthreads" >&5
12579 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12580   echo $ac_n "(cached) $ac_c" 1>&6
12581 else
12582   
12583                 # save the flags
12584                 ol_LIBS="$LIBS"
12585                 LIBS="-pthreads $LIBS"
12586
12587                 if test "$cross_compiling" = yes; then
12588   cat > conftest.$ac_ext <<EOF
12589 #line 12590 "configure"
12590 #include "confdefs.h"
12591 /* pthread test headers */
12592 #include <pthread.h>
12593 #if HAVE_PTHREADS < 7
12594 #include <errno.h>
12595 #endif
12596 #ifndef NULL
12597 #define NULL (void*)0
12598 #endif
12599
12600 static void *task(p)
12601         void *p;
12602 {
12603         return (void *) (p == NULL);
12604 }
12605
12606 int main() {
12607
12608         /* pthread test function */
12609 #ifndef PTHREAD_CREATE_DETACHED
12610 #define PTHREAD_CREATE_DETACHED 1
12611 #endif
12612         pthread_t t;
12613         int status;
12614         int detach = PTHREAD_CREATE_DETACHED;
12615
12616 #if HAVE_PTHREADS > 4
12617         /* Final pthreads */
12618         pthread_attr_t attr;
12619
12620         status = pthread_attr_init(&attr);
12621         if( status ) return status;
12622
12623 #if HAVE_PTHREADS < 7
12624         status = pthread_attr_setdetachstate(&attr, &detach);
12625         if( status < 0 ) status = errno;
12626 #else
12627         status = pthread_attr_setdetachstate(&attr, detach);
12628 #endif
12629         if( status ) return status;
12630         status = pthread_create( &t, &attr, task, NULL );
12631 #if HAVE_PTHREADS < 7
12632         if( status < 0 ) status = errno;
12633 #endif
12634         if( status ) return status;
12635 #else
12636         /* Draft 4 pthreads */
12637         status = pthread_create( &t, pthread_attr_default, task, NULL );
12638         if( status ) return errno;
12639
12640         /* give thread a chance to complete */
12641         /* it should remain joinable and hence detachable */
12642         sleep( 1 );
12643
12644         status = pthread_detach( &t );
12645         if( status ) return errno;
12646 #endif
12647
12648 #ifdef HAVE_LINUX_THREADS
12649         pthread_kill_other_threads_np();
12650 #endif
12651
12652         return 0;
12653
12654 ; return 0; }
12655 EOF
12656 if { (eval echo configure:12657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12657   rm -rf conftest*
12658   ol_cv_pthread_pthreads=yes
12659 else
12660   echo "configure: failed program was:" >&5
12661   cat conftest.$ac_ext >&5
12662   rm -rf conftest*
12663   ol_cv_pthread_pthreads=no
12664 fi
12665 rm -f conftest*
12666 else
12667   cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* pthread test headers */
12671 #include <pthread.h>
12672 #if HAVE_PTHREADS < 7
12673 #include <errno.h>
12674 #endif
12675 #ifndef NULL
12676 #define NULL (void*)0
12677 #endif
12678
12679 static void *task(p)
12680         void *p;
12681 {
12682         return (void *) (p == NULL);
12683 }
12684
12685
12686 int main(argc, argv)
12687         int argc;
12688         char **argv;
12689 {
12690
12691         /* pthread test function */
12692 #ifndef PTHREAD_CREATE_DETACHED
12693 #define PTHREAD_CREATE_DETACHED 1
12694 #endif
12695         pthread_t t;
12696         int status;
12697         int detach = PTHREAD_CREATE_DETACHED;
12698
12699 #if HAVE_PTHREADS > 4
12700         /* Final pthreads */
12701         pthread_attr_t attr;
12702
12703         status = pthread_attr_init(&attr);
12704         if( status ) return status;
12705
12706 #if HAVE_PTHREADS < 7
12707         status = pthread_attr_setdetachstate(&attr, &detach);
12708         if( status < 0 ) status = errno;
12709 #else
12710         status = pthread_attr_setdetachstate(&attr, detach);
12711 #endif
12712         if( status ) return status;
12713         status = pthread_create( &t, &attr, task, NULL );
12714 #if HAVE_PTHREADS < 7
12715         if( status < 0 ) status = errno;
12716 #endif
12717         if( status ) return status;
12718 #else
12719         /* Draft 4 pthreads */
12720         status = pthread_create( &t, pthread_attr_default, task, NULL );
12721         if( status ) return errno;
12722
12723         /* give thread a chance to complete */
12724         /* it should remain joinable and hence detachable */
12725         sleep( 1 );
12726
12727         status = pthread_detach( &t );
12728         if( status ) return errno;
12729 #endif
12730
12731 #ifdef HAVE_LINUX_THREADS
12732         pthread_kill_other_threads_np();
12733 #endif
12734
12735         return 0;
12736
12737 }
12738
12739 EOF
12740 if { (eval echo configure:12741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12741 then
12742   ol_cv_pthread_pthreads=yes
12743 else
12744   echo "configure: failed program was:" >&5
12745   cat conftest.$ac_ext >&5
12746   rm -fr conftest*
12747   ol_cv_pthread_pthreads=no
12748 fi
12749 rm -fr conftest*
12750 fi
12751
12752
12753                 # restore the LIBS
12754                 LIBS="$ol_LIBS"
12755         
12756 fi
12757
12758 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12759
12760         if test $ol_cv_pthread_pthreads = yes ; then
12761                 ol_link_pthreads="-pthreads"
12762                 ol_link_threads=posix
12763         fi
12764 fi
12765
12766                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12767 if test "$ol_link_threads" = no ; then
12768         # try -mthreads
12769         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12770 echo "configure:12771: checking for pthread link with -mthreads" >&5
12771 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12772   echo $ac_n "(cached) $ac_c" 1>&6
12773 else
12774   
12775                 # save the flags
12776                 ol_LIBS="$LIBS"
12777                 LIBS="-mthreads $LIBS"
12778
12779                 if test "$cross_compiling" = yes; then
12780   cat > conftest.$ac_ext <<EOF
12781 #line 12782 "configure"
12782 #include "confdefs.h"
12783 /* pthread test headers */
12784 #include <pthread.h>
12785 #if HAVE_PTHREADS < 7
12786 #include <errno.h>
12787 #endif
12788 #ifndef NULL
12789 #define NULL (void*)0
12790 #endif
12791
12792 static void *task(p)
12793         void *p;
12794 {
12795         return (void *) (p == NULL);
12796 }
12797
12798 int main() {
12799
12800         /* pthread test function */
12801 #ifndef PTHREAD_CREATE_DETACHED
12802 #define PTHREAD_CREATE_DETACHED 1
12803 #endif
12804         pthread_t t;
12805         int status;
12806         int detach = PTHREAD_CREATE_DETACHED;
12807
12808 #if HAVE_PTHREADS > 4
12809         /* Final pthreads */
12810         pthread_attr_t attr;
12811
12812         status = pthread_attr_init(&attr);
12813         if( status ) return status;
12814
12815 #if HAVE_PTHREADS < 7
12816         status = pthread_attr_setdetachstate(&attr, &detach);
12817         if( status < 0 ) status = errno;
12818 #else
12819         status = pthread_attr_setdetachstate(&attr, detach);
12820 #endif
12821         if( status ) return status;
12822         status = pthread_create( &t, &attr, task, NULL );
12823 #if HAVE_PTHREADS < 7
12824         if( status < 0 ) status = errno;
12825 #endif
12826         if( status ) return status;
12827 #else
12828         /* Draft 4 pthreads */
12829         status = pthread_create( &t, pthread_attr_default, task, NULL );
12830         if( status ) return errno;
12831
12832         /* give thread a chance to complete */
12833         /* it should remain joinable and hence detachable */
12834         sleep( 1 );
12835
12836         status = pthread_detach( &t );
12837         if( status ) return errno;
12838 #endif
12839
12840 #ifdef HAVE_LINUX_THREADS
12841         pthread_kill_other_threads_np();
12842 #endif
12843
12844         return 0;
12845
12846 ; return 0; }
12847 EOF
12848 if { (eval echo configure:12849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12849   rm -rf conftest*
12850   ol_cv_pthread_mthreads=yes
12851 else
12852   echo "configure: failed program was:" >&5
12853   cat conftest.$ac_ext >&5
12854   rm -rf conftest*
12855   ol_cv_pthread_mthreads=no
12856 fi
12857 rm -f conftest*
12858 else
12859   cat > conftest.$ac_ext <<EOF
12860 #line 12861 "configure"
12861 #include "confdefs.h"
12862 /* pthread test headers */
12863 #include <pthread.h>
12864 #if HAVE_PTHREADS < 7
12865 #include <errno.h>
12866 #endif
12867 #ifndef NULL
12868 #define NULL (void*)0
12869 #endif
12870
12871 static void *task(p)
12872         void *p;
12873 {
12874         return (void *) (p == NULL);
12875 }
12876
12877
12878 int main(argc, argv)
12879         int argc;
12880         char **argv;
12881 {
12882
12883         /* pthread test function */
12884 #ifndef PTHREAD_CREATE_DETACHED
12885 #define PTHREAD_CREATE_DETACHED 1
12886 #endif
12887         pthread_t t;
12888         int status;
12889         int detach = PTHREAD_CREATE_DETACHED;
12890
12891 #if HAVE_PTHREADS > 4
12892         /* Final pthreads */
12893         pthread_attr_t attr;
12894
12895         status = pthread_attr_init(&attr);
12896         if( status ) return status;
12897
12898 #if HAVE_PTHREADS < 7
12899         status = pthread_attr_setdetachstate(&attr, &detach);
12900         if( status < 0 ) status = errno;
12901 #else
12902         status = pthread_attr_setdetachstate(&attr, detach);
12903 #endif
12904         if( status ) return status;
12905         status = pthread_create( &t, &attr, task, NULL );
12906 #if HAVE_PTHREADS < 7
12907         if( status < 0 ) status = errno;
12908 #endif
12909         if( status ) return status;
12910 #else
12911         /* Draft 4 pthreads */
12912         status = pthread_create( &t, pthread_attr_default, task, NULL );
12913         if( status ) return errno;
12914
12915         /* give thread a chance to complete */
12916         /* it should remain joinable and hence detachable */
12917         sleep( 1 );
12918
12919         status = pthread_detach( &t );
12920         if( status ) return errno;
12921 #endif
12922
12923 #ifdef HAVE_LINUX_THREADS
12924         pthread_kill_other_threads_np();
12925 #endif
12926
12927         return 0;
12928
12929 }
12930
12931 EOF
12932 if { (eval echo configure:12933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12933 then
12934   ol_cv_pthread_mthreads=yes
12935 else
12936   echo "configure: failed program was:" >&5
12937   cat conftest.$ac_ext >&5
12938   rm -fr conftest*
12939   ol_cv_pthread_mthreads=no
12940 fi
12941 rm -fr conftest*
12942 fi
12943
12944
12945                 # restore the LIBS
12946                 LIBS="$ol_LIBS"
12947         
12948 fi
12949
12950 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12951
12952         if test $ol_cv_pthread_mthreads = yes ; then
12953                 ol_link_pthreads="-mthreads"
12954                 ol_link_threads=posix
12955         fi
12956 fi
12957
12958                 # Pthread try link: -thread (ol_cv_pthread_thread)
12959 if test "$ol_link_threads" = no ; then
12960         # try -thread
12961         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12962 echo "configure:12963: checking for pthread link with -thread" >&5
12963 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12964   echo $ac_n "(cached) $ac_c" 1>&6
12965 else
12966   
12967                 # save the flags
12968                 ol_LIBS="$LIBS"
12969                 LIBS="-thread $LIBS"
12970
12971                 if test "$cross_compiling" = yes; then
12972   cat > conftest.$ac_ext <<EOF
12973 #line 12974 "configure"
12974 #include "confdefs.h"
12975 /* pthread test headers */
12976 #include <pthread.h>
12977 #if HAVE_PTHREADS < 7
12978 #include <errno.h>
12979 #endif
12980 #ifndef NULL
12981 #define NULL (void*)0
12982 #endif
12983
12984 static void *task(p)
12985         void *p;
12986 {
12987         return (void *) (p == NULL);
12988 }
12989
12990 int main() {
12991
12992         /* pthread test function */
12993 #ifndef PTHREAD_CREATE_DETACHED
12994 #define PTHREAD_CREATE_DETACHED 1
12995 #endif
12996         pthread_t t;
12997         int status;
12998         int detach = PTHREAD_CREATE_DETACHED;
12999
13000 #if HAVE_PTHREADS > 4
13001         /* Final pthreads */
13002         pthread_attr_t attr;
13003
13004         status = pthread_attr_init(&attr);
13005         if( status ) return status;
13006
13007 #if HAVE_PTHREADS < 7
13008         status = pthread_attr_setdetachstate(&attr, &detach);
13009         if( status < 0 ) status = errno;
13010 #else
13011         status = pthread_attr_setdetachstate(&attr, detach);
13012 #endif
13013         if( status ) return status;
13014         status = pthread_create( &t, &attr, task, NULL );
13015 #if HAVE_PTHREADS < 7
13016         if( status < 0 ) status = errno;
13017 #endif
13018         if( status ) return status;
13019 #else
13020         /* Draft 4 pthreads */
13021         status = pthread_create( &t, pthread_attr_default, task, NULL );
13022         if( status ) return errno;
13023
13024         /* give thread a chance to complete */
13025         /* it should remain joinable and hence detachable */
13026         sleep( 1 );
13027
13028         status = pthread_detach( &t );
13029         if( status ) return errno;
13030 #endif
13031
13032 #ifdef HAVE_LINUX_THREADS
13033         pthread_kill_other_threads_np();
13034 #endif
13035
13036         return 0;
13037
13038 ; return 0; }
13039 EOF
13040 if { (eval echo configure:13041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13041   rm -rf conftest*
13042   ol_cv_pthread_thread=yes
13043 else
13044   echo "configure: failed program was:" >&5
13045   cat conftest.$ac_ext >&5
13046   rm -rf conftest*
13047   ol_cv_pthread_thread=no
13048 fi
13049 rm -f conftest*
13050 else
13051   cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054 /* pthread test headers */
13055 #include <pthread.h>
13056 #if HAVE_PTHREADS < 7
13057 #include <errno.h>
13058 #endif
13059 #ifndef NULL
13060 #define NULL (void*)0
13061 #endif
13062
13063 static void *task(p)
13064         void *p;
13065 {
13066         return (void *) (p == NULL);
13067 }
13068
13069
13070 int main(argc, argv)
13071         int argc;
13072         char **argv;
13073 {
13074
13075         /* pthread test function */
13076 #ifndef PTHREAD_CREATE_DETACHED
13077 #define PTHREAD_CREATE_DETACHED 1
13078 #endif
13079         pthread_t t;
13080         int status;
13081         int detach = PTHREAD_CREATE_DETACHED;
13082
13083 #if HAVE_PTHREADS > 4
13084         /* Final pthreads */
13085         pthread_attr_t attr;
13086
13087         status = pthread_attr_init(&attr);
13088         if( status ) return status;
13089
13090 #if HAVE_PTHREADS < 7
13091         status = pthread_attr_setdetachstate(&attr, &detach);
13092         if( status < 0 ) status = errno;
13093 #else
13094         status = pthread_attr_setdetachstate(&attr, detach);
13095 #endif
13096         if( status ) return status;
13097         status = pthread_create( &t, &attr, task, NULL );
13098 #if HAVE_PTHREADS < 7
13099         if( status < 0 ) status = errno;
13100 #endif
13101         if( status ) return status;
13102 #else
13103         /* Draft 4 pthreads */
13104         status = pthread_create( &t, pthread_attr_default, task, NULL );
13105         if( status ) return errno;
13106
13107         /* give thread a chance to complete */
13108         /* it should remain joinable and hence detachable */
13109         sleep( 1 );
13110
13111         status = pthread_detach( &t );
13112         if( status ) return errno;
13113 #endif
13114
13115 #ifdef HAVE_LINUX_THREADS
13116         pthread_kill_other_threads_np();
13117 #endif
13118
13119         return 0;
13120
13121 }
13122
13123 EOF
13124 if { (eval echo configure:13125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13125 then
13126   ol_cv_pthread_thread=yes
13127 else
13128   echo "configure: failed program was:" >&5
13129   cat conftest.$ac_ext >&5
13130   rm -fr conftest*
13131   ol_cv_pthread_thread=no
13132 fi
13133 rm -fr conftest*
13134 fi
13135
13136
13137                 # restore the LIBS
13138                 LIBS="$ol_LIBS"
13139         
13140 fi
13141
13142 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13143
13144         if test $ol_cv_pthread_thread = yes ; then
13145                 ol_link_pthreads="-thread"
13146                 ol_link_threads=posix
13147         fi
13148 fi
13149
13150
13151                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13152 if test "$ol_link_threads" = no ; then
13153         # try -lpthread -lmach -lexc -lc_r
13154         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13155 echo "configure:13156: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13156 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13157   echo $ac_n "(cached) $ac_c" 1>&6
13158 else
13159   
13160                 # save the flags
13161                 ol_LIBS="$LIBS"
13162                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13163
13164                 if test "$cross_compiling" = yes; then
13165   cat > conftest.$ac_ext <<EOF
13166 #line 13167 "configure"
13167 #include "confdefs.h"
13168 /* pthread test headers */
13169 #include <pthread.h>
13170 #if HAVE_PTHREADS < 7
13171 #include <errno.h>
13172 #endif
13173 #ifndef NULL
13174 #define NULL (void*)0
13175 #endif
13176
13177 static void *task(p)
13178         void *p;
13179 {
13180         return (void *) (p == NULL);
13181 }
13182
13183 int main() {
13184
13185         /* pthread test function */
13186 #ifndef PTHREAD_CREATE_DETACHED
13187 #define PTHREAD_CREATE_DETACHED 1
13188 #endif
13189         pthread_t t;
13190         int status;
13191         int detach = PTHREAD_CREATE_DETACHED;
13192
13193 #if HAVE_PTHREADS > 4
13194         /* Final pthreads */
13195         pthread_attr_t attr;
13196
13197         status = pthread_attr_init(&attr);
13198         if( status ) return status;
13199
13200 #if HAVE_PTHREADS < 7
13201         status = pthread_attr_setdetachstate(&attr, &detach);
13202         if( status < 0 ) status = errno;
13203 #else
13204         status = pthread_attr_setdetachstate(&attr, detach);
13205 #endif
13206         if( status ) return status;
13207         status = pthread_create( &t, &attr, task, NULL );
13208 #if HAVE_PTHREADS < 7
13209         if( status < 0 ) status = errno;
13210 #endif
13211         if( status ) return status;
13212 #else
13213         /* Draft 4 pthreads */
13214         status = pthread_create( &t, pthread_attr_default, task, NULL );
13215         if( status ) return errno;
13216
13217         /* give thread a chance to complete */
13218         /* it should remain joinable and hence detachable */
13219         sleep( 1 );
13220
13221         status = pthread_detach( &t );
13222         if( status ) return errno;
13223 #endif
13224
13225 #ifdef HAVE_LINUX_THREADS
13226         pthread_kill_other_threads_np();
13227 #endif
13228
13229         return 0;
13230
13231 ; return 0; }
13232 EOF
13233 if { (eval echo configure:13234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13234   rm -rf conftest*
13235   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13236 else
13237   echo "configure: failed program was:" >&5
13238   cat conftest.$ac_ext >&5
13239   rm -rf conftest*
13240   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13241 fi
13242 rm -f conftest*
13243 else
13244   cat > conftest.$ac_ext <<EOF
13245 #line 13246 "configure"
13246 #include "confdefs.h"
13247 /* pthread test headers */
13248 #include <pthread.h>
13249 #if HAVE_PTHREADS < 7
13250 #include <errno.h>
13251 #endif
13252 #ifndef NULL
13253 #define NULL (void*)0
13254 #endif
13255
13256 static void *task(p)
13257         void *p;
13258 {
13259         return (void *) (p == NULL);
13260 }
13261
13262
13263 int main(argc, argv)
13264         int argc;
13265         char **argv;
13266 {
13267
13268         /* pthread test function */
13269 #ifndef PTHREAD_CREATE_DETACHED
13270 #define PTHREAD_CREATE_DETACHED 1
13271 #endif
13272         pthread_t t;
13273         int status;
13274         int detach = PTHREAD_CREATE_DETACHED;
13275
13276 #if HAVE_PTHREADS > 4
13277         /* Final pthreads */
13278         pthread_attr_t attr;
13279
13280         status = pthread_attr_init(&attr);
13281         if( status ) return status;
13282
13283 #if HAVE_PTHREADS < 7
13284         status = pthread_attr_setdetachstate(&attr, &detach);
13285         if( status < 0 ) status = errno;
13286 #else
13287         status = pthread_attr_setdetachstate(&attr, detach);
13288 #endif
13289         if( status ) return status;
13290         status = pthread_create( &t, &attr, task, NULL );
13291 #if HAVE_PTHREADS < 7
13292         if( status < 0 ) status = errno;
13293 #endif
13294         if( status ) return status;
13295 #else
13296         /* Draft 4 pthreads */
13297         status = pthread_create( &t, pthread_attr_default, task, NULL );
13298         if( status ) return errno;
13299
13300         /* give thread a chance to complete */
13301         /* it should remain joinable and hence detachable */
13302         sleep( 1 );
13303
13304         status = pthread_detach( &t );
13305         if( status ) return errno;
13306 #endif
13307
13308 #ifdef HAVE_LINUX_THREADS
13309         pthread_kill_other_threads_np();
13310 #endif
13311
13312         return 0;
13313
13314 }
13315
13316 EOF
13317 if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13318 then
13319   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13320 else
13321   echo "configure: failed program was:" >&5
13322   cat conftest.$ac_ext >&5
13323   rm -fr conftest*
13324   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13325 fi
13326 rm -fr conftest*
13327 fi
13328
13329
13330                 # restore the LIBS
13331                 LIBS="$ol_LIBS"
13332         
13333 fi
13334
13335 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13336
13337         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13338                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13339                 ol_link_threads=posix
13340         fi
13341 fi
13342
13343                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13344 if test "$ol_link_threads" = no ; then
13345         # try -lpthread -lmach -lexc
13346         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13347 echo "configure:13348: checking for pthread link with -lpthread -lmach -lexc" >&5
13348 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13349   echo $ac_n "(cached) $ac_c" 1>&6
13350 else
13351   
13352                 # save the flags
13353                 ol_LIBS="$LIBS"
13354                 LIBS="-lpthread -lmach -lexc $LIBS"
13355
13356                 if test "$cross_compiling" = yes; then
13357   cat > conftest.$ac_ext <<EOF
13358 #line 13359 "configure"
13359 #include "confdefs.h"
13360 /* pthread test headers */
13361 #include <pthread.h>
13362 #if HAVE_PTHREADS < 7
13363 #include <errno.h>
13364 #endif
13365 #ifndef NULL
13366 #define NULL (void*)0
13367 #endif
13368
13369 static void *task(p)
13370         void *p;
13371 {
13372         return (void *) (p == NULL);
13373 }
13374
13375 int main() {
13376
13377         /* pthread test function */
13378 #ifndef PTHREAD_CREATE_DETACHED
13379 #define PTHREAD_CREATE_DETACHED 1
13380 #endif
13381         pthread_t t;
13382         int status;
13383         int detach = PTHREAD_CREATE_DETACHED;
13384
13385 #if HAVE_PTHREADS > 4
13386         /* Final pthreads */
13387         pthread_attr_t attr;
13388
13389         status = pthread_attr_init(&attr);
13390         if( status ) return status;
13391
13392 #if HAVE_PTHREADS < 7
13393         status = pthread_attr_setdetachstate(&attr, &detach);
13394         if( status < 0 ) status = errno;
13395 #else
13396         status = pthread_attr_setdetachstate(&attr, detach);
13397 #endif
13398         if( status ) return status;
13399         status = pthread_create( &t, &attr, task, NULL );
13400 #if HAVE_PTHREADS < 7
13401         if( status < 0 ) status = errno;
13402 #endif
13403         if( status ) return status;
13404 #else
13405         /* Draft 4 pthreads */
13406         status = pthread_create( &t, pthread_attr_default, task, NULL );
13407         if( status ) return errno;
13408
13409         /* give thread a chance to complete */
13410         /* it should remain joinable and hence detachable */
13411         sleep( 1 );
13412
13413         status = pthread_detach( &t );
13414         if( status ) return errno;
13415 #endif
13416
13417 #ifdef HAVE_LINUX_THREADS
13418         pthread_kill_other_threads_np();
13419 #endif
13420
13421         return 0;
13422
13423 ; return 0; }
13424 EOF
13425 if { (eval echo configure:13426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13426   rm -rf conftest*
13427   ol_cv_pthread_lpthread_lmach_lexc=yes
13428 else
13429   echo "configure: failed program was:" >&5
13430   cat conftest.$ac_ext >&5
13431   rm -rf conftest*
13432   ol_cv_pthread_lpthread_lmach_lexc=no
13433 fi
13434 rm -f conftest*
13435 else
13436   cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439 /* pthread test headers */
13440 #include <pthread.h>
13441 #if HAVE_PTHREADS < 7
13442 #include <errno.h>
13443 #endif
13444 #ifndef NULL
13445 #define NULL (void*)0
13446 #endif
13447
13448 static void *task(p)
13449         void *p;
13450 {
13451         return (void *) (p == NULL);
13452 }
13453
13454
13455 int main(argc, argv)
13456         int argc;
13457         char **argv;
13458 {
13459
13460         /* pthread test function */
13461 #ifndef PTHREAD_CREATE_DETACHED
13462 #define PTHREAD_CREATE_DETACHED 1
13463 #endif
13464         pthread_t t;
13465         int status;
13466         int detach = PTHREAD_CREATE_DETACHED;
13467
13468 #if HAVE_PTHREADS > 4
13469         /* Final pthreads */
13470         pthread_attr_t attr;
13471
13472         status = pthread_attr_init(&attr);
13473         if( status ) return status;
13474
13475 #if HAVE_PTHREADS < 7
13476         status = pthread_attr_setdetachstate(&attr, &detach);
13477         if( status < 0 ) status = errno;
13478 #else
13479         status = pthread_attr_setdetachstate(&attr, detach);
13480 #endif
13481         if( status ) return status;
13482         status = pthread_create( &t, &attr, task, NULL );
13483 #if HAVE_PTHREADS < 7
13484         if( status < 0 ) status = errno;
13485 #endif
13486         if( status ) return status;
13487 #else
13488         /* Draft 4 pthreads */
13489         status = pthread_create( &t, pthread_attr_default, task, NULL );
13490         if( status ) return errno;
13491
13492         /* give thread a chance to complete */
13493         /* it should remain joinable and hence detachable */
13494         sleep( 1 );
13495
13496         status = pthread_detach( &t );
13497         if( status ) return errno;
13498 #endif
13499
13500 #ifdef HAVE_LINUX_THREADS
13501         pthread_kill_other_threads_np();
13502 #endif
13503
13504         return 0;
13505
13506 }
13507
13508 EOF
13509 if { (eval echo configure:13510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13510 then
13511   ol_cv_pthread_lpthread_lmach_lexc=yes
13512 else
13513   echo "configure: failed program was:" >&5
13514   cat conftest.$ac_ext >&5
13515   rm -fr conftest*
13516   ol_cv_pthread_lpthread_lmach_lexc=no
13517 fi
13518 rm -fr conftest*
13519 fi
13520
13521
13522                 # restore the LIBS
13523                 LIBS="$ol_LIBS"
13524         
13525 fi
13526
13527 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13528
13529         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13530                 ol_link_pthreads="-lpthread -lmach -lexc"
13531                 ol_link_threads=posix
13532         fi
13533 fi
13534
13535
13536                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13537 if test "$ol_link_threads" = no ; then
13538         # try -lpthread -Wl,-woff,85
13539         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13540 echo "configure:13541: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13541 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13542   echo $ac_n "(cached) $ac_c" 1>&6
13543 else
13544   
13545                 # save the flags
13546                 ol_LIBS="$LIBS"
13547                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13548
13549                 if test "$cross_compiling" = yes; then
13550   cat > conftest.$ac_ext <<EOF
13551 #line 13552 "configure"
13552 #include "confdefs.h"
13553 /* pthread test headers */
13554 #include <pthread.h>
13555 #if HAVE_PTHREADS < 7
13556 #include <errno.h>
13557 #endif
13558 #ifndef NULL
13559 #define NULL (void*)0
13560 #endif
13561
13562 static void *task(p)
13563         void *p;
13564 {
13565         return (void *) (p == NULL);
13566 }
13567
13568 int main() {
13569
13570         /* pthread test function */
13571 #ifndef PTHREAD_CREATE_DETACHED
13572 #define PTHREAD_CREATE_DETACHED 1
13573 #endif
13574         pthread_t t;
13575         int status;
13576         int detach = PTHREAD_CREATE_DETACHED;
13577
13578 #if HAVE_PTHREADS > 4
13579         /* Final pthreads */
13580         pthread_attr_t attr;
13581
13582         status = pthread_attr_init(&attr);
13583         if( status ) return status;
13584
13585 #if HAVE_PTHREADS < 7
13586         status = pthread_attr_setdetachstate(&attr, &detach);
13587         if( status < 0 ) status = errno;
13588 #else
13589         status = pthread_attr_setdetachstate(&attr, detach);
13590 #endif
13591         if( status ) return status;
13592         status = pthread_create( &t, &attr, task, NULL );
13593 #if HAVE_PTHREADS < 7
13594         if( status < 0 ) status = errno;
13595 #endif
13596         if( status ) return status;
13597 #else
13598         /* Draft 4 pthreads */
13599         status = pthread_create( &t, pthread_attr_default, task, NULL );
13600         if( status ) return errno;
13601
13602         /* give thread a chance to complete */
13603         /* it should remain joinable and hence detachable */
13604         sleep( 1 );
13605
13606         status = pthread_detach( &t );
13607         if( status ) return errno;
13608 #endif
13609
13610 #ifdef HAVE_LINUX_THREADS
13611         pthread_kill_other_threads_np();
13612 #endif
13613
13614         return 0;
13615
13616 ; return 0; }
13617 EOF
13618 if { (eval echo configure:13619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13619   rm -rf conftest*
13620   ol_cv_pthread_lib_lpthread_woff=yes
13621 else
13622   echo "configure: failed program was:" >&5
13623   cat conftest.$ac_ext >&5
13624   rm -rf conftest*
13625   ol_cv_pthread_lib_lpthread_woff=no
13626 fi
13627 rm -f conftest*
13628 else
13629   cat > conftest.$ac_ext <<EOF
13630 #line 13631 "configure"
13631 #include "confdefs.h"
13632 /* pthread test headers */
13633 #include <pthread.h>
13634 #if HAVE_PTHREADS < 7
13635 #include <errno.h>
13636 #endif
13637 #ifndef NULL
13638 #define NULL (void*)0
13639 #endif
13640
13641 static void *task(p)
13642         void *p;
13643 {
13644         return (void *) (p == NULL);
13645 }
13646
13647
13648 int main(argc, argv)
13649         int argc;
13650         char **argv;
13651 {
13652
13653         /* pthread test function */
13654 #ifndef PTHREAD_CREATE_DETACHED
13655 #define PTHREAD_CREATE_DETACHED 1
13656 #endif
13657         pthread_t t;
13658         int status;
13659         int detach = PTHREAD_CREATE_DETACHED;
13660
13661 #if HAVE_PTHREADS > 4
13662         /* Final pthreads */
13663         pthread_attr_t attr;
13664
13665         status = pthread_attr_init(&attr);
13666         if( status ) return status;
13667
13668 #if HAVE_PTHREADS < 7
13669         status = pthread_attr_setdetachstate(&attr, &detach);
13670         if( status < 0 ) status = errno;
13671 #else
13672         status = pthread_attr_setdetachstate(&attr, detach);
13673 #endif
13674         if( status ) return status;
13675         status = pthread_create( &t, &attr, task, NULL );
13676 #if HAVE_PTHREADS < 7
13677         if( status < 0 ) status = errno;
13678 #endif
13679         if( status ) return status;
13680 #else
13681         /* Draft 4 pthreads */
13682         status = pthread_create( &t, pthread_attr_default, task, NULL );
13683         if( status ) return errno;
13684
13685         /* give thread a chance to complete */
13686         /* it should remain joinable and hence detachable */
13687         sleep( 1 );
13688
13689         status = pthread_detach( &t );
13690         if( status ) return errno;
13691 #endif
13692
13693 #ifdef HAVE_LINUX_THREADS
13694         pthread_kill_other_threads_np();
13695 #endif
13696
13697         return 0;
13698
13699 }
13700
13701 EOF
13702 if { (eval echo configure:13703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13703 then
13704   ol_cv_pthread_lib_lpthread_woff=yes
13705 else
13706   echo "configure: failed program was:" >&5
13707   cat conftest.$ac_ext >&5
13708   rm -fr conftest*
13709   ol_cv_pthread_lib_lpthread_woff=no
13710 fi
13711 rm -fr conftest*
13712 fi
13713
13714
13715                 # restore the LIBS
13716                 LIBS="$ol_LIBS"
13717         
13718 fi
13719
13720 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13721
13722         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13723                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13724                 ol_link_threads=posix
13725         fi
13726 fi
13727
13728
13729                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13730 if test "$ol_link_threads" = no ; then
13731         # try -lpthread
13732         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13733 echo "configure:13734: checking for pthread link with -lpthread" >&5
13734 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13735   echo $ac_n "(cached) $ac_c" 1>&6
13736 else
13737   
13738                 # save the flags
13739                 ol_LIBS="$LIBS"
13740                 LIBS="-lpthread $LIBS"
13741
13742                 if test "$cross_compiling" = yes; then
13743   cat > conftest.$ac_ext <<EOF
13744 #line 13745 "configure"
13745 #include "confdefs.h"
13746 /* pthread test headers */
13747 #include <pthread.h>
13748 #if HAVE_PTHREADS < 7
13749 #include <errno.h>
13750 #endif
13751 #ifndef NULL
13752 #define NULL (void*)0
13753 #endif
13754
13755 static void *task(p)
13756         void *p;
13757 {
13758         return (void *) (p == NULL);
13759 }
13760
13761 int main() {
13762
13763         /* pthread test function */
13764 #ifndef PTHREAD_CREATE_DETACHED
13765 #define PTHREAD_CREATE_DETACHED 1
13766 #endif
13767         pthread_t t;
13768         int status;
13769         int detach = PTHREAD_CREATE_DETACHED;
13770
13771 #if HAVE_PTHREADS > 4
13772         /* Final pthreads */
13773         pthread_attr_t attr;
13774
13775         status = pthread_attr_init(&attr);
13776         if( status ) return status;
13777
13778 #if HAVE_PTHREADS < 7
13779         status = pthread_attr_setdetachstate(&attr, &detach);
13780         if( status < 0 ) status = errno;
13781 #else
13782         status = pthread_attr_setdetachstate(&attr, detach);
13783 #endif
13784         if( status ) return status;
13785         status = pthread_create( &t, &attr, task, NULL );
13786 #if HAVE_PTHREADS < 7
13787         if( status < 0 ) status = errno;
13788 #endif
13789         if( status ) return status;
13790 #else
13791         /* Draft 4 pthreads */
13792         status = pthread_create( &t, pthread_attr_default, task, NULL );
13793         if( status ) return errno;
13794
13795         /* give thread a chance to complete */
13796         /* it should remain joinable and hence detachable */
13797         sleep( 1 );
13798
13799         status = pthread_detach( &t );
13800         if( status ) return errno;
13801 #endif
13802
13803 #ifdef HAVE_LINUX_THREADS
13804         pthread_kill_other_threads_np();
13805 #endif
13806
13807         return 0;
13808
13809 ; return 0; }
13810 EOF
13811 if { (eval echo configure:13812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13812   rm -rf conftest*
13813   ol_cv_pthread_lpthread=yes
13814 else
13815   echo "configure: failed program was:" >&5
13816   cat conftest.$ac_ext >&5
13817   rm -rf conftest*
13818   ol_cv_pthread_lpthread=no
13819 fi
13820 rm -f conftest*
13821 else
13822   cat > conftest.$ac_ext <<EOF
13823 #line 13824 "configure"
13824 #include "confdefs.h"
13825 /* pthread test headers */
13826 #include <pthread.h>
13827 #if HAVE_PTHREADS < 7
13828 #include <errno.h>
13829 #endif
13830 #ifndef NULL
13831 #define NULL (void*)0
13832 #endif
13833
13834 static void *task(p)
13835         void *p;
13836 {
13837         return (void *) (p == NULL);
13838 }
13839
13840
13841 int main(argc, argv)
13842         int argc;
13843         char **argv;
13844 {
13845
13846         /* pthread test function */
13847 #ifndef PTHREAD_CREATE_DETACHED
13848 #define PTHREAD_CREATE_DETACHED 1
13849 #endif
13850         pthread_t t;
13851         int status;
13852         int detach = PTHREAD_CREATE_DETACHED;
13853
13854 #if HAVE_PTHREADS > 4
13855         /* Final pthreads */
13856         pthread_attr_t attr;
13857
13858         status = pthread_attr_init(&attr);
13859         if( status ) return status;
13860
13861 #if HAVE_PTHREADS < 7
13862         status = pthread_attr_setdetachstate(&attr, &detach);
13863         if( status < 0 ) status = errno;
13864 #else
13865         status = pthread_attr_setdetachstate(&attr, detach);
13866 #endif
13867         if( status ) return status;
13868         status = pthread_create( &t, &attr, task, NULL );
13869 #if HAVE_PTHREADS < 7
13870         if( status < 0 ) status = errno;
13871 #endif
13872         if( status ) return status;
13873 #else
13874         /* Draft 4 pthreads */
13875         status = pthread_create( &t, pthread_attr_default, task, NULL );
13876         if( status ) return errno;
13877
13878         /* give thread a chance to complete */
13879         /* it should remain joinable and hence detachable */
13880         sleep( 1 );
13881
13882         status = pthread_detach( &t );
13883         if( status ) return errno;
13884 #endif
13885
13886 #ifdef HAVE_LINUX_THREADS
13887         pthread_kill_other_threads_np();
13888 #endif
13889
13890         return 0;
13891
13892 }
13893
13894 EOF
13895 if { (eval echo configure:13896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13896 then
13897   ol_cv_pthread_lpthread=yes
13898 else
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901   rm -fr conftest*
13902   ol_cv_pthread_lpthread=no
13903 fi
13904 rm -fr conftest*
13905 fi
13906
13907
13908                 # restore the LIBS
13909                 LIBS="$ol_LIBS"
13910         
13911 fi
13912
13913 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13914
13915         if test $ol_cv_pthread_lpthread = yes ; then
13916                 ol_link_pthreads="-lpthread"
13917                 ol_link_threads=posix
13918         fi
13919 fi
13920
13921                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13922 if test "$ol_link_threads" = no ; then
13923         # try -lc_r
13924         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13925 echo "configure:13926: checking for pthread link with -lc_r" >&5
13926 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13927   echo $ac_n "(cached) $ac_c" 1>&6
13928 else
13929   
13930                 # save the flags
13931                 ol_LIBS="$LIBS"
13932                 LIBS="-lc_r $LIBS"
13933
13934                 if test "$cross_compiling" = yes; then
13935   cat > conftest.$ac_ext <<EOF
13936 #line 13937 "configure"
13937 #include "confdefs.h"
13938 /* pthread test headers */
13939 #include <pthread.h>
13940 #if HAVE_PTHREADS < 7
13941 #include <errno.h>
13942 #endif
13943 #ifndef NULL
13944 #define NULL (void*)0
13945 #endif
13946
13947 static void *task(p)
13948         void *p;
13949 {
13950         return (void *) (p == NULL);
13951 }
13952
13953 int main() {
13954
13955         /* pthread test function */
13956 #ifndef PTHREAD_CREATE_DETACHED
13957 #define PTHREAD_CREATE_DETACHED 1
13958 #endif
13959         pthread_t t;
13960         int status;
13961         int detach = PTHREAD_CREATE_DETACHED;
13962
13963 #if HAVE_PTHREADS > 4
13964         /* Final pthreads */
13965         pthread_attr_t attr;
13966
13967         status = pthread_attr_init(&attr);
13968         if( status ) return status;
13969
13970 #if HAVE_PTHREADS < 7
13971         status = pthread_attr_setdetachstate(&attr, &detach);
13972         if( status < 0 ) status = errno;
13973 #else
13974         status = pthread_attr_setdetachstate(&attr, detach);
13975 #endif
13976         if( status ) return status;
13977         status = pthread_create( &t, &attr, task, NULL );
13978 #if HAVE_PTHREADS < 7
13979         if( status < 0 ) status = errno;
13980 #endif
13981         if( status ) return status;
13982 #else
13983         /* Draft 4 pthreads */
13984         status = pthread_create( &t, pthread_attr_default, task, NULL );
13985         if( status ) return errno;
13986
13987         /* give thread a chance to complete */
13988         /* it should remain joinable and hence detachable */
13989         sleep( 1 );
13990
13991         status = pthread_detach( &t );
13992         if( status ) return errno;
13993 #endif
13994
13995 #ifdef HAVE_LINUX_THREADS
13996         pthread_kill_other_threads_np();
13997 #endif
13998
13999         return 0;
14000
14001 ; return 0; }
14002 EOF
14003 if { (eval echo configure:14004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14004   rm -rf conftest*
14005   ol_cv_pthread_lc_r=yes
14006 else
14007   echo "configure: failed program was:" >&5
14008   cat conftest.$ac_ext >&5
14009   rm -rf conftest*
14010   ol_cv_pthread_lc_r=no
14011 fi
14012 rm -f conftest*
14013 else
14014   cat > conftest.$ac_ext <<EOF
14015 #line 14016 "configure"
14016 #include "confdefs.h"
14017 /* pthread test headers */
14018 #include <pthread.h>
14019 #if HAVE_PTHREADS < 7
14020 #include <errno.h>
14021 #endif
14022 #ifndef NULL
14023 #define NULL (void*)0
14024 #endif
14025
14026 static void *task(p)
14027         void *p;
14028 {
14029         return (void *) (p == NULL);
14030 }
14031
14032
14033 int main(argc, argv)
14034         int argc;
14035         char **argv;
14036 {
14037
14038         /* pthread test function */
14039 #ifndef PTHREAD_CREATE_DETACHED
14040 #define PTHREAD_CREATE_DETACHED 1
14041 #endif
14042         pthread_t t;
14043         int status;
14044         int detach = PTHREAD_CREATE_DETACHED;
14045
14046 #if HAVE_PTHREADS > 4
14047         /* Final pthreads */
14048         pthread_attr_t attr;
14049
14050         status = pthread_attr_init(&attr);
14051         if( status ) return status;
14052
14053 #if HAVE_PTHREADS < 7
14054         status = pthread_attr_setdetachstate(&attr, &detach);
14055         if( status < 0 ) status = errno;
14056 #else
14057         status = pthread_attr_setdetachstate(&attr, detach);
14058 #endif
14059         if( status ) return status;
14060         status = pthread_create( &t, &attr, task, NULL );
14061 #if HAVE_PTHREADS < 7
14062         if( status < 0 ) status = errno;
14063 #endif
14064         if( status ) return status;
14065 #else
14066         /* Draft 4 pthreads */
14067         status = pthread_create( &t, pthread_attr_default, task, NULL );
14068         if( status ) return errno;
14069
14070         /* give thread a chance to complete */
14071         /* it should remain joinable and hence detachable */
14072         sleep( 1 );
14073
14074         status = pthread_detach( &t );
14075         if( status ) return errno;
14076 #endif
14077
14078 #ifdef HAVE_LINUX_THREADS
14079         pthread_kill_other_threads_np();
14080 #endif
14081
14082         return 0;
14083
14084 }
14085
14086 EOF
14087 if { (eval echo configure:14088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14088 then
14089   ol_cv_pthread_lc_r=yes
14090 else
14091   echo "configure: failed program was:" >&5
14092   cat conftest.$ac_ext >&5
14093   rm -fr conftest*
14094   ol_cv_pthread_lc_r=no
14095 fi
14096 rm -fr conftest*
14097 fi
14098
14099
14100                 # restore the LIBS
14101                 LIBS="$ol_LIBS"
14102         
14103 fi
14104
14105 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14106
14107         if test $ol_cv_pthread_lc_r = yes ; then
14108                 ol_link_pthreads="-lc_r"
14109                 ol_link_threads=posix
14110         fi
14111 fi
14112
14113
14114                 # Pthread try link: -threads (ol_cv_pthread_threads)
14115 if test "$ol_link_threads" = no ; then
14116         # try -threads
14117         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14118 echo "configure:14119: checking for pthread link with -threads" >&5
14119 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14120   echo $ac_n "(cached) $ac_c" 1>&6
14121 else
14122   
14123                 # save the flags
14124                 ol_LIBS="$LIBS"
14125                 LIBS="-threads $LIBS"
14126
14127                 if test "$cross_compiling" = yes; then
14128   cat > conftest.$ac_ext <<EOF
14129 #line 14130 "configure"
14130 #include "confdefs.h"
14131 /* pthread test headers */
14132 #include <pthread.h>
14133 #if HAVE_PTHREADS < 7
14134 #include <errno.h>
14135 #endif
14136 #ifndef NULL
14137 #define NULL (void*)0
14138 #endif
14139
14140 static void *task(p)
14141         void *p;
14142 {
14143         return (void *) (p == NULL);
14144 }
14145
14146 int main() {
14147
14148         /* pthread test function */
14149 #ifndef PTHREAD_CREATE_DETACHED
14150 #define PTHREAD_CREATE_DETACHED 1
14151 #endif
14152         pthread_t t;
14153         int status;
14154         int detach = PTHREAD_CREATE_DETACHED;
14155
14156 #if HAVE_PTHREADS > 4
14157         /* Final pthreads */
14158         pthread_attr_t attr;
14159
14160         status = pthread_attr_init(&attr);
14161         if( status ) return status;
14162
14163 #if HAVE_PTHREADS < 7
14164         status = pthread_attr_setdetachstate(&attr, &detach);
14165         if( status < 0 ) status = errno;
14166 #else
14167         status = pthread_attr_setdetachstate(&attr, detach);
14168 #endif
14169         if( status ) return status;
14170         status = pthread_create( &t, &attr, task, NULL );
14171 #if HAVE_PTHREADS < 7
14172         if( status < 0 ) status = errno;
14173 #endif
14174         if( status ) return status;
14175 #else
14176         /* Draft 4 pthreads */
14177         status = pthread_create( &t, pthread_attr_default, task, NULL );
14178         if( status ) return errno;
14179
14180         /* give thread a chance to complete */
14181         /* it should remain joinable and hence detachable */
14182         sleep( 1 );
14183
14184         status = pthread_detach( &t );
14185         if( status ) return errno;
14186 #endif
14187
14188 #ifdef HAVE_LINUX_THREADS
14189         pthread_kill_other_threads_np();
14190 #endif
14191
14192         return 0;
14193
14194 ; return 0; }
14195 EOF
14196 if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14197   rm -rf conftest*
14198   ol_cv_pthread_threads=yes
14199 else
14200   echo "configure: failed program was:" >&5
14201   cat conftest.$ac_ext >&5
14202   rm -rf conftest*
14203   ol_cv_pthread_threads=no
14204 fi
14205 rm -f conftest*
14206 else
14207   cat > conftest.$ac_ext <<EOF
14208 #line 14209 "configure"
14209 #include "confdefs.h"
14210 /* pthread test headers */
14211 #include <pthread.h>
14212 #if HAVE_PTHREADS < 7
14213 #include <errno.h>
14214 #endif
14215 #ifndef NULL
14216 #define NULL (void*)0
14217 #endif
14218
14219 static void *task(p)
14220         void *p;
14221 {
14222         return (void *) (p == NULL);
14223 }
14224
14225
14226 int main(argc, argv)
14227         int argc;
14228         char **argv;
14229 {
14230
14231         /* pthread test function */
14232 #ifndef PTHREAD_CREATE_DETACHED
14233 #define PTHREAD_CREATE_DETACHED 1
14234 #endif
14235         pthread_t t;
14236         int status;
14237         int detach = PTHREAD_CREATE_DETACHED;
14238
14239 #if HAVE_PTHREADS > 4
14240         /* Final pthreads */
14241         pthread_attr_t attr;
14242
14243         status = pthread_attr_init(&attr);
14244         if( status ) return status;
14245
14246 #if HAVE_PTHREADS < 7
14247         status = pthread_attr_setdetachstate(&attr, &detach);
14248         if( status < 0 ) status = errno;
14249 #else
14250         status = pthread_attr_setdetachstate(&attr, detach);
14251 #endif
14252         if( status ) return status;
14253         status = pthread_create( &t, &attr, task, NULL );
14254 #if HAVE_PTHREADS < 7
14255         if( status < 0 ) status = errno;
14256 #endif
14257         if( status ) return status;
14258 #else
14259         /* Draft 4 pthreads */
14260         status = pthread_create( &t, pthread_attr_default, task, NULL );
14261         if( status ) return errno;
14262
14263         /* give thread a chance to complete */
14264         /* it should remain joinable and hence detachable */
14265         sleep( 1 );
14266
14267         status = pthread_detach( &t );
14268         if( status ) return errno;
14269 #endif
14270
14271 #ifdef HAVE_LINUX_THREADS
14272         pthread_kill_other_threads_np();
14273 #endif
14274
14275         return 0;
14276
14277 }
14278
14279 EOF
14280 if { (eval echo configure:14281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14281 then
14282   ol_cv_pthread_threads=yes
14283 else
14284   echo "configure: failed program was:" >&5
14285   cat conftest.$ac_ext >&5
14286   rm -fr conftest*
14287   ol_cv_pthread_threads=no
14288 fi
14289 rm -fr conftest*
14290 fi
14291
14292
14293                 # restore the LIBS
14294                 LIBS="$ol_LIBS"
14295         
14296 fi
14297
14298 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14299
14300         if test $ol_cv_pthread_threads = yes ; then
14301                 ol_link_pthreads="-threads"
14302                 ol_link_threads=posix
14303         fi
14304 fi
14305
14306
14307                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14308 if test "$ol_link_threads" = no ; then
14309         # try -lpthreads -lmach -lexc -lc_r
14310         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14311 echo "configure:14312: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14312 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14313   echo $ac_n "(cached) $ac_c" 1>&6
14314 else
14315   
14316                 # save the flags
14317                 ol_LIBS="$LIBS"
14318                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14319
14320                 if test "$cross_compiling" = yes; then
14321   cat > conftest.$ac_ext <<EOF
14322 #line 14323 "configure"
14323 #include "confdefs.h"
14324 /* pthread test headers */
14325 #include <pthread.h>
14326 #if HAVE_PTHREADS < 7
14327 #include <errno.h>
14328 #endif
14329 #ifndef NULL
14330 #define NULL (void*)0
14331 #endif
14332
14333 static void *task(p)
14334         void *p;
14335 {
14336         return (void *) (p == NULL);
14337 }
14338
14339 int main() {
14340
14341         /* pthread test function */
14342 #ifndef PTHREAD_CREATE_DETACHED
14343 #define PTHREAD_CREATE_DETACHED 1
14344 #endif
14345         pthread_t t;
14346         int status;
14347         int detach = PTHREAD_CREATE_DETACHED;
14348
14349 #if HAVE_PTHREADS > 4
14350         /* Final pthreads */
14351         pthread_attr_t attr;
14352
14353         status = pthread_attr_init(&attr);
14354         if( status ) return status;
14355
14356 #if HAVE_PTHREADS < 7
14357         status = pthread_attr_setdetachstate(&attr, &detach);
14358         if( status < 0 ) status = errno;
14359 #else
14360         status = pthread_attr_setdetachstate(&attr, detach);
14361 #endif
14362         if( status ) return status;
14363         status = pthread_create( &t, &attr, task, NULL );
14364 #if HAVE_PTHREADS < 7
14365         if( status < 0 ) status = errno;
14366 #endif
14367         if( status ) return status;
14368 #else
14369         /* Draft 4 pthreads */
14370         status = pthread_create( &t, pthread_attr_default, task, NULL );
14371         if( status ) return errno;
14372
14373         /* give thread a chance to complete */
14374         /* it should remain joinable and hence detachable */
14375         sleep( 1 );
14376
14377         status = pthread_detach( &t );
14378         if( status ) return errno;
14379 #endif
14380
14381 #ifdef HAVE_LINUX_THREADS
14382         pthread_kill_other_threads_np();
14383 #endif
14384
14385         return 0;
14386
14387 ; return 0; }
14388 EOF
14389 if { (eval echo configure:14390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14390   rm -rf conftest*
14391   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14392 else
14393   echo "configure: failed program was:" >&5
14394   cat conftest.$ac_ext >&5
14395   rm -rf conftest*
14396   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14397 fi
14398 rm -f conftest*
14399 else
14400   cat > conftest.$ac_ext <<EOF
14401 #line 14402 "configure"
14402 #include "confdefs.h"
14403 /* pthread test headers */
14404 #include <pthread.h>
14405 #if HAVE_PTHREADS < 7
14406 #include <errno.h>
14407 #endif
14408 #ifndef NULL
14409 #define NULL (void*)0
14410 #endif
14411
14412 static void *task(p)
14413         void *p;
14414 {
14415         return (void *) (p == NULL);
14416 }
14417
14418
14419 int main(argc, argv)
14420         int argc;
14421         char **argv;
14422 {
14423
14424         /* pthread test function */
14425 #ifndef PTHREAD_CREATE_DETACHED
14426 #define PTHREAD_CREATE_DETACHED 1
14427 #endif
14428         pthread_t t;
14429         int status;
14430         int detach = PTHREAD_CREATE_DETACHED;
14431
14432 #if HAVE_PTHREADS > 4
14433         /* Final pthreads */
14434         pthread_attr_t attr;
14435
14436         status = pthread_attr_init(&attr);
14437         if( status ) return status;
14438
14439 #if HAVE_PTHREADS < 7
14440         status = pthread_attr_setdetachstate(&attr, &detach);
14441         if( status < 0 ) status = errno;
14442 #else
14443         status = pthread_attr_setdetachstate(&attr, detach);
14444 #endif
14445         if( status ) return status;
14446         status = pthread_create( &t, &attr, task, NULL );
14447 #if HAVE_PTHREADS < 7
14448         if( status < 0 ) status = errno;
14449 #endif
14450         if( status ) return status;
14451 #else
14452         /* Draft 4 pthreads */
14453         status = pthread_create( &t, pthread_attr_default, task, NULL );
14454         if( status ) return errno;
14455
14456         /* give thread a chance to complete */
14457         /* it should remain joinable and hence detachable */
14458         sleep( 1 );
14459
14460         status = pthread_detach( &t );
14461         if( status ) return errno;
14462 #endif
14463
14464 #ifdef HAVE_LINUX_THREADS
14465         pthread_kill_other_threads_np();
14466 #endif
14467
14468         return 0;
14469
14470 }
14471
14472 EOF
14473 if { (eval echo configure:14474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14474 then
14475   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14476 else
14477   echo "configure: failed program was:" >&5
14478   cat conftest.$ac_ext >&5
14479   rm -fr conftest*
14480   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14481 fi
14482 rm -fr conftest*
14483 fi
14484
14485
14486                 # restore the LIBS
14487                 LIBS="$ol_LIBS"
14488         
14489 fi
14490
14491 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14492
14493         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14494                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14495                 ol_link_threads=posix
14496         fi
14497 fi
14498
14499                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14500 if test "$ol_link_threads" = no ; then
14501         # try -lpthreads -lmach -lexc
14502         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14503 echo "configure:14504: checking for pthread link with -lpthreads -lmach -lexc" >&5
14504 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14505   echo $ac_n "(cached) $ac_c" 1>&6
14506 else
14507   
14508                 # save the flags
14509                 ol_LIBS="$LIBS"
14510                 LIBS="-lpthreads -lmach -lexc $LIBS"
14511
14512                 if test "$cross_compiling" = yes; then
14513   cat > conftest.$ac_ext <<EOF
14514 #line 14515 "configure"
14515 #include "confdefs.h"
14516 /* pthread test headers */
14517 #include <pthread.h>
14518 #if HAVE_PTHREADS < 7
14519 #include <errno.h>
14520 #endif
14521 #ifndef NULL
14522 #define NULL (void*)0
14523 #endif
14524
14525 static void *task(p)
14526         void *p;
14527 {
14528         return (void *) (p == NULL);
14529 }
14530
14531 int main() {
14532
14533         /* pthread test function */
14534 #ifndef PTHREAD_CREATE_DETACHED
14535 #define PTHREAD_CREATE_DETACHED 1
14536 #endif
14537         pthread_t t;
14538         int status;
14539         int detach = PTHREAD_CREATE_DETACHED;
14540
14541 #if HAVE_PTHREADS > 4
14542         /* Final pthreads */
14543         pthread_attr_t attr;
14544
14545         status = pthread_attr_init(&attr);
14546         if( status ) return status;
14547
14548 #if HAVE_PTHREADS < 7
14549         status = pthread_attr_setdetachstate(&attr, &detach);
14550         if( status < 0 ) status = errno;
14551 #else
14552         status = pthread_attr_setdetachstate(&attr, detach);
14553 #endif
14554         if( status ) return status;
14555         status = pthread_create( &t, &attr, task, NULL );
14556 #if HAVE_PTHREADS < 7
14557         if( status < 0 ) status = errno;
14558 #endif
14559         if( status ) return status;
14560 #else
14561         /* Draft 4 pthreads */
14562         status = pthread_create( &t, pthread_attr_default, task, NULL );
14563         if( status ) return errno;
14564
14565         /* give thread a chance to complete */
14566         /* it should remain joinable and hence detachable */
14567         sleep( 1 );
14568
14569         status = pthread_detach( &t );
14570         if( status ) return errno;
14571 #endif
14572
14573 #ifdef HAVE_LINUX_THREADS
14574         pthread_kill_other_threads_np();
14575 #endif
14576
14577         return 0;
14578
14579 ; return 0; }
14580 EOF
14581 if { (eval echo configure:14582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14582   rm -rf conftest*
14583   ol_cv_pthread_lpthreads_lmach_lexc=yes
14584 else
14585   echo "configure: failed program was:" >&5
14586   cat conftest.$ac_ext >&5
14587   rm -rf conftest*
14588   ol_cv_pthread_lpthreads_lmach_lexc=no
14589 fi
14590 rm -f conftest*
14591 else
14592   cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 /* pthread test headers */
14596 #include <pthread.h>
14597 #if HAVE_PTHREADS < 7
14598 #include <errno.h>
14599 #endif
14600 #ifndef NULL
14601 #define NULL (void*)0
14602 #endif
14603
14604 static void *task(p)
14605         void *p;
14606 {
14607         return (void *) (p == NULL);
14608 }
14609
14610
14611 int main(argc, argv)
14612         int argc;
14613         char **argv;
14614 {
14615
14616         /* pthread test function */
14617 #ifndef PTHREAD_CREATE_DETACHED
14618 #define PTHREAD_CREATE_DETACHED 1
14619 #endif
14620         pthread_t t;
14621         int status;
14622         int detach = PTHREAD_CREATE_DETACHED;
14623
14624 #if HAVE_PTHREADS > 4
14625         /* Final pthreads */
14626         pthread_attr_t attr;
14627
14628         status = pthread_attr_init(&attr);
14629         if( status ) return status;
14630
14631 #if HAVE_PTHREADS < 7
14632         status = pthread_attr_setdetachstate(&attr, &detach);
14633         if( status < 0 ) status = errno;
14634 #else
14635         status = pthread_attr_setdetachstate(&attr, detach);
14636 #endif
14637         if( status ) return status;
14638         status = pthread_create( &t, &attr, task, NULL );
14639 #if HAVE_PTHREADS < 7
14640         if( status < 0 ) status = errno;
14641 #endif
14642         if( status ) return status;
14643 #else
14644         /* Draft 4 pthreads */
14645         status = pthread_create( &t, pthread_attr_default, task, NULL );
14646         if( status ) return errno;
14647
14648         /* give thread a chance to complete */
14649         /* it should remain joinable and hence detachable */
14650         sleep( 1 );
14651
14652         status = pthread_detach( &t );
14653         if( status ) return errno;
14654 #endif
14655
14656 #ifdef HAVE_LINUX_THREADS
14657         pthread_kill_other_threads_np();
14658 #endif
14659
14660         return 0;
14661
14662 }
14663
14664 EOF
14665 if { (eval echo configure:14666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14666 then
14667   ol_cv_pthread_lpthreads_lmach_lexc=yes
14668 else
14669   echo "configure: failed program was:" >&5
14670   cat conftest.$ac_ext >&5
14671   rm -fr conftest*
14672   ol_cv_pthread_lpthreads_lmach_lexc=no
14673 fi
14674 rm -fr conftest*
14675 fi
14676
14677
14678                 # restore the LIBS
14679                 LIBS="$ol_LIBS"
14680         
14681 fi
14682
14683 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14684
14685         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14686                 ol_link_pthreads="-lpthreads -lmach -lexc"
14687                 ol_link_threads=posix
14688         fi
14689 fi
14690
14691                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14692 if test "$ol_link_threads" = no ; then
14693         # try -lpthreads -lexc
14694         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14695 echo "configure:14696: checking for pthread link with -lpthreads -lexc" >&5
14696 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14697   echo $ac_n "(cached) $ac_c" 1>&6
14698 else
14699   
14700                 # save the flags
14701                 ol_LIBS="$LIBS"
14702                 LIBS="-lpthreads -lexc $LIBS"
14703
14704                 if test "$cross_compiling" = yes; then
14705   cat > conftest.$ac_ext <<EOF
14706 #line 14707 "configure"
14707 #include "confdefs.h"
14708 /* pthread test headers */
14709 #include <pthread.h>
14710 #if HAVE_PTHREADS < 7
14711 #include <errno.h>
14712 #endif
14713 #ifndef NULL
14714 #define NULL (void*)0
14715 #endif
14716
14717 static void *task(p)
14718         void *p;
14719 {
14720         return (void *) (p == NULL);
14721 }
14722
14723 int main() {
14724
14725         /* pthread test function */
14726 #ifndef PTHREAD_CREATE_DETACHED
14727 #define PTHREAD_CREATE_DETACHED 1
14728 #endif
14729         pthread_t t;
14730         int status;
14731         int detach = PTHREAD_CREATE_DETACHED;
14732
14733 #if HAVE_PTHREADS > 4
14734         /* Final pthreads */
14735         pthread_attr_t attr;
14736
14737         status = pthread_attr_init(&attr);
14738         if( status ) return status;
14739
14740 #if HAVE_PTHREADS < 7
14741         status = pthread_attr_setdetachstate(&attr, &detach);
14742         if( status < 0 ) status = errno;
14743 #else
14744         status = pthread_attr_setdetachstate(&attr, detach);
14745 #endif
14746         if( status ) return status;
14747         status = pthread_create( &t, &attr, task, NULL );
14748 #if HAVE_PTHREADS < 7
14749         if( status < 0 ) status = errno;
14750 #endif
14751         if( status ) return status;
14752 #else
14753         /* Draft 4 pthreads */
14754         status = pthread_create( &t, pthread_attr_default, task, NULL );
14755         if( status ) return errno;
14756
14757         /* give thread a chance to complete */
14758         /* it should remain joinable and hence detachable */
14759         sleep( 1 );
14760
14761         status = pthread_detach( &t );
14762         if( status ) return errno;
14763 #endif
14764
14765 #ifdef HAVE_LINUX_THREADS
14766         pthread_kill_other_threads_np();
14767 #endif
14768
14769         return 0;
14770
14771 ; return 0; }
14772 EOF
14773 if { (eval echo configure:14774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14774   rm -rf conftest*
14775   ol_cv_pthread_lpthreads_lexc=yes
14776 else
14777   echo "configure: failed program was:" >&5
14778   cat conftest.$ac_ext >&5
14779   rm -rf conftest*
14780   ol_cv_pthread_lpthreads_lexc=no
14781 fi
14782 rm -f conftest*
14783 else
14784   cat > conftest.$ac_ext <<EOF
14785 #line 14786 "configure"
14786 #include "confdefs.h"
14787 /* pthread test headers */
14788 #include <pthread.h>
14789 #if HAVE_PTHREADS < 7
14790 #include <errno.h>
14791 #endif
14792 #ifndef NULL
14793 #define NULL (void*)0
14794 #endif
14795
14796 static void *task(p)
14797         void *p;
14798 {
14799         return (void *) (p == NULL);
14800 }
14801
14802
14803 int main(argc, argv)
14804         int argc;
14805         char **argv;
14806 {
14807
14808         /* pthread test function */
14809 #ifndef PTHREAD_CREATE_DETACHED
14810 #define PTHREAD_CREATE_DETACHED 1
14811 #endif
14812         pthread_t t;
14813         int status;
14814         int detach = PTHREAD_CREATE_DETACHED;
14815
14816 #if HAVE_PTHREADS > 4
14817         /* Final pthreads */
14818         pthread_attr_t attr;
14819
14820         status = pthread_attr_init(&attr);
14821         if( status ) return status;
14822
14823 #if HAVE_PTHREADS < 7
14824         status = pthread_attr_setdetachstate(&attr, &detach);
14825         if( status < 0 ) status = errno;
14826 #else
14827         status = pthread_attr_setdetachstate(&attr, detach);
14828 #endif
14829         if( status ) return status;
14830         status = pthread_create( &t, &attr, task, NULL );
14831 #if HAVE_PTHREADS < 7
14832         if( status < 0 ) status = errno;
14833 #endif
14834         if( status ) return status;
14835 #else
14836         /* Draft 4 pthreads */
14837         status = pthread_create( &t, pthread_attr_default, task, NULL );
14838         if( status ) return errno;
14839
14840         /* give thread a chance to complete */
14841         /* it should remain joinable and hence detachable */
14842         sleep( 1 );
14843
14844         status = pthread_detach( &t );
14845         if( status ) return errno;
14846 #endif
14847
14848 #ifdef HAVE_LINUX_THREADS
14849         pthread_kill_other_threads_np();
14850 #endif
14851
14852         return 0;
14853
14854 }
14855
14856 EOF
14857 if { (eval echo configure:14858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14858 then
14859   ol_cv_pthread_lpthreads_lexc=yes
14860 else
14861   echo "configure: failed program was:" >&5
14862   cat conftest.$ac_ext >&5
14863   rm -fr conftest*
14864   ol_cv_pthread_lpthreads_lexc=no
14865 fi
14866 rm -fr conftest*
14867 fi
14868
14869
14870                 # restore the LIBS
14871                 LIBS="$ol_LIBS"
14872         
14873 fi
14874
14875 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14876
14877         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14878                 ol_link_pthreads="-lpthreads -lexc"
14879                 ol_link_threads=posix
14880         fi
14881 fi
14882
14883
14884                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14885 if test "$ol_link_threads" = no ; then
14886         # try -lpthreads
14887         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14888 echo "configure:14889: checking for pthread link with -lpthreads" >&5
14889 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14890   echo $ac_n "(cached) $ac_c" 1>&6
14891 else
14892   
14893                 # save the flags
14894                 ol_LIBS="$LIBS"
14895                 LIBS="-lpthreads $LIBS"
14896
14897                 if test "$cross_compiling" = yes; then
14898   cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 /* pthread test headers */
14902 #include <pthread.h>
14903 #if HAVE_PTHREADS < 7
14904 #include <errno.h>
14905 #endif
14906 #ifndef NULL
14907 #define NULL (void*)0
14908 #endif
14909
14910 static void *task(p)
14911         void *p;
14912 {
14913         return (void *) (p == NULL);
14914 }
14915
14916 int main() {
14917
14918         /* pthread test function */
14919 #ifndef PTHREAD_CREATE_DETACHED
14920 #define PTHREAD_CREATE_DETACHED 1
14921 #endif
14922         pthread_t t;
14923         int status;
14924         int detach = PTHREAD_CREATE_DETACHED;
14925
14926 #if HAVE_PTHREADS > 4
14927         /* Final pthreads */
14928         pthread_attr_t attr;
14929
14930         status = pthread_attr_init(&attr);
14931         if( status ) return status;
14932
14933 #if HAVE_PTHREADS < 7
14934         status = pthread_attr_setdetachstate(&attr, &detach);
14935         if( status < 0 ) status = errno;
14936 #else
14937         status = pthread_attr_setdetachstate(&attr, detach);
14938 #endif
14939         if( status ) return status;
14940         status = pthread_create( &t, &attr, task, NULL );
14941 #if HAVE_PTHREADS < 7
14942         if( status < 0 ) status = errno;
14943 #endif
14944         if( status ) return status;
14945 #else
14946         /* Draft 4 pthreads */
14947         status = pthread_create( &t, pthread_attr_default, task, NULL );
14948         if( status ) return errno;
14949
14950         /* give thread a chance to complete */
14951         /* it should remain joinable and hence detachable */
14952         sleep( 1 );
14953
14954         status = pthread_detach( &t );
14955         if( status ) return errno;
14956 #endif
14957
14958 #ifdef HAVE_LINUX_THREADS
14959         pthread_kill_other_threads_np();
14960 #endif
14961
14962         return 0;
14963
14964 ; return 0; }
14965 EOF
14966 if { (eval echo configure:14967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14967   rm -rf conftest*
14968   ol_cv_pthread_lib_lpthreads=yes
14969 else
14970   echo "configure: failed program was:" >&5
14971   cat conftest.$ac_ext >&5
14972   rm -rf conftest*
14973   ol_cv_pthread_lib_lpthreads=no
14974 fi
14975 rm -f conftest*
14976 else
14977   cat > conftest.$ac_ext <<EOF
14978 #line 14979 "configure"
14979 #include "confdefs.h"
14980 /* pthread test headers */
14981 #include <pthread.h>
14982 #if HAVE_PTHREADS < 7
14983 #include <errno.h>
14984 #endif
14985 #ifndef NULL
14986 #define NULL (void*)0
14987 #endif
14988
14989 static void *task(p)
14990         void *p;
14991 {
14992         return (void *) (p == NULL);
14993 }
14994
14995
14996 int main(argc, argv)
14997         int argc;
14998         char **argv;
14999 {
15000
15001         /* pthread test function */
15002 #ifndef PTHREAD_CREATE_DETACHED
15003 #define PTHREAD_CREATE_DETACHED 1
15004 #endif
15005         pthread_t t;
15006         int status;
15007         int detach = PTHREAD_CREATE_DETACHED;
15008
15009 #if HAVE_PTHREADS > 4
15010         /* Final pthreads */
15011         pthread_attr_t attr;
15012
15013         status = pthread_attr_init(&attr);
15014         if( status ) return status;
15015
15016 #if HAVE_PTHREADS < 7
15017         status = pthread_attr_setdetachstate(&attr, &detach);
15018         if( status < 0 ) status = errno;
15019 #else
15020         status = pthread_attr_setdetachstate(&attr, detach);
15021 #endif
15022         if( status ) return status;
15023         status = pthread_create( &t, &attr, task, NULL );
15024 #if HAVE_PTHREADS < 7
15025         if( status < 0 ) status = errno;
15026 #endif
15027         if( status ) return status;
15028 #else
15029         /* Draft 4 pthreads */
15030         status = pthread_create( &t, pthread_attr_default, task, NULL );
15031         if( status ) return errno;
15032
15033         /* give thread a chance to complete */
15034         /* it should remain joinable and hence detachable */
15035         sleep( 1 );
15036
15037         status = pthread_detach( &t );
15038         if( status ) return errno;
15039 #endif
15040
15041 #ifdef HAVE_LINUX_THREADS
15042         pthread_kill_other_threads_np();
15043 #endif
15044
15045         return 0;
15046
15047 }
15048
15049 EOF
15050 if { (eval echo configure:15051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15051 then
15052   ol_cv_pthread_lib_lpthreads=yes
15053 else
15054   echo "configure: failed program was:" >&5
15055   cat conftest.$ac_ext >&5
15056   rm -fr conftest*
15057   ol_cv_pthread_lib_lpthreads=no
15058 fi
15059 rm -fr conftest*
15060 fi
15061
15062
15063                 # restore the LIBS
15064                 LIBS="$ol_LIBS"
15065         
15066 fi
15067
15068 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15069
15070         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15071                 ol_link_pthreads="-lpthreads"
15072                 ol_link_threads=posix
15073         fi
15074 fi
15075
15076
15077                 if test $ol_link_threads != no ; then
15078                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15079
15080                                                 save_CPPFLAGS="$CPPFLAGS"
15081                         save_LIBS="$LIBS"
15082                         LIBS="$LTHREAD_LIBS $LIBS"
15083
15084                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15085 do
15086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15087 echo "configure:15088: checking for $ac_func" >&5
15088 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15089   echo $ac_n "(cached) $ac_c" 1>&6
15090 else
15091   cat > conftest.$ac_ext <<EOF
15092 #line 15093 "configure"
15093 #include "confdefs.h"
15094 /* System header to define __stub macros and hopefully few prototypes,
15095     which can conflict with char $ac_func(); below.  */
15096 #include <assert.h>
15097 /* Override any gcc2 internal prototype to avoid an error.  */
15098 /* We use char because int might match the return type of a gcc2
15099     builtin and then its argument prototype would still apply.  */
15100 char $ac_func();
15101 char (*f)();
15102
15103 int main() {
15104
15105 /* The GNU C library defines this for functions which it implements
15106     to always fail with ENOSYS.  Some functions are actually named
15107     something starting with __ and the normal name is an alias.  */
15108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15109 choke me
15110 #else
15111 f = $ac_func;
15112 #endif
15113
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_func_$ac_func=yes"
15119 else
15120   echo "configure: failed program was:" >&5
15121   cat conftest.$ac_ext >&5
15122   rm -rf conftest*
15123   eval "ac_cv_func_$ac_func=no"
15124 fi
15125 rm -f conftest*
15126 fi
15127
15128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15129   echo "$ac_t""yes" 1>&6
15130     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15131   cat >> confdefs.h <<EOF
15132 #define $ac_tr_func 1
15133 EOF
15134  
15135 else
15136   echo "$ac_t""no" 1>&6
15137 fi
15138 done
15139
15140
15141                         if test $ac_cv_func_sched_yield = no -a \
15142                                 $ac_cv_func_pthread_yield = no -a \
15143                                 $ac_cv_func_thr_yield = no ; then
15144                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15145 echo "configure:15146: checking for sched_yield in -lrt" >&5
15146 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15148   echo $ac_n "(cached) $ac_c" 1>&6
15149 else
15150   ac_save_LIBS="$LIBS"
15151 LIBS="-lrt  $LIBS"
15152 cat > conftest.$ac_ext <<EOF
15153 #line 15154 "configure"
15154 #include "confdefs.h"
15155 /* Override any gcc2 internal prototype to avoid an error.  */
15156 /* We use char because int might match the return type of a gcc2
15157     builtin and then its argument prototype would still apply.  */
15158 char sched_yield();
15159
15160 int main() {
15161 sched_yield()
15162 ; return 0; }
15163 EOF
15164 if { (eval echo configure:15165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15165   rm -rf conftest*
15166   eval "ac_cv_lib_$ac_lib_var=yes"
15167 else
15168   echo "configure: failed program was:" >&5
15169   cat conftest.$ac_ext >&5
15170   rm -rf conftest*
15171   eval "ac_cv_lib_$ac_lib_var=no"
15172 fi
15173 rm -f conftest*
15174 LIBS="$ac_save_LIBS"
15175
15176 fi
15177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15178   echo "$ac_t""yes" 1>&6
15179   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15180                                         cat >> confdefs.h <<\EOF
15181 #define HAVE_SCHED_YIELD 1
15182 EOF
15183
15184                                         ac_cv_func_sched_yield=yes
15185 else
15186   echo "$ac_t""no" 1>&6
15187 ac_cv_func_sched_yield=no
15188 fi
15189
15190                         fi
15191                         if test $ac_cv_func_sched_yield = no -a \
15192                                 $ac_cv_func_pthread_yield = no -a \
15193                                 "$ac_cv_func_thr_yield" = no ; then
15194                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15195                         fi
15196
15197                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15198 do
15199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15200 echo "configure:15201: checking for $ac_func" >&5
15201 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15202   echo $ac_n "(cached) $ac_c" 1>&6
15203 else
15204   cat > conftest.$ac_ext <<EOF
15205 #line 15206 "configure"
15206 #include "confdefs.h"
15207 /* System header to define __stub macros and hopefully few prototypes,
15208     which can conflict with char $ac_func(); below.  */
15209 #include <assert.h>
15210 /* Override any gcc2 internal prototype to avoid an error.  */
15211 /* We use char because int might match the return type of a gcc2
15212     builtin and then its argument prototype would still apply.  */
15213 char $ac_func();
15214 char (*f)();
15215
15216 int main() {
15217
15218 /* The GNU C library defines this for functions which it implements
15219     to always fail with ENOSYS.  Some functions are actually named
15220     something starting with __ and the normal name is an alias.  */
15221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15222 choke me
15223 #else
15224 f = $ac_func;
15225 #endif
15226
15227 ; return 0; }
15228 EOF
15229 if { (eval echo configure:15230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15230   rm -rf conftest*
15231   eval "ac_cv_func_$ac_func=yes"
15232 else
15233   echo "configure: failed program was:" >&5
15234   cat conftest.$ac_ext >&5
15235   rm -rf conftest*
15236   eval "ac_cv_func_$ac_func=no"
15237 fi
15238 rm -f conftest*
15239 fi
15240
15241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15242   echo "$ac_t""yes" 1>&6
15243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15244   cat >> confdefs.h <<EOF
15245 #define $ac_tr_func 1
15246 EOF
15247  
15248 else
15249   echo "$ac_t""no" 1>&6
15250 fi
15251 done
15252
15253
15254                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15255 echo "configure:15256: checking for pthread_detach with <pthread.h>" >&5
15256 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15257   echo $ac_n "(cached) $ac_c" 1>&6
15258 else
15259   
15260                                                                 cat > conftest.$ac_ext <<EOF
15261 #line 15262 "configure"
15262 #include "confdefs.h"
15263
15264 #include <pthread.h>
15265 #ifndef NULL
15266 #define NULL (void*)0
15267 #endif
15268
15269 int main() {
15270 pthread_detach(NULL);
15271 ; return 0; }
15272 EOF
15273 if { (eval echo configure:15274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15274   rm -rf conftest*
15275   ol_cv_func_pthread_detach=yes
15276 else
15277   echo "configure: failed program was:" >&5
15278   cat conftest.$ac_ext >&5
15279   rm -rf conftest*
15280   ol_cv_func_pthread_detach=no
15281 fi
15282 rm -f conftest*
15283                         
15284 fi
15285
15286 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15287
15288                         if test $ol_cv_func_pthread_detach = no ; then
15289                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15290                         fi
15291
15292                         cat >> confdefs.h <<\EOF
15293 #define HAVE_PTHREAD_DETACH 1
15294 EOF
15295
15296
15297                                                 for ac_func in \
15298                                 pthread_setconcurrency \
15299                                 pthread_getconcurrency \
15300                                 thr_setconcurrency \
15301                                 thr_getconcurrency \
15302                         
15303 do
15304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15305 echo "configure:15306: checking for $ac_func" >&5
15306 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15307   echo $ac_n "(cached) $ac_c" 1>&6
15308 else
15309   cat > conftest.$ac_ext <<EOF
15310 #line 15311 "configure"
15311 #include "confdefs.h"
15312 /* System header to define __stub macros and hopefully few prototypes,
15313     which can conflict with char $ac_func(); below.  */
15314 #include <assert.h>
15315 /* Override any gcc2 internal prototype to avoid an error.  */
15316 /* We use char because int might match the return type of a gcc2
15317     builtin and then its argument prototype would still apply.  */
15318 char $ac_func();
15319 char (*f)();
15320
15321 int main() {
15322
15323 /* The GNU C library defines this for functions which it implements
15324     to always fail with ENOSYS.  Some functions are actually named
15325     something starting with __ and the normal name is an alias.  */
15326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15327 choke me
15328 #else
15329 f = $ac_func;
15330 #endif
15331
15332 ; return 0; }
15333 EOF
15334 if { (eval echo configure:15335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15335   rm -rf conftest*
15336   eval "ac_cv_func_$ac_func=yes"
15337 else
15338   echo "configure: failed program was:" >&5
15339   cat conftest.$ac_ext >&5
15340   rm -rf conftest*
15341   eval "ac_cv_func_$ac_func=no"
15342 fi
15343 rm -f conftest*
15344 fi
15345
15346 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15347   echo "$ac_t""yes" 1>&6
15348     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15349   cat >> confdefs.h <<EOF
15350 #define $ac_tr_func 1
15351 EOF
15352  
15353 else
15354   echo "$ac_t""no" 1>&6
15355 fi
15356 done
15357
15358
15359                         
15360         for ac_func in pthread_kill_other_threads_np
15361 do
15362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15363 echo "configure:15364: checking for $ac_func" >&5
15364 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15365   echo $ac_n "(cached) $ac_c" 1>&6
15366 else
15367   cat > conftest.$ac_ext <<EOF
15368 #line 15369 "configure"
15369 #include "confdefs.h"
15370 /* System header to define __stub macros and hopefully few prototypes,
15371     which can conflict with char $ac_func(); below.  */
15372 #include <assert.h>
15373 /* Override any gcc2 internal prototype to avoid an error.  */
15374 /* We use char because int might match the return type of a gcc2
15375     builtin and then its argument prototype would still apply.  */
15376 char $ac_func();
15377 char (*f)();
15378
15379 int main() {
15380
15381 /* The GNU C library defines this for functions which it implements
15382     to always fail with ENOSYS.  Some functions are actually named
15383     something starting with __ and the normal name is an alias.  */
15384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15385 choke me
15386 #else
15387 f = $ac_func;
15388 #endif
15389
15390 ; return 0; }
15391 EOF
15392 if { (eval echo configure:15393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15393   rm -rf conftest*
15394   eval "ac_cv_func_$ac_func=yes"
15395 else
15396   echo "configure: failed program was:" >&5
15397   cat conftest.$ac_ext >&5
15398   rm -rf conftest*
15399   eval "ac_cv_func_$ac_func=no"
15400 fi
15401 rm -f conftest*
15402 fi
15403
15404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15405   echo "$ac_t""yes" 1>&6
15406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15407   cat >> confdefs.h <<EOF
15408 #define $ac_tr_func 1
15409 EOF
15410  
15411 else
15412   echo "$ac_t""no" 1>&6
15413 fi
15414 done
15415
15416         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15417 echo "configure:15418: checking for LinuxThreads implementation" >&5
15418 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15419   echo $ac_n "(cached) $ac_c" 1>&6
15420 else
15421   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15422 fi
15423
15424 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15425
15426                         
15427         
15428         
15429         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15430 echo "configure:15431: checking for LinuxThreads consistency" >&5
15431 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15432   echo $ac_n "(cached) $ac_c" 1>&6
15433 else
15434   
15435                 if test $ol_cv_header_linux_threads = yes -a \
15436                         $ol_cv_sys_linux_threads = yes; then
15437                         ol_cv_linux_threads=yes
15438                 elif test $ol_cv_header_linux_threads = no -a \
15439                         $ol_cv_sys_linux_threads = no; then
15440                         ol_cv_linux_threads=no
15441                 else
15442                         ol_cv_linux_threads=error
15443                 fi
15444         
15445 fi
15446
15447 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15448
15449
15450                         if test $ol_cv_linux_threads = error; then
15451                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15452                         fi
15453
15454                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15455 echo "configure:15456: checking if pthread_create() works" >&5
15456 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15457   echo $ac_n "(cached) $ac_c" 1>&6
15458 else
15459   
15460                         if test "$cross_compiling" = yes; then
15461                                 ol_cv_pthread_create_works=yes
15462 else
15463   cat > conftest.$ac_ext <<EOF
15464 #line 15465 "configure"
15465 #include "confdefs.h"
15466 /* pthread test headers */
15467 #include <pthread.h>
15468 #if HAVE_PTHREADS < 7
15469 #include <errno.h>
15470 #endif
15471 #ifndef NULL
15472 #define NULL (void*)0
15473 #endif
15474
15475 static void *task(p)
15476         void *p;
15477 {
15478         return (void *) (p == NULL);
15479 }
15480
15481
15482 int main(argc, argv)
15483         int argc;
15484         char **argv;
15485 {
15486
15487         /* pthread test function */
15488 #ifndef PTHREAD_CREATE_DETACHED
15489 #define PTHREAD_CREATE_DETACHED 1
15490 #endif
15491         pthread_t t;
15492         int status;
15493         int detach = PTHREAD_CREATE_DETACHED;
15494
15495 #if HAVE_PTHREADS > 4
15496         /* Final pthreads */
15497         pthread_attr_t attr;
15498
15499         status = pthread_attr_init(&attr);
15500         if( status ) return status;
15501
15502 #if HAVE_PTHREADS < 7
15503         status = pthread_attr_setdetachstate(&attr, &detach);
15504         if( status < 0 ) status = errno;
15505 #else
15506         status = pthread_attr_setdetachstate(&attr, detach);
15507 #endif
15508         if( status ) return status;
15509         status = pthread_create( &t, &attr, task, NULL );
15510 #if HAVE_PTHREADS < 7
15511         if( status < 0 ) status = errno;
15512 #endif
15513         if( status ) return status;
15514 #else
15515         /* Draft 4 pthreads */
15516         status = pthread_create( &t, pthread_attr_default, task, NULL );
15517         if( status ) return errno;
15518
15519         /* give thread a chance to complete */
15520         /* it should remain joinable and hence detachable */
15521         sleep( 1 );
15522
15523         status = pthread_detach( &t );
15524         if( status ) return errno;
15525 #endif
15526
15527 #ifdef HAVE_LINUX_THREADS
15528         pthread_kill_other_threads_np();
15529 #endif
15530
15531         return 0;
15532
15533 }
15534
15535 EOF
15536 if { (eval echo configure:15537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15537 then
15538   ol_cv_pthread_create_works=yes
15539 else
15540   echo "configure: failed program was:" >&5
15541   cat conftest.$ac_ext >&5
15542   rm -fr conftest*
15543   ol_cv_pthread_create_works=no
15544 fi
15545 rm -fr conftest*
15546 fi
15547
15548 fi
15549
15550 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15551
15552                         if test $ol_cv_pthread_create_works = no ; then
15553                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15554                         fi
15555
15556                                                 if test $ol_with_yielding_select = auto ; then
15557                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15558 echo "configure:15559: checking if select yields when using pthreads" >&5
15559 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15560   echo $ac_n "(cached) $ac_c" 1>&6
15561 else
15562   
15563                                 if test "$cross_compiling" = yes; then
15564   ol_cv_pthread_select_yields=cross
15565 else
15566   cat > conftest.$ac_ext <<EOF
15567 #line 15568 "configure"
15568 #include "confdefs.h"
15569
15570 #include <sys/types.h>
15571 #include <sys/time.h>
15572 #include <unistd.h>
15573 #include <pthread.h>
15574 #ifndef NULL
15575 #define NULL (void*) 0
15576 #endif
15577
15578 static int fildes[2];
15579
15580 static void *task(p)
15581         void *p;
15582 {
15583         int i;
15584         struct timeval tv;
15585
15586         fd_set rfds;
15587
15588         tv.tv_sec=10;
15589         tv.tv_usec=0;
15590
15591         FD_ZERO(&rfds);
15592         FD_SET(fildes[0], &rfds);
15593
15594         /* we're not interested in any fds */
15595         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15596
15597         if(i < 0) {
15598                 perror("select");
15599                 exit(10);
15600         }
15601
15602         exit(0); /* if we exit here, the select blocked the whole process */
15603 }
15604
15605 int main(argc, argv)
15606         int argc;
15607         char **argv;
15608 {
15609         pthread_t t;
15610
15611         /* create a pipe to select */
15612         if(pipe(&fildes[0])) {
15613                 perror("select");
15614                 exit(1);
15615         }
15616
15617 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15618         (void) pthread_setconcurrency(2);
15619 #else
15620 #ifdef HAVE_THR_SETCONCURRENCY
15621         /* Set Solaris LWP concurrency to 2 */
15622         thr_setconcurrency(2);
15623 #endif
15624 #endif
15625
15626 #if HAVE_PTHREADS < 6
15627         pthread_create(&t, pthread_attr_default, task, NULL);
15628 #else
15629         pthread_create(&t, NULL, task, NULL);
15630 #endif
15631
15632         /* make sure task runs first */
15633 #if HAVE_THR_YIELD
15634         thr_yield();
15635 #elif defined( HAVE_SCHED_YIELD )
15636         sched_yield();
15637 #elif defined( HAVE_PTHREAD_YIELD )
15638         pthread_yield();
15639 #endif
15640
15641         exit(2);
15642 }
15643 EOF
15644 if { (eval echo configure:15645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15645 then
15646   ol_cv_pthread_select_yields=no
15647 else
15648   echo "configure: failed program was:" >&5
15649   cat conftest.$ac_ext >&5
15650   rm -fr conftest*
15651   ol_cv_pthread_select_yields=yes
15652 fi
15653 rm -fr conftest*
15654 fi
15655
15656 fi
15657
15658 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15659
15660                                 if test $ol_cv_pthread_select_yields = cross ; then
15661                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15662                                 fi
15663
15664                                 if test $ol_cv_pthread_select_yields = yes ; then
15665                                         ol_with_yielding_select=yes
15666                                 fi
15667                         fi
15668
15669                                                 CPPFLAGS="$save_CPPFLAGS"
15670                         LIBS="$save_LIBS"
15671                 else
15672                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15673                 fi
15674         fi
15675
15676         if test $ol_with_threads = posix ; then
15677                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15678         fi
15679 fi
15680
15681 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15682         -o $ol_with_threads = mach ; then
15683
15684                 for ac_hdr in mach/cthreads.h cthreads.h
15685 do
15686 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15687 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15688 echo "configure:15689: checking for $ac_hdr" >&5
15689 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15690   echo $ac_n "(cached) $ac_c" 1>&6
15691 else
15692   cat > conftest.$ac_ext <<EOF
15693 #line 15694 "configure"
15694 #include "confdefs.h"
15695 #include <$ac_hdr>
15696 EOF
15697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15698 { (eval echo configure:15699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15700 if test -z "$ac_err"; then
15701   rm -rf conftest*
15702   eval "ac_cv_header_$ac_safe=yes"
15703 else
15704   echo "$ac_err" >&5
15705   echo "configure: failed program was:" >&5
15706   cat conftest.$ac_ext >&5
15707   rm -rf conftest*
15708   eval "ac_cv_header_$ac_safe=no"
15709 fi
15710 rm -f conftest*
15711 fi
15712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15713   echo "$ac_t""yes" 1>&6
15714     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15715   cat >> confdefs.h <<EOF
15716 #define $ac_tr_hdr 1
15717 EOF
15718  
15719 else
15720   echo "$ac_t""no" 1>&6
15721 fi
15722 done
15723
15724         if test $ac_cv_header_mach_cthreads_h = yes ; then
15725                 ol_with_threads=found
15726
15727                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15728 echo "configure:15729: checking for cthread_fork" >&5
15729 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15730   echo $ac_n "(cached) $ac_c" 1>&6
15731 else
15732   cat > conftest.$ac_ext <<EOF
15733 #line 15734 "configure"
15734 #include "confdefs.h"
15735 /* System header to define __stub macros and hopefully few prototypes,
15736     which can conflict with char cthread_fork(); below.  */
15737 #include <assert.h>
15738 /* Override any gcc2 internal prototype to avoid an error.  */
15739 /* We use char because int might match the return type of a gcc2
15740     builtin and then its argument prototype would still apply.  */
15741 char cthread_fork();
15742 char (*f)();
15743
15744 int main() {
15745
15746 /* The GNU C library defines this for functions which it implements
15747     to always fail with ENOSYS.  Some functions are actually named
15748     something starting with __ and the normal name is an alias.  */
15749 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15750 choke me
15751 #else
15752 f = cthread_fork;
15753 #endif
15754
15755 ; return 0; }
15756 EOF
15757 if { (eval echo configure:15758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15758   rm -rf conftest*
15759   eval "ac_cv_func_cthread_fork=yes"
15760 else
15761   echo "configure: failed program was:" >&5
15762   cat conftest.$ac_ext >&5
15763   rm -rf conftest*
15764   eval "ac_cv_func_cthread_fork=no"
15765 fi
15766 rm -f conftest*
15767 fi
15768
15769 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15770   echo "$ac_t""yes" 1>&6
15771   ol_link_threads=yes
15772 else
15773   echo "$ac_t""no" 1>&6
15774 fi
15775
15776
15777                 if test $ol_link_threads = no ; then
15778                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15779 echo "configure:15780: checking for cthread_fork with -all_load" >&5
15780 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15781   echo $ac_n "(cached) $ac_c" 1>&6
15782 else
15783   
15784                                                                 save_LIBS="$LIBS"
15785                                 LIBS="-all_load $LIBS"
15786                                 cat > conftest.$ac_ext <<EOF
15787 #line 15788 "configure"
15788 #include "confdefs.h"
15789 #include <mach/cthreads.h>
15790 int main() {
15791
15792                                         cthread_fork((void *)0, (void *)0);
15793                                         
15794 ; return 0; }
15795 EOF
15796 if { (eval echo configure:15797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15797   rm -rf conftest*
15798   ol_cv_cthread_all_load=yes
15799 else
15800   echo "configure: failed program was:" >&5
15801   cat conftest.$ac_ext >&5
15802   rm -rf conftest*
15803   ol_cv_cthread_all_load=no
15804 fi
15805 rm -f conftest*
15806                                                                 LIBS="$save_LIBS"
15807                         
15808 fi
15809
15810 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15811
15812                         if test $ol_cv_cthread_all_load = yes ; then
15813                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15814                                 ol_link_threads=mach
15815                                 ol_with_threads=found
15816                         fi
15817                 fi
15818
15819         elif test $ac_cv_header_cthreads_h = yes ; then
15820                                 
15821                 ol_with_threads=found
15822  
15823                                 save_LIBS="$LIBS"
15824                 LIBS="$LIBS -lthreads"
15825                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15826 echo "configure:15827: checking for cthread_fork" >&5
15827 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15828   echo $ac_n "(cached) $ac_c" 1>&6
15829 else
15830   cat > conftest.$ac_ext <<EOF
15831 #line 15832 "configure"
15832 #include "confdefs.h"
15833 /* System header to define __stub macros and hopefully few prototypes,
15834     which can conflict with char cthread_fork(); below.  */
15835 #include <assert.h>
15836 /* Override any gcc2 internal prototype to avoid an error.  */
15837 /* We use char because int might match the return type of a gcc2
15838     builtin and then its argument prototype would still apply.  */
15839 char cthread_fork();
15840 char (*f)();
15841
15842 int main() {
15843
15844 /* The GNU C library defines this for functions which it implements
15845     to always fail with ENOSYS.  Some functions are actually named
15846     something starting with __ and the normal name is an alias.  */
15847 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15848 choke me
15849 #else
15850 f = cthread_fork;
15851 #endif
15852
15853 ; return 0; }
15854 EOF
15855 if { (eval echo configure:15856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15856   rm -rf conftest*
15857   eval "ac_cv_func_cthread_fork=yes"
15858 else
15859   echo "configure: failed program was:" >&5
15860   cat conftest.$ac_ext >&5
15861   rm -rf conftest*
15862   eval "ac_cv_func_cthread_fork=no"
15863 fi
15864 rm -f conftest*
15865 fi
15866
15867 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15868   echo "$ac_t""yes" 1>&6
15869   ol_link_threads=yes
15870 else
15871   echo "$ac_t""no" 1>&6
15872 fi
15873
15874                 LIBS="$save_LIBS"
15875
15876                 if test $ol_link_threads = yes ; then
15877                         LTHREAD_LIBS="-lthreads"
15878                         ol_link_threads=mach
15879                         ol_with_threads=found
15880                 else
15881                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15882                 fi
15883
15884         elif test $ol_with_threads = mach ; then
15885                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15886         fi
15887
15888         if test $ol_link_threads = mach ; then
15889                 cat >> confdefs.h <<\EOF
15890 #define HAVE_MACH_CTHREADS 1
15891 EOF
15892
15893         elif test $ol_with_threads = found ; then
15894                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15895         fi
15896 fi
15897
15898 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15899         -o $ol_with_threads = pth ; then
15900
15901         for ac_hdr in pth.h
15902 do
15903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15905 echo "configure:15906: checking for $ac_hdr" >&5
15906 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15907   echo $ac_n "(cached) $ac_c" 1>&6
15908 else
15909   cat > conftest.$ac_ext <<EOF
15910 #line 15911 "configure"
15911 #include "confdefs.h"
15912 #include <$ac_hdr>
15913 EOF
15914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15915 { (eval echo configure:15916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15917 if test -z "$ac_err"; then
15918   rm -rf conftest*
15919   eval "ac_cv_header_$ac_safe=yes"
15920 else
15921   echo "$ac_err" >&5
15922   echo "configure: failed program was:" >&5
15923   cat conftest.$ac_ext >&5
15924   rm -rf conftest*
15925   eval "ac_cv_header_$ac_safe=no"
15926 fi
15927 rm -f conftest*
15928 fi
15929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15930   echo "$ac_t""yes" 1>&6
15931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15932   cat >> confdefs.h <<EOF
15933 #define $ac_tr_hdr 1
15934 EOF
15935  
15936 else
15937   echo "$ac_t""no" 1>&6
15938 fi
15939 done
15940
15941
15942         if test $ac_cv_header_pth_h = yes ; then
15943                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15944 echo "configure:15945: checking for pth_version in -lpth" >&5
15945 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15946 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15947   echo $ac_n "(cached) $ac_c" 1>&6
15948 else
15949   ac_save_LIBS="$LIBS"
15950 LIBS="-lpth  $LIBS"
15951 cat > conftest.$ac_ext <<EOF
15952 #line 15953 "configure"
15953 #include "confdefs.h"
15954 /* Override any gcc2 internal prototype to avoid an error.  */
15955 /* We use char because int might match the return type of a gcc2
15956     builtin and then its argument prototype would still apply.  */
15957 char pth_version();
15958
15959 int main() {
15960 pth_version()
15961 ; return 0; }
15962 EOF
15963 if { (eval echo configure:15964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15964   rm -rf conftest*
15965   eval "ac_cv_lib_$ac_lib_var=yes"
15966 else
15967   echo "configure: failed program was:" >&5
15968   cat conftest.$ac_ext >&5
15969   rm -rf conftest*
15970   eval "ac_cv_lib_$ac_lib_var=no"
15971 fi
15972 rm -f conftest*
15973 LIBS="$ac_save_LIBS"
15974
15975 fi
15976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15977   echo "$ac_t""yes" 1>&6
15978   have_pth=yes
15979 else
15980   echo "$ac_t""no" 1>&6
15981 have_pth=no
15982 fi
15983
15984
15985                 if test $have_pth = yes ; then
15986                         cat >> confdefs.h <<\EOF
15987 #define HAVE_GNU_PTH 1
15988 EOF
15989
15990                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15991                         ol_link_threads=pth
15992                         ol_with_threads=found
15993
15994                         if test $ol_with_yielding_select = auto ; then
15995                                 ol_with_yielding_select=yes
15996                         fi
15997                 fi
15998         fi
15999 fi
16000
16001 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16002         -o $ol_with_threads = lwp ; then
16003
16004                 for ac_hdr in thread.h synch.h
16005 do
16006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16008 echo "configure:16009: checking for $ac_hdr" >&5
16009 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16010   echo $ac_n "(cached) $ac_c" 1>&6
16011 else
16012   cat > conftest.$ac_ext <<EOF
16013 #line 16014 "configure"
16014 #include "confdefs.h"
16015 #include <$ac_hdr>
16016 EOF
16017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16018 { (eval echo configure:16019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16020 if test -z "$ac_err"; then
16021   rm -rf conftest*
16022   eval "ac_cv_header_$ac_safe=yes"
16023 else
16024   echo "$ac_err" >&5
16025   echo "configure: failed program was:" >&5
16026   cat conftest.$ac_ext >&5
16027   rm -rf conftest*
16028   eval "ac_cv_header_$ac_safe=no"
16029 fi
16030 rm -f conftest*
16031 fi
16032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16033   echo "$ac_t""yes" 1>&6
16034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16035   cat >> confdefs.h <<EOF
16036 #define $ac_tr_hdr 1
16037 EOF
16038  
16039 else
16040   echo "$ac_t""no" 1>&6
16041 fi
16042 done
16043
16044         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16045                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16046 echo "configure:16047: checking for thr_create in -lthread" >&5
16047 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16049   echo $ac_n "(cached) $ac_c" 1>&6
16050 else
16051   ac_save_LIBS="$LIBS"
16052 LIBS="-lthread  $LIBS"
16053 cat > conftest.$ac_ext <<EOF
16054 #line 16055 "configure"
16055 #include "confdefs.h"
16056 /* Override any gcc2 internal prototype to avoid an error.  */
16057 /* We use char because int might match the return type of a gcc2
16058     builtin and then its argument prototype would still apply.  */
16059 char thr_create();
16060
16061 int main() {
16062 thr_create()
16063 ; return 0; }
16064 EOF
16065 if { (eval echo configure:16066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16066   rm -rf conftest*
16067   eval "ac_cv_lib_$ac_lib_var=yes"
16068 else
16069   echo "configure: failed program was:" >&5
16070   cat conftest.$ac_ext >&5
16071   rm -rf conftest*
16072   eval "ac_cv_lib_$ac_lib_var=no"
16073 fi
16074 rm -f conftest*
16075 LIBS="$ac_save_LIBS"
16076
16077 fi
16078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16079   echo "$ac_t""yes" 1>&6
16080   have_thr=yes
16081 else
16082   echo "$ac_t""no" 1>&6
16083 have_thr=no
16084 fi
16085
16086
16087                 if test $have_thr = yes ; then
16088                         cat >> confdefs.h <<\EOF
16089 #define HAVE_THR 1
16090 EOF
16091
16092                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16093                         ol_link_threads=thr
16094
16095                         if test $ol_with_yielding_select = auto ; then
16096                                 ol_with_yielding_select=yes
16097                         fi
16098
16099                                                 for ac_func in \
16100                                 thr_setconcurrency \
16101                                 thr_getconcurrency \
16102                         
16103 do
16104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16105 echo "configure:16106: checking for $ac_func" >&5
16106 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16107   echo $ac_n "(cached) $ac_c" 1>&6
16108 else
16109   cat > conftest.$ac_ext <<EOF
16110 #line 16111 "configure"
16111 #include "confdefs.h"
16112 /* System header to define __stub macros and hopefully few prototypes,
16113     which can conflict with char $ac_func(); below.  */
16114 #include <assert.h>
16115 /* Override any gcc2 internal prototype to avoid an error.  */
16116 /* We use char because int might match the return type of a gcc2
16117     builtin and then its argument prototype would still apply.  */
16118 char $ac_func();
16119 char (*f)();
16120
16121 int main() {
16122
16123 /* The GNU C library defines this for functions which it implements
16124     to always fail with ENOSYS.  Some functions are actually named
16125     something starting with __ and the normal name is an alias.  */
16126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16127 choke me
16128 #else
16129 f = $ac_func;
16130 #endif
16131
16132 ; return 0; }
16133 EOF
16134 if { (eval echo configure:16135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16135   rm -rf conftest*
16136   eval "ac_cv_func_$ac_func=yes"
16137 else
16138   echo "configure: failed program was:" >&5
16139   cat conftest.$ac_ext >&5
16140   rm -rf conftest*
16141   eval "ac_cv_func_$ac_func=no"
16142 fi
16143 rm -f conftest*
16144 fi
16145
16146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16147   echo "$ac_t""yes" 1>&6
16148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16149   cat >> confdefs.h <<EOF
16150 #define $ac_tr_func 1
16151 EOF
16152  
16153 else
16154   echo "$ac_t""no" 1>&6
16155 fi
16156 done
16157
16158                 fi
16159         fi
16160
16161                 for ac_hdr in lwp/lwp.h
16162 do
16163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16165 echo "configure:16166: checking for $ac_hdr" >&5
16166 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16167   echo $ac_n "(cached) $ac_c" 1>&6
16168 else
16169   cat > conftest.$ac_ext <<EOF
16170 #line 16171 "configure"
16171 #include "confdefs.h"
16172 #include <$ac_hdr>
16173 EOF
16174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16175 { (eval echo configure:16176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16177 if test -z "$ac_err"; then
16178   rm -rf conftest*
16179   eval "ac_cv_header_$ac_safe=yes"
16180 else
16181   echo "$ac_err" >&5
16182   echo "configure: failed program was:" >&5
16183   cat conftest.$ac_ext >&5
16184   rm -rf conftest*
16185   eval "ac_cv_header_$ac_safe=no"
16186 fi
16187 rm -f conftest*
16188 fi
16189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16190   echo "$ac_t""yes" 1>&6
16191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16192   cat >> confdefs.h <<EOF
16193 #define $ac_tr_hdr 1
16194 EOF
16195  
16196 else
16197   echo "$ac_t""no" 1>&6
16198 fi
16199 done
16200
16201         if test $ac_cv_header_lwp_lwp_h = yes ; then
16202                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16203 echo "configure:16204: checking for lwp_create in -llwp" >&5
16204 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16206   echo $ac_n "(cached) $ac_c" 1>&6
16207 else
16208   ac_save_LIBS="$LIBS"
16209 LIBS="-llwp  $LIBS"
16210 cat > conftest.$ac_ext <<EOF
16211 #line 16212 "configure"
16212 #include "confdefs.h"
16213 /* Override any gcc2 internal prototype to avoid an error.  */
16214 /* We use char because int might match the return type of a gcc2
16215     builtin and then its argument prototype would still apply.  */
16216 char lwp_create();
16217
16218 int main() {
16219 lwp_create()
16220 ; return 0; }
16221 EOF
16222 if { (eval echo configure:16223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16223   rm -rf conftest*
16224   eval "ac_cv_lib_$ac_lib_var=yes"
16225 else
16226   echo "configure: failed program was:" >&5
16227   cat conftest.$ac_ext >&5
16228   rm -rf conftest*
16229   eval "ac_cv_lib_$ac_lib_var=no"
16230 fi
16231 rm -f conftest*
16232 LIBS="$ac_save_LIBS"
16233
16234 fi
16235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16236   echo "$ac_t""yes" 1>&6
16237   have_lwp=yes
16238 else
16239   echo "$ac_t""no" 1>&6
16240 have_lwp=no
16241 fi
16242
16243
16244                 if test $have_lwp = yes ; then
16245                         cat >> confdefs.h <<\EOF
16246 #define HAVE_LWP 1
16247 EOF
16248
16249                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16250                         ol_link_threads=lwp
16251
16252                         if test $ol_with_yielding_select = auto ; then
16253                                 ol_with_yielding_select=no
16254                         fi
16255                 fi
16256         fi
16257 fi
16258
16259 if test $ol_with_yielding_select = yes ; then
16260         cat >> confdefs.h <<\EOF
16261 #define HAVE_YIELDING_SELECT 1
16262 EOF
16263
16264 fi
16265
16266 if test $ol_with_threads = manual ; then
16267                 ol_link_threads=yes
16268
16269         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16270
16271         for ac_hdr in pthread.h sched.h
16272 do
16273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16275 echo "configure:16276: checking for $ac_hdr" >&5
16276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16277   echo $ac_n "(cached) $ac_c" 1>&6
16278 else
16279   cat > conftest.$ac_ext <<EOF
16280 #line 16281 "configure"
16281 #include "confdefs.h"
16282 #include <$ac_hdr>
16283 EOF
16284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16285 { (eval echo configure:16286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16287 if test -z "$ac_err"; then
16288   rm -rf conftest*
16289   eval "ac_cv_header_$ac_safe=yes"
16290 else
16291   echo "$ac_err" >&5
16292   echo "configure: failed program was:" >&5
16293   cat conftest.$ac_ext >&5
16294   rm -rf conftest*
16295   eval "ac_cv_header_$ac_safe=no"
16296 fi
16297 rm -f conftest*
16298 fi
16299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16300   echo "$ac_t""yes" 1>&6
16301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16302   cat >> confdefs.h <<EOF
16303 #define $ac_tr_hdr 1
16304 EOF
16305  
16306 else
16307   echo "$ac_t""no" 1>&6
16308 fi
16309 done
16310
16311         for ac_func in sched_yield pthread_yield
16312 do
16313 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16314 echo "configure:16315: checking for $ac_func" >&5
16315 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16316   echo $ac_n "(cached) $ac_c" 1>&6
16317 else
16318   cat > conftest.$ac_ext <<EOF
16319 #line 16320 "configure"
16320 #include "confdefs.h"
16321 /* System header to define __stub macros and hopefully few prototypes,
16322     which can conflict with char $ac_func(); below.  */
16323 #include <assert.h>
16324 /* Override any gcc2 internal prototype to avoid an error.  */
16325 /* We use char because int might match the return type of a gcc2
16326     builtin and then its argument prototype would still apply.  */
16327 char $ac_func();
16328 char (*f)();
16329
16330 int main() {
16331
16332 /* The GNU C library defines this for functions which it implements
16333     to always fail with ENOSYS.  Some functions are actually named
16334     something starting with __ and the normal name is an alias.  */
16335 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16336 choke me
16337 #else
16338 f = $ac_func;
16339 #endif
16340
16341 ; return 0; }
16342 EOF
16343 if { (eval echo configure:16344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16344   rm -rf conftest*
16345   eval "ac_cv_func_$ac_func=yes"
16346 else
16347   echo "configure: failed program was:" >&5
16348   cat conftest.$ac_ext >&5
16349   rm -rf conftest*
16350   eval "ac_cv_func_$ac_func=no"
16351 fi
16352 rm -f conftest*
16353 fi
16354
16355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16356   echo "$ac_t""yes" 1>&6
16357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16358   cat >> confdefs.h <<EOF
16359 #define $ac_tr_func 1
16360 EOF
16361  
16362 else
16363   echo "$ac_t""no" 1>&6
16364 fi
16365 done
16366
16367         
16368         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16369 echo "configure:16370: checking for LinuxThreads pthread.h" >&5
16370 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16371   echo $ac_n "(cached) $ac_c" 1>&6
16372 else
16373   cat > conftest.$ac_ext <<EOF
16374 #line 16375 "configure"
16375 #include "confdefs.h"
16376 #include <pthread.h>
16377 EOF
16378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16379   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16380   rm -rf conftest*
16381   ol_cv_header_linux_threads=yes
16382 else
16383   rm -rf conftest*
16384   ol_cv_header_linux_threads=no
16385 fi
16386 rm -f conftest*
16387
16388                 
16389 fi
16390
16391 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16392         if test $ol_cv_header_linux_threads = yes; then
16393                 cat >> confdefs.h <<\EOF
16394 #define HAVE_LINUX_THREADS 1
16395 EOF
16396
16397         fi
16398
16399
16400         for ac_hdr in mach/cthreads.h
16401 do
16402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16404 echo "configure:16405: checking for $ac_hdr" >&5
16405 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16406   echo $ac_n "(cached) $ac_c" 1>&6
16407 else
16408   cat > conftest.$ac_ext <<EOF
16409 #line 16410 "configure"
16410 #include "confdefs.h"
16411 #include <$ac_hdr>
16412 EOF
16413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16414 { (eval echo configure:16415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16416 if test -z "$ac_err"; then
16417   rm -rf conftest*
16418   eval "ac_cv_header_$ac_safe=yes"
16419 else
16420   echo "$ac_err" >&5
16421   echo "configure: failed program was:" >&5
16422   cat conftest.$ac_ext >&5
16423   rm -rf conftest*
16424   eval "ac_cv_header_$ac_safe=no"
16425 fi
16426 rm -f conftest*
16427 fi
16428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16429   echo "$ac_t""yes" 1>&6
16430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16431   cat >> confdefs.h <<EOF
16432 #define $ac_tr_hdr 1
16433 EOF
16434  
16435 else
16436   echo "$ac_t""no" 1>&6
16437 fi
16438 done
16439
16440         for ac_hdr in lwp/lwp.h
16441 do
16442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16444 echo "configure:16445: checking for $ac_hdr" >&5
16445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16446   echo $ac_n "(cached) $ac_c" 1>&6
16447 else
16448   cat > conftest.$ac_ext <<EOF
16449 #line 16450 "configure"
16450 #include "confdefs.h"
16451 #include <$ac_hdr>
16452 EOF
16453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16454 { (eval echo configure:16455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16456 if test -z "$ac_err"; then
16457   rm -rf conftest*
16458   eval "ac_cv_header_$ac_safe=yes"
16459 else
16460   echo "$ac_err" >&5
16461   echo "configure: failed program was:" >&5
16462   cat conftest.$ac_ext >&5
16463   rm -rf conftest*
16464   eval "ac_cv_header_$ac_safe=no"
16465 fi
16466 rm -f conftest*
16467 fi
16468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16469   echo "$ac_t""yes" 1>&6
16470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16471   cat >> confdefs.h <<EOF
16472 #define $ac_tr_hdr 1
16473 EOF
16474  
16475 else
16476   echo "$ac_t""no" 1>&6
16477 fi
16478 done
16479
16480         for ac_hdr in thread.h synch.h
16481 do
16482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16484 echo "configure:16485: checking for $ac_hdr" >&5
16485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16486   echo $ac_n "(cached) $ac_c" 1>&6
16487 else
16488   cat > conftest.$ac_ext <<EOF
16489 #line 16490 "configure"
16490 #include "confdefs.h"
16491 #include <$ac_hdr>
16492 EOF
16493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16494 { (eval echo configure:16495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16496 if test -z "$ac_err"; then
16497   rm -rf conftest*
16498   eval "ac_cv_header_$ac_safe=yes"
16499 else
16500   echo "$ac_err" >&5
16501   echo "configure: failed program was:" >&5
16502   cat conftest.$ac_ext >&5
16503   rm -rf conftest*
16504   eval "ac_cv_header_$ac_safe=no"
16505 fi
16506 rm -f conftest*
16507 fi
16508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16509   echo "$ac_t""yes" 1>&6
16510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16511   cat >> confdefs.h <<EOF
16512 #define $ac_tr_hdr 1
16513 EOF
16514  
16515 else
16516   echo "$ac_t""no" 1>&6
16517 fi
16518 done
16519
16520 fi
16521
16522 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16523                         cat >> confdefs.h <<\EOF
16524 #define REENTRANT 1
16525 EOF
16526
16527         cat >> confdefs.h <<\EOF
16528 #define _REENTRANT 1
16529 EOF
16530
16531         cat >> confdefs.h <<\EOF
16532 #define THREAD_SAFE 1
16533 EOF
16534
16535         cat >> confdefs.h <<\EOF
16536 #define _THREAD_SAFE 1
16537 EOF
16538
16539         cat >> confdefs.h <<\EOF
16540 #define THREADSAFE 1
16541 EOF
16542
16543         cat >> confdefs.h <<\EOF
16544 #define _THREADSAFE 1
16545 EOF
16546
16547         cat >> confdefs.h <<\EOF
16548 #define _SGI_MP_SOURCE 1
16549 EOF
16550
16551
16552                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16553 echo "configure:16554: checking for thread specific errno" >&5
16554 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16555   echo $ac_n "(cached) $ac_c" 1>&6
16556 else
16557   
16558                 cat > conftest.$ac_ext <<EOF
16559 #line 16560 "configure"
16560 #include "confdefs.h"
16561 #include <errno.h>
16562 int main() {
16563 errno = 0;
16564 ; return 0; }
16565 EOF
16566 if { (eval echo configure:16567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16567   rm -rf conftest*
16568   ol_cv_errno_thread_specific=yes
16569 else
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   ol_cv_errno_thread_specific=no
16574 fi
16575 rm -f conftest*
16576         
16577 fi
16578
16579 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16580
16581                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16582 echo "configure:16583: checking for thread specific h_errno" >&5
16583 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16584   echo $ac_n "(cached) $ac_c" 1>&6
16585 else
16586   
16587                 cat > conftest.$ac_ext <<EOF
16588 #line 16589 "configure"
16589 #include "confdefs.h"
16590 #include <netdb.h>
16591 int main() {
16592 h_errno = 0;
16593 ; return 0; }
16594 EOF
16595 if { (eval echo configure:16596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16596   rm -rf conftest*
16597   ol_cv_h_errno_thread_specific=yes
16598 else
16599   echo "configure: failed program was:" >&5
16600   cat conftest.$ac_ext >&5
16601   rm -rf conftest*
16602   ol_cv_h_errno_thread_specific=no
16603 fi
16604 rm -f conftest*
16605         
16606 fi
16607
16608 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16609
16610         if test $ol_cv_errno_thread_specific != yes \
16611                 -o $ol_cv_h_errno_thread_specific != yes ; then
16612                 LIBS="$LTHREAD_LIBS $LIBS"
16613                 LTHREAD_LIBS=""
16614         fi
16615
16616 fi  
16617
16618 if test $ol_link_threads = no ; then
16619         if test $ol_with_threads = yes ; then
16620                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16621         fi
16622
16623         if test $ol_with_threads = auto ; then
16624                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16625                 ol_with_threads=no
16626         fi
16627
16628         cat >> confdefs.h <<\EOF
16629 #define NO_THREADS 1
16630 EOF
16631
16632         LTHREAD_LIBS=""
16633 fi
16634
16635 if test $ol_link_threads != no ; then
16636         cat >> confdefs.h <<\EOF
16637 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16638 EOF
16639
16640 fi
16641
16642 for ac_func in \
16643         ctime_r                 \
16644         gethostbyname_r gethostbyaddr_r \
16645
16646 do
16647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16648 echo "configure:16649: checking for $ac_func" >&5
16649 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16650   echo $ac_n "(cached) $ac_c" 1>&6
16651 else
16652   cat > conftest.$ac_ext <<EOF
16653 #line 16654 "configure"
16654 #include "confdefs.h"
16655 /* System header to define __stub macros and hopefully few prototypes,
16656     which can conflict with char $ac_func(); below.  */
16657 #include <assert.h>
16658 /* Override any gcc2 internal prototype to avoid an error.  */
16659 /* We use char because int might match the return type of a gcc2
16660     builtin and then its argument prototype would still apply.  */
16661 char $ac_func();
16662 char (*f)();
16663
16664 int main() {
16665
16666 /* The GNU C library defines this for functions which it implements
16667     to always fail with ENOSYS.  Some functions are actually named
16668     something starting with __ and the normal name is an alias.  */
16669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16670 choke me
16671 #else
16672 f = $ac_func;
16673 #endif
16674
16675 ; return 0; }
16676 EOF
16677 if { (eval echo configure:16678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16678   rm -rf conftest*
16679   eval "ac_cv_func_$ac_func=yes"
16680 else
16681   echo "configure: failed program was:" >&5
16682   cat conftest.$ac_ext >&5
16683   rm -rf conftest*
16684   eval "ac_cv_func_$ac_func=no"
16685 fi
16686 rm -f conftest*
16687 fi
16688
16689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16690   echo "$ac_t""yes" 1>&6
16691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16692   cat >> confdefs.h <<EOF
16693 #define $ac_tr_func 1
16694 EOF
16695  
16696 else
16697   echo "$ac_t""no" 1>&6
16698 fi
16699 done
16700
16701
16702 if test "$ac_cv_func_ctime_r" = no ; then
16703         ol_cv_func_ctime_r_nargs=0
16704 else
16705         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16706 echo "configure:16707: checking number of arguments of ctime_r" >&5
16707 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16708   echo $ac_n "(cached) $ac_c" 1>&6
16709 else
16710   cat > conftest.$ac_ext <<EOF
16711 #line 16712 "configure"
16712 #include "confdefs.h"
16713 #include <time.h>
16714 int main() {
16715 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16716 ; return 0; }
16717 EOF
16718 if { (eval echo configure:16719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16719   rm -rf conftest*
16720   ol_cv_func_ctime_r_nargs3=yes
16721 else
16722   echo "configure: failed program was:" >&5
16723   cat conftest.$ac_ext >&5
16724   rm -rf conftest*
16725   ol_cv_func_ctime_r_nargs3=no
16726 fi
16727 rm -f conftest*
16728
16729         cat > conftest.$ac_ext <<EOF
16730 #line 16731 "configure"
16731 #include "confdefs.h"
16732 #include <time.h>
16733 int main() {
16734 time_t ti; char *buffer; ctime_r(&ti,buffer);
16735 ; return 0; }
16736 EOF
16737 if { (eval echo configure:16738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16738   rm -rf conftest*
16739   ol_cv_func_ctime_r_nargs2=yes
16740 else
16741   echo "configure: failed program was:" >&5
16742   cat conftest.$ac_ext >&5
16743   rm -rf conftest*
16744   ol_cv_func_ctime_r_nargs2=no
16745 fi
16746 rm -f conftest*
16747
16748         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16749                 $ol_cv_func_ctime_r_nargs2 = no ; then
16750
16751                 ol_cv_func_ctime_r_nargs=3
16752
16753         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16754                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16755
16756                 ol_cv_func_ctime_r_nargs=2
16757
16758         else
16759                 ol_cv_func_ctime_r_nargs=0
16760         fi
16761   
16762 fi
16763
16764 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16765
16766   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16767         cat >> confdefs.h <<EOF
16768 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16769 EOF
16770
16771   fi
16772
16773 fi
16774
16775 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16776         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16777 echo "configure:16778: checking number of arguments of gethostbyname_r" >&5
16778 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16779   echo $ac_n "(cached) $ac_c" 1>&6
16780 else
16781   cat > conftest.$ac_ext <<EOF
16782 #line 16783 "configure"
16783 #include "confdefs.h"
16784 #include <sys/types.h>
16785 #include <sys/socket.h>
16786 #include <netinet/in.h>
16787 #include <netdb.h>
16788 #define BUFSIZE (sizeof(struct hostent)+10)
16789 int main() {
16790 struct hostent hent; char buffer[BUFSIZE];
16791                 int bufsize=BUFSIZE;int h_errno;
16792                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16793                         buffer, bufsize, &h_errno);
16794 ; return 0; }
16795 EOF
16796 if { (eval echo configure:16797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16797   rm -rf conftest*
16798   ol_cv_func_gethostbyname_r_nargs5=yes
16799 else
16800   echo "configure: failed program was:" >&5
16801   cat conftest.$ac_ext >&5
16802   rm -rf conftest*
16803   ol_cv_func_gethostbyname_r_nargs5=no
16804 fi
16805 rm -f conftest*
16806
16807         cat > conftest.$ac_ext <<EOF
16808 #line 16809 "configure"
16809 #include "confdefs.h"
16810 #include <sys/types.h>
16811 #include <sys/socket.h>
16812 #include <netinet/in.h>
16813 #include <netdb.h>
16814 #define BUFSIZE (sizeof(struct hostent)+10)
16815 int main() {
16816 struct hostent hent;struct hostent *rhent;
16817                 char buffer[BUFSIZE];
16818                 int bufsize=BUFSIZE;int h_errno;
16819                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16820                         &rhent, &h_errno);
16821 ; return 0; }
16822 EOF
16823 if { (eval echo configure:16824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16824   rm -rf conftest*
16825   ol_cv_func_gethostbyname_r_nargs6=yes
16826 else
16827   echo "configure: failed program was:" >&5
16828   cat conftest.$ac_ext >&5
16829   rm -rf conftest*
16830   ol_cv_func_gethostbyname_r_nargs6=no
16831 fi
16832 rm -f conftest*
16833
16834         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16835                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16836
16837                 ol_cv_func_gethostbyname_r_nargs=5
16838
16839         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16840                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16841
16842                 ol_cv_func_gethostbyname_r_nargs=6
16843
16844         else
16845                 ol_cv_func_gethostbyname_r_nargs=0
16846         fi
16847   
16848 fi
16849
16850 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16851   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16852         cat >> confdefs.h <<EOF
16853 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16854 EOF
16855
16856   fi
16857
16858 else
16859         ol_cv_func_gethostbyname_r_nargs=0
16860 fi
16861  
16862 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16863         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16864 echo "configure:16865: checking number of arguments of gethostbyaddr_r" >&5
16865 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16866   echo $ac_n "(cached) $ac_c" 1>&6
16867 else
16868   cat > conftest.$ac_ext <<EOF
16869 #line 16870 "configure"
16870 #include "confdefs.h"
16871 #include <sys/types.h>
16872 #include <sys/socket.h>
16873 #include <netinet/in.h>
16874 #include <netdb.h>
16875 #define BUFSIZE (sizeof(struct hostent)+10)
16876 int main() {
16877 struct hostent hent; char buffer[BUFSIZE]; 
16878             struct in_addr add;
16879             size_t alen=sizeof(struct in_addr);
16880             int bufsize=BUFSIZE;int h_errno;
16881                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16882                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16883 ; return 0; }
16884 EOF
16885 if { (eval echo configure:16886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16886   rm -rf conftest*
16887   ol_cv_func_gethostbyaddr_r_nargs7=yes
16888 else
16889   echo "configure: failed program was:" >&5
16890   cat conftest.$ac_ext >&5
16891   rm -rf conftest*
16892   ol_cv_func_gethostbyaddr_r_nargs7=no
16893 fi
16894 rm -f conftest*
16895
16896         cat > conftest.$ac_ext <<EOF
16897 #line 16898 "configure"
16898 #include "confdefs.h"
16899 #include <sys/types.h>
16900 #include <sys/socket.h>
16901 #include <netinet/in.h>
16902 #include <netdb.h>
16903 #define BUFSIZE (sizeof(struct hostent)+10)
16904 int main() {
16905 struct hostent hent;
16906                 struct hostent *rhent; char buffer[BUFSIZE]; 
16907                 struct in_addr add;
16908                 size_t alen=sizeof(struct in_addr);
16909                 int bufsize=BUFSIZE;int h_errno;
16910                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16911                         alen, AF_INET, &hent, buffer, bufsize, 
16912                         &rhent, &h_errno);
16913 ; return 0; }
16914 EOF
16915 if { (eval echo configure:16916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16916   rm -rf conftest*
16917   ol_cv_func_gethostbyaddr_r_nargs8=yes
16918 else
16919   echo "configure: failed program was:" >&5
16920   cat conftest.$ac_ext >&5
16921   rm -rf conftest*
16922   ol_cv_func_gethostbyaddr_r_nargs8=no
16923 fi
16924 rm -f conftest*
16925
16926         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16927                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16928
16929                 ol_cv_func_gethostbyaddr_r_nargs=7
16930
16931         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16932                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16933
16934                 ol_cv_func_gethostbyaddr_r_nargs=8
16935
16936         else
16937                 ol_cv_func_gethostbyaddr_r_nargs=0
16938         fi
16939   
16940 fi
16941
16942 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16943   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16944     cat >> confdefs.h <<EOF
16945 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16946 EOF
16947
16948   fi
16949
16950 else
16951         ol_cv_func_gethostbyaddr_r_nargs=0
16952 fi
16953
16954 ol_link_ldbm=no 
16955
16956 if test $ol_with_ldbm_api = auto \
16957         -o $ol_with_ldbm_api = berkeley \
16958         -o $ol_with_ldbm_api = bcompat ; then
16959
16960         if test $ol_with_ldbm_api = bcompat; then \
16961                 for ac_hdr in db_185.h db.h
16962 do
16963 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16964 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16965 echo "configure:16966: checking for $ac_hdr" >&5
16966 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16967   echo $ac_n "(cached) $ac_c" 1>&6
16968 else
16969   cat > conftest.$ac_ext <<EOF
16970 #line 16971 "configure"
16971 #include "confdefs.h"
16972 #include <$ac_hdr>
16973 EOF
16974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16975 { (eval echo configure:16976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16977 if test -z "$ac_err"; then
16978   rm -rf conftest*
16979   eval "ac_cv_header_$ac_safe=yes"
16980 else
16981   echo "$ac_err" >&5
16982   echo "configure: failed program was:" >&5
16983   cat conftest.$ac_ext >&5
16984   rm -rf conftest*
16985   eval "ac_cv_header_$ac_safe=no"
16986 fi
16987 rm -f conftest*
16988 fi
16989 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16990   echo "$ac_t""yes" 1>&6
16991     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16992   cat >> confdefs.h <<EOF
16993 #define $ac_tr_hdr 1
16994 EOF
16995  
16996 else
16997   echo "$ac_t""no" 1>&6
16998 fi
16999 done
17000
17001 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17002         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17003 echo "configure:17004: checking if Berkeley DB header compatibility" >&5
17004 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17005   echo $ac_n "(cached) $ac_c" 1>&6
17006 else
17007   
17008                 cat > conftest.$ac_ext <<EOF
17009 #line 17010 "configure"
17010 #include "confdefs.h"
17011
17012 #if HAVE_DB_185_H
17013 #       include <db_185.h>
17014 #else
17015 #       include <db.h>
17016 #endif
17017
17018  /* this check could be improved */
17019 #ifndef DB_VERSION_MAJOR
17020 #       define DB_VERSION_MAJOR 1
17021 #endif
17022
17023 #if DB_VERSION_MAJOR == 1 
17024         __db_version_1
17025 #endif
17026
17027 EOF
17028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17029   egrep "__db_version_1" >/dev/null 2>&1; then
17030   rm -rf conftest*
17031   ol_cv_header_db1=yes
17032 else
17033   rm -rf conftest*
17034   ol_cv_header_db1=no
17035 fi
17036 rm -f conftest*
17037
17038 fi
17039
17040 echo "$ac_t""$ol_cv_header_db1" 1>&6
17041
17042         if test $ol_cv_header_db1 = yes ; then
17043                 ol_cv_lib_db=no
17044 if test $ol_cv_lib_db = no ; then
17045         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17046 echo "configure:17047: checking for Berkeley DB link (default)" >&5
17047 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17048   echo $ac_n "(cached) $ac_c" 1>&6
17049 else
17050   
17051         ol_DB_LIB=
17052         ol_LIBS=$LIBS
17053         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17054
17055         cat > conftest.$ac_ext <<EOF
17056 #line 17057 "configure"
17057 #include "confdefs.h"
17058
17059 #ifdef HAVE_DB_185_H
17060 # include <db_185.h>
17061 #else
17062 # include <db.h>
17063 #endif
17064
17065 #ifndef DB_VERSION_MAJOR
17066 # define DB_VERSION_MAJOR 1
17067 #endif
17068
17069 #ifndef NULL
17070 #define NULL ((void*)0)
17071 #endif
17072
17073 int main() {
17074
17075 #if DB_VERSION_MAJOR > 1
17076         {
17077                 char *version;
17078                 int major, minor, patch;
17079
17080                 version = db_version( &major, &minor, &patch );
17081
17082                 if( major != DB_VERSION_MAJOR ||
17083                         minor < DB_VERSION_MINOR )
17084                 {
17085                         printf("Berkeley DB version mismatch\n"
17086                                 "\theader: %s\n\tlibrary: %s\n",
17087                                 DB_VERSION_STRING, version);
17088                         return 1;
17089                 }
17090         }
17091 #endif
17092
17093 #if DB_VERSION_MAJOR > 2
17094         db_env_create( NULL, 0 );
17095 #elif DB_VERSION_MAJOR > 1
17096         db_appexit( NULL );
17097 #else
17098         (void) dbopen( NULL, 0, 0, 0, NULL);
17099 #endif
17100
17101 ; return 0; }
17102 EOF
17103 if { (eval echo configure:17104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17104   rm -rf conftest*
17105   ol_cv_db_none=yes
17106 else
17107   echo "configure: failed program was:" >&5
17108   cat conftest.$ac_ext >&5
17109   rm -rf conftest*
17110   ol_cv_db_none=no
17111 fi
17112 rm -f conftest*
17113
17114         LIBS="$ol_LIBS"
17115
17116 fi
17117
17118 echo "$ac_t""$ol_cv_db_none" 1>&6
17119
17120         if test $ol_cv_db_none = yes ; then
17121                 ol_cv_lib_db=yes
17122         fi
17123 fi
17124
17125 if test $ol_cv_lib_db = no ; then
17126         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17127 echo "configure:17128: checking for Berkeley DB link (-ldb43)" >&5
17128 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17129   echo $ac_n "(cached) $ac_c" 1>&6
17130 else
17131   
17132         ol_DB_LIB=-ldb43
17133         ol_LIBS=$LIBS
17134         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17135
17136         cat > conftest.$ac_ext <<EOF
17137 #line 17138 "configure"
17138 #include "confdefs.h"
17139
17140 #ifdef HAVE_DB_185_H
17141 # include <db_185.h>
17142 #else
17143 # include <db.h>
17144 #endif
17145
17146 #ifndef DB_VERSION_MAJOR
17147 # define DB_VERSION_MAJOR 1
17148 #endif
17149
17150 #ifndef NULL
17151 #define NULL ((void*)0)
17152 #endif
17153
17154 int main() {
17155
17156 #if DB_VERSION_MAJOR > 1
17157         {
17158                 char *version;
17159                 int major, minor, patch;
17160
17161                 version = db_version( &major, &minor, &patch );
17162
17163                 if( major != DB_VERSION_MAJOR ||
17164                         minor < DB_VERSION_MINOR )
17165                 {
17166                         printf("Berkeley DB version mismatch\n"
17167                                 "\theader: %s\n\tlibrary: %s\n",
17168                                 DB_VERSION_STRING, version);
17169                         return 1;
17170                 }
17171         }
17172 #endif
17173
17174 #if DB_VERSION_MAJOR > 2
17175         db_env_create( NULL, 0 );
17176 #elif DB_VERSION_MAJOR > 1
17177         db_appexit( NULL );
17178 #else
17179         (void) dbopen( NULL, 0, 0, 0, NULL);
17180 #endif
17181
17182 ; return 0; }
17183 EOF
17184 if { (eval echo configure:17185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17185   rm -rf conftest*
17186   ol_cv_db_db43=yes
17187 else
17188   echo "configure: failed program was:" >&5
17189   cat conftest.$ac_ext >&5
17190   rm -rf conftest*
17191   ol_cv_db_db43=no
17192 fi
17193 rm -f conftest*
17194
17195         LIBS="$ol_LIBS"
17196
17197 fi
17198
17199 echo "$ac_t""$ol_cv_db_db43" 1>&6
17200
17201         if test $ol_cv_db_db43 = yes ; then
17202                 ol_cv_lib_db=-ldb43
17203         fi
17204 fi
17205
17206 if test $ol_cv_lib_db = no ; then
17207         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17208 echo "configure:17209: checking for Berkeley DB link (-ldb-43)" >&5
17209 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17210   echo $ac_n "(cached) $ac_c" 1>&6
17211 else
17212   
17213         ol_DB_LIB=-ldb-43
17214         ol_LIBS=$LIBS
17215         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17216
17217         cat > conftest.$ac_ext <<EOF
17218 #line 17219 "configure"
17219 #include "confdefs.h"
17220
17221 #ifdef HAVE_DB_185_H
17222 # include <db_185.h>
17223 #else
17224 # include <db.h>
17225 #endif
17226
17227 #ifndef DB_VERSION_MAJOR
17228 # define DB_VERSION_MAJOR 1
17229 #endif
17230
17231 #ifndef NULL
17232 #define NULL ((void*)0)
17233 #endif
17234
17235 int main() {
17236
17237 #if DB_VERSION_MAJOR > 1
17238         {
17239                 char *version;
17240                 int major, minor, patch;
17241
17242                 version = db_version( &major, &minor, &patch );
17243
17244                 if( major != DB_VERSION_MAJOR ||
17245                         minor < DB_VERSION_MINOR )
17246                 {
17247                         printf("Berkeley DB version mismatch\n"
17248                                 "\theader: %s\n\tlibrary: %s\n",
17249                                 DB_VERSION_STRING, version);
17250                         return 1;
17251                 }
17252         }
17253 #endif
17254
17255 #if DB_VERSION_MAJOR > 2
17256         db_env_create( NULL, 0 );
17257 #elif DB_VERSION_MAJOR > 1
17258         db_appexit( NULL );
17259 #else
17260         (void) dbopen( NULL, 0, 0, 0, NULL);
17261 #endif
17262
17263 ; return 0; }
17264 EOF
17265 if { (eval echo configure:17266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17266   rm -rf conftest*
17267   ol_cv_db_db_43=yes
17268 else
17269   echo "configure: failed program was:" >&5
17270   cat conftest.$ac_ext >&5
17271   rm -rf conftest*
17272   ol_cv_db_db_43=no
17273 fi
17274 rm -f conftest*
17275
17276         LIBS="$ol_LIBS"
17277
17278 fi
17279
17280 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17281
17282         if test $ol_cv_db_db_43 = yes ; then
17283                 ol_cv_lib_db=-ldb-43
17284         fi
17285 fi
17286
17287 if test $ol_cv_lib_db = no ; then
17288         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17289 echo "configure:17290: checking for Berkeley DB link (-ldb-4.3)" >&5
17290 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17291   echo $ac_n "(cached) $ac_c" 1>&6
17292 else
17293   
17294         ol_DB_LIB=-ldb-4.3
17295         ol_LIBS=$LIBS
17296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17297
17298         cat > conftest.$ac_ext <<EOF
17299 #line 17300 "configure"
17300 #include "confdefs.h"
17301
17302 #ifdef HAVE_DB_185_H
17303 # include <db_185.h>
17304 #else
17305 # include <db.h>
17306 #endif
17307
17308 #ifndef DB_VERSION_MAJOR
17309 # define DB_VERSION_MAJOR 1
17310 #endif
17311
17312 #ifndef NULL
17313 #define NULL ((void*)0)
17314 #endif
17315
17316 int main() {
17317
17318 #if DB_VERSION_MAJOR > 1
17319         {
17320                 char *version;
17321                 int major, minor, patch;
17322
17323                 version = db_version( &major, &minor, &patch );
17324
17325                 if( major != DB_VERSION_MAJOR ||
17326                         minor < DB_VERSION_MINOR )
17327                 {
17328                         printf("Berkeley DB version mismatch\n"
17329                                 "\theader: %s\n\tlibrary: %s\n",
17330                                 DB_VERSION_STRING, version);
17331                         return 1;
17332                 }
17333         }
17334 #endif
17335
17336 #if DB_VERSION_MAJOR > 2
17337         db_env_create( NULL, 0 );
17338 #elif DB_VERSION_MAJOR > 1
17339         db_appexit( NULL );
17340 #else
17341         (void) dbopen( NULL, 0, 0, 0, NULL);
17342 #endif
17343
17344 ; return 0; }
17345 EOF
17346 if { (eval echo configure:17347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17347   rm -rf conftest*
17348   ol_cv_db_db_4_dot_3=yes
17349 else
17350   echo "configure: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   rm -rf conftest*
17353   ol_cv_db_db_4_dot_3=no
17354 fi
17355 rm -f conftest*
17356
17357         LIBS="$ol_LIBS"
17358
17359 fi
17360
17361 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17362
17363         if test $ol_cv_db_db_4_dot_3 = yes ; then
17364                 ol_cv_lib_db=-ldb-4.3
17365         fi
17366 fi
17367
17368 if test $ol_cv_lib_db = no ; then
17369         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17370 echo "configure:17371: checking for Berkeley DB link (-ldb-4-3)" >&5
17371 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17372   echo $ac_n "(cached) $ac_c" 1>&6
17373 else
17374   
17375         ol_DB_LIB=-ldb-4-3
17376         ol_LIBS=$LIBS
17377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17378
17379         cat > conftest.$ac_ext <<EOF
17380 #line 17381 "configure"
17381 #include "confdefs.h"
17382
17383 #ifdef HAVE_DB_185_H
17384 # include <db_185.h>
17385 #else
17386 # include <db.h>
17387 #endif
17388
17389 #ifndef DB_VERSION_MAJOR
17390 # define DB_VERSION_MAJOR 1
17391 #endif
17392
17393 #ifndef NULL
17394 #define NULL ((void*)0)
17395 #endif
17396
17397 int main() {
17398
17399 #if DB_VERSION_MAJOR > 1
17400         {
17401                 char *version;
17402                 int major, minor, patch;
17403
17404                 version = db_version( &major, &minor, &patch );
17405
17406                 if( major != DB_VERSION_MAJOR ||
17407                         minor < DB_VERSION_MINOR )
17408                 {
17409                         printf("Berkeley DB version mismatch\n"
17410                                 "\theader: %s\n\tlibrary: %s\n",
17411                                 DB_VERSION_STRING, version);
17412                         return 1;
17413                 }
17414         }
17415 #endif
17416
17417 #if DB_VERSION_MAJOR > 2
17418         db_env_create( NULL, 0 );
17419 #elif DB_VERSION_MAJOR > 1
17420         db_appexit( NULL );
17421 #else
17422         (void) dbopen( NULL, 0, 0, 0, NULL);
17423 #endif
17424
17425 ; return 0; }
17426 EOF
17427 if { (eval echo configure:17428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17428   rm -rf conftest*
17429   ol_cv_db_db_4_3=yes
17430 else
17431   echo "configure: failed program was:" >&5
17432   cat conftest.$ac_ext >&5
17433   rm -rf conftest*
17434   ol_cv_db_db_4_3=no
17435 fi
17436 rm -f conftest*
17437
17438         LIBS="$ol_LIBS"
17439
17440 fi
17441
17442 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17443
17444         if test $ol_cv_db_db_4_3 = yes ; then
17445                 ol_cv_lib_db=-ldb-4-3
17446         fi
17447 fi
17448
17449 if test $ol_cv_lib_db = no ; then
17450         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17451 echo "configure:17452: checking for Berkeley DB link (-ldb42)" >&5
17452 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17453   echo $ac_n "(cached) $ac_c" 1>&6
17454 else
17455   
17456         ol_DB_LIB=-ldb42
17457         ol_LIBS=$LIBS
17458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17459
17460         cat > conftest.$ac_ext <<EOF
17461 #line 17462 "configure"
17462 #include "confdefs.h"
17463
17464 #ifdef HAVE_DB_185_H
17465 # include <db_185.h>
17466 #else
17467 # include <db.h>
17468 #endif
17469
17470 #ifndef DB_VERSION_MAJOR
17471 # define DB_VERSION_MAJOR 1
17472 #endif
17473
17474 #ifndef NULL
17475 #define NULL ((void*)0)
17476 #endif
17477
17478 int main() {
17479
17480 #if DB_VERSION_MAJOR > 1
17481         {
17482                 char *version;
17483                 int major, minor, patch;
17484
17485                 version = db_version( &major, &minor, &patch );
17486
17487                 if( major != DB_VERSION_MAJOR ||
17488                         minor < DB_VERSION_MINOR )
17489                 {
17490                         printf("Berkeley DB version mismatch\n"
17491                                 "\theader: %s\n\tlibrary: %s\n",
17492                                 DB_VERSION_STRING, version);
17493                         return 1;
17494                 }
17495         }
17496 #endif
17497
17498 #if DB_VERSION_MAJOR > 2
17499         db_env_create( NULL, 0 );
17500 #elif DB_VERSION_MAJOR > 1
17501         db_appexit( NULL );
17502 #else
17503         (void) dbopen( NULL, 0, 0, 0, NULL);
17504 #endif
17505
17506 ; return 0; }
17507 EOF
17508 if { (eval echo configure:17509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17509   rm -rf conftest*
17510   ol_cv_db_db42=yes
17511 else
17512   echo "configure: failed program was:" >&5
17513   cat conftest.$ac_ext >&5
17514   rm -rf conftest*
17515   ol_cv_db_db42=no
17516 fi
17517 rm -f conftest*
17518
17519         LIBS="$ol_LIBS"
17520
17521 fi
17522
17523 echo "$ac_t""$ol_cv_db_db42" 1>&6
17524
17525         if test $ol_cv_db_db42 = yes ; then
17526                 ol_cv_lib_db=-ldb42
17527         fi
17528 fi
17529
17530 if test $ol_cv_lib_db = no ; then
17531         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17532 echo "configure:17533: checking for Berkeley DB link (-ldb-42)" >&5
17533 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17534   echo $ac_n "(cached) $ac_c" 1>&6
17535 else
17536   
17537         ol_DB_LIB=-ldb-42
17538         ol_LIBS=$LIBS
17539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17540
17541         cat > conftest.$ac_ext <<EOF
17542 #line 17543 "configure"
17543 #include "confdefs.h"
17544
17545 #ifdef HAVE_DB_185_H
17546 # include <db_185.h>
17547 #else
17548 # include <db.h>
17549 #endif
17550
17551 #ifndef DB_VERSION_MAJOR
17552 # define DB_VERSION_MAJOR 1
17553 #endif
17554
17555 #ifndef NULL
17556 #define NULL ((void*)0)
17557 #endif
17558
17559 int main() {
17560
17561 #if DB_VERSION_MAJOR > 1
17562         {
17563                 char *version;
17564                 int major, minor, patch;
17565
17566                 version = db_version( &major, &minor, &patch );
17567
17568                 if( major != DB_VERSION_MAJOR ||
17569                         minor < DB_VERSION_MINOR )
17570                 {
17571                         printf("Berkeley DB version mismatch\n"
17572                                 "\theader: %s\n\tlibrary: %s\n",
17573                                 DB_VERSION_STRING, version);
17574                         return 1;
17575                 }
17576         }
17577 #endif
17578
17579 #if DB_VERSION_MAJOR > 2
17580         db_env_create( NULL, 0 );
17581 #elif DB_VERSION_MAJOR > 1
17582         db_appexit( NULL );
17583 #else
17584         (void) dbopen( NULL, 0, 0, 0, NULL);
17585 #endif
17586
17587 ; return 0; }
17588 EOF
17589 if { (eval echo configure:17590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17590   rm -rf conftest*
17591   ol_cv_db_db_42=yes
17592 else
17593   echo "configure: failed program was:" >&5
17594   cat conftest.$ac_ext >&5
17595   rm -rf conftest*
17596   ol_cv_db_db_42=no
17597 fi
17598 rm -f conftest*
17599
17600         LIBS="$ol_LIBS"
17601
17602 fi
17603
17604 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17605
17606         if test $ol_cv_db_db_42 = yes ; then
17607                 ol_cv_lib_db=-ldb-42
17608         fi
17609 fi
17610
17611 if test $ol_cv_lib_db = no ; then
17612         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17613 echo "configure:17614: checking for Berkeley DB link (-ldb-4.2)" >&5
17614 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17615   echo $ac_n "(cached) $ac_c" 1>&6
17616 else
17617   
17618         ol_DB_LIB=-ldb-4.2
17619         ol_LIBS=$LIBS
17620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17621
17622         cat > conftest.$ac_ext <<EOF
17623 #line 17624 "configure"
17624 #include "confdefs.h"
17625
17626 #ifdef HAVE_DB_185_H
17627 # include <db_185.h>
17628 #else
17629 # include <db.h>
17630 #endif
17631
17632 #ifndef DB_VERSION_MAJOR
17633 # define DB_VERSION_MAJOR 1
17634 #endif
17635
17636 #ifndef NULL
17637 #define NULL ((void*)0)
17638 #endif
17639
17640 int main() {
17641
17642 #if DB_VERSION_MAJOR > 1
17643         {
17644                 char *version;
17645                 int major, minor, patch;
17646
17647                 version = db_version( &major, &minor, &patch );
17648
17649                 if( major != DB_VERSION_MAJOR ||
17650                         minor < DB_VERSION_MINOR )
17651                 {
17652                         printf("Berkeley DB version mismatch\n"
17653                                 "\theader: %s\n\tlibrary: %s\n",
17654                                 DB_VERSION_STRING, version);
17655                         return 1;
17656                 }
17657         }
17658 #endif
17659
17660 #if DB_VERSION_MAJOR > 2
17661         db_env_create( NULL, 0 );
17662 #elif DB_VERSION_MAJOR > 1
17663         db_appexit( NULL );
17664 #else
17665         (void) dbopen( NULL, 0, 0, 0, NULL);
17666 #endif
17667
17668 ; return 0; }
17669 EOF
17670 if { (eval echo configure:17671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17671   rm -rf conftest*
17672   ol_cv_db_db_4_dot_2=yes
17673 else
17674   echo "configure: failed program was:" >&5
17675   cat conftest.$ac_ext >&5
17676   rm -rf conftest*
17677   ol_cv_db_db_4_dot_2=no
17678 fi
17679 rm -f conftest*
17680
17681         LIBS="$ol_LIBS"
17682
17683 fi
17684
17685 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17686
17687         if test $ol_cv_db_db_4_dot_2 = yes ; then
17688                 ol_cv_lib_db=-ldb-4.2
17689         fi
17690 fi
17691
17692 if test $ol_cv_lib_db = no ; then
17693         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17694 echo "configure:17695: checking for Berkeley DB link (-ldb-4-2)" >&5
17695 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17696   echo $ac_n "(cached) $ac_c" 1>&6
17697 else
17698   
17699         ol_DB_LIB=-ldb-4-2
17700         ol_LIBS=$LIBS
17701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17702
17703         cat > conftest.$ac_ext <<EOF
17704 #line 17705 "configure"
17705 #include "confdefs.h"
17706
17707 #ifdef HAVE_DB_185_H
17708 # include <db_185.h>
17709 #else
17710 # include <db.h>
17711 #endif
17712
17713 #ifndef DB_VERSION_MAJOR
17714 # define DB_VERSION_MAJOR 1
17715 #endif
17716
17717 #ifndef NULL
17718 #define NULL ((void*)0)
17719 #endif
17720
17721 int main() {
17722
17723 #if DB_VERSION_MAJOR > 1
17724         {
17725                 char *version;
17726                 int major, minor, patch;
17727
17728                 version = db_version( &major, &minor, &patch );
17729
17730                 if( major != DB_VERSION_MAJOR ||
17731                         minor < DB_VERSION_MINOR )
17732                 {
17733                         printf("Berkeley DB version mismatch\n"
17734                                 "\theader: %s\n\tlibrary: %s\n",
17735                                 DB_VERSION_STRING, version);
17736                         return 1;
17737                 }
17738         }
17739 #endif
17740
17741 #if DB_VERSION_MAJOR > 2
17742         db_env_create( NULL, 0 );
17743 #elif DB_VERSION_MAJOR > 1
17744         db_appexit( NULL );
17745 #else
17746         (void) dbopen( NULL, 0, 0, 0, NULL);
17747 #endif
17748
17749 ; return 0; }
17750 EOF
17751 if { (eval echo configure:17752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17752   rm -rf conftest*
17753   ol_cv_db_db_4_2=yes
17754 else
17755   echo "configure: failed program was:" >&5
17756   cat conftest.$ac_ext >&5
17757   rm -rf conftest*
17758   ol_cv_db_db_4_2=no
17759 fi
17760 rm -f conftest*
17761
17762         LIBS="$ol_LIBS"
17763
17764 fi
17765
17766 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17767
17768         if test $ol_cv_db_db_4_2 = yes ; then
17769                 ol_cv_lib_db=-ldb-4-2
17770         fi
17771 fi
17772
17773 if test $ol_cv_lib_db = no ; then
17774         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17775 echo "configure:17776: checking for Berkeley DB link (-ldb-4)" >&5
17776 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17777   echo $ac_n "(cached) $ac_c" 1>&6
17778 else
17779   
17780         ol_DB_LIB=-ldb-4
17781         ol_LIBS=$LIBS
17782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17783
17784         cat > conftest.$ac_ext <<EOF
17785 #line 17786 "configure"
17786 #include "confdefs.h"
17787
17788 #ifdef HAVE_DB_185_H
17789 # include <db_185.h>
17790 #else
17791 # include <db.h>
17792 #endif
17793
17794 #ifndef DB_VERSION_MAJOR
17795 # define DB_VERSION_MAJOR 1
17796 #endif
17797
17798 #ifndef NULL
17799 #define NULL ((void*)0)
17800 #endif
17801
17802 int main() {
17803
17804 #if DB_VERSION_MAJOR > 1
17805         {
17806                 char *version;
17807                 int major, minor, patch;
17808
17809                 version = db_version( &major, &minor, &patch );
17810
17811                 if( major != DB_VERSION_MAJOR ||
17812                         minor < DB_VERSION_MINOR )
17813                 {
17814                         printf("Berkeley DB version mismatch\n"
17815                                 "\theader: %s\n\tlibrary: %s\n",
17816                                 DB_VERSION_STRING, version);
17817                         return 1;
17818                 }
17819         }
17820 #endif
17821
17822 #if DB_VERSION_MAJOR > 2
17823         db_env_create( NULL, 0 );
17824 #elif DB_VERSION_MAJOR > 1
17825         db_appexit( NULL );
17826 #else
17827         (void) dbopen( NULL, 0, 0, 0, NULL);
17828 #endif
17829
17830 ; return 0; }
17831 EOF
17832 if { (eval echo configure:17833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17833   rm -rf conftest*
17834   ol_cv_db_db_4=yes
17835 else
17836   echo "configure: failed program was:" >&5
17837   cat conftest.$ac_ext >&5
17838   rm -rf conftest*
17839   ol_cv_db_db_4=no
17840 fi
17841 rm -f conftest*
17842
17843         LIBS="$ol_LIBS"
17844
17845 fi
17846
17847 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17848
17849         if test $ol_cv_db_db_4 = yes ; then
17850                 ol_cv_lib_db=-ldb-4
17851         fi
17852 fi
17853
17854 if test $ol_cv_lib_db = no ; then
17855         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17856 echo "configure:17857: checking for Berkeley DB link (-ldb4)" >&5
17857 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17858   echo $ac_n "(cached) $ac_c" 1>&6
17859 else
17860   
17861         ol_DB_LIB=-ldb4
17862         ol_LIBS=$LIBS
17863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17864
17865         cat > conftest.$ac_ext <<EOF
17866 #line 17867 "configure"
17867 #include "confdefs.h"
17868
17869 #ifdef HAVE_DB_185_H
17870 # include <db_185.h>
17871 #else
17872 # include <db.h>
17873 #endif
17874
17875 #ifndef DB_VERSION_MAJOR
17876 # define DB_VERSION_MAJOR 1
17877 #endif
17878
17879 #ifndef NULL
17880 #define NULL ((void*)0)
17881 #endif
17882
17883 int main() {
17884
17885 #if DB_VERSION_MAJOR > 1
17886         {
17887                 char *version;
17888                 int major, minor, patch;
17889
17890                 version = db_version( &major, &minor, &patch );
17891
17892                 if( major != DB_VERSION_MAJOR ||
17893                         minor < DB_VERSION_MINOR )
17894                 {
17895                         printf("Berkeley DB version mismatch\n"
17896                                 "\theader: %s\n\tlibrary: %s\n",
17897                                 DB_VERSION_STRING, version);
17898                         return 1;
17899                 }
17900         }
17901 #endif
17902
17903 #if DB_VERSION_MAJOR > 2
17904         db_env_create( NULL, 0 );
17905 #elif DB_VERSION_MAJOR > 1
17906         db_appexit( NULL );
17907 #else
17908         (void) dbopen( NULL, 0, 0, 0, NULL);
17909 #endif
17910
17911 ; return 0; }
17912 EOF
17913 if { (eval echo configure:17914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17914   rm -rf conftest*
17915   ol_cv_db_db4=yes
17916 else
17917   echo "configure: failed program was:" >&5
17918   cat conftest.$ac_ext >&5
17919   rm -rf conftest*
17920   ol_cv_db_db4=no
17921 fi
17922 rm -f conftest*
17923
17924         LIBS="$ol_LIBS"
17925
17926 fi
17927
17928 echo "$ac_t""$ol_cv_db_db4" 1>&6
17929
17930         if test $ol_cv_db_db4 = yes ; then
17931                 ol_cv_lib_db=-ldb4
17932         fi
17933 fi
17934
17935 if test $ol_cv_lib_db = no ; then
17936         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17937 echo "configure:17938: checking for Berkeley DB link (-ldb)" >&5
17938 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17939   echo $ac_n "(cached) $ac_c" 1>&6
17940 else
17941   
17942         ol_DB_LIB=-ldb
17943         ol_LIBS=$LIBS
17944         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17945
17946         cat > conftest.$ac_ext <<EOF
17947 #line 17948 "configure"
17948 #include "confdefs.h"
17949
17950 #ifdef HAVE_DB_185_H
17951 # include <db_185.h>
17952 #else
17953 # include <db.h>
17954 #endif
17955
17956 #ifndef DB_VERSION_MAJOR
17957 # define DB_VERSION_MAJOR 1
17958 #endif
17959
17960 #ifndef NULL
17961 #define NULL ((void*)0)
17962 #endif
17963
17964 int main() {
17965
17966 #if DB_VERSION_MAJOR > 1
17967         {
17968                 char *version;
17969                 int major, minor, patch;
17970
17971                 version = db_version( &major, &minor, &patch );
17972
17973                 if( major != DB_VERSION_MAJOR ||
17974                         minor < DB_VERSION_MINOR )
17975                 {
17976                         printf("Berkeley DB version mismatch\n"
17977                                 "\theader: %s\n\tlibrary: %s\n",
17978                                 DB_VERSION_STRING, version);
17979                         return 1;
17980                 }
17981         }
17982 #endif
17983
17984 #if DB_VERSION_MAJOR > 2
17985         db_env_create( NULL, 0 );
17986 #elif DB_VERSION_MAJOR > 1
17987         db_appexit( NULL );
17988 #else
17989         (void) dbopen( NULL, 0, 0, 0, NULL);
17990 #endif
17991
17992 ; return 0; }
17993 EOF
17994 if { (eval echo configure:17995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17995   rm -rf conftest*
17996   ol_cv_db_db=yes
17997 else
17998   echo "configure: failed program was:" >&5
17999   cat conftest.$ac_ext >&5
18000   rm -rf conftest*
18001   ol_cv_db_db=no
18002 fi
18003 rm -f conftest*
18004
18005         LIBS="$ol_LIBS"
18006
18007 fi
18008
18009 echo "$ac_t""$ol_cv_db_db" 1>&6
18010
18011         if test $ol_cv_db_db = yes ; then
18012                 ol_cv_lib_db=-ldb
18013         fi
18014 fi
18015
18016 if test $ol_cv_lib_db = no ; then
18017         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18018 echo "configure:18019: checking for Berkeley DB link (-ldb41)" >&5
18019 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18020   echo $ac_n "(cached) $ac_c" 1>&6
18021 else
18022   
18023         ol_DB_LIB=-ldb41
18024         ol_LIBS=$LIBS
18025         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18026
18027         cat > conftest.$ac_ext <<EOF
18028 #line 18029 "configure"
18029 #include "confdefs.h"
18030
18031 #ifdef HAVE_DB_185_H
18032 # include <db_185.h>
18033 #else
18034 # include <db.h>
18035 #endif
18036
18037 #ifndef DB_VERSION_MAJOR
18038 # define DB_VERSION_MAJOR 1
18039 #endif
18040
18041 #ifndef NULL
18042 #define NULL ((void*)0)
18043 #endif
18044
18045 int main() {
18046
18047 #if DB_VERSION_MAJOR > 1
18048         {
18049                 char *version;
18050                 int major, minor, patch;
18051
18052                 version = db_version( &major, &minor, &patch );
18053
18054                 if( major != DB_VERSION_MAJOR ||
18055                         minor < DB_VERSION_MINOR )
18056                 {
18057                         printf("Berkeley DB version mismatch\n"
18058                                 "\theader: %s\n\tlibrary: %s\n",
18059                                 DB_VERSION_STRING, version);
18060                         return 1;
18061                 }
18062         }
18063 #endif
18064
18065 #if DB_VERSION_MAJOR > 2
18066         db_env_create( NULL, 0 );
18067 #elif DB_VERSION_MAJOR > 1
18068         db_appexit( NULL );
18069 #else
18070         (void) dbopen( NULL, 0, 0, 0, NULL);
18071 #endif
18072
18073 ; return 0; }
18074 EOF
18075 if { (eval echo configure:18076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18076   rm -rf conftest*
18077   ol_cv_db_db41=yes
18078 else
18079   echo "configure: failed program was:" >&5
18080   cat conftest.$ac_ext >&5
18081   rm -rf conftest*
18082   ol_cv_db_db41=no
18083 fi
18084 rm -f conftest*
18085
18086         LIBS="$ol_LIBS"
18087
18088 fi
18089
18090 echo "$ac_t""$ol_cv_db_db41" 1>&6
18091
18092         if test $ol_cv_db_db41 = yes ; then
18093                 ol_cv_lib_db=-ldb41
18094         fi
18095 fi
18096
18097 if test $ol_cv_lib_db = no ; then
18098         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18099 echo "configure:18100: checking for Berkeley DB link (-ldb-41)" >&5
18100 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18101   echo $ac_n "(cached) $ac_c" 1>&6
18102 else
18103   
18104         ol_DB_LIB=-ldb-41
18105         ol_LIBS=$LIBS
18106         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18107
18108         cat > conftest.$ac_ext <<EOF
18109 #line 18110 "configure"
18110 #include "confdefs.h"
18111
18112 #ifdef HAVE_DB_185_H
18113 # include <db_185.h>
18114 #else
18115 # include <db.h>
18116 #endif
18117
18118 #ifndef DB_VERSION_MAJOR
18119 # define DB_VERSION_MAJOR 1
18120 #endif
18121
18122 #ifndef NULL
18123 #define NULL ((void*)0)
18124 #endif
18125
18126 int main() {
18127
18128 #if DB_VERSION_MAJOR > 1
18129         {
18130                 char *version;
18131                 int major, minor, patch;
18132
18133                 version = db_version( &major, &minor, &patch );
18134
18135                 if( major != DB_VERSION_MAJOR ||
18136                         minor < DB_VERSION_MINOR )
18137                 {
18138                         printf("Berkeley DB version mismatch\n"
18139                                 "\theader: %s\n\tlibrary: %s\n",
18140                                 DB_VERSION_STRING, version);
18141                         return 1;
18142                 }
18143         }
18144 #endif
18145
18146 #if DB_VERSION_MAJOR > 2
18147         db_env_create( NULL, 0 );
18148 #elif DB_VERSION_MAJOR > 1
18149         db_appexit( NULL );
18150 #else
18151         (void) dbopen( NULL, 0, 0, 0, NULL);
18152 #endif
18153
18154 ; return 0; }
18155 EOF
18156 if { (eval echo configure:18157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18157   rm -rf conftest*
18158   ol_cv_db_db_41=yes
18159 else
18160   echo "configure: failed program was:" >&5
18161   cat conftest.$ac_ext >&5
18162   rm -rf conftest*
18163   ol_cv_db_db_41=no
18164 fi
18165 rm -f conftest*
18166
18167         LIBS="$ol_LIBS"
18168
18169 fi
18170
18171 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18172
18173         if test $ol_cv_db_db_41 = yes ; then
18174                 ol_cv_lib_db=-ldb-41
18175         fi
18176 fi
18177
18178 if test $ol_cv_lib_db = no ; then
18179         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18180 echo "configure:18181: checking for Berkeley DB link (-ldb-4.1)" >&5
18181 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18182   echo $ac_n "(cached) $ac_c" 1>&6
18183 else
18184   
18185         ol_DB_LIB=-ldb-4.1
18186         ol_LIBS=$LIBS
18187         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18188
18189         cat > conftest.$ac_ext <<EOF
18190 #line 18191 "configure"
18191 #include "confdefs.h"
18192
18193 #ifdef HAVE_DB_185_H
18194 # include <db_185.h>
18195 #else
18196 # include <db.h>
18197 #endif
18198
18199 #ifndef DB_VERSION_MAJOR
18200 # define DB_VERSION_MAJOR 1
18201 #endif
18202
18203 #ifndef NULL
18204 #define NULL ((void*)0)
18205 #endif
18206
18207 int main() {
18208
18209 #if DB_VERSION_MAJOR > 1
18210         {
18211                 char *version;
18212                 int major, minor, patch;
18213
18214                 version = db_version( &major, &minor, &patch );
18215
18216                 if( major != DB_VERSION_MAJOR ||
18217                         minor < DB_VERSION_MINOR )
18218                 {
18219                         printf("Berkeley DB version mismatch\n"
18220                                 "\theader: %s\n\tlibrary: %s\n",
18221                                 DB_VERSION_STRING, version);
18222                         return 1;
18223                 }
18224         }
18225 #endif
18226
18227 #if DB_VERSION_MAJOR > 2
18228         db_env_create( NULL, 0 );
18229 #elif DB_VERSION_MAJOR > 1
18230         db_appexit( NULL );
18231 #else
18232         (void) dbopen( NULL, 0, 0, 0, NULL);
18233 #endif
18234
18235 ; return 0; }
18236 EOF
18237 if { (eval echo configure:18238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18238   rm -rf conftest*
18239   ol_cv_db_db_4_dot_1=yes
18240 else
18241   echo "configure: failed program was:" >&5
18242   cat conftest.$ac_ext >&5
18243   rm -rf conftest*
18244   ol_cv_db_db_4_dot_1=no
18245 fi
18246 rm -f conftest*
18247
18248         LIBS="$ol_LIBS"
18249
18250 fi
18251
18252 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18253
18254         if test $ol_cv_db_db_4_dot_1 = yes ; then
18255                 ol_cv_lib_db=-ldb-4.1
18256         fi
18257 fi
18258
18259 if test $ol_cv_lib_db = no ; then
18260         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18261 echo "configure:18262: checking for Berkeley DB link (-ldb-4-1)" >&5
18262 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18263   echo $ac_n "(cached) $ac_c" 1>&6
18264 else
18265   
18266         ol_DB_LIB=-ldb-4-1
18267         ol_LIBS=$LIBS
18268         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18269
18270         cat > conftest.$ac_ext <<EOF
18271 #line 18272 "configure"
18272 #include "confdefs.h"
18273
18274 #ifdef HAVE_DB_185_H
18275 # include <db_185.h>
18276 #else
18277 # include <db.h>
18278 #endif
18279
18280 #ifndef DB_VERSION_MAJOR
18281 # define DB_VERSION_MAJOR 1
18282 #endif
18283
18284 #ifndef NULL
18285 #define NULL ((void*)0)
18286 #endif
18287
18288 int main() {
18289
18290 #if DB_VERSION_MAJOR > 1
18291         {
18292                 char *version;
18293                 int major, minor, patch;
18294
18295                 version = db_version( &major, &minor, &patch );
18296
18297                 if( major != DB_VERSION_MAJOR ||
18298                         minor < DB_VERSION_MINOR )
18299                 {
18300                         printf("Berkeley DB version mismatch\n"
18301                                 "\theader: %s\n\tlibrary: %s\n",
18302                                 DB_VERSION_STRING, version);
18303                         return 1;
18304                 }
18305         }
18306 #endif
18307
18308 #if DB_VERSION_MAJOR > 2
18309         db_env_create( NULL, 0 );
18310 #elif DB_VERSION_MAJOR > 1
18311         db_appexit( NULL );
18312 #else
18313         (void) dbopen( NULL, 0, 0, 0, NULL);
18314 #endif
18315
18316 ; return 0; }
18317 EOF
18318 if { (eval echo configure:18319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18319   rm -rf conftest*
18320   ol_cv_db_db_4_1=yes
18321 else
18322   echo "configure: failed program was:" >&5
18323   cat conftest.$ac_ext >&5
18324   rm -rf conftest*
18325   ol_cv_db_db_4_1=no
18326 fi
18327 rm -f conftest*
18328
18329         LIBS="$ol_LIBS"
18330
18331 fi
18332
18333 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18334
18335         if test $ol_cv_db_db_4_1 = yes ; then
18336                 ol_cv_lib_db=-ldb-4-1
18337         fi
18338 fi
18339
18340 if test $ol_cv_lib_db = no ; then
18341         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18342 echo "configure:18343: checking for Berkeley DB link (-ldb3)" >&5
18343 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18344   echo $ac_n "(cached) $ac_c" 1>&6
18345 else
18346   
18347         ol_DB_LIB=-ldb3
18348         ol_LIBS=$LIBS
18349         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18350
18351         cat > conftest.$ac_ext <<EOF
18352 #line 18353 "configure"
18353 #include "confdefs.h"
18354
18355 #ifdef HAVE_DB_185_H
18356 # include <db_185.h>
18357 #else
18358 # include <db.h>
18359 #endif
18360
18361 #ifndef DB_VERSION_MAJOR
18362 # define DB_VERSION_MAJOR 1
18363 #endif
18364
18365 #ifndef NULL
18366 #define NULL ((void*)0)
18367 #endif
18368
18369 int main() {
18370
18371 #if DB_VERSION_MAJOR > 1
18372         {
18373                 char *version;
18374                 int major, minor, patch;
18375
18376                 version = db_version( &major, &minor, &patch );
18377
18378                 if( major != DB_VERSION_MAJOR ||
18379                         minor < DB_VERSION_MINOR )
18380                 {
18381                         printf("Berkeley DB version mismatch\n"
18382                                 "\theader: %s\n\tlibrary: %s\n",
18383                                 DB_VERSION_STRING, version);
18384                         return 1;
18385                 }
18386         }
18387 #endif
18388
18389 #if DB_VERSION_MAJOR > 2
18390         db_env_create( NULL, 0 );
18391 #elif DB_VERSION_MAJOR > 1
18392         db_appexit( NULL );
18393 #else
18394         (void) dbopen( NULL, 0, 0, 0, NULL);
18395 #endif
18396
18397 ; return 0; }
18398 EOF
18399 if { (eval echo configure:18400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18400   rm -rf conftest*
18401   ol_cv_db_db3=yes
18402 else
18403   echo "configure: failed program was:" >&5
18404   cat conftest.$ac_ext >&5
18405   rm -rf conftest*
18406   ol_cv_db_db3=no
18407 fi
18408 rm -f conftest*
18409
18410         LIBS="$ol_LIBS"
18411
18412 fi
18413
18414 echo "$ac_t""$ol_cv_db_db3" 1>&6
18415
18416         if test $ol_cv_db_db3 = yes ; then
18417                 ol_cv_lib_db=-ldb3
18418         fi
18419 fi
18420
18421 if test $ol_cv_lib_db = no ; then
18422         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18423 echo "configure:18424: checking for Berkeley DB link (-ldb-3)" >&5
18424 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18425   echo $ac_n "(cached) $ac_c" 1>&6
18426 else
18427   
18428         ol_DB_LIB=-ldb-3
18429         ol_LIBS=$LIBS
18430         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18431
18432         cat > conftest.$ac_ext <<EOF
18433 #line 18434 "configure"
18434 #include "confdefs.h"
18435
18436 #ifdef HAVE_DB_185_H
18437 # include <db_185.h>
18438 #else
18439 # include <db.h>
18440 #endif
18441
18442 #ifndef DB_VERSION_MAJOR
18443 # define DB_VERSION_MAJOR 1
18444 #endif
18445
18446 #ifndef NULL
18447 #define NULL ((void*)0)
18448 #endif
18449
18450 int main() {
18451
18452 #if DB_VERSION_MAJOR > 1
18453         {
18454                 char *version;
18455                 int major, minor, patch;
18456
18457                 version = db_version( &major, &minor, &patch );
18458
18459                 if( major != DB_VERSION_MAJOR ||
18460                         minor < DB_VERSION_MINOR )
18461                 {
18462                         printf("Berkeley DB version mismatch\n"
18463                                 "\theader: %s\n\tlibrary: %s\n",
18464                                 DB_VERSION_STRING, version);
18465                         return 1;
18466                 }
18467         }
18468 #endif
18469
18470 #if DB_VERSION_MAJOR > 2
18471         db_env_create( NULL, 0 );
18472 #elif DB_VERSION_MAJOR > 1
18473         db_appexit( NULL );
18474 #else
18475         (void) dbopen( NULL, 0, 0, 0, NULL);
18476 #endif
18477
18478 ; return 0; }
18479 EOF
18480 if { (eval echo configure:18481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18481   rm -rf conftest*
18482   ol_cv_db_db_3=yes
18483 else
18484   echo "configure: failed program was:" >&5
18485   cat conftest.$ac_ext >&5
18486   rm -rf conftest*
18487   ol_cv_db_db_3=no
18488 fi
18489 rm -f conftest*
18490
18491         LIBS="$ol_LIBS"
18492
18493 fi
18494
18495 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18496
18497         if test $ol_cv_db_db_3 = yes ; then
18498                 ol_cv_lib_db=-ldb-3
18499         fi
18500 fi
18501
18502 if test $ol_cv_lib_db = no ; then
18503         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18504 echo "configure:18505: checking for Berkeley DB link (-ldb2)" >&5
18505 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18506   echo $ac_n "(cached) $ac_c" 1>&6
18507 else
18508   
18509         ol_DB_LIB=-ldb2
18510         ol_LIBS=$LIBS
18511         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18512
18513         cat > conftest.$ac_ext <<EOF
18514 #line 18515 "configure"
18515 #include "confdefs.h"
18516
18517 #ifdef HAVE_DB_185_H
18518 # include <db_185.h>
18519 #else
18520 # include <db.h>
18521 #endif
18522
18523 #ifndef DB_VERSION_MAJOR
18524 # define DB_VERSION_MAJOR 1
18525 #endif
18526
18527 #ifndef NULL
18528 #define NULL ((void*)0)
18529 #endif
18530
18531 int main() {
18532
18533 #if DB_VERSION_MAJOR > 1
18534         {
18535                 char *version;
18536                 int major, minor, patch;
18537
18538                 version = db_version( &major, &minor, &patch );
18539
18540                 if( major != DB_VERSION_MAJOR ||
18541                         minor < DB_VERSION_MINOR )
18542                 {
18543                         printf("Berkeley DB version mismatch\n"
18544                                 "\theader: %s\n\tlibrary: %s\n",
18545                                 DB_VERSION_STRING, version);
18546                         return 1;
18547                 }
18548         }
18549 #endif
18550
18551 #if DB_VERSION_MAJOR > 2
18552         db_env_create( NULL, 0 );
18553 #elif DB_VERSION_MAJOR > 1
18554         db_appexit( NULL );
18555 #else
18556         (void) dbopen( NULL, 0, 0, 0, NULL);
18557 #endif
18558
18559 ; return 0; }
18560 EOF
18561 if { (eval echo configure:18562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18562   rm -rf conftest*
18563   ol_cv_db_db2=yes
18564 else
18565   echo "configure: failed program was:" >&5
18566   cat conftest.$ac_ext >&5
18567   rm -rf conftest*
18568   ol_cv_db_db2=no
18569 fi
18570 rm -f conftest*
18571
18572         LIBS="$ol_LIBS"
18573
18574 fi
18575
18576 echo "$ac_t""$ol_cv_db_db2" 1>&6
18577
18578         if test $ol_cv_db_db2 = yes ; then
18579                 ol_cv_lib_db=-ldb2
18580         fi
18581 fi
18582
18583 if test $ol_cv_lib_db = no ; then
18584         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18585 echo "configure:18586: checking for Berkeley DB link (-ldb-2)" >&5
18586 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18587   echo $ac_n "(cached) $ac_c" 1>&6
18588 else
18589   
18590         ol_DB_LIB=-ldb-2
18591         ol_LIBS=$LIBS
18592         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18593
18594         cat > conftest.$ac_ext <<EOF
18595 #line 18596 "configure"
18596 #include "confdefs.h"
18597
18598 #ifdef HAVE_DB_185_H
18599 # include <db_185.h>
18600 #else
18601 # include <db.h>
18602 #endif
18603
18604 #ifndef DB_VERSION_MAJOR
18605 # define DB_VERSION_MAJOR 1
18606 #endif
18607
18608 #ifndef NULL
18609 #define NULL ((void*)0)
18610 #endif
18611
18612 int main() {
18613
18614 #if DB_VERSION_MAJOR > 1
18615         {
18616                 char *version;
18617                 int major, minor, patch;
18618
18619                 version = db_version( &major, &minor, &patch );
18620
18621                 if( major != DB_VERSION_MAJOR ||
18622                         minor < DB_VERSION_MINOR )
18623                 {
18624                         printf("Berkeley DB version mismatch\n"
18625                                 "\theader: %s\n\tlibrary: %s\n",
18626                                 DB_VERSION_STRING, version);
18627                         return 1;
18628                 }
18629         }
18630 #endif
18631
18632 #if DB_VERSION_MAJOR > 2
18633         db_env_create( NULL, 0 );
18634 #elif DB_VERSION_MAJOR > 1
18635         db_appexit( NULL );
18636 #else
18637         (void) dbopen( NULL, 0, 0, 0, NULL);
18638 #endif
18639
18640 ; return 0; }
18641 EOF
18642 if { (eval echo configure:18643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18643   rm -rf conftest*
18644   ol_cv_db_db_2=yes
18645 else
18646   echo "configure: failed program was:" >&5
18647   cat conftest.$ac_ext >&5
18648   rm -rf conftest*
18649   ol_cv_db_db_2=no
18650 fi
18651 rm -f conftest*
18652
18653         LIBS="$ol_LIBS"
18654
18655 fi
18656
18657 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18658
18659         if test $ol_cv_db_db_2 = yes ; then
18660                 ol_cv_lib_db=-ldb-2
18661         fi
18662 fi
18663
18664 if test $ol_cv_lib_db = no ; then
18665         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18666 echo "configure:18667: checking for Berkeley DB link (-ldb1)" >&5
18667 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18668   echo $ac_n "(cached) $ac_c" 1>&6
18669 else
18670   
18671         ol_DB_LIB=-ldb1
18672         ol_LIBS=$LIBS
18673         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18674
18675         cat > conftest.$ac_ext <<EOF
18676 #line 18677 "configure"
18677 #include "confdefs.h"
18678
18679 #ifdef HAVE_DB_185_H
18680 # include <db_185.h>
18681 #else
18682 # include <db.h>
18683 #endif
18684
18685 #ifndef DB_VERSION_MAJOR
18686 # define DB_VERSION_MAJOR 1
18687 #endif
18688
18689 #ifndef NULL
18690 #define NULL ((void*)0)
18691 #endif
18692
18693 int main() {
18694
18695 #if DB_VERSION_MAJOR > 1
18696         {
18697                 char *version;
18698                 int major, minor, patch;
18699
18700                 version = db_version( &major, &minor, &patch );
18701
18702                 if( major != DB_VERSION_MAJOR ||
18703                         minor < DB_VERSION_MINOR )
18704                 {
18705                         printf("Berkeley DB version mismatch\n"
18706                                 "\theader: %s\n\tlibrary: %s\n",
18707                                 DB_VERSION_STRING, version);
18708                         return 1;
18709                 }
18710         }
18711 #endif
18712
18713 #if DB_VERSION_MAJOR > 2
18714         db_env_create( NULL, 0 );
18715 #elif DB_VERSION_MAJOR > 1
18716         db_appexit( NULL );
18717 #else
18718         (void) dbopen( NULL, 0, 0, 0, NULL);
18719 #endif
18720
18721 ; return 0; }
18722 EOF
18723 if { (eval echo configure:18724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18724   rm -rf conftest*
18725   ol_cv_db_db1=yes
18726 else
18727   echo "configure: failed program was:" >&5
18728   cat conftest.$ac_ext >&5
18729   rm -rf conftest*
18730   ol_cv_db_db1=no
18731 fi
18732 rm -f conftest*
18733
18734         LIBS="$ol_LIBS"
18735
18736 fi
18737
18738 echo "$ac_t""$ol_cv_db_db1" 1>&6
18739
18740         if test $ol_cv_db_db1 = yes ; then
18741                 ol_cv_lib_db=-ldb1
18742         fi
18743 fi
18744
18745 if test $ol_cv_lib_db = no ; then
18746         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18747 echo "configure:18748: checking for Berkeley DB link (-ldb-1)" >&5
18748 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18749   echo $ac_n "(cached) $ac_c" 1>&6
18750 else
18751   
18752         ol_DB_LIB=-ldb-1
18753         ol_LIBS=$LIBS
18754         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18755
18756         cat > conftest.$ac_ext <<EOF
18757 #line 18758 "configure"
18758 #include "confdefs.h"
18759
18760 #ifdef HAVE_DB_185_H
18761 # include <db_185.h>
18762 #else
18763 # include <db.h>
18764 #endif
18765
18766 #ifndef DB_VERSION_MAJOR
18767 # define DB_VERSION_MAJOR 1
18768 #endif
18769
18770 #ifndef NULL
18771 #define NULL ((void*)0)
18772 #endif
18773
18774 int main() {
18775
18776 #if DB_VERSION_MAJOR > 1
18777         {
18778                 char *version;
18779                 int major, minor, patch;
18780
18781                 version = db_version( &major, &minor, &patch );
18782
18783                 if( major != DB_VERSION_MAJOR ||
18784                         minor < DB_VERSION_MINOR )
18785                 {
18786                         printf("Berkeley DB version mismatch\n"
18787                                 "\theader: %s\n\tlibrary: %s\n",
18788                                 DB_VERSION_STRING, version);
18789                         return 1;
18790                 }
18791         }
18792 #endif
18793
18794 #if DB_VERSION_MAJOR > 2
18795         db_env_create( NULL, 0 );
18796 #elif DB_VERSION_MAJOR > 1
18797         db_appexit( NULL );
18798 #else
18799         (void) dbopen( NULL, 0, 0, 0, NULL);
18800 #endif
18801
18802 ; return 0; }
18803 EOF
18804 if { (eval echo configure:18805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18805   rm -rf conftest*
18806   ol_cv_db_db_1=yes
18807 else
18808   echo "configure: failed program was:" >&5
18809   cat conftest.$ac_ext >&5
18810   rm -rf conftest*
18811   ol_cv_db_db_1=no
18812 fi
18813 rm -f conftest*
18814
18815         LIBS="$ol_LIBS"
18816
18817 fi
18818
18819 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18820
18821         if test $ol_cv_db_db_1 = yes ; then
18822                 ol_cv_lib_db=-ldb-1
18823         fi
18824 fi
18825
18826
18827                 if test "$ol_cv_lib_db" != no ; then
18828                         ol_cv_berkeley_db=yes
18829                 fi
18830         fi
18831 fi
18832
18833         else
18834                 ol_cv_berkeley_db=no
18835 for ac_hdr in db.h
18836 do
18837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18839 echo "configure:18840: checking for $ac_hdr" >&5
18840 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18841   echo $ac_n "(cached) $ac_c" 1>&6
18842 else
18843   cat > conftest.$ac_ext <<EOF
18844 #line 18845 "configure"
18845 #include "confdefs.h"
18846 #include <$ac_hdr>
18847 EOF
18848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18849 { (eval echo configure:18850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18851 if test -z "$ac_err"; then
18852   rm -rf conftest*
18853   eval "ac_cv_header_$ac_safe=yes"
18854 else
18855   echo "$ac_err" >&5
18856   echo "configure: failed program was:" >&5
18857   cat conftest.$ac_ext >&5
18858   rm -rf conftest*
18859   eval "ac_cv_header_$ac_safe=no"
18860 fi
18861 rm -f conftest*
18862 fi
18863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18864   echo "$ac_t""yes" 1>&6
18865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18866   cat >> confdefs.h <<EOF
18867 #define $ac_tr_hdr 1
18868 EOF
18869  
18870 else
18871   echo "$ac_t""no" 1>&6
18872 fi
18873 done
18874
18875 if test $ac_cv_header_db_h = yes; then
18876         ol_cv_lib_db=no
18877 if test $ol_cv_lib_db = no ; then
18878         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18879 echo "configure:18880: checking for Berkeley DB link (default)" >&5
18880 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18881   echo $ac_n "(cached) $ac_c" 1>&6
18882 else
18883   
18884         ol_DB_LIB=
18885         ol_LIBS=$LIBS
18886         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18887
18888         cat > conftest.$ac_ext <<EOF
18889 #line 18890 "configure"
18890 #include "confdefs.h"
18891
18892 #ifdef HAVE_DB_185_H
18893 # include <db_185.h>
18894 #else
18895 # include <db.h>
18896 #endif
18897
18898 #ifndef DB_VERSION_MAJOR
18899 # define DB_VERSION_MAJOR 1
18900 #endif
18901
18902 #ifndef NULL
18903 #define NULL ((void*)0)
18904 #endif
18905
18906 int main() {
18907
18908 #if DB_VERSION_MAJOR > 1
18909         {
18910                 char *version;
18911                 int major, minor, patch;
18912
18913                 version = db_version( &major, &minor, &patch );
18914
18915                 if( major != DB_VERSION_MAJOR ||
18916                         minor < DB_VERSION_MINOR )
18917                 {
18918                         printf("Berkeley DB version mismatch\n"
18919                                 "\theader: %s\n\tlibrary: %s\n",
18920                                 DB_VERSION_STRING, version);
18921                         return 1;
18922                 }
18923         }
18924 #endif
18925
18926 #if DB_VERSION_MAJOR > 2
18927         db_env_create( NULL, 0 );
18928 #elif DB_VERSION_MAJOR > 1
18929         db_appexit( NULL );
18930 #else
18931         (void) dbopen( NULL, 0, 0, 0, NULL);
18932 #endif
18933
18934 ; return 0; }
18935 EOF
18936 if { (eval echo configure:18937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18937   rm -rf conftest*
18938   ol_cv_db_none=yes
18939 else
18940   echo "configure: failed program was:" >&5
18941   cat conftest.$ac_ext >&5
18942   rm -rf conftest*
18943   ol_cv_db_none=no
18944 fi
18945 rm -f conftest*
18946
18947         LIBS="$ol_LIBS"
18948
18949 fi
18950
18951 echo "$ac_t""$ol_cv_db_none" 1>&6
18952
18953         if test $ol_cv_db_none = yes ; then
18954                 ol_cv_lib_db=yes
18955         fi
18956 fi
18957
18958 if test $ol_cv_lib_db = no ; then
18959         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18960 echo "configure:18961: checking for Berkeley DB link (-ldb43)" >&5
18961 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18962   echo $ac_n "(cached) $ac_c" 1>&6
18963 else
18964   
18965         ol_DB_LIB=-ldb43
18966         ol_LIBS=$LIBS
18967         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18968
18969         cat > conftest.$ac_ext <<EOF
18970 #line 18971 "configure"
18971 #include "confdefs.h"
18972
18973 #ifdef HAVE_DB_185_H
18974 # include <db_185.h>
18975 #else
18976 # include <db.h>
18977 #endif
18978
18979 #ifndef DB_VERSION_MAJOR
18980 # define DB_VERSION_MAJOR 1
18981 #endif
18982
18983 #ifndef NULL
18984 #define NULL ((void*)0)
18985 #endif
18986
18987 int main() {
18988
18989 #if DB_VERSION_MAJOR > 1
18990         {
18991                 char *version;
18992                 int major, minor, patch;
18993
18994                 version = db_version( &major, &minor, &patch );
18995
18996                 if( major != DB_VERSION_MAJOR ||
18997                         minor < DB_VERSION_MINOR )
18998                 {
18999                         printf("Berkeley DB version mismatch\n"
19000                                 "\theader: %s\n\tlibrary: %s\n",
19001                                 DB_VERSION_STRING, version);
19002                         return 1;
19003                 }
19004         }
19005 #endif
19006
19007 #if DB_VERSION_MAJOR > 2
19008         db_env_create( NULL, 0 );
19009 #elif DB_VERSION_MAJOR > 1
19010         db_appexit( NULL );
19011 #else
19012         (void) dbopen( NULL, 0, 0, 0, NULL);
19013 #endif
19014
19015 ; return 0; }
19016 EOF
19017 if { (eval echo configure:19018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19018   rm -rf conftest*
19019   ol_cv_db_db43=yes
19020 else
19021   echo "configure: failed program was:" >&5
19022   cat conftest.$ac_ext >&5
19023   rm -rf conftest*
19024   ol_cv_db_db43=no
19025 fi
19026 rm -f conftest*
19027
19028         LIBS="$ol_LIBS"
19029
19030 fi
19031
19032 echo "$ac_t""$ol_cv_db_db43" 1>&6
19033
19034         if test $ol_cv_db_db43 = yes ; then
19035                 ol_cv_lib_db=-ldb43
19036         fi
19037 fi
19038
19039 if test $ol_cv_lib_db = no ; then
19040         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19041 echo "configure:19042: checking for Berkeley DB link (-ldb-43)" >&5
19042 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19043   echo $ac_n "(cached) $ac_c" 1>&6
19044 else
19045   
19046         ol_DB_LIB=-ldb-43
19047         ol_LIBS=$LIBS
19048         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19049
19050         cat > conftest.$ac_ext <<EOF
19051 #line 19052 "configure"
19052 #include "confdefs.h"
19053
19054 #ifdef HAVE_DB_185_H
19055 # include <db_185.h>
19056 #else
19057 # include <db.h>
19058 #endif
19059
19060 #ifndef DB_VERSION_MAJOR
19061 # define DB_VERSION_MAJOR 1
19062 #endif
19063
19064 #ifndef NULL
19065 #define NULL ((void*)0)
19066 #endif
19067
19068 int main() {
19069
19070 #if DB_VERSION_MAJOR > 1
19071         {
19072                 char *version;
19073                 int major, minor, patch;
19074
19075                 version = db_version( &major, &minor, &patch );
19076
19077                 if( major != DB_VERSION_MAJOR ||
19078                         minor < DB_VERSION_MINOR )
19079                 {
19080                         printf("Berkeley DB version mismatch\n"
19081                                 "\theader: %s\n\tlibrary: %s\n",
19082                                 DB_VERSION_STRING, version);
19083                         return 1;
19084                 }
19085         }
19086 #endif
19087
19088 #if DB_VERSION_MAJOR > 2
19089         db_env_create( NULL, 0 );
19090 #elif DB_VERSION_MAJOR > 1
19091         db_appexit( NULL );
19092 #else
19093         (void) dbopen( NULL, 0, 0, 0, NULL);
19094 #endif
19095
19096 ; return 0; }
19097 EOF
19098 if { (eval echo configure:19099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19099   rm -rf conftest*
19100   ol_cv_db_db_43=yes
19101 else
19102   echo "configure: failed program was:" >&5
19103   cat conftest.$ac_ext >&5
19104   rm -rf conftest*
19105   ol_cv_db_db_43=no
19106 fi
19107 rm -f conftest*
19108
19109         LIBS="$ol_LIBS"
19110
19111 fi
19112
19113 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19114
19115         if test $ol_cv_db_db_43 = yes ; then
19116                 ol_cv_lib_db=-ldb-43
19117         fi
19118 fi
19119
19120 if test $ol_cv_lib_db = no ; then
19121         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19122 echo "configure:19123: checking for Berkeley DB link (-ldb-4.3)" >&5
19123 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19124   echo $ac_n "(cached) $ac_c" 1>&6
19125 else
19126   
19127         ol_DB_LIB=-ldb-4.3
19128         ol_LIBS=$LIBS
19129         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19130
19131         cat > conftest.$ac_ext <<EOF
19132 #line 19133 "configure"
19133 #include "confdefs.h"
19134
19135 #ifdef HAVE_DB_185_H
19136 # include <db_185.h>
19137 #else
19138 # include <db.h>
19139 #endif
19140
19141 #ifndef DB_VERSION_MAJOR
19142 # define DB_VERSION_MAJOR 1
19143 #endif
19144
19145 #ifndef NULL
19146 #define NULL ((void*)0)
19147 #endif
19148
19149 int main() {
19150
19151 #if DB_VERSION_MAJOR > 1
19152         {
19153                 char *version;
19154                 int major, minor, patch;
19155
19156                 version = db_version( &major, &minor, &patch );
19157
19158                 if( major != DB_VERSION_MAJOR ||
19159                         minor < DB_VERSION_MINOR )
19160                 {
19161                         printf("Berkeley DB version mismatch\n"
19162                                 "\theader: %s\n\tlibrary: %s\n",
19163                                 DB_VERSION_STRING, version);
19164                         return 1;
19165                 }
19166         }
19167 #endif
19168
19169 #if DB_VERSION_MAJOR > 2
19170         db_env_create( NULL, 0 );
19171 #elif DB_VERSION_MAJOR > 1
19172         db_appexit( NULL );
19173 #else
19174         (void) dbopen( NULL, 0, 0, 0, NULL);
19175 #endif
19176
19177 ; return 0; }
19178 EOF
19179 if { (eval echo configure:19180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19180   rm -rf conftest*
19181   ol_cv_db_db_4_dot_3=yes
19182 else
19183   echo "configure: failed program was:" >&5
19184   cat conftest.$ac_ext >&5
19185   rm -rf conftest*
19186   ol_cv_db_db_4_dot_3=no
19187 fi
19188 rm -f conftest*
19189
19190         LIBS="$ol_LIBS"
19191
19192 fi
19193
19194 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19195
19196         if test $ol_cv_db_db_4_dot_3 = yes ; then
19197                 ol_cv_lib_db=-ldb-4.3
19198         fi
19199 fi
19200
19201 if test $ol_cv_lib_db = no ; then
19202         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19203 echo "configure:19204: checking for Berkeley DB link (-ldb-4-3)" >&5
19204 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19205   echo $ac_n "(cached) $ac_c" 1>&6
19206 else
19207   
19208         ol_DB_LIB=-ldb-4-3
19209         ol_LIBS=$LIBS
19210         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19211
19212         cat > conftest.$ac_ext <<EOF
19213 #line 19214 "configure"
19214 #include "confdefs.h"
19215
19216 #ifdef HAVE_DB_185_H
19217 # include <db_185.h>
19218 #else
19219 # include <db.h>
19220 #endif
19221
19222 #ifndef DB_VERSION_MAJOR
19223 # define DB_VERSION_MAJOR 1
19224 #endif
19225
19226 #ifndef NULL
19227 #define NULL ((void*)0)
19228 #endif
19229
19230 int main() {
19231
19232 #if DB_VERSION_MAJOR > 1
19233         {
19234                 char *version;
19235                 int major, minor, patch;
19236
19237                 version = db_version( &major, &minor, &patch );
19238
19239                 if( major != DB_VERSION_MAJOR ||
19240                         minor < DB_VERSION_MINOR )
19241                 {
19242                         printf("Berkeley DB version mismatch\n"
19243                                 "\theader: %s\n\tlibrary: %s\n",
19244                                 DB_VERSION_STRING, version);
19245                         return 1;
19246                 }
19247         }
19248 #endif
19249
19250 #if DB_VERSION_MAJOR > 2
19251         db_env_create( NULL, 0 );
19252 #elif DB_VERSION_MAJOR > 1
19253         db_appexit( NULL );
19254 #else
19255         (void) dbopen( NULL, 0, 0, 0, NULL);
19256 #endif
19257
19258 ; return 0; }
19259 EOF
19260 if { (eval echo configure:19261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19261   rm -rf conftest*
19262   ol_cv_db_db_4_3=yes
19263 else
19264   echo "configure: failed program was:" >&5
19265   cat conftest.$ac_ext >&5
19266   rm -rf conftest*
19267   ol_cv_db_db_4_3=no
19268 fi
19269 rm -f conftest*
19270
19271         LIBS="$ol_LIBS"
19272
19273 fi
19274
19275 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19276
19277         if test $ol_cv_db_db_4_3 = yes ; then
19278                 ol_cv_lib_db=-ldb-4-3
19279         fi
19280 fi
19281
19282 if test $ol_cv_lib_db = no ; then
19283         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19284 echo "configure:19285: checking for Berkeley DB link (-ldb42)" >&5
19285 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19286   echo $ac_n "(cached) $ac_c" 1>&6
19287 else
19288   
19289         ol_DB_LIB=-ldb42
19290         ol_LIBS=$LIBS
19291         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19292
19293         cat > conftest.$ac_ext <<EOF
19294 #line 19295 "configure"
19295 #include "confdefs.h"
19296
19297 #ifdef HAVE_DB_185_H
19298 # include <db_185.h>
19299 #else
19300 # include <db.h>
19301 #endif
19302
19303 #ifndef DB_VERSION_MAJOR
19304 # define DB_VERSION_MAJOR 1
19305 #endif
19306
19307 #ifndef NULL
19308 #define NULL ((void*)0)
19309 #endif
19310
19311 int main() {
19312
19313 #if DB_VERSION_MAJOR > 1
19314         {
19315                 char *version;
19316                 int major, minor, patch;
19317
19318                 version = db_version( &major, &minor, &patch );
19319
19320                 if( major != DB_VERSION_MAJOR ||
19321                         minor < DB_VERSION_MINOR )
19322                 {
19323                         printf("Berkeley DB version mismatch\n"
19324                                 "\theader: %s\n\tlibrary: %s\n",
19325                                 DB_VERSION_STRING, version);
19326                         return 1;
19327                 }
19328         }
19329 #endif
19330
19331 #if DB_VERSION_MAJOR > 2
19332         db_env_create( NULL, 0 );
19333 #elif DB_VERSION_MAJOR > 1
19334         db_appexit( NULL );
19335 #else
19336         (void) dbopen( NULL, 0, 0, 0, NULL);
19337 #endif
19338
19339 ; return 0; }
19340 EOF
19341 if { (eval echo configure:19342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19342   rm -rf conftest*
19343   ol_cv_db_db42=yes
19344 else
19345   echo "configure: failed program was:" >&5
19346   cat conftest.$ac_ext >&5
19347   rm -rf conftest*
19348   ol_cv_db_db42=no
19349 fi
19350 rm -f conftest*
19351
19352         LIBS="$ol_LIBS"
19353
19354 fi
19355
19356 echo "$ac_t""$ol_cv_db_db42" 1>&6
19357
19358         if test $ol_cv_db_db42 = yes ; then
19359                 ol_cv_lib_db=-ldb42
19360         fi
19361 fi
19362
19363 if test $ol_cv_lib_db = no ; then
19364         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19365 echo "configure:19366: checking for Berkeley DB link (-ldb-42)" >&5
19366 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19367   echo $ac_n "(cached) $ac_c" 1>&6
19368 else
19369   
19370         ol_DB_LIB=-ldb-42
19371         ol_LIBS=$LIBS
19372         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19373
19374         cat > conftest.$ac_ext <<EOF
19375 #line 19376 "configure"
19376 #include "confdefs.h"
19377
19378 #ifdef HAVE_DB_185_H
19379 # include <db_185.h>
19380 #else
19381 # include <db.h>
19382 #endif
19383
19384 #ifndef DB_VERSION_MAJOR
19385 # define DB_VERSION_MAJOR 1
19386 #endif
19387
19388 #ifndef NULL
19389 #define NULL ((void*)0)
19390 #endif
19391
19392 int main() {
19393
19394 #if DB_VERSION_MAJOR > 1
19395         {
19396                 char *version;
19397                 int major, minor, patch;
19398
19399                 version = db_version( &major, &minor, &patch );
19400
19401                 if( major != DB_VERSION_MAJOR ||
19402                         minor < DB_VERSION_MINOR )
19403                 {
19404                         printf("Berkeley DB version mismatch\n"
19405                                 "\theader: %s\n\tlibrary: %s\n",
19406                                 DB_VERSION_STRING, version);
19407                         return 1;
19408                 }
19409         }
19410 #endif
19411
19412 #if DB_VERSION_MAJOR > 2
19413         db_env_create( NULL, 0 );
19414 #elif DB_VERSION_MAJOR > 1
19415         db_appexit( NULL );
19416 #else
19417         (void) dbopen( NULL, 0, 0, 0, NULL);
19418 #endif
19419
19420 ; return 0; }
19421 EOF
19422 if { (eval echo configure:19423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19423   rm -rf conftest*
19424   ol_cv_db_db_42=yes
19425 else
19426   echo "configure: failed program was:" >&5
19427   cat conftest.$ac_ext >&5
19428   rm -rf conftest*
19429   ol_cv_db_db_42=no
19430 fi
19431 rm -f conftest*
19432
19433         LIBS="$ol_LIBS"
19434
19435 fi
19436
19437 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19438
19439         if test $ol_cv_db_db_42 = yes ; then
19440                 ol_cv_lib_db=-ldb-42
19441         fi
19442 fi
19443
19444 if test $ol_cv_lib_db = no ; then
19445         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19446 echo "configure:19447: checking for Berkeley DB link (-ldb-4.2)" >&5
19447 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19448   echo $ac_n "(cached) $ac_c" 1>&6
19449 else
19450   
19451         ol_DB_LIB=-ldb-4.2
19452         ol_LIBS=$LIBS
19453         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19454
19455         cat > conftest.$ac_ext <<EOF
19456 #line 19457 "configure"
19457 #include "confdefs.h"
19458
19459 #ifdef HAVE_DB_185_H
19460 # include <db_185.h>
19461 #else
19462 # include <db.h>
19463 #endif
19464
19465 #ifndef DB_VERSION_MAJOR
19466 # define DB_VERSION_MAJOR 1
19467 #endif
19468
19469 #ifndef NULL
19470 #define NULL ((void*)0)
19471 #endif
19472
19473 int main() {
19474
19475 #if DB_VERSION_MAJOR > 1
19476         {
19477                 char *version;
19478                 int major, minor, patch;
19479
19480                 version = db_version( &major, &minor, &patch );
19481
19482                 if( major != DB_VERSION_MAJOR ||
19483                         minor < DB_VERSION_MINOR )
19484                 {
19485                         printf("Berkeley DB version mismatch\n"
19486                                 "\theader: %s\n\tlibrary: %s\n",
19487                                 DB_VERSION_STRING, version);
19488                         return 1;
19489                 }
19490         }
19491 #endif
19492
19493 #if DB_VERSION_MAJOR > 2
19494         db_env_create( NULL, 0 );
19495 #elif DB_VERSION_MAJOR > 1
19496         db_appexit( NULL );
19497 #else
19498         (void) dbopen( NULL, 0, 0, 0, NULL);
19499 #endif
19500
19501 ; return 0; }
19502 EOF
19503 if { (eval echo configure:19504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19504   rm -rf conftest*
19505   ol_cv_db_db_4_dot_2=yes
19506 else
19507   echo "configure: failed program was:" >&5
19508   cat conftest.$ac_ext >&5
19509   rm -rf conftest*
19510   ol_cv_db_db_4_dot_2=no
19511 fi
19512 rm -f conftest*
19513
19514         LIBS="$ol_LIBS"
19515
19516 fi
19517
19518 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19519
19520         if test $ol_cv_db_db_4_dot_2 = yes ; then
19521                 ol_cv_lib_db=-ldb-4.2
19522         fi
19523 fi
19524
19525 if test $ol_cv_lib_db = no ; then
19526         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19527 echo "configure:19528: checking for Berkeley DB link (-ldb-4-2)" >&5
19528 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19529   echo $ac_n "(cached) $ac_c" 1>&6
19530 else
19531   
19532         ol_DB_LIB=-ldb-4-2
19533         ol_LIBS=$LIBS
19534         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19535
19536         cat > conftest.$ac_ext <<EOF
19537 #line 19538 "configure"
19538 #include "confdefs.h"
19539
19540 #ifdef HAVE_DB_185_H
19541 # include <db_185.h>
19542 #else
19543 # include <db.h>
19544 #endif
19545
19546 #ifndef DB_VERSION_MAJOR
19547 # define DB_VERSION_MAJOR 1
19548 #endif
19549
19550 #ifndef NULL
19551 #define NULL ((void*)0)
19552 #endif
19553
19554 int main() {
19555
19556 #if DB_VERSION_MAJOR > 1
19557         {
19558                 char *version;
19559                 int major, minor, patch;
19560
19561                 version = db_version( &major, &minor, &patch );
19562
19563                 if( major != DB_VERSION_MAJOR ||
19564                         minor < DB_VERSION_MINOR )
19565                 {
19566                         printf("Berkeley DB version mismatch\n"
19567                                 "\theader: %s\n\tlibrary: %s\n",
19568                                 DB_VERSION_STRING, version);
19569                         return 1;
19570                 }
19571         }
19572 #endif
19573
19574 #if DB_VERSION_MAJOR > 2
19575         db_env_create( NULL, 0 );
19576 #elif DB_VERSION_MAJOR > 1
19577         db_appexit( NULL );
19578 #else
19579         (void) dbopen( NULL, 0, 0, 0, NULL);
19580 #endif
19581
19582 ; return 0; }
19583 EOF
19584 if { (eval echo configure:19585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19585   rm -rf conftest*
19586   ol_cv_db_db_4_2=yes
19587 else
19588   echo "configure: failed program was:" >&5
19589   cat conftest.$ac_ext >&5
19590   rm -rf conftest*
19591   ol_cv_db_db_4_2=no
19592 fi
19593 rm -f conftest*
19594
19595         LIBS="$ol_LIBS"
19596
19597 fi
19598
19599 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19600
19601         if test $ol_cv_db_db_4_2 = yes ; then
19602                 ol_cv_lib_db=-ldb-4-2
19603         fi
19604 fi
19605
19606 if test $ol_cv_lib_db = no ; then
19607         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19608 echo "configure:19609: checking for Berkeley DB link (-ldb-4)" >&5
19609 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19610   echo $ac_n "(cached) $ac_c" 1>&6
19611 else
19612   
19613         ol_DB_LIB=-ldb-4
19614         ol_LIBS=$LIBS
19615         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19616
19617         cat > conftest.$ac_ext <<EOF
19618 #line 19619 "configure"
19619 #include "confdefs.h"
19620
19621 #ifdef HAVE_DB_185_H
19622 # include <db_185.h>
19623 #else
19624 # include <db.h>
19625 #endif
19626
19627 #ifndef DB_VERSION_MAJOR
19628 # define DB_VERSION_MAJOR 1
19629 #endif
19630
19631 #ifndef NULL
19632 #define NULL ((void*)0)
19633 #endif
19634
19635 int main() {
19636
19637 #if DB_VERSION_MAJOR > 1
19638         {
19639                 char *version;
19640                 int major, minor, patch;
19641
19642                 version = db_version( &major, &minor, &patch );
19643
19644                 if( major != DB_VERSION_MAJOR ||
19645                         minor < DB_VERSION_MINOR )
19646                 {
19647                         printf("Berkeley DB version mismatch\n"
19648                                 "\theader: %s\n\tlibrary: %s\n",
19649                                 DB_VERSION_STRING, version);
19650                         return 1;
19651                 }
19652         }
19653 #endif
19654
19655 #if DB_VERSION_MAJOR > 2
19656         db_env_create( NULL, 0 );
19657 #elif DB_VERSION_MAJOR > 1
19658         db_appexit( NULL );
19659 #else
19660         (void) dbopen( NULL, 0, 0, 0, NULL);
19661 #endif
19662
19663 ; return 0; }
19664 EOF
19665 if { (eval echo configure:19666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19666   rm -rf conftest*
19667   ol_cv_db_db_4=yes
19668 else
19669   echo "configure: failed program was:" >&5
19670   cat conftest.$ac_ext >&5
19671   rm -rf conftest*
19672   ol_cv_db_db_4=no
19673 fi
19674 rm -f conftest*
19675
19676         LIBS="$ol_LIBS"
19677
19678 fi
19679
19680 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19681
19682         if test $ol_cv_db_db_4 = yes ; then
19683                 ol_cv_lib_db=-ldb-4
19684         fi
19685 fi
19686
19687 if test $ol_cv_lib_db = no ; then
19688         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19689 echo "configure:19690: checking for Berkeley DB link (-ldb4)" >&5
19690 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19691   echo $ac_n "(cached) $ac_c" 1>&6
19692 else
19693   
19694         ol_DB_LIB=-ldb4
19695         ol_LIBS=$LIBS
19696         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19697
19698         cat > conftest.$ac_ext <<EOF
19699 #line 19700 "configure"
19700 #include "confdefs.h"
19701
19702 #ifdef HAVE_DB_185_H
19703 # include <db_185.h>
19704 #else
19705 # include <db.h>
19706 #endif
19707
19708 #ifndef DB_VERSION_MAJOR
19709 # define DB_VERSION_MAJOR 1
19710 #endif
19711
19712 #ifndef NULL
19713 #define NULL ((void*)0)
19714 #endif
19715
19716 int main() {
19717
19718 #if DB_VERSION_MAJOR > 1
19719         {
19720                 char *version;
19721                 int major, minor, patch;
19722
19723                 version = db_version( &major, &minor, &patch );
19724
19725                 if( major != DB_VERSION_MAJOR ||
19726                         minor < DB_VERSION_MINOR )
19727                 {
19728                         printf("Berkeley DB version mismatch\n"
19729                                 "\theader: %s\n\tlibrary: %s\n",
19730                                 DB_VERSION_STRING, version);
19731                         return 1;
19732                 }
19733         }
19734 #endif
19735
19736 #if DB_VERSION_MAJOR > 2
19737         db_env_create( NULL, 0 );
19738 #elif DB_VERSION_MAJOR > 1
19739         db_appexit( NULL );
19740 #else
19741         (void) dbopen( NULL, 0, 0, 0, NULL);
19742 #endif
19743
19744 ; return 0; }
19745 EOF
19746 if { (eval echo configure:19747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19747   rm -rf conftest*
19748   ol_cv_db_db4=yes
19749 else
19750   echo "configure: failed program was:" >&5
19751   cat conftest.$ac_ext >&5
19752   rm -rf conftest*
19753   ol_cv_db_db4=no
19754 fi
19755 rm -f conftest*
19756
19757         LIBS="$ol_LIBS"
19758
19759 fi
19760
19761 echo "$ac_t""$ol_cv_db_db4" 1>&6
19762
19763         if test $ol_cv_db_db4 = yes ; then
19764                 ol_cv_lib_db=-ldb4
19765         fi
19766 fi
19767
19768 if test $ol_cv_lib_db = no ; then
19769         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19770 echo "configure:19771: checking for Berkeley DB link (-ldb)" >&5
19771 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19772   echo $ac_n "(cached) $ac_c" 1>&6
19773 else
19774   
19775         ol_DB_LIB=-ldb
19776         ol_LIBS=$LIBS
19777         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19778
19779         cat > conftest.$ac_ext <<EOF
19780 #line 19781 "configure"
19781 #include "confdefs.h"
19782
19783 #ifdef HAVE_DB_185_H
19784 # include <db_185.h>
19785 #else
19786 # include <db.h>
19787 #endif
19788
19789 #ifndef DB_VERSION_MAJOR
19790 # define DB_VERSION_MAJOR 1
19791 #endif
19792
19793 #ifndef NULL
19794 #define NULL ((void*)0)
19795 #endif
19796
19797 int main() {
19798
19799 #if DB_VERSION_MAJOR > 1
19800         {
19801                 char *version;
19802                 int major, minor, patch;
19803
19804                 version = db_version( &major, &minor, &patch );
19805
19806                 if( major != DB_VERSION_MAJOR ||
19807                         minor < DB_VERSION_MINOR )
19808                 {
19809                         printf("Berkeley DB version mismatch\n"
19810                                 "\theader: %s\n\tlibrary: %s\n",
19811                                 DB_VERSION_STRING, version);
19812                         return 1;
19813                 }
19814         }
19815 #endif
19816
19817 #if DB_VERSION_MAJOR > 2
19818         db_env_create( NULL, 0 );
19819 #elif DB_VERSION_MAJOR > 1
19820         db_appexit( NULL );
19821 #else
19822         (void) dbopen( NULL, 0, 0, 0, NULL);
19823 #endif
19824
19825 ; return 0; }
19826 EOF
19827 if { (eval echo configure:19828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19828   rm -rf conftest*
19829   ol_cv_db_db=yes
19830 else
19831   echo "configure: failed program was:" >&5
19832   cat conftest.$ac_ext >&5
19833   rm -rf conftest*
19834   ol_cv_db_db=no
19835 fi
19836 rm -f conftest*
19837
19838         LIBS="$ol_LIBS"
19839
19840 fi
19841
19842 echo "$ac_t""$ol_cv_db_db" 1>&6
19843
19844         if test $ol_cv_db_db = yes ; then
19845                 ol_cv_lib_db=-ldb
19846         fi
19847 fi
19848
19849 if test $ol_cv_lib_db = no ; then
19850         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19851 echo "configure:19852: checking for Berkeley DB link (-ldb41)" >&5
19852 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19853   echo $ac_n "(cached) $ac_c" 1>&6
19854 else
19855   
19856         ol_DB_LIB=-ldb41
19857         ol_LIBS=$LIBS
19858         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19859
19860         cat > conftest.$ac_ext <<EOF
19861 #line 19862 "configure"
19862 #include "confdefs.h"
19863
19864 #ifdef HAVE_DB_185_H
19865 # include <db_185.h>
19866 #else
19867 # include <db.h>
19868 #endif
19869
19870 #ifndef DB_VERSION_MAJOR
19871 # define DB_VERSION_MAJOR 1
19872 #endif
19873
19874 #ifndef NULL
19875 #define NULL ((void*)0)
19876 #endif
19877
19878 int main() {
19879
19880 #if DB_VERSION_MAJOR > 1
19881         {
19882                 char *version;
19883                 int major, minor, patch;
19884
19885                 version = db_version( &major, &minor, &patch );
19886
19887                 if( major != DB_VERSION_MAJOR ||
19888                         minor < DB_VERSION_MINOR )
19889                 {
19890                         printf("Berkeley DB version mismatch\n"
19891                                 "\theader: %s\n\tlibrary: %s\n",
19892                                 DB_VERSION_STRING, version);
19893                         return 1;
19894                 }
19895         }
19896 #endif
19897
19898 #if DB_VERSION_MAJOR > 2
19899         db_env_create( NULL, 0 );
19900 #elif DB_VERSION_MAJOR > 1
19901         db_appexit( NULL );
19902 #else
19903         (void) dbopen( NULL, 0, 0, 0, NULL);
19904 #endif
19905
19906 ; return 0; }
19907 EOF
19908 if { (eval echo configure:19909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19909   rm -rf conftest*
19910   ol_cv_db_db41=yes
19911 else
19912   echo "configure: failed program was:" >&5
19913   cat conftest.$ac_ext >&5
19914   rm -rf conftest*
19915   ol_cv_db_db41=no
19916 fi
19917 rm -f conftest*
19918
19919         LIBS="$ol_LIBS"
19920
19921 fi
19922
19923 echo "$ac_t""$ol_cv_db_db41" 1>&6
19924
19925         if test $ol_cv_db_db41 = yes ; then
19926                 ol_cv_lib_db=-ldb41
19927         fi
19928 fi
19929
19930 if test $ol_cv_lib_db = no ; then
19931         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19932 echo "configure:19933: checking for Berkeley DB link (-ldb-41)" >&5
19933 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19934   echo $ac_n "(cached) $ac_c" 1>&6
19935 else
19936   
19937         ol_DB_LIB=-ldb-41
19938         ol_LIBS=$LIBS
19939         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19940
19941         cat > conftest.$ac_ext <<EOF
19942 #line 19943 "configure"
19943 #include "confdefs.h"
19944
19945 #ifdef HAVE_DB_185_H
19946 # include <db_185.h>
19947 #else
19948 # include <db.h>
19949 #endif
19950
19951 #ifndef DB_VERSION_MAJOR
19952 # define DB_VERSION_MAJOR 1
19953 #endif
19954
19955 #ifndef NULL
19956 #define NULL ((void*)0)
19957 #endif
19958
19959 int main() {
19960
19961 #if DB_VERSION_MAJOR > 1
19962         {
19963                 char *version;
19964                 int major, minor, patch;
19965
19966                 version = db_version( &major, &minor, &patch );
19967
19968                 if( major != DB_VERSION_MAJOR ||
19969                         minor < DB_VERSION_MINOR )
19970                 {
19971                         printf("Berkeley DB version mismatch\n"
19972                                 "\theader: %s\n\tlibrary: %s\n",
19973                                 DB_VERSION_STRING, version);
19974                         return 1;
19975                 }
19976         }
19977 #endif
19978
19979 #if DB_VERSION_MAJOR > 2
19980         db_env_create( NULL, 0 );
19981 #elif DB_VERSION_MAJOR > 1
19982         db_appexit( NULL );
19983 #else
19984         (void) dbopen( NULL, 0, 0, 0, NULL);
19985 #endif
19986
19987 ; return 0; }
19988 EOF
19989 if { (eval echo configure:19990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19990   rm -rf conftest*
19991   ol_cv_db_db_41=yes
19992 else
19993   echo "configure: failed program was:" >&5
19994   cat conftest.$ac_ext >&5
19995   rm -rf conftest*
19996   ol_cv_db_db_41=no
19997 fi
19998 rm -f conftest*
19999
20000         LIBS="$ol_LIBS"
20001
20002 fi
20003
20004 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20005
20006         if test $ol_cv_db_db_41 = yes ; then
20007                 ol_cv_lib_db=-ldb-41
20008         fi
20009 fi
20010
20011 if test $ol_cv_lib_db = no ; then
20012         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20013 echo "configure:20014: checking for Berkeley DB link (-ldb-4.1)" >&5
20014 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20015   echo $ac_n "(cached) $ac_c" 1>&6
20016 else
20017   
20018         ol_DB_LIB=-ldb-4.1
20019         ol_LIBS=$LIBS
20020         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20021
20022         cat > conftest.$ac_ext <<EOF
20023 #line 20024 "configure"
20024 #include "confdefs.h"
20025
20026 #ifdef HAVE_DB_185_H
20027 # include <db_185.h>
20028 #else
20029 # include <db.h>
20030 #endif
20031
20032 #ifndef DB_VERSION_MAJOR
20033 # define DB_VERSION_MAJOR 1
20034 #endif
20035
20036 #ifndef NULL
20037 #define NULL ((void*)0)
20038 #endif
20039
20040 int main() {
20041
20042 #if DB_VERSION_MAJOR > 1
20043         {
20044                 char *version;
20045                 int major, minor, patch;
20046
20047                 version = db_version( &major, &minor, &patch );
20048
20049                 if( major != DB_VERSION_MAJOR ||
20050                         minor < DB_VERSION_MINOR )
20051                 {
20052                         printf("Berkeley DB version mismatch\n"
20053                                 "\theader: %s\n\tlibrary: %s\n",
20054                                 DB_VERSION_STRING, version);
20055                         return 1;
20056                 }
20057         }
20058 #endif
20059
20060 #if DB_VERSION_MAJOR > 2
20061         db_env_create( NULL, 0 );
20062 #elif DB_VERSION_MAJOR > 1
20063         db_appexit( NULL );
20064 #else
20065         (void) dbopen( NULL, 0, 0, 0, NULL);
20066 #endif
20067
20068 ; return 0; }
20069 EOF
20070 if { (eval echo configure:20071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20071   rm -rf conftest*
20072   ol_cv_db_db_4_dot_1=yes
20073 else
20074   echo "configure: failed program was:" >&5
20075   cat conftest.$ac_ext >&5
20076   rm -rf conftest*
20077   ol_cv_db_db_4_dot_1=no
20078 fi
20079 rm -f conftest*
20080
20081         LIBS="$ol_LIBS"
20082
20083 fi
20084
20085 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20086
20087         if test $ol_cv_db_db_4_dot_1 = yes ; then
20088                 ol_cv_lib_db=-ldb-4.1
20089         fi
20090 fi
20091
20092 if test $ol_cv_lib_db = no ; then
20093         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20094 echo "configure:20095: checking for Berkeley DB link (-ldb-4-1)" >&5
20095 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20096   echo $ac_n "(cached) $ac_c" 1>&6
20097 else
20098   
20099         ol_DB_LIB=-ldb-4-1
20100         ol_LIBS=$LIBS
20101         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20102
20103         cat > conftest.$ac_ext <<EOF
20104 #line 20105 "configure"
20105 #include "confdefs.h"
20106
20107 #ifdef HAVE_DB_185_H
20108 # include <db_185.h>
20109 #else
20110 # include <db.h>
20111 #endif
20112
20113 #ifndef DB_VERSION_MAJOR
20114 # define DB_VERSION_MAJOR 1
20115 #endif
20116
20117 #ifndef NULL
20118 #define NULL ((void*)0)
20119 #endif
20120
20121 int main() {
20122
20123 #if DB_VERSION_MAJOR > 1
20124         {
20125                 char *version;
20126                 int major, minor, patch;
20127
20128                 version = db_version( &major, &minor, &patch );
20129
20130                 if( major != DB_VERSION_MAJOR ||
20131                         minor < DB_VERSION_MINOR )
20132                 {
20133                         printf("Berkeley DB version mismatch\n"
20134                                 "\theader: %s\n\tlibrary: %s\n",
20135                                 DB_VERSION_STRING, version);
20136                         return 1;
20137                 }
20138         }
20139 #endif
20140
20141 #if DB_VERSION_MAJOR > 2
20142         db_env_create( NULL, 0 );
20143 #elif DB_VERSION_MAJOR > 1
20144         db_appexit( NULL );
20145 #else
20146         (void) dbopen( NULL, 0, 0, 0, NULL);
20147 #endif
20148
20149 ; return 0; }
20150 EOF
20151 if { (eval echo configure:20152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20152   rm -rf conftest*
20153   ol_cv_db_db_4_1=yes
20154 else
20155   echo "configure: failed program was:" >&5
20156   cat conftest.$ac_ext >&5
20157   rm -rf conftest*
20158   ol_cv_db_db_4_1=no
20159 fi
20160 rm -f conftest*
20161
20162         LIBS="$ol_LIBS"
20163
20164 fi
20165
20166 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20167
20168         if test $ol_cv_db_db_4_1 = yes ; then
20169                 ol_cv_lib_db=-ldb-4-1
20170         fi
20171 fi
20172
20173 if test $ol_cv_lib_db = no ; then
20174         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20175 echo "configure:20176: checking for Berkeley DB link (-ldb3)" >&5
20176 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20177   echo $ac_n "(cached) $ac_c" 1>&6
20178 else
20179   
20180         ol_DB_LIB=-ldb3
20181         ol_LIBS=$LIBS
20182         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20183
20184         cat > conftest.$ac_ext <<EOF
20185 #line 20186 "configure"
20186 #include "confdefs.h"
20187
20188 #ifdef HAVE_DB_185_H
20189 # include <db_185.h>
20190 #else
20191 # include <db.h>
20192 #endif
20193
20194 #ifndef DB_VERSION_MAJOR
20195 # define DB_VERSION_MAJOR 1
20196 #endif
20197
20198 #ifndef NULL
20199 #define NULL ((void*)0)
20200 #endif
20201
20202 int main() {
20203
20204 #if DB_VERSION_MAJOR > 1
20205         {
20206                 char *version;
20207                 int major, minor, patch;
20208
20209                 version = db_version( &major, &minor, &patch );
20210
20211                 if( major != DB_VERSION_MAJOR ||
20212                         minor < DB_VERSION_MINOR )
20213                 {
20214                         printf("Berkeley DB version mismatch\n"
20215                                 "\theader: %s\n\tlibrary: %s\n",
20216                                 DB_VERSION_STRING, version);
20217                         return 1;
20218                 }
20219         }
20220 #endif
20221
20222 #if DB_VERSION_MAJOR > 2
20223         db_env_create( NULL, 0 );
20224 #elif DB_VERSION_MAJOR > 1
20225         db_appexit( NULL );
20226 #else
20227         (void) dbopen( NULL, 0, 0, 0, NULL);
20228 #endif
20229
20230 ; return 0; }
20231 EOF
20232 if { (eval echo configure:20233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20233   rm -rf conftest*
20234   ol_cv_db_db3=yes
20235 else
20236   echo "configure: failed program was:" >&5
20237   cat conftest.$ac_ext >&5
20238   rm -rf conftest*
20239   ol_cv_db_db3=no
20240 fi
20241 rm -f conftest*
20242
20243         LIBS="$ol_LIBS"
20244
20245 fi
20246
20247 echo "$ac_t""$ol_cv_db_db3" 1>&6
20248
20249         if test $ol_cv_db_db3 = yes ; then
20250                 ol_cv_lib_db=-ldb3
20251         fi
20252 fi
20253
20254 if test $ol_cv_lib_db = no ; then
20255         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20256 echo "configure:20257: checking for Berkeley DB link (-ldb-3)" >&5
20257 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20258   echo $ac_n "(cached) $ac_c" 1>&6
20259 else
20260   
20261         ol_DB_LIB=-ldb-3
20262         ol_LIBS=$LIBS
20263         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20264
20265         cat > conftest.$ac_ext <<EOF
20266 #line 20267 "configure"
20267 #include "confdefs.h"
20268
20269 #ifdef HAVE_DB_185_H
20270 # include <db_185.h>
20271 #else
20272 # include <db.h>
20273 #endif
20274
20275 #ifndef DB_VERSION_MAJOR
20276 # define DB_VERSION_MAJOR 1
20277 #endif
20278
20279 #ifndef NULL
20280 #define NULL ((void*)0)
20281 #endif
20282
20283 int main() {
20284
20285 #if DB_VERSION_MAJOR > 1
20286         {
20287                 char *version;
20288                 int major, minor, patch;
20289
20290                 version = db_version( &major, &minor, &patch );
20291
20292                 if( major != DB_VERSION_MAJOR ||
20293                         minor < DB_VERSION_MINOR )
20294                 {
20295                         printf("Berkeley DB version mismatch\n"
20296                                 "\theader: %s\n\tlibrary: %s\n",
20297                                 DB_VERSION_STRING, version);
20298                         return 1;
20299                 }
20300         }
20301 #endif
20302
20303 #if DB_VERSION_MAJOR > 2
20304         db_env_create( NULL, 0 );
20305 #elif DB_VERSION_MAJOR > 1
20306         db_appexit( NULL );
20307 #else
20308         (void) dbopen( NULL, 0, 0, 0, NULL);
20309 #endif
20310
20311 ; return 0; }
20312 EOF
20313 if { (eval echo configure:20314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20314   rm -rf conftest*
20315   ol_cv_db_db_3=yes
20316 else
20317   echo "configure: failed program was:" >&5
20318   cat conftest.$ac_ext >&5
20319   rm -rf conftest*
20320   ol_cv_db_db_3=no
20321 fi
20322 rm -f conftest*
20323
20324         LIBS="$ol_LIBS"
20325
20326 fi
20327
20328 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20329
20330         if test $ol_cv_db_db_3 = yes ; then
20331                 ol_cv_lib_db=-ldb-3
20332         fi
20333 fi
20334
20335 if test $ol_cv_lib_db = no ; then
20336         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20337 echo "configure:20338: checking for Berkeley DB link (-ldb2)" >&5
20338 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20339   echo $ac_n "(cached) $ac_c" 1>&6
20340 else
20341   
20342         ol_DB_LIB=-ldb2
20343         ol_LIBS=$LIBS
20344         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20345
20346         cat > conftest.$ac_ext <<EOF
20347 #line 20348 "configure"
20348 #include "confdefs.h"
20349
20350 #ifdef HAVE_DB_185_H
20351 # include <db_185.h>
20352 #else
20353 # include <db.h>
20354 #endif
20355
20356 #ifndef DB_VERSION_MAJOR
20357 # define DB_VERSION_MAJOR 1
20358 #endif
20359
20360 #ifndef NULL
20361 #define NULL ((void*)0)
20362 #endif
20363
20364 int main() {
20365
20366 #if DB_VERSION_MAJOR > 1
20367         {
20368                 char *version;
20369                 int major, minor, patch;
20370
20371                 version = db_version( &major, &minor, &patch );
20372
20373                 if( major != DB_VERSION_MAJOR ||
20374                         minor < DB_VERSION_MINOR )
20375                 {
20376                         printf("Berkeley DB version mismatch\n"
20377                                 "\theader: %s\n\tlibrary: %s\n",
20378                                 DB_VERSION_STRING, version);
20379                         return 1;
20380                 }
20381         }
20382 #endif
20383
20384 #if DB_VERSION_MAJOR > 2
20385         db_env_create( NULL, 0 );
20386 #elif DB_VERSION_MAJOR > 1
20387         db_appexit( NULL );
20388 #else
20389         (void) dbopen( NULL, 0, 0, 0, NULL);
20390 #endif
20391
20392 ; return 0; }
20393 EOF
20394 if { (eval echo configure:20395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20395   rm -rf conftest*
20396   ol_cv_db_db2=yes
20397 else
20398   echo "configure: failed program was:" >&5
20399   cat conftest.$ac_ext >&5
20400   rm -rf conftest*
20401   ol_cv_db_db2=no
20402 fi
20403 rm -f conftest*
20404
20405         LIBS="$ol_LIBS"
20406
20407 fi
20408
20409 echo "$ac_t""$ol_cv_db_db2" 1>&6
20410
20411         if test $ol_cv_db_db2 = yes ; then
20412                 ol_cv_lib_db=-ldb2
20413         fi
20414 fi
20415
20416 if test $ol_cv_lib_db = no ; then
20417         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20418 echo "configure:20419: checking for Berkeley DB link (-ldb-2)" >&5
20419 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20420   echo $ac_n "(cached) $ac_c" 1>&6
20421 else
20422   
20423         ol_DB_LIB=-ldb-2
20424         ol_LIBS=$LIBS
20425         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20426
20427         cat > conftest.$ac_ext <<EOF
20428 #line 20429 "configure"
20429 #include "confdefs.h"
20430
20431 #ifdef HAVE_DB_185_H
20432 # include <db_185.h>
20433 #else
20434 # include <db.h>
20435 #endif
20436
20437 #ifndef DB_VERSION_MAJOR
20438 # define DB_VERSION_MAJOR 1
20439 #endif
20440
20441 #ifndef NULL
20442 #define NULL ((void*)0)
20443 #endif
20444
20445 int main() {
20446
20447 #if DB_VERSION_MAJOR > 1
20448         {
20449                 char *version;
20450                 int major, minor, patch;
20451
20452                 version = db_version( &major, &minor, &patch );
20453
20454                 if( major != DB_VERSION_MAJOR ||
20455                         minor < DB_VERSION_MINOR )
20456                 {
20457                         printf("Berkeley DB version mismatch\n"
20458                                 "\theader: %s\n\tlibrary: %s\n",
20459                                 DB_VERSION_STRING, version);
20460                         return 1;
20461                 }
20462         }
20463 #endif
20464
20465 #if DB_VERSION_MAJOR > 2
20466         db_env_create( NULL, 0 );
20467 #elif DB_VERSION_MAJOR > 1
20468         db_appexit( NULL );
20469 #else
20470         (void) dbopen( NULL, 0, 0, 0, NULL);
20471 #endif
20472
20473 ; return 0; }
20474 EOF
20475 if { (eval echo configure:20476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20476   rm -rf conftest*
20477   ol_cv_db_db_2=yes
20478 else
20479   echo "configure: failed program was:" >&5
20480   cat conftest.$ac_ext >&5
20481   rm -rf conftest*
20482   ol_cv_db_db_2=no
20483 fi
20484 rm -f conftest*
20485
20486         LIBS="$ol_LIBS"
20487
20488 fi
20489
20490 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20491
20492         if test $ol_cv_db_db_2 = yes ; then
20493                 ol_cv_lib_db=-ldb-2
20494         fi
20495 fi
20496
20497 if test $ol_cv_lib_db = no ; then
20498         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20499 echo "configure:20500: checking for Berkeley DB link (-ldb1)" >&5
20500 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20501   echo $ac_n "(cached) $ac_c" 1>&6
20502 else
20503   
20504         ol_DB_LIB=-ldb1
20505         ol_LIBS=$LIBS
20506         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20507
20508         cat > conftest.$ac_ext <<EOF
20509 #line 20510 "configure"
20510 #include "confdefs.h"
20511
20512 #ifdef HAVE_DB_185_H
20513 # include <db_185.h>
20514 #else
20515 # include <db.h>
20516 #endif
20517
20518 #ifndef DB_VERSION_MAJOR
20519 # define DB_VERSION_MAJOR 1
20520 #endif
20521
20522 #ifndef NULL
20523 #define NULL ((void*)0)
20524 #endif
20525
20526 int main() {
20527
20528 #if DB_VERSION_MAJOR > 1
20529         {
20530                 char *version;
20531                 int major, minor, patch;
20532
20533                 version = db_version( &major, &minor, &patch );
20534
20535                 if( major != DB_VERSION_MAJOR ||
20536                         minor < DB_VERSION_MINOR )
20537                 {
20538                         printf("Berkeley DB version mismatch\n"
20539                                 "\theader: %s\n\tlibrary: %s\n",
20540                                 DB_VERSION_STRING, version);
20541                         return 1;
20542                 }
20543         }
20544 #endif
20545
20546 #if DB_VERSION_MAJOR > 2
20547         db_env_create( NULL, 0 );
20548 #elif DB_VERSION_MAJOR > 1
20549         db_appexit( NULL );
20550 #else
20551         (void) dbopen( NULL, 0, 0, 0, NULL);
20552 #endif
20553
20554 ; return 0; }
20555 EOF
20556 if { (eval echo configure:20557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20557   rm -rf conftest*
20558   ol_cv_db_db1=yes
20559 else
20560   echo "configure: failed program was:" >&5
20561   cat conftest.$ac_ext >&5
20562   rm -rf conftest*
20563   ol_cv_db_db1=no
20564 fi
20565 rm -f conftest*
20566
20567         LIBS="$ol_LIBS"
20568
20569 fi
20570
20571 echo "$ac_t""$ol_cv_db_db1" 1>&6
20572
20573         if test $ol_cv_db_db1 = yes ; then
20574                 ol_cv_lib_db=-ldb1
20575         fi
20576 fi
20577
20578 if test $ol_cv_lib_db = no ; then
20579         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20580 echo "configure:20581: checking for Berkeley DB link (-ldb-1)" >&5
20581 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20582   echo $ac_n "(cached) $ac_c" 1>&6
20583 else
20584   
20585         ol_DB_LIB=-ldb-1
20586         ol_LIBS=$LIBS
20587         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20588
20589         cat > conftest.$ac_ext <<EOF
20590 #line 20591 "configure"
20591 #include "confdefs.h"
20592
20593 #ifdef HAVE_DB_185_H
20594 # include <db_185.h>
20595 #else
20596 # include <db.h>
20597 #endif
20598
20599 #ifndef DB_VERSION_MAJOR
20600 # define DB_VERSION_MAJOR 1
20601 #endif
20602
20603 #ifndef NULL
20604 #define NULL ((void*)0)
20605 #endif
20606
20607 int main() {
20608
20609 #if DB_VERSION_MAJOR > 1
20610         {
20611                 char *version;
20612                 int major, minor, patch;
20613
20614                 version = db_version( &major, &minor, &patch );
20615
20616                 if( major != DB_VERSION_MAJOR ||
20617                         minor < DB_VERSION_MINOR )
20618                 {
20619                         printf("Berkeley DB version mismatch\n"
20620                                 "\theader: %s\n\tlibrary: %s\n",
20621                                 DB_VERSION_STRING, version);
20622                         return 1;
20623                 }
20624         }
20625 #endif
20626
20627 #if DB_VERSION_MAJOR > 2
20628         db_env_create( NULL, 0 );
20629 #elif DB_VERSION_MAJOR > 1
20630         db_appexit( NULL );
20631 #else
20632         (void) dbopen( NULL, 0, 0, 0, NULL);
20633 #endif
20634
20635 ; return 0; }
20636 EOF
20637 if { (eval echo configure:20638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20638   rm -rf conftest*
20639   ol_cv_db_db_1=yes
20640 else
20641   echo "configure: failed program was:" >&5
20642   cat conftest.$ac_ext >&5
20643   rm -rf conftest*
20644   ol_cv_db_db_1=no
20645 fi
20646 rm -f conftest*
20647
20648         LIBS="$ol_LIBS"
20649
20650 fi
20651
20652 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20653
20654         if test $ol_cv_db_db_1 = yes ; then
20655                 ol_cv_lib_db=-ldb-1
20656         fi
20657 fi
20658
20659
20660         if test "$ol_cv_lib_db" != no ; then
20661                 ol_cv_berkeley_db=yes
20662                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20663 echo "configure:20664: checking for Berkeley DB version match" >&5
20664 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20665   echo $ac_n "(cached) $ac_c" 1>&6
20666 else
20667   
20668         ol_LIBS="$LIBS"
20669         LIBS="$LTHREAD_LIBS $LIBS"
20670         if test $ol_cv_lib_db != yes ; then
20671                 LIBS="$ol_cv_lib_db $LIBS"
20672         fi
20673
20674         if test "$cross_compiling" = yes; then
20675   ol_cv_berkeley_db_version=cross
20676 else
20677   cat > conftest.$ac_ext <<EOF
20678 #line 20679 "configure"
20679 #include "confdefs.h"
20680
20681 #ifdef HAVE_DB_185_H
20682         choke me;
20683 #else
20684 #include <db.h>
20685 #endif
20686 #ifndef DB_VERSION_MAJOR
20687 # define DB_VERSION_MAJOR 1
20688 #endif
20689 #ifndef NULL
20690 #define NULL ((void *)0)
20691 #endif
20692 main()
20693 {
20694 #if DB_VERSION_MAJOR > 1
20695         char *version;
20696         int major, minor, patch;
20697
20698         version = db_version( &major, &minor, &patch );
20699
20700         if( major != DB_VERSION_MAJOR ||
20701                 minor != DB_VERSION_MINOR ||
20702                 patch != DB_VERSION_PATCH )
20703         {
20704                 printf("Berkeley DB version mismatch\n"
20705                         "\theader: %s\n\tlibrary: %s\n",
20706                         DB_VERSION_STRING, version);
20707                 return 1;
20708         }
20709 #endif
20710
20711         return 0;
20712 }
20713 EOF
20714 if { (eval echo configure:20715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20715 then
20716   ol_cv_berkeley_db_version=yes
20717 else
20718   echo "configure: failed program was:" >&5
20719   cat conftest.$ac_ext >&5
20720   rm -fr conftest*
20721   ol_cv_berkeley_db_version=no
20722 fi
20723 rm -fr conftest*
20724 fi
20725
20726
20727         LIBS="$ol_LIBS"
20728
20729 fi
20730
20731 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20732
20733         if test $ol_cv_berkeley_db_version = no ; then
20734                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20735         fi
20736
20737                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20738 echo "configure:20739: checking for Berkeley DB thread support" >&5
20739 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20740   echo $ac_n "(cached) $ac_c" 1>&6
20741 else
20742   
20743         ol_LIBS="$LIBS"
20744         LIBS="$LTHREAD_LIBS $LIBS"
20745         if test $ol_cv_lib_db != yes ; then
20746                 LIBS="$ol_cv_lib_db $LIBS"
20747         fi
20748
20749         if test "$cross_compiling" = yes; then
20750   ol_cv_berkeley_db_thread=cross
20751 else
20752   cat > conftest.$ac_ext <<EOF
20753 #line 20754 "configure"
20754 #include "confdefs.h"
20755
20756 #ifdef HAVE_DB_185_H
20757         choke me;
20758 #else
20759 #include <db.h>
20760 #endif
20761 #ifndef NULL
20762 #define NULL ((void *)0)
20763 #endif
20764 main()
20765 {
20766         int rc;
20767         u_int32_t flags = DB_CREATE |
20768 #ifdef DB_PRIVATE
20769                 DB_PRIVATE |
20770 #endif
20771                 DB_THREAD;
20772
20773 #if DB_VERSION_MAJOR > 2
20774         DB_ENV *env = NULL;
20775
20776         rc = db_env_create( &env, 0 );
20777
20778         flags |= DB_INIT_MPOOL;
20779 #ifdef DB_MPOOL_PRIVATE
20780         flags |= DB_MPOOL_PRIVATE;
20781 #endif
20782
20783         if( rc ) {
20784                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20785                 return rc;
20786         }
20787
20788 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20789         rc = env->open( env, NULL, flags, 0 );
20790 #else
20791         rc = env->open( env, NULL, NULL, flags, 0 );
20792 #endif
20793
20794         if ( rc == 0 ) {
20795                 rc = env->close( env, 0 );
20796         }
20797
20798         if( rc ) {
20799                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20800                 return rc;
20801         }
20802
20803 #else
20804         DB_ENV env;
20805         memset( &env, '\0', sizeof(env) );
20806
20807         rc = db_appinit( NULL, NULL, &env, flags );
20808
20809         if( rc == 0 ) {
20810                 db_appexit( &env );
20811         }
20812
20813         unlink("__db_mpool.share");
20814         unlink("__db_lock.share");
20815 #endif
20816
20817         return rc;
20818 }
20819 EOF
20820 if { (eval echo configure:20821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20821 then
20822   ol_cv_berkeley_db_thread=yes
20823 else
20824   echo "configure: failed program was:" >&5
20825   cat conftest.$ac_ext >&5
20826   rm -fr conftest*
20827   ol_cv_berkeley_db_thread=no
20828 fi
20829 rm -fr conftest*
20830 fi
20831
20832
20833         LIBS="$ol_LIBS"
20834
20835 fi
20836
20837 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20838
20839         if test $ol_cv_berkeley_db_thread != no ; then
20840                 cat >> confdefs.h <<\EOF
20841 #define HAVE_BERKELEY_DB_THREAD 1
20842 EOF
20843
20844         fi
20845
20846         fi
20847 fi
20848
20849         fi
20850
20851         if test $ol_cv_berkeley_db != no ; then
20852                 cat >> confdefs.h <<\EOF
20853 #define HAVE_BERKELEY_DB 1
20854 EOF
20855
20856
20857                 ol_link_ldbm=berkeley
20858                 ol_with_ldbm_api=berkeley
20859
20860                 if test $ol_with_ldbm_type = hash ; then
20861                         cat >> confdefs.h <<\EOF
20862 #define LDBM_USE_DBHASH 1
20863 EOF
20864
20865                 else
20866                         cat >> confdefs.h <<\EOF
20867 #define LDBM_USE_DBBTREE 1
20868 EOF
20869
20870                 fi
20871
20872                                                 if test $ol_cv_lib_db != yes ; then
20873                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20874                 fi
20875         fi
20876 fi
20877
20878 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20879         if test $ol_link_ldbm != berkeley ; then
20880                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20881         else
20882                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20883 echo "configure:20884: checking Berkeley DB version for BDB backend" >&5
20884 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20885   echo $ac_n "(cached) $ac_c" 1>&6
20886 else
20887   
20888         cat > conftest.$ac_ext <<EOF
20889 #line 20890 "configure"
20890 #include "confdefs.h"
20891
20892 #include <db.h>
20893
20894  /* this check could be improved */
20895 #ifndef DB_VERSION_MAJOR
20896 #       define DB_VERSION_MAJOR 1
20897 #endif
20898 #ifndef DB_VERSION_MINOR
20899 #       define DB_VERSION_MINOR 0
20900 #endif
20901
20902 /* require 4.2 or later */
20903 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20904         __db_version_compat
20905 #endif
20906         
20907 EOF
20908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20909   egrep "__db_version_compat" >/dev/null 2>&1; then
20910   rm -rf conftest*
20911   ol_cv_bdb_compat=yes
20912 else
20913   rm -rf conftest*
20914   ol_cv_bdb_compat=no
20915 fi
20916 rm -f conftest*
20917
20918 fi
20919
20920 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20921
20922
20923                 if test $ol_cv_bdb_compat != yes ; then
20924                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20925                 fi
20926         fi
20927 fi
20928
20929 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20930         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20931         ol_with_ldbm_api=none
20932 fi
20933
20934 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20935         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20936 echo "configure:20937: checking for MDBM library" >&5
20937 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20938   echo $ac_n "(cached) $ac_c" 1>&6
20939 else
20940         ol_LIBS="$LIBS"
20941         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20942 echo "configure:20943: checking for mdbm_set_chain" >&5
20943 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20944   echo $ac_n "(cached) $ac_c" 1>&6
20945 else
20946   cat > conftest.$ac_ext <<EOF
20947 #line 20948 "configure"
20948 #include "confdefs.h"
20949 /* System header to define __stub macros and hopefully few prototypes,
20950     which can conflict with char mdbm_set_chain(); below.  */
20951 #include <assert.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 char (*f)();
20957
20958 int main() {
20959
20960 /* The GNU C library defines this for functions which it implements
20961     to always fail with ENOSYS.  Some functions are actually named
20962     something starting with __ and the normal name is an alias.  */
20963 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20964 choke me
20965 #else
20966 f = mdbm_set_chain;
20967 #endif
20968
20969 ; return 0; }
20970 EOF
20971 if { (eval echo configure:20972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20972   rm -rf conftest*
20973   eval "ac_cv_func_mdbm_set_chain=yes"
20974 else
20975   echo "configure: failed program was:" >&5
20976   cat conftest.$ac_ext >&5
20977   rm -rf conftest*
20978   eval "ac_cv_func_mdbm_set_chain=no"
20979 fi
20980 rm -f conftest*
20981 fi
20982
20983 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20984   echo "$ac_t""yes" 1>&6
20985   ol_cv_lib_mdbm=yes
20986 else
20987   echo "$ac_t""no" 1>&6
20988
20989                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20990 echo "configure:20991: checking for mdbm_set_chain in -lmdbm" >&5
20991 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20992 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20993   echo $ac_n "(cached) $ac_c" 1>&6
20994 else
20995   ac_save_LIBS="$LIBS"
20996 LIBS="-lmdbm  $LIBS"
20997 cat > conftest.$ac_ext <<EOF
20998 #line 20999 "configure"
20999 #include "confdefs.h"
21000 /* Override any gcc2 internal prototype to avoid an error.  */
21001 /* We use char because int might match the return type of a gcc2
21002     builtin and then its argument prototype would still apply.  */
21003 char mdbm_set_chain();
21004
21005 int main() {
21006 mdbm_set_chain()
21007 ; return 0; }
21008 EOF
21009 if { (eval echo configure:21010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21010   rm -rf conftest*
21011   eval "ac_cv_lib_$ac_lib_var=yes"
21012 else
21013   echo "configure: failed program was:" >&5
21014   cat conftest.$ac_ext >&5
21015   rm -rf conftest*
21016   eval "ac_cv_lib_$ac_lib_var=no"
21017 fi
21018 rm -f conftest*
21019 LIBS="$ac_save_LIBS"
21020
21021 fi
21022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21023   echo "$ac_t""yes" 1>&6
21024   ol_cv_lib_mdbm=-lmdbm
21025 else
21026   echo "$ac_t""no" 1>&6
21027 ol_cv_lib_mdbm=no
21028 fi
21029
21030         
21031 fi
21032
21033         LIBS="$ol_LIBS"
21034
21035 fi
21036
21037 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21038
21039
21040  for ac_hdr in mdbm.h
21041 do
21042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21044 echo "configure:21045: checking for $ac_hdr" >&5
21045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21046   echo $ac_n "(cached) $ac_c" 1>&6
21047 else
21048   cat > conftest.$ac_ext <<EOF
21049 #line 21050 "configure"
21050 #include "confdefs.h"
21051 #include <$ac_hdr>
21052 EOF
21053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21054 { (eval echo configure:21055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21056 if test -z "$ac_err"; then
21057   rm -rf conftest*
21058   eval "ac_cv_header_$ac_safe=yes"
21059 else
21060   echo "$ac_err" >&5
21061   echo "configure: failed program was:" >&5
21062   cat conftest.$ac_ext >&5
21063   rm -rf conftest*
21064   eval "ac_cv_header_$ac_safe=no"
21065 fi
21066 rm -f conftest*
21067 fi
21068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21069   echo "$ac_t""yes" 1>&6
21070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21071   cat >> confdefs.h <<EOF
21072 #define $ac_tr_hdr 1
21073 EOF
21074  
21075 else
21076   echo "$ac_t""no" 1>&6
21077 fi
21078 done
21079
21080  echo $ac_n "checking for db""... $ac_c" 1>&6
21081 echo "configure:21082: checking for db" >&5
21082 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21083   echo $ac_n "(cached) $ac_c" 1>&6
21084 else
21085   
21086         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21087                 ol_cv_mdbm=no
21088         else
21089                 ol_cv_mdbm=yes
21090         fi
21091
21092 fi
21093
21094 echo "$ac_t""$ol_cv_mdbm" 1>&6
21095  if test $ol_cv_mdbm = yes ; then
21096         cat >> confdefs.h <<\EOF
21097 #define HAVE_MDBM 1
21098 EOF
21099
21100  fi
21101
21102
21103         if test $ol_cv_mdbm = yes ; then
21104                 ol_link_ldbm=mdbm
21105                 ol_with_ldbm_api=mdbm
21106                 if test $ol_cv_lib_mdbm != yes ; then
21107                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21108                 fi
21109         fi
21110 fi
21111
21112 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21113         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21114 echo "configure:21115: checking for GDBM library" >&5
21115 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21116   echo $ac_n "(cached) $ac_c" 1>&6
21117 else
21118         ol_LIBS="$LIBS"
21119         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21120 echo "configure:21121: checking for gdbm_open" >&5
21121 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21122   echo $ac_n "(cached) $ac_c" 1>&6
21123 else
21124   cat > conftest.$ac_ext <<EOF
21125 #line 21126 "configure"
21126 #include "confdefs.h"
21127 /* System header to define __stub macros and hopefully few prototypes,
21128     which can conflict with char gdbm_open(); below.  */
21129 #include <assert.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 char (*f)();
21135
21136 int main() {
21137
21138 /* The GNU C library defines this for functions which it implements
21139     to always fail with ENOSYS.  Some functions are actually named
21140     something starting with __ and the normal name is an alias.  */
21141 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21142 choke me
21143 #else
21144 f = gdbm_open;
21145 #endif
21146
21147 ; return 0; }
21148 EOF
21149 if { (eval echo configure:21150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21150   rm -rf conftest*
21151   eval "ac_cv_func_gdbm_open=yes"
21152 else
21153   echo "configure: failed program was:" >&5
21154   cat conftest.$ac_ext >&5
21155   rm -rf conftest*
21156   eval "ac_cv_func_gdbm_open=no"
21157 fi
21158 rm -f conftest*
21159 fi
21160
21161 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21162   echo "$ac_t""yes" 1>&6
21163   ol_cv_lib_gdbm=yes
21164 else
21165   echo "$ac_t""no" 1>&6
21166
21167                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21168 echo "configure:21169: checking for gdbm_open in -lgdbm" >&5
21169 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21171   echo $ac_n "(cached) $ac_c" 1>&6
21172 else
21173   ac_save_LIBS="$LIBS"
21174 LIBS="-lgdbm  $LIBS"
21175 cat > conftest.$ac_ext <<EOF
21176 #line 21177 "configure"
21177 #include "confdefs.h"
21178 /* Override any gcc2 internal prototype to avoid an error.  */
21179 /* We use char because int might match the return type of a gcc2
21180     builtin and then its argument prototype would still apply.  */
21181 char gdbm_open();
21182
21183 int main() {
21184 gdbm_open()
21185 ; return 0; }
21186 EOF
21187 if { (eval echo configure:21188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21188   rm -rf conftest*
21189   eval "ac_cv_lib_$ac_lib_var=yes"
21190 else
21191   echo "configure: failed program was:" >&5
21192   cat conftest.$ac_ext >&5
21193   rm -rf conftest*
21194   eval "ac_cv_lib_$ac_lib_var=no"
21195 fi
21196 rm -f conftest*
21197 LIBS="$ac_save_LIBS"
21198
21199 fi
21200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21201   echo "$ac_t""yes" 1>&6
21202   ol_cv_lib_gdbm=-lgdbm
21203 else
21204   echo "$ac_t""no" 1>&6
21205 ol_cv_lib_gdbm=no
21206 fi
21207
21208         
21209 fi
21210
21211         LIBS="$ol_LIBS"
21212
21213 fi
21214
21215 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21216
21217
21218  for ac_hdr in gdbm.h
21219 do
21220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21222 echo "configure:21223: checking for $ac_hdr" >&5
21223 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21224   echo $ac_n "(cached) $ac_c" 1>&6
21225 else
21226   cat > conftest.$ac_ext <<EOF
21227 #line 21228 "configure"
21228 #include "confdefs.h"
21229 #include <$ac_hdr>
21230 EOF
21231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21232 { (eval echo configure:21233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21234 if test -z "$ac_err"; then
21235   rm -rf conftest*
21236   eval "ac_cv_header_$ac_safe=yes"
21237 else
21238   echo "$ac_err" >&5
21239   echo "configure: failed program was:" >&5
21240   cat conftest.$ac_ext >&5
21241   rm -rf conftest*
21242   eval "ac_cv_header_$ac_safe=no"
21243 fi
21244 rm -f conftest*
21245 fi
21246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21247   echo "$ac_t""yes" 1>&6
21248     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21249   cat >> confdefs.h <<EOF
21250 #define $ac_tr_hdr 1
21251 EOF
21252  
21253 else
21254   echo "$ac_t""no" 1>&6
21255 fi
21256 done
21257
21258  echo $ac_n "checking for db""... $ac_c" 1>&6
21259 echo "configure:21260: checking for db" >&5
21260 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21261   echo $ac_n "(cached) $ac_c" 1>&6
21262 else
21263   
21264         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21265                 ol_cv_gdbm=no
21266         else
21267                 ol_cv_gdbm=yes
21268         fi
21269
21270 fi
21271
21272 echo "$ac_t""$ol_cv_gdbm" 1>&6
21273  if test $ol_cv_gdbm = yes ; then
21274         cat >> confdefs.h <<\EOF
21275 #define HAVE_GDBM 1
21276 EOF
21277
21278  fi
21279
21280
21281         if test $ol_cv_gdbm = yes ; then
21282                 ol_link_ldbm=gdbm
21283                 ol_with_ldbm_api=gdbm
21284
21285                 if test $ol_cv_lib_gdbm != yes ; then
21286                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21287                 fi
21288         fi
21289 fi
21290
21291 if test $ol_with_ldbm_api = ndbm ; then
21292         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21293 echo "configure:21294: checking for NDBM library" >&5
21294 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297         ol_LIBS="$LIBS"
21298         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21299 echo "configure:21300: checking for dbm_open" >&5
21300 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21301   echo $ac_n "(cached) $ac_c" 1>&6
21302 else
21303   cat > conftest.$ac_ext <<EOF
21304 #line 21305 "configure"
21305 #include "confdefs.h"
21306 /* System header to define __stub macros and hopefully few prototypes,
21307     which can conflict with char dbm_open(); below.  */
21308 #include <assert.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 char (*f)();
21314
21315 int main() {
21316
21317 /* The GNU C library defines this for functions which it implements
21318     to always fail with ENOSYS.  Some functions are actually named
21319     something starting with __ and the normal name is an alias.  */
21320 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21321 choke me
21322 #else
21323 f = dbm_open;
21324 #endif
21325
21326 ; return 0; }
21327 EOF
21328 if { (eval echo configure:21329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21329   rm -rf conftest*
21330   eval "ac_cv_func_dbm_open=yes"
21331 else
21332   echo "configure: failed program was:" >&5
21333   cat conftest.$ac_ext >&5
21334   rm -rf conftest*
21335   eval "ac_cv_func_dbm_open=no"
21336 fi
21337 rm -f conftest*
21338 fi
21339
21340 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21341   echo "$ac_t""yes" 1>&6
21342   ol_cv_lib_ndbm=yes
21343 else
21344   echo "$ac_t""no" 1>&6
21345
21346                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21347 echo "configure:21348: checking for dbm_open in -lndbm" >&5
21348 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21349 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   ac_save_LIBS="$LIBS"
21353 LIBS="-lndbm  $LIBS"
21354 cat > conftest.$ac_ext <<EOF
21355 #line 21356 "configure"
21356 #include "confdefs.h"
21357 /* Override any gcc2 internal prototype to avoid an error.  */
21358 /* We use char because int might match the return type of a gcc2
21359     builtin and then its argument prototype would still apply.  */
21360 char dbm_open();
21361
21362 int main() {
21363 dbm_open()
21364 ; return 0; }
21365 EOF
21366 if { (eval echo configure:21367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21367   rm -rf conftest*
21368   eval "ac_cv_lib_$ac_lib_var=yes"
21369 else
21370   echo "configure: failed program was:" >&5
21371   cat conftest.$ac_ext >&5
21372   rm -rf conftest*
21373   eval "ac_cv_lib_$ac_lib_var=no"
21374 fi
21375 rm -f conftest*
21376 LIBS="$ac_save_LIBS"
21377
21378 fi
21379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21380   echo "$ac_t""yes" 1>&6
21381   ol_cv_lib_ndbm=-lndbm
21382 else
21383   echo "$ac_t""no" 1>&6
21384
21385                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21386 echo "configure:21387: checking for dbm_open in -ldbm" >&5
21387 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21389   echo $ac_n "(cached) $ac_c" 1>&6
21390 else
21391   ac_save_LIBS="$LIBS"
21392 LIBS="-ldbm  $LIBS"
21393 cat > conftest.$ac_ext <<EOF
21394 #line 21395 "configure"
21395 #include "confdefs.h"
21396 /* Override any gcc2 internal prototype to avoid an error.  */
21397 /* We use char because int might match the return type of a gcc2
21398     builtin and then its argument prototype would still apply.  */
21399 char dbm_open();
21400
21401 int main() {
21402 dbm_open()
21403 ; return 0; }
21404 EOF
21405 if { (eval echo configure:21406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21406   rm -rf conftest*
21407   eval "ac_cv_lib_$ac_lib_var=yes"
21408 else
21409   echo "configure: failed program was:" >&5
21410   cat conftest.$ac_ext >&5
21411   rm -rf conftest*
21412   eval "ac_cv_lib_$ac_lib_var=no"
21413 fi
21414 rm -f conftest*
21415 LIBS="$ac_save_LIBS"
21416
21417 fi
21418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21419   echo "$ac_t""yes" 1>&6
21420   ol_cv_lib_ndbm=-ldbm
21421 else
21422   echo "$ac_t""no" 1>&6
21423 ol_cv_lib_ndbm=no
21424 fi
21425                 
21426 fi
21427
21428         
21429 fi
21430
21431         LIBS="$ol_LIBS"
21432
21433 fi
21434
21435 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21436
21437
21438  for ac_hdr in ndbm.h
21439 do
21440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21442 echo "configure:21443: checking for $ac_hdr" >&5
21443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21444   echo $ac_n "(cached) $ac_c" 1>&6
21445 else
21446   cat > conftest.$ac_ext <<EOF
21447 #line 21448 "configure"
21448 #include "confdefs.h"
21449 #include <$ac_hdr>
21450 EOF
21451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21452 { (eval echo configure:21453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21454 if test -z "$ac_err"; then
21455   rm -rf conftest*
21456   eval "ac_cv_header_$ac_safe=yes"
21457 else
21458   echo "$ac_err" >&5
21459   echo "configure: failed program was:" >&5
21460   cat conftest.$ac_ext >&5
21461   rm -rf conftest*
21462   eval "ac_cv_header_$ac_safe=no"
21463 fi
21464 rm -f conftest*
21465 fi
21466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21467   echo "$ac_t""yes" 1>&6
21468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21469   cat >> confdefs.h <<EOF
21470 #define $ac_tr_hdr 1
21471 EOF
21472  
21473 else
21474   echo "$ac_t""no" 1>&6
21475 fi
21476 done
21477
21478  echo $ac_n "checking for db""... $ac_c" 1>&6
21479 echo "configure:21480: checking for db" >&5
21480 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21481   echo $ac_n "(cached) $ac_c" 1>&6
21482 else
21483   
21484         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21485                 ol_cv_ndbm=no
21486         else
21487                 ol_cv_ndbm=yes
21488         fi
21489
21490 fi
21491
21492 echo "$ac_t""$ol_cv_ndbm" 1>&6
21493  if test $ol_cv_ndbm = yes ; then
21494         cat >> confdefs.h <<\EOF
21495 #define HAVE_NDBM 1
21496 EOF
21497
21498  fi
21499
21500
21501         if test $ol_cv_ndbm = yes ; then
21502                 ol_link_ldbm=ndbm
21503                 ol_with_ldbm_api=ndbm
21504
21505                 if test $ol_cv_lib_ndbm != yes ; then
21506                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21507                 fi
21508         fi
21509 fi
21510
21511 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21512         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21513 fi
21514
21515 if test $ol_enable_bdb = yes -o \
21516         $ol_enable_hdb = yes -o \
21517         $ol_enable_ldbm = yes ; then
21518         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21519 fi
21520
21521
21522 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21523         BUILD_LIBS_DYNAMIC=shared
21524         cat >> confdefs.h <<\EOF
21525 #define LDAP_LIBS_DYNAMIC 1
21526 EOF
21527
21528         LTSTATIC=""
21529 else
21530         BUILD_LIBS_DYNAMIC=static
21531         LTSTATIC="-static"
21532 fi
21533
21534 if test $ol_enable_wrappers != no ; then
21535         for ac_hdr in tcpd.h
21536 do
21537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21539 echo "configure:21540: checking for $ac_hdr" >&5
21540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21541   echo $ac_n "(cached) $ac_c" 1>&6
21542 else
21543   cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546 #include <$ac_hdr>
21547 EOF
21548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21549 { (eval echo configure:21550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21551 if test -z "$ac_err"; then
21552   rm -rf conftest*
21553   eval "ac_cv_header_$ac_safe=yes"
21554 else
21555   echo "$ac_err" >&5
21556   echo "configure: failed program was:" >&5
21557   cat conftest.$ac_ext >&5
21558   rm -rf conftest*
21559   eval "ac_cv_header_$ac_safe=no"
21560 fi
21561 rm -f conftest*
21562 fi
21563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21564   echo "$ac_t""yes" 1>&6
21565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21566   cat >> confdefs.h <<EOF
21567 #define $ac_tr_hdr 1
21568 EOF
21569  
21570                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21571 echo "configure:21572: checking for TCP wrappers library" >&5
21572                 save_LIBS="$LIBS"
21573                 LIBS="$LIBS -lwrap"
21574                 cat > conftest.$ac_ext <<EOF
21575 #line 21576 "configure"
21576 #include "confdefs.h"
21577
21578 #include <tcpd.h>
21579 int allow_severity = 0;
21580 int deny_severity  = 0;
21581
21582 struct request_info *req;
21583                 
21584 int main() {
21585
21586 hosts_access(req)
21587                 
21588 ; return 0; }
21589 EOF
21590 if { (eval echo configure:21591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21591   rm -rf conftest*
21592   echo "$ac_t""-lwrap" 1>&6
21593                 have_wrappers=yes
21594                 LIBS="$save_LIBS"
21595 else
21596   echo "configure: failed program was:" >&5
21597   cat conftest.$ac_ext >&5
21598   rm -rf conftest*
21599   
21600                                 LIBS="$LIBS -lnsl"
21601                 cat > conftest.$ac_ext <<EOF
21602 #line 21603 "configure"
21603 #include "confdefs.h"
21604
21605 #include <tcpd.h>
21606 int allow_severity = 0;
21607 int deny_severity  = 0;
21608
21609 struct request_info *req;
21610                 
21611 int main() {
21612
21613 hosts_access(req)
21614                 
21615 ; return 0; }
21616 EOF
21617 if { (eval echo configure:21618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21618   rm -rf conftest*
21619   echo "$ac_t""-lwrap -lnsl" 1>&6
21620                 have_wrappers=yes
21621                 LIBS="$save_LIBS -lnsl"
21622 else
21623   echo "configure: failed program was:" >&5
21624   cat conftest.$ac_ext >&5
21625   rm -rf conftest*
21626   
21627                 echo "$ac_t""no" 1>&6
21628                 have_wrappers=no
21629                 LIBS=$save_LIBS
21630 fi
21631 rm -f conftest*
21632 fi
21633 rm -f conftest*
21634 else
21635   echo "$ac_t""no" 1>&6
21636 have_wrappers=no
21637 fi
21638 done
21639
21640
21641         if test $have_wrappers = yes ; then
21642                 cat >> confdefs.h <<\EOF
21643 #define HAVE_TCPD 1
21644 EOF
21645
21646                 WRAP_LIBS="-lwrap"
21647         elif test $ol_enable_wrappers = yes ; then
21648                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21649         else
21650                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21651                 WRAP_LIBS=""
21652         fi
21653 fi
21654
21655 if test $ol_enable_syslog != no ; then
21656         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21657 echo "configure:21658: checking for openlog" >&5
21658 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21659   echo $ac_n "(cached) $ac_c" 1>&6
21660 else
21661   cat > conftest.$ac_ext <<EOF
21662 #line 21663 "configure"
21663 #include "confdefs.h"
21664 /* System header to define __stub macros and hopefully few prototypes,
21665     which can conflict with char openlog(); below.  */
21666 #include <assert.h>
21667 /* Override any gcc2 internal prototype to avoid an error.  */
21668 /* We use char because int might match the return type of a gcc2
21669     builtin and then its argument prototype would still apply.  */
21670 char openlog();
21671 char (*f)();
21672
21673 int main() {
21674
21675 /* The GNU C library defines this for functions which it implements
21676     to always fail with ENOSYS.  Some functions are actually named
21677     something starting with __ and the normal name is an alias.  */
21678 #if defined (__stub_openlog) || defined (__stub___openlog)
21679 choke me
21680 #else
21681 f = openlog;
21682 #endif
21683
21684 ; return 0; }
21685 EOF
21686 if { (eval echo configure:21687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21687   rm -rf conftest*
21688   eval "ac_cv_func_openlog=yes"
21689 else
21690   echo "configure: failed program was:" >&5
21691   cat conftest.$ac_ext >&5
21692   rm -rf conftest*
21693   eval "ac_cv_func_openlog=no"
21694 fi
21695 rm -f conftest*
21696 fi
21697
21698 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21699   echo "$ac_t""yes" 1>&6
21700   :
21701 else
21702   echo "$ac_t""no" 1>&6
21703 fi
21704
21705         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21706                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21707         fi
21708         ol_enable_syslog=$ac_cv_func_openlog
21709 fi
21710
21711
21712 ol_link_sql=no
21713 if test $ol_enable_sql != no ; then
21714         for ac_hdr in sql.h sqlext.h
21715 do
21716 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21717 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21718 echo "configure:21719: checking for $ac_hdr" >&5
21719 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21720   echo $ac_n "(cached) $ac_c" 1>&6
21721 else
21722   cat > conftest.$ac_ext <<EOF
21723 #line 21724 "configure"
21724 #include "confdefs.h"
21725 #include <$ac_hdr>
21726 EOF
21727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21728 { (eval echo configure:21729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21730 if test -z "$ac_err"; then
21731   rm -rf conftest*
21732   eval "ac_cv_header_$ac_safe=yes"
21733 else
21734   echo "$ac_err" >&5
21735   echo "configure: failed program was:" >&5
21736   cat conftest.$ac_ext >&5
21737   rm -rf conftest*
21738   eval "ac_cv_header_$ac_safe=no"
21739 fi
21740 rm -f conftest*
21741 fi
21742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21743   echo "$ac_t""yes" 1>&6
21744     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21745   cat >> confdefs.h <<EOF
21746 #define $ac_tr_hdr 1
21747 EOF
21748  
21749 else
21750   echo "$ac_t""no" 1>&6
21751 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21752         
21753 fi
21754 done
21755
21756
21757         sql_LIBS="$LIBS"
21758         LIBS="$LTHREAD_LIBS"
21759
21760         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21761 echo "configure:21762: checking for SQLDriverConnect in -liodbc" >&5
21762 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21764   echo $ac_n "(cached) $ac_c" 1>&6
21765 else
21766   ac_save_LIBS="$LIBS"
21767 LIBS="-liodbc  $LIBS"
21768 cat > conftest.$ac_ext <<EOF
21769 #line 21770 "configure"
21770 #include "confdefs.h"
21771 /* Override any gcc2 internal prototype to avoid an error.  */
21772 /* We use char because int might match the return type of a gcc2
21773     builtin and then its argument prototype would still apply.  */
21774 char SQLDriverConnect();
21775
21776 int main() {
21777 SQLDriverConnect()
21778 ; return 0; }
21779 EOF
21780 if { (eval echo configure:21781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21781   rm -rf conftest*
21782   eval "ac_cv_lib_$ac_lib_var=yes"
21783 else
21784   echo "configure: failed program was:" >&5
21785   cat conftest.$ac_ext >&5
21786   rm -rf conftest*
21787   eval "ac_cv_lib_$ac_lib_var=no"
21788 fi
21789 rm -f conftest*
21790 LIBS="$ac_save_LIBS"
21791
21792 fi
21793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21794   echo "$ac_t""yes" 1>&6
21795   have_iodbc=yes
21796 else
21797   echo "$ac_t""no" 1>&6
21798 have_iodbc=no
21799 fi
21800
21801         if test $have_iodbc = yes ; then
21802                 ol_link_sql="-liodbc"
21803         else
21804                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21805 echo "configure:21806: checking for SQLDriverConnect in -lodbc" >&5
21806 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21807 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21808   echo $ac_n "(cached) $ac_c" 1>&6
21809 else
21810   ac_save_LIBS="$LIBS"
21811 LIBS="-lodbc  $LIBS"
21812 cat > conftest.$ac_ext <<EOF
21813 #line 21814 "configure"
21814 #include "confdefs.h"
21815 /* Override any gcc2 internal prototype to avoid an error.  */
21816 /* We use char because int might match the return type of a gcc2
21817     builtin and then its argument prototype would still apply.  */
21818 char SQLDriverConnect();
21819
21820 int main() {
21821 SQLDriverConnect()
21822 ; return 0; }
21823 EOF
21824 if { (eval echo configure:21825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21825   rm -rf conftest*
21826   eval "ac_cv_lib_$ac_lib_var=yes"
21827 else
21828   echo "configure: failed program was:" >&5
21829   cat conftest.$ac_ext >&5
21830   rm -rf conftest*
21831   eval "ac_cv_lib_$ac_lib_var=no"
21832 fi
21833 rm -f conftest*
21834 LIBS="$ac_save_LIBS"
21835
21836 fi
21837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21838   echo "$ac_t""yes" 1>&6
21839   have_odbc=yes
21840 else
21841   echo "$ac_t""no" 1>&6
21842 have_odbc=no
21843 fi
21844
21845                 if test $have_odbc = yes ; then
21846                         ol_link_sql="-lodbc"
21847                 fi
21848         fi
21849
21850         LIBS="$sql_LIBS"
21851
21852         if test $ol_link_sql != no ; then
21853                 SLAPD_SQL_LIBS="$ol_link_sql"
21854
21855         elif test $ol_enable_sql != auto ; then
21856                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21857         fi
21858 fi
21859
21860 WITH_SASL=no
21861 ol_link_sasl=no
21862 ol_link_spasswd=no
21863 if test $ol_with_cyrus_sasl != no ; then
21864         for ac_hdr in sasl/sasl.h sasl.h
21865 do
21866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21868 echo "configure:21869: checking for $ac_hdr" >&5
21869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21870   echo $ac_n "(cached) $ac_c" 1>&6
21871 else
21872   cat > conftest.$ac_ext <<EOF
21873 #line 21874 "configure"
21874 #include "confdefs.h"
21875 #include <$ac_hdr>
21876 EOF
21877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21878 { (eval echo configure:21879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21880 if test -z "$ac_err"; then
21881   rm -rf conftest*
21882   eval "ac_cv_header_$ac_safe=yes"
21883 else
21884   echo "$ac_err" >&5
21885   echo "configure: failed program was:" >&5
21886   cat conftest.$ac_ext >&5
21887   rm -rf conftest*
21888   eval "ac_cv_header_$ac_safe=no"
21889 fi
21890 rm -f conftest*
21891 fi
21892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21893   echo "$ac_t""yes" 1>&6
21894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21895   cat >> confdefs.h <<EOF
21896 #define $ac_tr_hdr 1
21897 EOF
21898  
21899 else
21900   echo "$ac_t""no" 1>&6
21901 fi
21902 done
21903
21904
21905         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21906                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21907 echo "configure:21908: checking for sasl_client_init in -lsasl2" >&5
21908 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21910   echo $ac_n "(cached) $ac_c" 1>&6
21911 else
21912   ac_save_LIBS="$LIBS"
21913 LIBS="-lsasl2  $LIBS"
21914 cat > conftest.$ac_ext <<EOF
21915 #line 21916 "configure"
21916 #include "confdefs.h"
21917 /* Override any gcc2 internal prototype to avoid an error.  */
21918 /* We use char because int might match the return type of a gcc2
21919     builtin and then its argument prototype would still apply.  */
21920 char sasl_client_init();
21921
21922 int main() {
21923 sasl_client_init()
21924 ; return 0; }
21925 EOF
21926 if { (eval echo configure:21927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21927   rm -rf conftest*
21928   eval "ac_cv_lib_$ac_lib_var=yes"
21929 else
21930   echo "configure: failed program was:" >&5
21931   cat conftest.$ac_ext >&5
21932   rm -rf conftest*
21933   eval "ac_cv_lib_$ac_lib_var=no"
21934 fi
21935 rm -f conftest*
21936 LIBS="$ac_save_LIBS"
21937
21938 fi
21939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21940   echo "$ac_t""yes" 1>&6
21941   ol_link_sasl="-lsasl2"
21942 else
21943   echo "$ac_t""no" 1>&6
21944 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21945 echo "configure:21946: checking for sasl_client_init in -lsasl" >&5
21946 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21948   echo $ac_n "(cached) $ac_c" 1>&6
21949 else
21950   ac_save_LIBS="$LIBS"
21951 LIBS="-lsasl  $LIBS"
21952 cat > conftest.$ac_ext <<EOF
21953 #line 21954 "configure"
21954 #include "confdefs.h"
21955 /* Override any gcc2 internal prototype to avoid an error.  */
21956 /* We use char because int might match the return type of a gcc2
21957     builtin and then its argument prototype would still apply.  */
21958 char sasl_client_init();
21959
21960 int main() {
21961 sasl_client_init()
21962 ; return 0; }
21963 EOF
21964 if { (eval echo configure:21965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21965   rm -rf conftest*
21966   eval "ac_cv_lib_$ac_lib_var=yes"
21967 else
21968   echo "configure: failed program was:" >&5
21969   cat conftest.$ac_ext >&5
21970   rm -rf conftest*
21971   eval "ac_cv_lib_$ac_lib_var=no"
21972 fi
21973 rm -f conftest*
21974 LIBS="$ac_save_LIBS"
21975
21976 fi
21977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21978   echo "$ac_t""yes" 1>&6
21979   ol_link_sasl="-lsasl"
21980 else
21981   echo "$ac_t""no" 1>&6
21982 fi
21983
21984 fi
21985
21986         fi
21987
21988         if test $ol_link_sasl = no ; then
21989                 if test $ol_with_cyrus_sasl != auto ; then
21990                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21991                 else
21992                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21993                         echo "configure: warning: SASL authentication not supported!" 1>&2
21994                         if test $ol_link_tls = no ; then
21995                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21996                         fi
21997                 fi
21998         else
21999                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22000 echo "configure:22001: checking Cyrus SASL library version" >&5
22001 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22002   echo $ac_n "(cached) $ac_c" 1>&6
22003 else
22004   
22005         cat > conftest.$ac_ext <<EOF
22006 #line 22007 "configure"
22007 #include "confdefs.h"
22008
22009 #ifdef HAVE_SASL_SASL_H
22010 #include <sasl/sasl.h>
22011 #else
22012 #include <sasl.h>
22013 #endif
22014
22015 /* Require 2.1.15+ */
22016 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22017         char *__sasl_compat = "2.2+ or better okay (we guess)";
22018 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22019         && SASL_VERSION_STEP >=15
22020         char *__sasl_compat = "2.1.15+ or better okay";
22021 #endif
22022         
22023 EOF
22024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22025   egrep "__sasl_compat" >/dev/null 2>&1; then
22026   rm -rf conftest*
22027   ol_cv_sasl_compat=yes
22028 else
22029   rm -rf conftest*
22030   ol_cv_sasl_compat=no
22031 fi
22032 rm -f conftest*
22033
22034 fi
22035
22036 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22037
22038                 if test $ol_cv_sasl_compat = no ; then
22039                         ol_link_sasl=no
22040                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22041                 fi
22042
22043                 cat >> confdefs.h <<\EOF
22044 #define HAVE_CYRUS_SASL 1
22045 EOF
22046
22047                 SASL_LIBS="$ol_link_sasl"
22048                 if test $ol_enable_spasswd != no ; then
22049                         ol_link_spasswd=yes
22050                 fi
22051
22052                 ac_save_LIBS="$LIBS"
22053                 LIBS="$LIBS $ol_link_sasl"
22054                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22055 echo "configure:22056: checking for sasl_version" >&5
22056 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22057   echo $ac_n "(cached) $ac_c" 1>&6
22058 else
22059   cat > conftest.$ac_ext <<EOF
22060 #line 22061 "configure"
22061 #include "confdefs.h"
22062 /* System header to define __stub macros and hopefully few prototypes,
22063     which can conflict with char sasl_version(); below.  */
22064 #include <assert.h>
22065 /* Override any gcc2 internal prototype to avoid an error.  */
22066 /* We use char because int might match the return type of a gcc2
22067     builtin and then its argument prototype would still apply.  */
22068 char sasl_version();
22069 char (*f)();
22070
22071 int main() {
22072
22073 /* The GNU C library defines this for functions which it implements
22074     to always fail with ENOSYS.  Some functions are actually named
22075     something starting with __ and the normal name is an alias.  */
22076 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22077 choke me
22078 #else
22079 f = sasl_version;
22080 #endif
22081
22082 ; return 0; }
22083 EOF
22084 if { (eval echo configure:22085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22085   rm -rf conftest*
22086   eval "ac_cv_func_sasl_version=yes"
22087 else
22088   echo "configure: failed program was:" >&5
22089   cat conftest.$ac_ext >&5
22090   rm -rf conftest*
22091   eval "ac_cv_func_sasl_version=no"
22092 fi
22093 rm -f conftest*
22094 fi
22095
22096 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22097   echo "$ac_t""yes" 1>&6
22098   cat >> confdefs.h <<\EOF
22099 #define HAVE_SASL_VERSION 1
22100 EOF
22101
22102 else
22103   echo "$ac_t""no" 1>&6
22104 fi
22105
22106                 LIBS="$ac_save_LIBS"
22107
22108                 WITH_SASL=yes
22109         fi
22110
22111 else
22112         echo "configure: warning: SASL authentication not supported!" 1>&2
22113         if test $ol_link_tls = no ; then
22114                 echo "configure: warning: Strong authentication not supported!" 1>&2
22115         fi
22116 fi
22117
22118 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22119         dev=no
22120         if test -r /dev/urandom ; then
22121                 dev="/dev/urandom";
22122         elif test -r /idev/urandom ; then
22123                 dev="/idev/urandom";
22124         elif test -r /dev/srandom ; then
22125                 dev="/dev/srandom";
22126         elif test -r /dev/random ; then
22127                 dev="/dev/random";
22128         elif test -r /idev/random ; then
22129                 dev="/idev/random";
22130         fi
22131
22132         if test $dev != no ; then
22133                 cat >> confdefs.h <<EOF
22134 #define URANDOM_DEVICE "$dev"
22135 EOF
22136
22137         fi
22138 fi
22139
22140 ol_link_fetch=no
22141 if test $ol_with_fetch != no ; then
22142         ol_LIBS=$LIBS
22143 LIBS="-lfetch -lcom_err $LIBS"
22144 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22145 echo "configure:22146: checking fetch(3) library" >&5
22146 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22147   echo $ac_n "(cached) $ac_c" 1>&6
22148 else
22149   
22150         cat > conftest.$ac_ext <<EOF
22151 #line 22152 "configure"
22152 #include "confdefs.h"
22153
22154 #include <sys/param.h>
22155 #include <stdio.h>
22156 #include <fetch.h>
22157 int main() {
22158 struct url *u = fetchParseURL("file:///"); 
22159 ; return 0; }
22160 EOF
22161 if { (eval echo configure:22162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22162   rm -rf conftest*
22163   ol_cv_lib_fetch=yes
22164 else
22165   echo "configure: failed program was:" >&5
22166   cat conftest.$ac_ext >&5
22167   rm -rf conftest*
22168   ol_cv_lib_fetch=no
22169 fi
22170 rm -f conftest*
22171 fi
22172
22173 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22174 LIBS=$ol_LIBS
22175 if test $ol_cv_lib_fetch != no ; then
22176         ol_link_fetch="-lfetch -lcom_err"
22177         cat >> confdefs.h <<\EOF
22178 #define HAVE_FETCH 1
22179 EOF
22180
22181 fi
22182
22183
22184         if test $ol_cv_lib_fetch != no ; then
22185                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22186                 ol_link_fetch=freebsd
22187
22188         elif test $ol_with_fetch != auto ; then
22189                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22190         fi 
22191 fi
22192
22193 if test $ol_enable_crypt != no ; then
22194         save_LIBS="$LIBS"
22195         LIBS="$TLS_LIBS $LIBS"
22196
22197         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22198 echo "configure:22199: checking for crypt" >&5
22199 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22200   echo $ac_n "(cached) $ac_c" 1>&6
22201 else
22202   cat > conftest.$ac_ext <<EOF
22203 #line 22204 "configure"
22204 #include "confdefs.h"
22205 /* System header to define __stub macros and hopefully few prototypes,
22206     which can conflict with char crypt(); below.  */
22207 #include <assert.h>
22208 /* Override any gcc2 internal prototype to avoid an error.  */
22209 /* We use char because int might match the return type of a gcc2
22210     builtin and then its argument prototype would still apply.  */
22211 char crypt();
22212 char (*f)();
22213
22214 int main() {
22215
22216 /* The GNU C library defines this for functions which it implements
22217     to always fail with ENOSYS.  Some functions are actually named
22218     something starting with __ and the normal name is an alias.  */
22219 #if defined (__stub_crypt) || defined (__stub___crypt)
22220 choke me
22221 #else
22222 f = crypt;
22223 #endif
22224
22225 ; return 0; }
22226 EOF
22227 if { (eval echo configure:22228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22228   rm -rf conftest*
22229   eval "ac_cv_func_crypt=yes"
22230 else
22231   echo "configure: failed program was:" >&5
22232   cat conftest.$ac_ext >&5
22233   rm -rf conftest*
22234   eval "ac_cv_func_crypt=no"
22235 fi
22236 rm -f conftest*
22237 fi
22238
22239 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22240   echo "$ac_t""yes" 1>&6
22241   have_crypt=yes
22242 else
22243   echo "$ac_t""no" 1>&6
22244
22245                 LIBS="$save_LIBS"
22246                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22247 echo "configure:22248: checking for crypt in -lcrypt" >&5
22248 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22250   echo $ac_n "(cached) $ac_c" 1>&6
22251 else
22252   ac_save_LIBS="$LIBS"
22253 LIBS="-lcrypt  $LIBS"
22254 cat > conftest.$ac_ext <<EOF
22255 #line 22256 "configure"
22256 #include "confdefs.h"
22257 /* Override any gcc2 internal prototype to avoid an error.  */
22258 /* We use char because int might match the return type of a gcc2
22259     builtin and then its argument prototype would still apply.  */
22260 char crypt();
22261
22262 int main() {
22263 crypt()
22264 ; return 0; }
22265 EOF
22266 if { (eval echo configure:22267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22267   rm -rf conftest*
22268   eval "ac_cv_lib_$ac_lib_var=yes"
22269 else
22270   echo "configure: failed program was:" >&5
22271   cat conftest.$ac_ext >&5
22272   rm -rf conftest*
22273   eval "ac_cv_lib_$ac_lib_var=no"
22274 fi
22275 rm -f conftest*
22276 LIBS="$ac_save_LIBS"
22277
22278 fi
22279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22280   echo "$ac_t""yes" 1>&6
22281   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22282                         have_crypt=yes
22283 else
22284   echo "$ac_t""no" 1>&6
22285 have_crypt=no
22286 fi
22287
22288 fi
22289
22290
22291         LIBS="$save_LIBS"
22292
22293         if test $have_crypt = yes ; then
22294                 cat >> confdefs.h <<\EOF
22295 #define HAVE_CRYPT 1
22296 EOF
22297
22298         else
22299                 echo "configure: warning: could not find crypt" 1>&2
22300                 if test $ol_enable_crypt = yes ; then
22301                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22302                 fi
22303
22304                 echo "configure: warning: disabling crypt support" 1>&2
22305                 ol_enable_crypt=no
22306         fi
22307 fi
22308
22309 if test $ol_enable_proctitle != no ; then
22310         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22311 echo "configure:22312: checking for setproctitle" >&5
22312 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22313   echo $ac_n "(cached) $ac_c" 1>&6
22314 else
22315   cat > conftest.$ac_ext <<EOF
22316 #line 22317 "configure"
22317 #include "confdefs.h"
22318 /* System header to define __stub macros and hopefully few prototypes,
22319     which can conflict with char setproctitle(); below.  */
22320 #include <assert.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 char (*f)();
22326
22327 int main() {
22328
22329 /* The GNU C library defines this for functions which it implements
22330     to always fail with ENOSYS.  Some functions are actually named
22331     something starting with __ and the normal name is an alias.  */
22332 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22333 choke me
22334 #else
22335 f = setproctitle;
22336 #endif
22337
22338 ; return 0; }
22339 EOF
22340 if { (eval echo configure:22341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22341   rm -rf conftest*
22342   eval "ac_cv_func_setproctitle=yes"
22343 else
22344   echo "configure: failed program was:" >&5
22345   cat conftest.$ac_ext >&5
22346   rm -rf conftest*
22347   eval "ac_cv_func_setproctitle=no"
22348 fi
22349 rm -f conftest*
22350 fi
22351
22352 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22353   echo "$ac_t""yes" 1>&6
22354   have_setproctitle=yes
22355 else
22356   echo "$ac_t""no" 1>&6
22357
22358                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22359 echo "configure:22360: checking for setproctitle in -lutil" >&5
22360 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22362   echo $ac_n "(cached) $ac_c" 1>&6
22363 else
22364   ac_save_LIBS="$LIBS"
22365 LIBS="-lutil  $LIBS"
22366 cat > conftest.$ac_ext <<EOF
22367 #line 22368 "configure"
22368 #include "confdefs.h"
22369 /* Override any gcc2 internal prototype to avoid an error.  */
22370 /* We use char because int might match the return type of a gcc2
22371     builtin and then its argument prototype would still apply.  */
22372 char setproctitle();
22373
22374 int main() {
22375 setproctitle()
22376 ; return 0; }
22377 EOF
22378 if { (eval echo configure:22379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22379   rm -rf conftest*
22380   eval "ac_cv_lib_$ac_lib_var=yes"
22381 else
22382   echo "configure: failed program was:" >&5
22383   cat conftest.$ac_ext >&5
22384   rm -rf conftest*
22385   eval "ac_cv_lib_$ac_lib_var=no"
22386 fi
22387 rm -f conftest*
22388 LIBS="$ac_save_LIBS"
22389
22390 fi
22391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22392   echo "$ac_t""yes" 1>&6
22393   have_setproctitle=yes
22394                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22395 else
22396   echo "$ac_t""no" 1>&6
22397 have_setproctitle=no
22398                         LIBOBJS="$LIBOBJS setproctitle.o"
22399                         LIBSRCS="$LIBSRCS setproctitle.c"
22400 fi
22401
22402 fi
22403
22404
22405         if test $have_setproctitle = yes ; then
22406                 cat >> confdefs.h <<\EOF
22407 #define HAVE_SETPROCTITLE 1
22408 EOF
22409
22410         fi
22411 fi
22412
22413 if test $ol_enable_slp != no ; then
22414         for ac_hdr in slp.h 
22415 do
22416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22418 echo "configure:22419: checking for $ac_hdr" >&5
22419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22420   echo $ac_n "(cached) $ac_c" 1>&6
22421 else
22422   cat > conftest.$ac_ext <<EOF
22423 #line 22424 "configure"
22424 #include "confdefs.h"
22425 #include <$ac_hdr>
22426 EOF
22427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22428 { (eval echo configure:22429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22430 if test -z "$ac_err"; then
22431   rm -rf conftest*
22432   eval "ac_cv_header_$ac_safe=yes"
22433 else
22434   echo "$ac_err" >&5
22435   echo "configure: failed program was:" >&5
22436   cat conftest.$ac_ext >&5
22437   rm -rf conftest*
22438   eval "ac_cv_header_$ac_safe=no"
22439 fi
22440 rm -f conftest*
22441 fi
22442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22443   echo "$ac_t""yes" 1>&6
22444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22445   cat >> confdefs.h <<EOF
22446 #define $ac_tr_hdr 1
22447 EOF
22448  
22449 else
22450   echo "$ac_t""no" 1>&6
22451 fi
22452 done
22453
22454
22455         if test $ac_cv_header_slp_h = yes ; then
22456                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22457 echo "configure:22458: checking for SLPOpen in -lslp" >&5
22458 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22460   echo $ac_n "(cached) $ac_c" 1>&6
22461 else
22462   ac_save_LIBS="$LIBS"
22463 LIBS="-lslp  $LIBS"
22464 cat > conftest.$ac_ext <<EOF
22465 #line 22466 "configure"
22466 #include "confdefs.h"
22467 /* Override any gcc2 internal prototype to avoid an error.  */
22468 /* We use char because int might match the return type of a gcc2
22469     builtin and then its argument prototype would still apply.  */
22470 char SLPOpen();
22471
22472 int main() {
22473 SLPOpen()
22474 ; return 0; }
22475 EOF
22476 if { (eval echo configure:22477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22477   rm -rf conftest*
22478   eval "ac_cv_lib_$ac_lib_var=yes"
22479 else
22480   echo "configure: failed program was:" >&5
22481   cat conftest.$ac_ext >&5
22482   rm -rf conftest*
22483   eval "ac_cv_lib_$ac_lib_var=no"
22484 fi
22485 rm -f conftest*
22486 LIBS="$ac_save_LIBS"
22487
22488 fi
22489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22490   echo "$ac_t""yes" 1>&6
22491   have_slp=yes
22492 else
22493   echo "$ac_t""no" 1>&6
22494 have_slp=no
22495 fi
22496
22497                 if test $have_slp = yes ; then
22498                         cat >> confdefs.h <<\EOF
22499 #define HAVE_SLP 1
22500 EOF
22501
22502                         SLAPD_SLP_LIBS=-lslp
22503                 fi
22504
22505         elif test $ol_enable_slp = yes ; then
22506                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22507         fi
22508 fi
22509
22510 if test "$ol_with_multiple_precision" != "no" ; then
22511         ol_have_bignum=no
22512         ol_have_gmp=no
22513
22514         for ac_hdr in openssl/bn.h bn.h
22515 do
22516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22518 echo "configure:22519: checking for $ac_hdr" >&5
22519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22520   echo $ac_n "(cached) $ac_c" 1>&6
22521 else
22522   cat > conftest.$ac_ext <<EOF
22523 #line 22524 "configure"
22524 #include "confdefs.h"
22525 #include <$ac_hdr>
22526 EOF
22527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22528 { (eval echo configure:22529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22530 if test -z "$ac_err"; then
22531   rm -rf conftest*
22532   eval "ac_cv_header_$ac_safe=yes"
22533 else
22534   echo "$ac_err" >&5
22535   echo "configure: failed program was:" >&5
22536   cat conftest.$ac_ext >&5
22537   rm -rf conftest*
22538   eval "ac_cv_header_$ac_safe=no"
22539 fi
22540 rm -f conftest*
22541 fi
22542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22543   echo "$ac_t""yes" 1>&6
22544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22545   cat >> confdefs.h <<EOF
22546 #define $ac_tr_hdr 1
22547 EOF
22548  
22549 else
22550   echo "$ac_t""no" 1>&6
22551 fi
22552 done
22553
22554         for ac_hdr in openssl/crypto.h crypto.h
22555 do
22556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22557 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22558 echo "configure:22559: checking for $ac_hdr" >&5
22559 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22560   echo $ac_n "(cached) $ac_c" 1>&6
22561 else
22562   cat > conftest.$ac_ext <<EOF
22563 #line 22564 "configure"
22564 #include "confdefs.h"
22565 #include <$ac_hdr>
22566 EOF
22567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22568 { (eval echo configure:22569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22570 if test -z "$ac_err"; then
22571   rm -rf conftest*
22572   eval "ac_cv_header_$ac_safe=yes"
22573 else
22574   echo "$ac_err" >&5
22575   echo "configure: failed program was:" >&5
22576   cat conftest.$ac_ext >&5
22577   rm -rf conftest*
22578   eval "ac_cv_header_$ac_safe=no"
22579 fi
22580 rm -f conftest*
22581 fi
22582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22583   echo "$ac_t""yes" 1>&6
22584     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22585   cat >> confdefs.h <<EOF
22586 #define $ac_tr_hdr 1
22587 EOF
22588  
22589 else
22590   echo "$ac_t""no" 1>&6
22591 fi
22592 done
22593
22594         for ac_hdr in gmp.h 
22595 do
22596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22598 echo "configure:22599: checking for $ac_hdr" >&5
22599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22600   echo $ac_n "(cached) $ac_c" 1>&6
22601 else
22602   cat > conftest.$ac_ext <<EOF
22603 #line 22604 "configure"
22604 #include "confdefs.h"
22605 #include <$ac_hdr>
22606 EOF
22607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22608 { (eval echo configure:22609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22610 if test -z "$ac_err"; then
22611   rm -rf conftest*
22612   eval "ac_cv_header_$ac_safe=yes"
22613 else
22614   echo "$ac_err" >&5
22615   echo "configure: failed program was:" >&5
22616   cat conftest.$ac_ext >&5
22617   rm -rf conftest*
22618   eval "ac_cv_header_$ac_safe=no"
22619 fi
22620 rm -f conftest*
22621 fi
22622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22623   echo "$ac_t""yes" 1>&6
22624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22625   cat >> confdefs.h <<EOF
22626 #define $ac_tr_hdr 1
22627 EOF
22628  
22629 else
22630   echo "$ac_t""no" 1>&6
22631 fi
22632 done
22633
22634
22635         if test "$ol_with_tls" = "found" ; then
22636                 ol_have_bn_h=no
22637                 ol_have_crypto_h=no
22638
22639                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22640                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22641                         ol_have_bn_h=yes
22642                 fi
22643
22644                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22645                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22646                         ol_have_crypto_h=yes
22647                 fi
22648
22649                 if test "$ol_have_bn_h" = "yes" \
22650                                 -a "$ol_have_crypto_h" = "yes" ; then
22651                         ol_have_bignum=yes
22652                 fi
22653         fi
22654
22655         if test $ac_cv_header_gmp_h = yes ; then
22656                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22657 echo "configure:22658: checking for __gmpz_add_ui in -lgmp" >&5
22658 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22660   echo $ac_n "(cached) $ac_c" 1>&6
22661 else
22662   ac_save_LIBS="$LIBS"
22663 LIBS="-lgmp  $LIBS"
22664 cat > conftest.$ac_ext <<EOF
22665 #line 22666 "configure"
22666 #include "confdefs.h"
22667 /* Override any gcc2 internal prototype to avoid an error.  */
22668 /* We use char because int might match the return type of a gcc2
22669     builtin and then its argument prototype would still apply.  */
22670 char __gmpz_add_ui();
22671
22672 int main() {
22673 __gmpz_add_ui()
22674 ; return 0; }
22675 EOF
22676 if { (eval echo configure:22677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22677   rm -rf conftest*
22678   eval "ac_cv_lib_$ac_lib_var=yes"
22679 else
22680   echo "configure: failed program was:" >&5
22681   cat conftest.$ac_ext >&5
22682   rm -rf conftest*
22683   eval "ac_cv_lib_$ac_lib_var=no"
22684 fi
22685 rm -f conftest*
22686 LIBS="$ac_save_LIBS"
22687
22688 fi
22689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22690   echo "$ac_t""yes" 1>&6
22691   have_gmp=yes
22692 else
22693   echo "$ac_t""no" 1>&6
22694 have_gmp=no
22695 fi
22696
22697                 if test $have_gmp = yes ; then
22698                         ol_have_gmp=yes
22699                 fi
22700         fi
22701
22702         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22703 echo "configure:22704: checking for multiple precision support" >&5
22704
22705         ol_mp_support="none"
22706         case "$ol_with_multiple_precision" in
22707         auto)
22708                                                                                 if test "$ol_have_bignum" = "yes" ; then
22709                         ol_mp_support="bignum"
22710                 else
22711                         if test "$ol_have_gmp" = "yes" ; then
22712                                 ol_mp_support="gmp"
22713                         fi
22714                 fi
22715                 ;;
22716         bignum)
22717                 if test "$ol_have_bignum" != "yes" ; then
22718                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22719                 fi
22720                 ol_mp_support="bignum"
22721                 ;;
22722         gmp)
22723                 if test "$ol_have_gmp" != "yes" ; then
22724                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22725                 fi
22726                 ol_mp_support="gmp"
22727                 ;;
22728         yes)
22729                 if test "$ol_have_bignum" = "yes" ; then
22730                         ol_mp_support="bignum"
22731                 elif test "$ol_have_gmp" = "yes" ; then
22732                         ol_mp_support="gmp"
22733                 else
22734                         { echo "configure: error: not available" 1>&2; exit 1; }
22735                 fi
22736                 ;;
22737         esac
22738
22739         case "$ol_mp_support" in
22740         bignum)
22741                 cat >> confdefs.h <<\EOF
22742 #define HAVE_BIGNUM 1
22743 EOF
22744
22745                 ;;
22746         gmp)
22747                 cat >> confdefs.h <<\EOF
22748 #define HAVE_GMP 1
22749 EOF
22750
22751                 SLAPD_GMP_LIBS=-lgmp
22752                 ;;
22753         none)
22754                 ;;
22755         esac
22756
22757         echo "$ac_t""$ol_mp_support" 1>&6
22758 fi
22759
22760
22761 echo $ac_n "checking long long""... $ac_c" 1>&6
22762 echo "configure:22763: checking long long" >&5
22763 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22764   echo $ac_n "(cached) $ac_c" 1>&6
22765 else
22766   
22767         cat > conftest.$ac_ext <<EOF
22768 #line 22769 "configure"
22769 #include "confdefs.h"
22770
22771 int main() {
22772 long long x;
22773 ; return 0; }
22774 EOF
22775 if { (eval echo configure:22776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22776   rm -rf conftest*
22777   ol_cv_type_long_long=yes
22778 else
22779   echo "configure: failed program was:" >&5
22780   cat conftest.$ac_ext >&5
22781   rm -rf conftest*
22782   ol_cv_type_long_long=no
22783 fi
22784 rm -f conftest*
22785 fi
22786
22787 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22788 if test $ol_cv_type_long_long = yes; then
22789         cat >> confdefs.h <<\EOF
22790 #define HAVE_LONG_LONG 1
22791 EOF
22792
22793 fi
22794
22795 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22796 echo "configure:22797: checking for ANSI C header files" >&5
22797 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22798   echo $ac_n "(cached) $ac_c" 1>&6
22799 else
22800   cat > conftest.$ac_ext <<EOF
22801 #line 22802 "configure"
22802 #include "confdefs.h"
22803 #include <stdlib.h>
22804 #include <stdarg.h>
22805 #include <string.h>
22806 #include <float.h>
22807 EOF
22808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22809 { (eval echo configure:22810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22811 if test -z "$ac_err"; then
22812   rm -rf conftest*
22813   ac_cv_header_stdc=yes
22814 else
22815   echo "$ac_err" >&5
22816   echo "configure: failed program was:" >&5
22817   cat conftest.$ac_ext >&5
22818   rm -rf conftest*
22819   ac_cv_header_stdc=no
22820 fi
22821 rm -f conftest*
22822
22823 if test $ac_cv_header_stdc = yes; then
22824   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22825 cat > conftest.$ac_ext <<EOF
22826 #line 22827 "configure"
22827 #include "confdefs.h"
22828 #include <string.h>
22829 EOF
22830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22831   egrep "memchr" >/dev/null 2>&1; then
22832   :
22833 else
22834   rm -rf conftest*
22835   ac_cv_header_stdc=no
22836 fi
22837 rm -f conftest*
22838
22839 fi
22840
22841 if test $ac_cv_header_stdc = yes; then
22842   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22843 cat > conftest.$ac_ext <<EOF
22844 #line 22845 "configure"
22845 #include "confdefs.h"
22846 #include <stdlib.h>
22847 EOF
22848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22849   egrep "free" >/dev/null 2>&1; then
22850   :
22851 else
22852   rm -rf conftest*
22853   ac_cv_header_stdc=no
22854 fi
22855 rm -f conftest*
22856
22857 fi
22858
22859 if test $ac_cv_header_stdc = yes; then
22860   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22861 if test "$cross_compiling" = yes; then
22862   :
22863 else
22864   cat > conftest.$ac_ext <<EOF
22865 #line 22866 "configure"
22866 #include "confdefs.h"
22867 #include <ctype.h>
22868 #if ((' ' & 0x0FF) == 0x020)
22869 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22870 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22871 #else
22872 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22873  || ('j' <= (c) && (c) <= 'r') \
22874  || ('s' <= (c) && (c) <= 'z'))
22875 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22876 #endif
22877 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22878 int main () { int i; for (i = 0; i < 256; i++)
22879 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22880 exit (0); }
22881
22882 EOF
22883 if { (eval echo configure:22884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22884 then
22885   :
22886 else
22887   echo "configure: failed program was:" >&5
22888   cat conftest.$ac_ext >&5
22889   rm -fr conftest*
22890   ac_cv_header_stdc=no
22891 fi
22892 rm -fr conftest*
22893 fi
22894
22895 fi
22896 fi
22897
22898 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22899 if test $ac_cv_header_stdc = yes; then
22900   cat >> confdefs.h <<\EOF
22901 #define STDC_HEADERS 1
22902 EOF
22903
22904 fi
22905
22906 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22907 echo "configure:22908: checking for mode_t" >&5
22908 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22909   echo $ac_n "(cached) $ac_c" 1>&6
22910 else
22911   cat > conftest.$ac_ext <<EOF
22912 #line 22913 "configure"
22913 #include "confdefs.h"
22914 #include <sys/types.h>
22915 #if STDC_HEADERS
22916 #include <stdlib.h>
22917 #include <stddef.h>
22918 #endif
22919
22920 EOF
22921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22922   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22923   rm -rf conftest*
22924   eval "ac_cv_type_mode_t=yes"
22925 else
22926   rm -rf conftest*
22927   eval "ac_cv_type_mode_t=no"
22928 fi
22929 rm -f conftest*
22930
22931 fi
22932 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22933   echo "$ac_t""yes" 1>&6
22934 else
22935   echo "$ac_t""no" 1>&6
22936   cat >> confdefs.h <<EOF
22937 #define mode_t int
22938 EOF
22939
22940 fi
22941
22942 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22943 echo "configure:22944: checking for off_t" >&5
22944 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22945   echo $ac_n "(cached) $ac_c" 1>&6
22946 else
22947   cat > conftest.$ac_ext <<EOF
22948 #line 22949 "configure"
22949 #include "confdefs.h"
22950 #include <sys/types.h>
22951 #if STDC_HEADERS
22952 #include <stdlib.h>
22953 #include <stddef.h>
22954 #endif
22955
22956 EOF
22957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22958   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22959   rm -rf conftest*
22960   eval "ac_cv_type_off_t=yes"
22961 else
22962   rm -rf conftest*
22963   eval "ac_cv_type_off_t=no"
22964 fi
22965 rm -f conftest*
22966
22967 fi
22968 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22969   echo "$ac_t""yes" 1>&6
22970 else
22971   echo "$ac_t""no" 1>&6
22972   cat >> confdefs.h <<EOF
22973 #define off_t long
22974 EOF
22975
22976 fi
22977
22978 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22979 echo "configure:22980: checking for pid_t" >&5
22980 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22981   echo $ac_n "(cached) $ac_c" 1>&6
22982 else
22983   cat > conftest.$ac_ext <<EOF
22984 #line 22985 "configure"
22985 #include "confdefs.h"
22986 #include <sys/types.h>
22987 #if STDC_HEADERS
22988 #include <stdlib.h>
22989 #include <stddef.h>
22990 #endif
22991
22992 EOF
22993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22994   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22995   rm -rf conftest*
22996   eval "ac_cv_type_pid_t=yes"
22997 else
22998   rm -rf conftest*
22999   eval "ac_cv_type_pid_t=no"
23000 fi
23001 rm -f conftest*
23002
23003 fi
23004 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23005   echo "$ac_t""yes" 1>&6
23006 else
23007   echo "$ac_t""no" 1>&6
23008   cat >> confdefs.h <<EOF
23009 #define pid_t int
23010 EOF
23011
23012 fi
23013
23014 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23015 echo "configure:23016: checking for ptrdiff_t" >&5
23016 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23017   echo $ac_n "(cached) $ac_c" 1>&6
23018 else
23019   cat > conftest.$ac_ext <<EOF
23020 #line 23021 "configure"
23021 #include "confdefs.h"
23022 #include <stddef.h>
23023 int main() {
23024 ptrdiff_t p
23025 ; return 0; }
23026 EOF
23027 if { (eval echo configure:23028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23028   rm -rf conftest*
23029   am_cv_type_ptrdiff_t=yes
23030 else
23031   echo "configure: failed program was:" >&5
23032   cat conftest.$ac_ext >&5
23033   rm -rf conftest*
23034   am_cv_type_ptrdiff_t=no
23035 fi
23036 rm -f conftest*
23037 fi
23038
23039 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23040    if test $am_cv_type_ptrdiff_t = yes; then
23041      cat >> confdefs.h <<\EOF
23042 #define HAVE_PTRDIFF_T 1
23043 EOF
23044
23045    fi
23046
23047 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23048 echo "configure:23049: checking return type of signal handlers" >&5
23049 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23050   echo $ac_n "(cached) $ac_c" 1>&6
23051 else
23052   cat > conftest.$ac_ext <<EOF
23053 #line 23054 "configure"
23054 #include "confdefs.h"
23055 #include <sys/types.h>
23056 #include <signal.h>
23057 #ifdef signal
23058 #undef signal
23059 #endif
23060 #ifdef __cplusplus
23061 extern "C" void (*signal (int, void (*)(int)))(int);
23062 #else
23063 void (*signal ()) ();
23064 #endif
23065
23066 int main() {
23067 int i;
23068 ; return 0; }
23069 EOF
23070 if { (eval echo configure:23071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23071   rm -rf conftest*
23072   ac_cv_type_signal=void
23073 else
23074   echo "configure: failed program was:" >&5
23075   cat conftest.$ac_ext >&5
23076   rm -rf conftest*
23077   ac_cv_type_signal=int
23078 fi
23079 rm -f conftest*
23080 fi
23081
23082 echo "$ac_t""$ac_cv_type_signal" 1>&6
23083 cat >> confdefs.h <<EOF
23084 #define RETSIGTYPE $ac_cv_type_signal
23085 EOF
23086
23087
23088 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23089 echo "configure:23090: checking for size_t" >&5
23090 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23091   echo $ac_n "(cached) $ac_c" 1>&6
23092 else
23093   cat > conftest.$ac_ext <<EOF
23094 #line 23095 "configure"
23095 #include "confdefs.h"
23096 #include <sys/types.h>
23097 #if STDC_HEADERS
23098 #include <stdlib.h>
23099 #include <stddef.h>
23100 #endif
23101
23102 EOF
23103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23104   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23105   rm -rf conftest*
23106   eval "ac_cv_type_size_t=yes"
23107 else
23108   rm -rf conftest*
23109   eval "ac_cv_type_size_t=no"
23110 fi
23111 rm -f conftest*
23112
23113 fi
23114 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23115   echo "$ac_t""yes" 1>&6
23116 else
23117   echo "$ac_t""no" 1>&6
23118   cat >> confdefs.h <<EOF
23119 #define size_t unsigned
23120 EOF
23121
23122 fi
23123
23124
23125 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23126 echo "configure:23127: checking for ssize_t" >&5
23127 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23128   echo $ac_n "(cached) $ac_c" 1>&6
23129 else
23130   cat > conftest.$ac_ext <<EOF
23131 #line 23132 "configure"
23132 #include "confdefs.h"
23133 #include <sys/types.h>
23134 #if STDC_HEADERS
23135 #include <stdlib.h>
23136 #include <stddef.h>
23137 #endif
23138
23139 EOF
23140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23141   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23142   rm -rf conftest*
23143   eval "ac_cv_type_ssize_t=yes"
23144 else
23145   rm -rf conftest*
23146   eval "ac_cv_type_ssize_t=no"
23147 fi
23148 rm -f conftest*
23149
23150 fi
23151 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23152   echo "$ac_t""yes" 1>&6
23153 else
23154   echo "$ac_t""no" 1>&6
23155   cat >> confdefs.h <<EOF
23156 #define ssize_t signed int
23157 EOF
23158
23159 fi
23160
23161 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23162 echo "configure:23163: checking for caddr_t" >&5
23163 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23164   echo $ac_n "(cached) $ac_c" 1>&6
23165 else
23166   cat > conftest.$ac_ext <<EOF
23167 #line 23168 "configure"
23168 #include "confdefs.h"
23169 #include <sys/types.h>
23170 #if STDC_HEADERS
23171 #include <stdlib.h>
23172 #include <stddef.h>
23173 #endif
23174
23175 EOF
23176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23177   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23178   rm -rf conftest*
23179   eval "ac_cv_type_caddr_t=yes"
23180 else
23181   rm -rf conftest*
23182   eval "ac_cv_type_caddr_t=no"
23183 fi
23184 rm -f conftest*
23185
23186 fi
23187 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23188   echo "$ac_t""yes" 1>&6
23189 else
23190   echo "$ac_t""no" 1>&6
23191   cat >> confdefs.h <<EOF
23192 #define caddr_t char *
23193 EOF
23194
23195 fi
23196
23197
23198 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23199 echo "configure:23200: checking for socklen_t" >&5
23200 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23201   echo $ac_n "(cached) $ac_c" 1>&6
23202 else
23203   cat > conftest.$ac_ext <<EOF
23204 #line 23205 "configure"
23205 #include "confdefs.h"
23206
23207 #ifdef HAVE_SYS_TYPES_H
23208 #include <sys/types.h>
23209 #endif
23210 #ifdef HAVE_SYS_SOCKET_H
23211 #include <sys/socket.h>
23212 #endif
23213
23214 int main() {
23215 socklen_t len;
23216 ; return 0; }
23217 EOF
23218 if { (eval echo configure:23219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23219   rm -rf conftest*
23220   ol_cv_type_socklen_t=yes
23221 else
23222   echo "configure: failed program was:" >&5
23223   cat conftest.$ac_ext >&5
23224   rm -rf conftest*
23225   ol_cv_type_socklen_t=no
23226 fi
23227 rm -f conftest*
23228 fi
23229
23230 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23231   if test $ol_cv_type_socklen_t = no; then
23232     cat >> confdefs.h <<\EOF
23233 #define socklen_t int
23234 EOF
23235
23236   fi
23237  
23238 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23239 echo "configure:23240: checking for member st_blksize in aggregate type struct stat" >&5
23240 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23241   echo $ac_n "(cached) $ac_c" 1>&6
23242 else
23243   cat > conftest.$ac_ext <<EOF
23244 #line 23245 "configure"
23245 #include "confdefs.h"
23246 #include <sys/types.h>
23247 #include <sys/stat.h>
23248 int main() {
23249 struct stat foo; foo.st_blksize;
23250 ; return 0; }
23251 EOF
23252 if { (eval echo configure:23253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23253   rm -rf conftest*
23254   ac_cv_c_struct_member_st_blksize=yes
23255 else
23256   echo "configure: failed program was:" >&5
23257   cat conftest.$ac_ext >&5
23258   rm -rf conftest*
23259   ac_cv_c_struct_member_st_blksize=no
23260 fi
23261 rm -f conftest*
23262 fi
23263
23264 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23265 st_blksize="$ac_cv_c_struct_member_st_blksize"
23266 if test $ac_cv_c_struct_member_st_blksize = yes; then
23267   cat >> confdefs.h <<\EOF
23268 #define HAVE_ST_BLKSIZE 1
23269 EOF
23270
23271 fi
23272
23273 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23274 echo "configure:23275: checking whether time.h and sys/time.h may both be included" >&5
23275 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23276   echo $ac_n "(cached) $ac_c" 1>&6
23277 else
23278   cat > conftest.$ac_ext <<EOF
23279 #line 23280 "configure"
23280 #include "confdefs.h"
23281 #include <sys/types.h>
23282 #include <sys/time.h>
23283 #include <time.h>
23284 int main() {
23285 struct tm *tp;
23286 ; return 0; }
23287 EOF
23288 if { (eval echo configure:23289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23289   rm -rf conftest*
23290   ac_cv_header_time=yes
23291 else
23292   echo "configure: failed program was:" >&5
23293   cat conftest.$ac_ext >&5
23294   rm -rf conftest*
23295   ac_cv_header_time=no
23296 fi
23297 rm -f conftest*
23298 fi
23299
23300 echo "$ac_t""$ac_cv_header_time" 1>&6
23301 if test $ac_cv_header_time = yes; then
23302   cat >> confdefs.h <<\EOF
23303 #define TIME_WITH_SYS_TIME 1
23304 EOF
23305
23306 fi
23307
23308 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23309 echo "configure:23310: checking whether struct tm is in sys/time.h or time.h" >&5
23310 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23311   echo $ac_n "(cached) $ac_c" 1>&6
23312 else
23313   cat > conftest.$ac_ext <<EOF
23314 #line 23315 "configure"
23315 #include "confdefs.h"
23316 #include <sys/types.h>
23317 #include <time.h>
23318 int main() {
23319 struct tm *tp; tp->tm_sec;
23320 ; return 0; }
23321 EOF
23322 if { (eval echo configure:23323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23323   rm -rf conftest*
23324   ac_cv_struct_tm=time.h
23325 else
23326   echo "configure: failed program was:" >&5
23327   cat conftest.$ac_ext >&5
23328   rm -rf conftest*
23329   ac_cv_struct_tm=sys/time.h
23330 fi
23331 rm -f conftest*
23332 fi
23333
23334 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23335 if test $ac_cv_struct_tm = sys/time.h; then
23336   cat >> confdefs.h <<\EOF
23337 #define TM_IN_SYS_TIME 1
23338 EOF
23339
23340 fi
23341
23342 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23343 echo "configure:23344: checking for uid_t in sys/types.h" >&5
23344 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23345   echo $ac_n "(cached) $ac_c" 1>&6
23346 else
23347   cat > conftest.$ac_ext <<EOF
23348 #line 23349 "configure"
23349 #include "confdefs.h"
23350 #include <sys/types.h>
23351 EOF
23352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23353   egrep "uid_t" >/dev/null 2>&1; then
23354   rm -rf conftest*
23355   ac_cv_type_uid_t=yes
23356 else
23357   rm -rf conftest*
23358   ac_cv_type_uid_t=no
23359 fi
23360 rm -f conftest*
23361
23362 fi
23363
23364 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23365 if test $ac_cv_type_uid_t = no; then
23366   cat >> confdefs.h <<\EOF
23367 #define uid_t int
23368 EOF
23369
23370   cat >> confdefs.h <<\EOF
23371 #define gid_t int
23372 EOF
23373
23374 fi
23375
23376 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23377 echo "configure:23378: checking for sig_atomic_t" >&5
23378 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23379   echo $ac_n "(cached) $ac_c" 1>&6
23380 else
23381   cat > conftest.$ac_ext <<EOF
23382 #line 23383 "configure"
23383 #include "confdefs.h"
23384 #include <signal.h>
23385 int main() {
23386 sig_atomic_t atomic;
23387 ; return 0; }
23388 EOF
23389 if { (eval echo configure:23390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23390   rm -rf conftest*
23391   ol_cv_type_sig_atomic_t=yes
23392 else
23393   echo "configure: failed program was:" >&5
23394   cat conftest.$ac_ext >&5
23395   rm -rf conftest*
23396   ol_cv_type_sig_atomic_t=no
23397 fi
23398 rm -f conftest*
23399 fi
23400
23401 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23402   if test $ol_cv_type_sig_atomic_t = no; then
23403     cat >> confdefs.h <<\EOF
23404 #define sig_atomic_t int
23405 EOF
23406
23407   fi
23408  
23409
23410
23411 # test for pw_gecos in struct passwd
23412 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23413 echo "configure:23414: checking struct passwd for pw_gecos" >&5
23414 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23415   echo $ac_n "(cached) $ac_c" 1>&6
23416 else
23417   
23418         cat > conftest.$ac_ext <<EOF
23419 #line 23420 "configure"
23420 #include "confdefs.h"
23421 #include <pwd.h>
23422 int main() {
23423
23424         struct passwd pwd;
23425         pwd.pw_gecos = pwd.pw_name;
23426
23427 ; return 0; }
23428 EOF
23429 if { (eval echo configure:23430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23430   rm -rf conftest*
23431   ol_cv_struct_passwd_pw_gecos=yes
23432 else
23433   echo "configure: failed program was:" >&5
23434   cat conftest.$ac_ext >&5
23435   rm -rf conftest*
23436   ol_cv_struct_passwd_pw_gecos=no
23437 fi
23438 rm -f conftest*
23439 fi
23440
23441 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23442 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23443         cat >> confdefs.h <<\EOF
23444 #define HAVE_PW_GECOS 1
23445 EOF
23446
23447 fi
23448
23449 # test for pw_passwd in struct passwd
23450 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23451 echo "configure:23452: checking struct passwd for pw_passwd" >&5
23452 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23453   echo $ac_n "(cached) $ac_c" 1>&6
23454 else
23455   
23456         cat > conftest.$ac_ext <<EOF
23457 #line 23458 "configure"
23458 #include "confdefs.h"
23459 #include <pwd.h>
23460 int main() {
23461
23462         struct passwd pwd;
23463         pwd.pw_passwd = pwd.pw_name;
23464
23465 ; return 0; }
23466 EOF
23467 if { (eval echo configure:23468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23468   rm -rf conftest*
23469   ol_cv_struct_passwd_pw_passwd=yes
23470 else
23471   echo "configure: failed program was:" >&5
23472   cat conftest.$ac_ext >&5
23473   rm -rf conftest*
23474   ol_cv_struct_passwd_pw_passwd=no
23475 fi
23476 rm -f conftest*
23477 fi
23478
23479 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23480 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23481         cat >> confdefs.h <<\EOF
23482 #define HAVE_PW_PASSWD 1
23483 EOF
23484
23485 fi
23486
23487
23488 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23489 echo "configure:23490: checking if toupper() requires islower()" >&5
23490 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23491   echo $ac_n "(cached) $ac_c" 1>&6
23492 else
23493   
23494         if test "$cross_compiling" = yes; then
23495   ol_cv_c_upper_lower=safe
23496 else
23497   cat > conftest.$ac_ext <<EOF
23498 #line 23499 "configure"
23499 #include "confdefs.h"
23500
23501 #include <ctype.h>
23502 main()
23503 {
23504         if ('C' == toupper('C'))
23505                 exit(0);
23506         else
23507                 exit(1);
23508 }
23509 EOF
23510 if { (eval echo configure:23511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23511 then
23512   ol_cv_c_upper_lower=no
23513 else
23514   echo "configure: failed program was:" >&5
23515   cat conftest.$ac_ext >&5
23516   rm -fr conftest*
23517   ol_cv_c_upper_lower=yes
23518 fi
23519 rm -fr conftest*
23520 fi
23521
23522 fi
23523
23524 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23525 if test $ol_cv_c_upper_lower != no ; then
23526         cat >> confdefs.h <<\EOF
23527 #define C_UPPER_LOWER 1
23528 EOF
23529
23530 fi
23531
23532 echo $ac_n "checking for working const""... $ac_c" 1>&6
23533 echo "configure:23534: checking for working const" >&5
23534 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23535   echo $ac_n "(cached) $ac_c" 1>&6
23536 else
23537   cat > conftest.$ac_ext <<EOF
23538 #line 23539 "configure"
23539 #include "confdefs.h"
23540
23541 int main() {
23542
23543 /* Ultrix mips cc rejects this.  */
23544 typedef int charset[2]; const charset x;
23545 /* SunOS 4.1.1 cc rejects this.  */
23546 char const *const *ccp;
23547 char **p;
23548 /* NEC SVR4.0.2 mips cc rejects this.  */
23549 struct point {int x, y;};
23550 static struct point const zero = {0,0};
23551 /* AIX XL C 1.02.0.0 rejects this.
23552    It does not let you subtract one const X* pointer from another in an arm
23553    of an if-expression whose if-part is not a constant expression */
23554 const char *g = "string";
23555 ccp = &g + (g ? g-g : 0);
23556 /* HPUX 7.0 cc rejects these. */
23557 ++ccp;
23558 p = (char**) ccp;
23559 ccp = (char const *const *) p;
23560 { /* SCO 3.2v4 cc rejects this.  */
23561   char *t;
23562   char const *s = 0 ? (char *) 0 : (char const *) 0;
23563
23564   *t++ = 0;
23565 }
23566 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23567   int x[] = {25, 17};
23568   const int *foo = &x[0];
23569   ++foo;
23570 }
23571 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23572   typedef const int *iptr;
23573   iptr p = 0;
23574   ++p;
23575 }
23576 { /* AIX XL C 1.02.0.0 rejects this saying
23577      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23578   struct s { int j; const int *ap[3]; };
23579   struct s *b; b->j = 5;
23580 }
23581 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23582   const int foo = 10;
23583 }
23584
23585 ; return 0; }
23586 EOF
23587 if { (eval echo configure:23588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23588   rm -rf conftest*
23589   ac_cv_c_const=yes
23590 else
23591   echo "configure: failed program was:" >&5
23592   cat conftest.$ac_ext >&5
23593   rm -rf conftest*
23594   ac_cv_c_const=no
23595 fi
23596 rm -f conftest*
23597 fi
23598
23599 echo "$ac_t""$ac_cv_c_const" 1>&6
23600 if test $ac_cv_c_const = no; then
23601   cat >> confdefs.h <<\EOF
23602 #define const 
23603 EOF
23604
23605 fi
23606
23607 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23608 echo "configure:23609: checking if compiler understands volatile" >&5
23609 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23610   echo $ac_n "(cached) $ac_c" 1>&6
23611 else
23612   cat > conftest.$ac_ext <<EOF
23613 #line 23614 "configure"
23614 #include "confdefs.h"
23615 int x, y, z;
23616 int main() {
23617 volatile int a; int * volatile b = x ? &y : &z;
23618       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23619       *b = 0;
23620 ; return 0; }
23621 EOF
23622 if { (eval echo configure:23623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23623   rm -rf conftest*
23624   ol_cv_c_volatile=yes
23625 else
23626   echo "configure: failed program was:" >&5
23627   cat conftest.$ac_ext >&5
23628   rm -rf conftest*
23629   ol_cv_c_volatile=no
23630 fi
23631 rm -f conftest*
23632 fi
23633
23634 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23635   if test $ol_cv_c_volatile = yes; then
23636     : 
23637   else
23638     cat >> confdefs.h <<\EOF
23639 #define volatile 
23640 EOF
23641
23642   fi
23643  
23644
23645 if test $cross_compiling = yes ; then
23646         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23647         cat >> confdefs.h <<\EOF
23648 #define CROSS_COMPILING 1
23649 EOF
23650
23651 else
23652         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23653 echo "configure:23654: checking whether byte ordering is bigendian" >&5
23654 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23655   echo $ac_n "(cached) $ac_c" 1>&6
23656 else
23657   ac_cv_c_bigendian=unknown
23658 # See if sys/param.h defines the BYTE_ORDER macro.
23659 cat > conftest.$ac_ext <<EOF
23660 #line 23661 "configure"
23661 #include "confdefs.h"
23662 #include <sys/types.h>
23663 #include <sys/param.h>
23664 int main() {
23665
23666 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23667  bogus endian macros
23668 #endif
23669 ; return 0; }
23670 EOF
23671 if { (eval echo configure:23672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23672   rm -rf conftest*
23673   # It does; now see whether it defined to BIG_ENDIAN or not.
23674 cat > conftest.$ac_ext <<EOF
23675 #line 23676 "configure"
23676 #include "confdefs.h"
23677 #include <sys/types.h>
23678 #include <sys/param.h>
23679 int main() {
23680
23681 #if BYTE_ORDER != BIG_ENDIAN
23682  not big endian
23683 #endif
23684 ; return 0; }
23685 EOF
23686 if { (eval echo configure:23687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23687   rm -rf conftest*
23688   ac_cv_c_bigendian=yes
23689 else
23690   echo "configure: failed program was:" >&5
23691   cat conftest.$ac_ext >&5
23692   rm -rf conftest*
23693   ac_cv_c_bigendian=no
23694 fi
23695 rm -f conftest*
23696 else
23697   echo "configure: failed program was:" >&5
23698   cat conftest.$ac_ext >&5
23699 fi
23700 rm -f conftest*
23701 if test $ac_cv_c_bigendian = unknown; then
23702 if test "$cross_compiling" = yes; then
23703     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23704 else
23705   cat > conftest.$ac_ext <<EOF
23706 #line 23707 "configure"
23707 #include "confdefs.h"
23708 main () {
23709   /* Are we little or big endian?  From Harbison&Steele.  */
23710   union
23711   {
23712     long l;
23713     char c[sizeof (long)];
23714   } u;
23715   u.l = 1;
23716   exit (u.c[sizeof (long) - 1] == 1);
23717 }
23718 EOF
23719 if { (eval echo configure:23720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23720 then
23721   ac_cv_c_bigendian=no
23722 else
23723   echo "configure: failed program was:" >&5
23724   cat conftest.$ac_ext >&5
23725   rm -fr conftest*
23726   ac_cv_c_bigendian=yes
23727 fi
23728 rm -fr conftest*
23729 fi
23730
23731 fi
23732 fi
23733
23734 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23735 if test $ac_cv_c_bigendian = yes; then
23736   cat >> confdefs.h <<\EOF
23737 #define WORDS_BIGENDIAN 1
23738 EOF
23739
23740 fi
23741
23742 fi
23743
23744 echo $ac_n "checking size of short""... $ac_c" 1>&6
23745 echo "configure:23746: checking size of short" >&5 
23746 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23747   echo $ac_n "(cached) $ac_c" 1>&6
23748 else
23749   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23750   cat > conftest.$ac_ext <<EOF
23751 #line 23752 "configure"
23752 #include "confdefs.h"
23753 #include "confdefs.h" 
23754 #include <stdlib.h>
23755 #include <sys/types.h> 
23756  
23757
23758 int main() {
23759 switch (0) case 0: case (sizeof (short) == $ac_size):;
23760 ; return 0; }
23761 EOF
23762 if { (eval echo configure:23763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23763   rm -rf conftest*
23764   ac_cv_sizeof_short=$ac_size
23765 else
23766   echo "configure: failed program was:" >&5
23767   cat conftest.$ac_ext >&5
23768 fi
23769 rm -f conftest* 
23770   if test x$ac_cv_sizeof_short != x ; then break; fi 
23771 done 
23772
23773 fi
23774  
23775 if test x$ac_cv_sizeof_short = x ; then 
23776   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23777 fi 
23778 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23779 cat >> confdefs.h <<EOF
23780 #define SIZEOF_SHORT $ac_cv_sizeof_short
23781 EOF
23782  
23783  
23784 echo $ac_n "checking size of int""... $ac_c" 1>&6
23785 echo "configure:23786: checking size of int" >&5 
23786 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23787   echo $ac_n "(cached) $ac_c" 1>&6
23788 else
23789   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23790   cat > conftest.$ac_ext <<EOF
23791 #line 23792 "configure"
23792 #include "confdefs.h"
23793 #include "confdefs.h" 
23794 #include <stdlib.h>
23795 #include <sys/types.h> 
23796  
23797
23798 int main() {
23799 switch (0) case 0: case (sizeof (int) == $ac_size):;
23800 ; return 0; }
23801 EOF
23802 if { (eval echo configure:23803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23803   rm -rf conftest*
23804   ac_cv_sizeof_int=$ac_size
23805 else
23806   echo "configure: failed program was:" >&5
23807   cat conftest.$ac_ext >&5
23808 fi
23809 rm -f conftest* 
23810   if test x$ac_cv_sizeof_int != x ; then break; fi 
23811 done 
23812
23813 fi
23814  
23815 if test x$ac_cv_sizeof_int = x ; then 
23816   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23817 fi 
23818 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23819 cat >> confdefs.h <<EOF
23820 #define SIZEOF_INT $ac_cv_sizeof_int
23821 EOF
23822  
23823  
23824 echo $ac_n "checking size of long""... $ac_c" 1>&6
23825 echo "configure:23826: checking size of long" >&5 
23826 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23827   echo $ac_n "(cached) $ac_c" 1>&6
23828 else
23829   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23830   cat > conftest.$ac_ext <<EOF
23831 #line 23832 "configure"
23832 #include "confdefs.h"
23833 #include "confdefs.h" 
23834 #include <stdlib.h>
23835 #include <sys/types.h> 
23836  
23837
23838 int main() {
23839 switch (0) case 0: case (sizeof (long) == $ac_size):;
23840 ; return 0; }
23841 EOF
23842 if { (eval echo configure:23843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23843   rm -rf conftest*
23844   ac_cv_sizeof_long=$ac_size
23845 else
23846   echo "configure: failed program was:" >&5
23847   cat conftest.$ac_ext >&5
23848 fi
23849 rm -f conftest* 
23850   if test x$ac_cv_sizeof_long != x ; then break; fi 
23851 done 
23852
23853 fi
23854  
23855 if test x$ac_cv_sizeof_long = x ; then 
23856   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23857 fi 
23858 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23859 cat >> confdefs.h <<EOF
23860 #define SIZEOF_LONG $ac_cv_sizeof_long
23861 EOF
23862  
23863
23864 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23865 echo "configure:23866: checking size of wchar_t" >&5 
23866 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23867   echo $ac_n "(cached) $ac_c" 1>&6
23868 else
23869   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23870   cat > conftest.$ac_ext <<EOF
23871 #line 23872 "configure"
23872 #include "confdefs.h"
23873 #include "confdefs.h" 
23874 #include <stdlib.h>
23875 #include <sys/types.h> 
23876  
23877
23878 int main() {
23879 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23880 ; return 0; }
23881 EOF
23882 if { (eval echo configure:23883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23883   rm -rf conftest*
23884   ac_cv_sizeof_wchar_t=$ac_size
23885 else
23886   echo "configure: failed program was:" >&5
23887   cat conftest.$ac_ext >&5
23888 fi
23889 rm -f conftest* 
23890   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23891 done 
23892
23893 fi
23894  
23895 if test x$ac_cv_sizeof_wchar_t = x ; then 
23896   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23897 fi 
23898 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23899 cat >> confdefs.h <<EOF
23900 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23901 EOF
23902  
23903
23904
23905 if test "$ac_cv_sizeof_int" -lt 4 ; then
23906         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23907
23908         cat >> confdefs.h <<\EOF
23909 #define LBER_INT_T long
23910 EOF
23911
23912 else
23913         cat >> confdefs.h <<\EOF
23914 #define LBER_INT_T int
23915 EOF
23916
23917 fi
23918
23919 cat >> confdefs.h <<\EOF
23920 #define LBER_LEN_T long
23921 EOF
23922
23923 cat >> confdefs.h <<\EOF
23924 #define LBER_SOCKET_T int
23925 EOF
23926
23927 cat >> confdefs.h <<\EOF
23928 #define LBER_TAG_T long
23929 EOF
23930
23931
23932 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23933 echo "configure:23934: checking for 8-bit clean memcmp" >&5
23934 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23935   echo $ac_n "(cached) $ac_c" 1>&6
23936 else
23937   if test "$cross_compiling" = yes; then
23938   ac_cv_func_memcmp_clean=no
23939 else
23940   cat > conftest.$ac_ext <<EOF
23941 #line 23942 "configure"
23942 #include "confdefs.h"
23943
23944 main()
23945 {
23946   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23947   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23948 }
23949
23950 EOF
23951 if { (eval echo configure:23952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23952 then
23953   ac_cv_func_memcmp_clean=yes
23954 else
23955   echo "configure: failed program was:" >&5
23956   cat conftest.$ac_ext >&5
23957   rm -fr conftest*
23958   ac_cv_func_memcmp_clean=no
23959 fi
23960 rm -fr conftest*
23961 fi
23962
23963 fi
23964
23965 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23966 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23967
23968
23969 if test $ac_cv_func_memcmp_clean = no ; then
23970         cat >> confdefs.h <<\EOF
23971 #define NEED_MEMCMP_REPLACEMENT 1
23972 EOF
23973
23974 fi
23975
23976 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23977 echo "configure:23978: checking for strftime" >&5
23978 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23979   echo $ac_n "(cached) $ac_c" 1>&6
23980 else
23981   cat > conftest.$ac_ext <<EOF
23982 #line 23983 "configure"
23983 #include "confdefs.h"
23984 /* System header to define __stub macros and hopefully few prototypes,
23985     which can conflict with char strftime(); below.  */
23986 #include <assert.h>
23987 /* Override any gcc2 internal prototype to avoid an error.  */
23988 /* We use char because int might match the return type of a gcc2
23989     builtin and then its argument prototype would still apply.  */
23990 char strftime();
23991 char (*f)();
23992
23993 int main() {
23994
23995 /* The GNU C library defines this for functions which it implements
23996     to always fail with ENOSYS.  Some functions are actually named
23997     something starting with __ and the normal name is an alias.  */
23998 #if defined (__stub_strftime) || defined (__stub___strftime)
23999 choke me
24000 #else
24001 f = strftime;
24002 #endif
24003
24004 ; return 0; }
24005 EOF
24006 if { (eval echo configure:24007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24007   rm -rf conftest*
24008   eval "ac_cv_func_strftime=yes"
24009 else
24010   echo "configure: failed program was:" >&5
24011   cat conftest.$ac_ext >&5
24012   rm -rf conftest*
24013   eval "ac_cv_func_strftime=no"
24014 fi
24015 rm -f conftest*
24016 fi
24017
24018 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24019   echo "$ac_t""yes" 1>&6
24020   cat >> confdefs.h <<\EOF
24021 #define HAVE_STRFTIME 1
24022 EOF
24023
24024 else
24025   echo "$ac_t""no" 1>&6
24026 # strftime is in -lintl on SCO UNIX.
24027 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24028 echo "configure:24029: checking for strftime in -lintl" >&5
24029 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24030 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24031   echo $ac_n "(cached) $ac_c" 1>&6
24032 else
24033   ac_save_LIBS="$LIBS"
24034 LIBS="-lintl  $LIBS"
24035 cat > conftest.$ac_ext <<EOF
24036 #line 24037 "configure"
24037 #include "confdefs.h"
24038 /* Override any gcc2 internal prototype to avoid an error.  */
24039 /* We use char because int might match the return type of a gcc2
24040     builtin and then its argument prototype would still apply.  */
24041 char strftime();
24042
24043 int main() {
24044 strftime()
24045 ; return 0; }
24046 EOF
24047 if { (eval echo configure:24048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24048   rm -rf conftest*
24049   eval "ac_cv_lib_$ac_lib_var=yes"
24050 else
24051   echo "configure: failed program was:" >&5
24052   cat conftest.$ac_ext >&5
24053   rm -rf conftest*
24054   eval "ac_cv_lib_$ac_lib_var=no"
24055 fi
24056 rm -f conftest*
24057 LIBS="$ac_save_LIBS"
24058
24059 fi
24060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24061   echo "$ac_t""yes" 1>&6
24062   cat >> confdefs.h <<\EOF
24063 #define HAVE_STRFTIME 1
24064 EOF
24065
24066 LIBS="-lintl $LIBS"
24067 else
24068   echo "$ac_t""no" 1>&6
24069 fi
24070
24071 fi
24072
24073
24074 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24075 echo "configure:24076: checking for inet_aton()" >&5
24076 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24077   echo $ac_n "(cached) $ac_c" 1>&6
24078 else
24079   cat > conftest.$ac_ext <<EOF
24080 #line 24081 "configure"
24081 #include "confdefs.h"
24082
24083 #ifdef HAVE_SYS_TYPES_H
24084 #       include <sys/types.h>
24085 #endif
24086 #ifdef HAVE_SYS_SOCKET_H
24087 #       include <sys/socket.h>
24088 #       ifdef HAVE_SYS_SELECT_H
24089 #               include <sys/select.h>
24090 #       endif
24091 #       include <netinet/in.h>
24092 #       ifdef HAVE_ARPA_INET_H
24093 #               include <arpa/inet.h>
24094 #       endif
24095 #endif
24096
24097 int main() {
24098 struct in_addr in;
24099 int rc = inet_aton( "255.255.255.255", &in );
24100 ; return 0; }
24101 EOF
24102 if { (eval echo configure:24103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24103   rm -rf conftest*
24104   ol_cv_func_inet_aton=yes
24105 else
24106   echo "configure: failed program was:" >&5
24107   cat conftest.$ac_ext >&5
24108   rm -rf conftest*
24109   ol_cv_func_inet_aton=no
24110 fi
24111 rm -f conftest*
24112 fi
24113
24114 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24115   if test $ol_cv_func_inet_aton != no; then
24116     cat >> confdefs.h <<\EOF
24117 #define HAVE_INET_ATON 1
24118 EOF
24119
24120   fi
24121  
24122
24123 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24124 echo "configure:24125: checking for _spawnlp" >&5
24125 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24126   echo $ac_n "(cached) $ac_c" 1>&6
24127 else
24128   cat > conftest.$ac_ext <<EOF
24129 #line 24130 "configure"
24130 #include "confdefs.h"
24131 /* System header to define __stub macros and hopefully few prototypes,
24132     which can conflict with char _spawnlp(); below.  */
24133 #include <assert.h>
24134 /* Override any gcc2 internal prototype to avoid an error.  */
24135 /* We use char because int might match the return type of a gcc2
24136     builtin and then its argument prototype would still apply.  */
24137 char _spawnlp();
24138 char (*f)();
24139
24140 int main() {
24141
24142 /* The GNU C library defines this for functions which it implements
24143     to always fail with ENOSYS.  Some functions are actually named
24144     something starting with __ and the normal name is an alias.  */
24145 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24146 choke me
24147 #else
24148 f = _spawnlp;
24149 #endif
24150
24151 ; return 0; }
24152 EOF
24153 if { (eval echo configure:24154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24154   rm -rf conftest*
24155   eval "ac_cv_func__spawnlp=yes"
24156 else
24157   echo "configure: failed program was:" >&5
24158   cat conftest.$ac_ext >&5
24159   rm -rf conftest*
24160   eval "ac_cv_func__spawnlp=no"
24161 fi
24162 rm -f conftest*
24163 fi
24164
24165 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24166   echo "$ac_t""yes" 1>&6
24167   cat >> confdefs.h <<\EOF
24168 #define HAVE_SPAWNLP 1
24169 EOF
24170
24171 else
24172   echo "$ac_t""no" 1>&6
24173 fi
24174
24175
24176 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24177 echo "configure:24178: checking for _snprintf" >&5
24178 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24179   echo $ac_n "(cached) $ac_c" 1>&6
24180 else
24181   cat > conftest.$ac_ext <<EOF
24182 #line 24183 "configure"
24183 #include "confdefs.h"
24184 /* System header to define __stub macros and hopefully few prototypes,
24185     which can conflict with char _snprintf(); below.  */
24186 #include <assert.h>
24187 /* Override any gcc2 internal prototype to avoid an error.  */
24188 /* We use char because int might match the return type of a gcc2
24189     builtin and then its argument prototype would still apply.  */
24190 char _snprintf();
24191 char (*f)();
24192
24193 int main() {
24194
24195 /* The GNU C library defines this for functions which it implements
24196     to always fail with ENOSYS.  Some functions are actually named
24197     something starting with __ and the normal name is an alias.  */
24198 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24199 choke me
24200 #else
24201 f = _snprintf;
24202 #endif
24203
24204 ; return 0; }
24205 EOF
24206 if { (eval echo configure:24207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24207   rm -rf conftest*
24208   eval "ac_cv_func__snprintf=yes"
24209 else
24210   echo "configure: failed program was:" >&5
24211   cat conftest.$ac_ext >&5
24212   rm -rf conftest*
24213   eval "ac_cv_func__snprintf=no"
24214 fi
24215 rm -f conftest*
24216 fi
24217
24218 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24219   echo "$ac_t""yes" 1>&6
24220   ac_cv_func_snprintf=yes
24221         cat >> confdefs.h <<\EOF
24222 #define snprintf _snprintf
24223 EOF
24224
24225
24226 else
24227   echo "$ac_t""no" 1>&6
24228 fi
24229
24230
24231 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24232 echo "configure:24233: checking for _vsnprintf" >&5
24233 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24234   echo $ac_n "(cached) $ac_c" 1>&6
24235 else
24236   cat > conftest.$ac_ext <<EOF
24237 #line 24238 "configure"
24238 #include "confdefs.h"
24239 /* System header to define __stub macros and hopefully few prototypes,
24240     which can conflict with char _vsnprintf(); below.  */
24241 #include <assert.h>
24242 /* Override any gcc2 internal prototype to avoid an error.  */
24243 /* We use char because int might match the return type of a gcc2
24244     builtin and then its argument prototype would still apply.  */
24245 char _vsnprintf();
24246 char (*f)();
24247
24248 int main() {
24249
24250 /* The GNU C library defines this for functions which it implements
24251     to always fail with ENOSYS.  Some functions are actually named
24252     something starting with __ and the normal name is an alias.  */
24253 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24254 choke me
24255 #else
24256 f = _vsnprintf;
24257 #endif
24258
24259 ; return 0; }
24260 EOF
24261 if { (eval echo configure:24262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24262   rm -rf conftest*
24263   eval "ac_cv_func__vsnprintf=yes"
24264 else
24265   echo "configure: failed program was:" >&5
24266   cat conftest.$ac_ext >&5
24267   rm -rf conftest*
24268   eval "ac_cv_func__vsnprintf=no"
24269 fi
24270 rm -f conftest*
24271 fi
24272
24273 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24274   echo "$ac_t""yes" 1>&6
24275   ac_cv_func_vsnprintf=yes
24276         cat >> confdefs.h <<\EOF
24277 #define vsnprintf _vsnprintf
24278 EOF
24279
24280
24281 else
24282   echo "$ac_t""no" 1>&6
24283 fi
24284
24285
24286 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24287 echo "configure:24288: checking for vprintf" >&5
24288 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24289   echo $ac_n "(cached) $ac_c" 1>&6
24290 else
24291   cat > conftest.$ac_ext <<EOF
24292 #line 24293 "configure"
24293 #include "confdefs.h"
24294 /* System header to define __stub macros and hopefully few prototypes,
24295     which can conflict with char vprintf(); below.  */
24296 #include <assert.h>
24297 /* Override any gcc2 internal prototype to avoid an error.  */
24298 /* We use char because int might match the return type of a gcc2
24299     builtin and then its argument prototype would still apply.  */
24300 char vprintf();
24301 char (*f)();
24302
24303 int main() {
24304
24305 /* The GNU C library defines this for functions which it implements
24306     to always fail with ENOSYS.  Some functions are actually named
24307     something starting with __ and the normal name is an alias.  */
24308 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24309 choke me
24310 #else
24311 f = vprintf;
24312 #endif
24313
24314 ; return 0; }
24315 EOF
24316 if { (eval echo configure:24317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24317   rm -rf conftest*
24318   eval "ac_cv_func_vprintf=yes"
24319 else
24320   echo "configure: failed program was:" >&5
24321   cat conftest.$ac_ext >&5
24322   rm -rf conftest*
24323   eval "ac_cv_func_vprintf=no"
24324 fi
24325 rm -f conftest*
24326 fi
24327
24328 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24329   echo "$ac_t""yes" 1>&6
24330   cat >> confdefs.h <<\EOF
24331 #define HAVE_VPRINTF 1
24332 EOF
24333
24334 else
24335   echo "$ac_t""no" 1>&6
24336 fi
24337
24338 if test "$ac_cv_func_vprintf" != yes; then
24339 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24340 echo "configure:24341: checking for _doprnt" >&5
24341 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24342   echo $ac_n "(cached) $ac_c" 1>&6
24343 else
24344   cat > conftest.$ac_ext <<EOF
24345 #line 24346 "configure"
24346 #include "confdefs.h"
24347 /* System header to define __stub macros and hopefully few prototypes,
24348     which can conflict with char _doprnt(); below.  */
24349 #include <assert.h>
24350 /* Override any gcc2 internal prototype to avoid an error.  */
24351 /* We use char because int might match the return type of a gcc2
24352     builtin and then its argument prototype would still apply.  */
24353 char _doprnt();
24354 char (*f)();
24355
24356 int main() {
24357
24358 /* The GNU C library defines this for functions which it implements
24359     to always fail with ENOSYS.  Some functions are actually named
24360     something starting with __ and the normal name is an alias.  */
24361 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24362 choke me
24363 #else
24364 f = _doprnt;
24365 #endif
24366
24367 ; return 0; }
24368 EOF
24369 if { (eval echo configure:24370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24370   rm -rf conftest*
24371   eval "ac_cv_func__doprnt=yes"
24372 else
24373   echo "configure: failed program was:" >&5
24374   cat conftest.$ac_ext >&5
24375   rm -rf conftest*
24376   eval "ac_cv_func__doprnt=no"
24377 fi
24378 rm -f conftest*
24379 fi
24380
24381 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24382   echo "$ac_t""yes" 1>&6
24383   cat >> confdefs.h <<\EOF
24384 #define HAVE_DOPRNT 1
24385 EOF
24386
24387 else
24388   echo "$ac_t""no" 1>&6
24389 fi
24390
24391 fi
24392
24393
24394 if test $ac_cv_func_vprintf = yes ; then
24395                 for ac_func in snprintf vsnprintf
24396 do
24397 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24398 echo "configure:24399: checking for $ac_func" >&5
24399 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24400   echo $ac_n "(cached) $ac_c" 1>&6
24401 else
24402   cat > conftest.$ac_ext <<EOF
24403 #line 24404 "configure"
24404 #include "confdefs.h"
24405 /* System header to define __stub macros and hopefully few prototypes,
24406     which can conflict with char $ac_func(); below.  */
24407 #include <assert.h>
24408 /* Override any gcc2 internal prototype to avoid an error.  */
24409 /* We use char because int might match the return type of a gcc2
24410     builtin and then its argument prototype would still apply.  */
24411 char $ac_func();
24412 char (*f)();
24413
24414 int main() {
24415
24416 /* The GNU C library defines this for functions which it implements
24417     to always fail with ENOSYS.  Some functions are actually named
24418     something starting with __ and the normal name is an alias.  */
24419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24420 choke me
24421 #else
24422 f = $ac_func;
24423 #endif
24424
24425 ; return 0; }
24426 EOF
24427 if { (eval echo configure:24428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24428   rm -rf conftest*
24429   eval "ac_cv_func_$ac_func=yes"
24430 else
24431   echo "configure: failed program was:" >&5
24432   cat conftest.$ac_ext >&5
24433   rm -rf conftest*
24434   eval "ac_cv_func_$ac_func=no"
24435 fi
24436 rm -f conftest*
24437 fi
24438
24439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24440   echo "$ac_t""yes" 1>&6
24441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24442   cat >> confdefs.h <<EOF
24443 #define $ac_tr_func 1
24444 EOF
24445  
24446 else
24447   echo "$ac_t""no" 1>&6
24448 fi
24449 done
24450
24451 fi
24452
24453 for ac_func in \
24454         bcopy                   \
24455         closesocket             \
24456         chroot                  \
24457         endgrent                \
24458         endpwent                \
24459         fcntl                   \
24460         flock                   \
24461         fstat                   \
24462         getdtablesize   \
24463         getgrgid                \
24464         gethostname             \
24465         getpass                 \
24466         getpassphrase   \
24467         getpwuid                \
24468         getpwnam                \
24469         getspnam                \
24470         gettimeofday    \
24471         initgroups              \
24472         lockf                   \
24473         memcpy                  \
24474         memmove                 \
24475         mkstemp                 \
24476         mktemp                  \
24477         pipe                    \
24478         read                    \
24479         recv                    \
24480         recvfrom                \
24481         setpwfile               \
24482         setgid                  \
24483         setegid                 \
24484         setsid                  \
24485         setuid                  \
24486         seteuid                 \
24487         signal                  \
24488         strdup                  \
24489         strpbrk                 \
24490         strrchr                 \
24491         strsep                  \
24492         strstr                  \
24493         strtol                  \
24494         strtoul                 \
24495         strtoq                  \
24496         strtouq                 \
24497         strtoll                 \
24498         strspn                  \
24499         sysconf                 \
24500         usleep                  \
24501         waitpid                 \
24502         wait4                   \
24503         write                   \
24504         send                    \
24505         sendmsg                 \
24506         sendto                  \
24507
24508 do
24509 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24510 echo "configure:24511: checking for $ac_func" >&5
24511 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24512   echo $ac_n "(cached) $ac_c" 1>&6
24513 else
24514   cat > conftest.$ac_ext <<EOF
24515 #line 24516 "configure"
24516 #include "confdefs.h"
24517 /* System header to define __stub macros and hopefully few prototypes,
24518     which can conflict with char $ac_func(); below.  */
24519 #include <assert.h>
24520 /* Override any gcc2 internal prototype to avoid an error.  */
24521 /* We use char because int might match the return type of a gcc2
24522     builtin and then its argument prototype would still apply.  */
24523 char $ac_func();
24524 char (*f)();
24525
24526 int main() {
24527
24528 /* The GNU C library defines this for functions which it implements
24529     to always fail with ENOSYS.  Some functions are actually named
24530     something starting with __ and the normal name is an alias.  */
24531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24532 choke me
24533 #else
24534 f = $ac_func;
24535 #endif
24536
24537 ; return 0; }
24538 EOF
24539 if { (eval echo configure:24540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24540   rm -rf conftest*
24541   eval "ac_cv_func_$ac_func=yes"
24542 else
24543   echo "configure: failed program was:" >&5
24544   cat conftest.$ac_ext >&5
24545   rm -rf conftest*
24546   eval "ac_cv_func_$ac_func=no"
24547 fi
24548 rm -f conftest*
24549 fi
24550
24551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24552   echo "$ac_t""yes" 1>&6
24553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24554   cat >> confdefs.h <<EOF
24555 #define $ac_tr_func 1
24556 EOF
24557  
24558 else
24559   echo "$ac_t""no" 1>&6
24560 fi
24561 done
24562
24563
24564 for ac_func in getopt getpeereid
24565 do
24566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24567 echo "configure:24568: checking for $ac_func" >&5
24568 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24569   echo $ac_n "(cached) $ac_c" 1>&6
24570 else
24571   cat > conftest.$ac_ext <<EOF
24572 #line 24573 "configure"
24573 #include "confdefs.h"
24574 /* System header to define __stub macros and hopefully few prototypes,
24575     which can conflict with char $ac_func(); below.  */
24576 #include <assert.h>
24577 /* Override any gcc2 internal prototype to avoid an error.  */
24578 /* We use char because int might match the return type of a gcc2
24579     builtin and then its argument prototype would still apply.  */
24580 char $ac_func();
24581 char (*f)();
24582
24583 int main() {
24584
24585 /* The GNU C library defines this for functions which it implements
24586     to always fail with ENOSYS.  Some functions are actually named
24587     something starting with __ and the normal name is an alias.  */
24588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24589 choke me
24590 #else
24591 f = $ac_func;
24592 #endif
24593
24594 ; return 0; }
24595 EOF
24596 if { (eval echo configure:24597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24597   rm -rf conftest*
24598   eval "ac_cv_func_$ac_func=yes"
24599 else
24600   echo "configure: failed program was:" >&5
24601   cat conftest.$ac_ext >&5
24602   rm -rf conftest*
24603   eval "ac_cv_func_$ac_func=no"
24604 fi
24605 rm -f conftest*
24606 fi
24607
24608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24609   echo "$ac_t""yes" 1>&6
24610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24611   cat >> confdefs.h <<EOF
24612 #define $ac_tr_func 1
24613 EOF
24614  
24615 else
24616   echo "$ac_t""no" 1>&6
24617 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24618 fi
24619 done
24620
24621
24622
24623 if test "$ac_cv_func_getopt" != yes; then
24624         LIBSRCS="$LIBSRCS getopt.c"
24625 fi
24626 if test "$ac_cv_func_getpeereid" != yes; then
24627         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24628 echo "configure:24629: checking for msg_accrights in msghdr" >&5
24629 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24630   echo $ac_n "(cached) $ac_c" 1>&6
24631 else
24632   cat > conftest.$ac_ext <<EOF
24633 #line 24634 "configure"
24634 #include "confdefs.h"
24635 #include <sys/socket.h>
24636 int main() {
24637 struct msghdr m; m.msg_accrightslen=0
24638 ; return 0; }
24639 EOF
24640 if { (eval echo configure:24641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24641   rm -rf conftest*
24642   ol_cv_msghdr_msg_accrights=yes
24643 else
24644   echo "configure: failed program was:" >&5
24645   cat conftest.$ac_ext >&5
24646   rm -rf conftest*
24647   ol_cv_msghdr_msg_accrights=no
24648 fi
24649 rm -f conftest*
24650         
24651 fi
24652
24653 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24654   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24655         cat >> confdefs.h <<\EOF
24656 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24657 EOF
24658
24659   fi
24660
24661         if test "$ac_cv_func_getpeereid" != yes; then
24662                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24663 echo "configure:24664: checking for msg_control in msghdr" >&5
24664 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24665   echo $ac_n "(cached) $ac_c" 1>&6
24666 else
24667   cat > conftest.$ac_ext <<EOF
24668 #line 24669 "configure"
24669 #include "confdefs.h"
24670 #include <sys/socket.h>
24671 int main() {
24672 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24673 ; return 0; }
24674 EOF
24675 if { (eval echo configure:24676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24676   rm -rf conftest*
24677   ol_cv_msghdr_msg_control=yes
24678 else
24679   echo "configure: failed program was:" >&5
24680   cat conftest.$ac_ext >&5
24681   rm -rf conftest*
24682   ol_cv_msghdr_msg_control=no
24683 fi
24684 rm -f conftest*
24685         
24686 fi
24687
24688 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24689   if test $ol_cv_msghdr_msg_control = "yes" ; then
24690         cat >> confdefs.h <<\EOF
24691 #define HAVE_MSGHDR_MSG_CONTROL 1
24692 EOF
24693
24694   fi
24695
24696         fi
24697         LIBSRCS="$LIBSRCS getpeereid.c"
24698 fi
24699 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24700         if test "$ac_cv_func_snprintf" != yes; then
24701                 cat >> confdefs.h <<\EOF
24702 #define snprintf ber_pvt_snprintf
24703 EOF
24704
24705         fi
24706         if test "$ac_cv_func_vsnprintf" != yes; then
24707                 cat >> confdefs.h <<\EOF
24708 #define vsnprintf ber_pvt_vsnprintf
24709 EOF
24710
24711         fi
24712 fi
24713
24714
24715 if test "$ol_enable_slapi" != no ; then
24716                         for ac_hdr in ltdl.h
24717 do
24718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24720 echo "configure:24721: checking for $ac_hdr" >&5
24721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24722   echo $ac_n "(cached) $ac_c" 1>&6
24723 else
24724   cat > conftest.$ac_ext <<EOF
24725 #line 24726 "configure"
24726 #include "confdefs.h"
24727 #include <$ac_hdr>
24728 EOF
24729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24730 { (eval echo configure:24731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24732 if test -z "$ac_err"; then
24733   rm -rf conftest*
24734   eval "ac_cv_header_$ac_safe=yes"
24735 else
24736   echo "$ac_err" >&5
24737   echo "configure: failed program was:" >&5
24738   cat conftest.$ac_ext >&5
24739   rm -rf conftest*
24740   eval "ac_cv_header_$ac_safe=no"
24741 fi
24742 rm -f conftest*
24743 fi
24744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24745   echo "$ac_t""yes" 1>&6
24746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24747   cat >> confdefs.h <<EOF
24748 #define $ac_tr_hdr 1
24749 EOF
24750  
24751 else
24752   echo "$ac_t""no" 1>&6
24753 fi
24754 done
24755
24756
24757         if test $ac_cv_header_ltdl_h != yes ; then
24758                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24759         fi
24760         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24761 echo "configure:24762: checking for lt_dlinit in -lltdl" >&5
24762 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24764   echo $ac_n "(cached) $ac_c" 1>&6
24765 else
24766   ac_save_LIBS="$LIBS"
24767 LIBS="-lltdl  $LIBS"
24768 cat > conftest.$ac_ext <<EOF
24769 #line 24770 "configure"
24770 #include "confdefs.h"
24771 /* Override any gcc2 internal prototype to avoid an error.  */
24772 /* We use char because int might match the return type of a gcc2
24773     builtin and then its argument prototype would still apply.  */
24774 char lt_dlinit();
24775
24776 int main() {
24777 lt_dlinit()
24778 ; return 0; }
24779 EOF
24780 if { (eval echo configure:24781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24781   rm -rf conftest*
24782   eval "ac_cv_lib_$ac_lib_var=yes"
24783 else
24784   echo "configure: failed program was:" >&5
24785   cat conftest.$ac_ext >&5
24786   rm -rf conftest*
24787   eval "ac_cv_lib_$ac_lib_var=no"
24788 fi
24789 rm -f conftest*
24790 LIBS="$ac_save_LIBS"
24791
24792 fi
24793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24794   echo "$ac_t""yes" 1>&6
24795   
24796                 SLAPI_LIBS=-lltdl
24797                 LIBSLAPI=libslapi.a
24798                 LIBSLAPITOOLS=../libslapi.a
24799                 cat >> confdefs.h <<\EOF
24800 #define HAVE_LIBLTDL 1
24801 EOF
24802
24803         
24804 else
24805   echo "$ac_t""no" 1>&6
24806 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24807 fi
24808
24809
24810         cat >> confdefs.h <<\EOF
24811 #define LDAP_SLAPI 1
24812 EOF
24813
24814 fi
24815
24816 if test "$ol_enable_debug" != no ; then
24817         cat >> confdefs.h <<\EOF
24818 #define LDAP_DEBUG 1
24819 EOF
24820
24821 fi
24822 if test "$ol_enable_syslog" = yes ; then
24823         cat >> confdefs.h <<\EOF
24824 #define LDAP_SYSLOG 1
24825 EOF
24826
24827 fi
24828 if test "$ol_link_kbind" != no ; then
24829         cat >> confdefs.h <<\EOF
24830 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24831 EOF
24832
24833 fi
24834 if test "$ol_enable_proctitle" != no ; then
24835         cat >> confdefs.h <<\EOF
24836 #define LDAP_PROCTITLE 1
24837 EOF
24838
24839 fi
24840 if test "$ol_enable_referrals" != no ; then
24841         cat >> confdefs.h <<\EOF
24842 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24843 EOF
24844
24845 fi
24846 if test "$ol_enable_local" != no; then
24847         cat >> confdefs.h <<\EOF
24848 #define LDAP_PF_LOCAL 1
24849 EOF
24850
24851 fi
24852 if test "$ol_link_ipv6" != no; then
24853         cat >> confdefs.h <<\EOF
24854 #define LDAP_PF_INET6 1
24855 EOF
24856
24857 fi
24858 if test "$ol_enable_cleartext" != no ; then
24859         cat >> confdefs.h <<\EOF
24860 #define SLAPD_CLEARTEXT 1
24861 EOF
24862
24863 fi
24864 if test "$ol_enable_crypt" != no ; then
24865         cat >> confdefs.h <<\EOF
24866 #define SLAPD_CRYPT 1
24867 EOF
24868
24869 fi
24870 if test "$ol_link_spasswd" != no ; then
24871         cat >> confdefs.h <<\EOF
24872 #define SLAPD_SPASSWD 1
24873 EOF
24874
24875 fi
24876 if test "$ol_enable_multimaster" != no ; then
24877         cat >> confdefs.h <<\EOF
24878 #define SLAPD_MULTIMASTER 1
24879 EOF
24880
24881 fi
24882 if test "$ol_enable_rlookups" != no ; then
24883         cat >> confdefs.h <<\EOF
24884 #define SLAPD_RLOOKUPS 1
24885 EOF
24886
24887 fi
24888 if test "$ol_enable_aci" != no ; then
24889         cat >> confdefs.h <<\EOF
24890 #define SLAPD_ACI_ENABLED 1
24891 EOF
24892
24893 fi
24894
24895 if test "$ol_link_modules" != no ; then
24896         cat >> confdefs.h <<\EOF
24897 #define SLAPD_MODULES 1
24898 EOF
24899
24900         BUILD_SLAPD=yes
24901         SLAPD_MODULES_LDFLAGS="-dlopen self"
24902 fi
24903
24904 cat >> confdefs.h <<\EOF
24905 #define SLAPD_MOD_STATIC 1
24906 EOF
24907
24908 cat >> confdefs.h <<\EOF
24909 #define SLAPD_MOD_DYNAMIC 2
24910 EOF
24911
24912
24913 if test "$ol_enable_bdb" != no ; then
24914         BUILD_SLAPD=yes
24915         BUILD_BDB=$ol_enable_bdb
24916         if test "$ol_enable_bdb" = mod ; then
24917                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24918                 MFLAG=SLAPD_MOD_DYNAMIC
24919         else
24920                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24921                 MFLAG=SLAPD_MOD_STATIC
24922         fi
24923         cat >> confdefs.h <<EOF
24924 #define SLAPD_BDB $MFLAG
24925 EOF
24926
24927 fi
24928
24929 if test "$ol_enable_dnssrv" != no ; then
24930         BUILD_SLAPD=yes
24931         BUILD_DNSSRV=$ol_enable_dnssrv
24932         if test "$ol_enable_dnssrv" = mod ; then
24933                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24934                 MFLAG=SLAPD_MOD_DYNAMIC
24935         else
24936                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24937                 MFLAG=SLAPD_MOD_STATIC
24938         fi
24939         cat >> confdefs.h <<EOF
24940 #define SLAPD_DNSSRV $MFLAG
24941 EOF
24942
24943 fi
24944
24945 if test "$ol_enable_hdb" != no ; then
24946         BUILD_SLAPD=yes
24947         BUILD_HDB=$ol_enable_hdb
24948         if test "$ol_enable_hdb" = mod ; then
24949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24950                 MFLAG=SLAPD_MOD_DYNAMIC
24951         else
24952                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24953                 MFLAG=SLAPD_MOD_STATIC
24954         fi
24955         cat >> confdefs.h <<EOF
24956 #define SLAPD_HDB $MFLAG
24957 EOF
24958
24959 fi
24960
24961 if test "$ol_enable_ldap" != no ; then
24962         BUILD_SLAPD=yes
24963         BUILD_LDAP=$ol_enable_ldap
24964         if test "$ol_enable_ldap" = mod ; then
24965                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24966                 MFLAG=SLAPD_MOD_DYNAMIC
24967         else
24968                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24969                 MFLAG=SLAPD_MOD_STATIC
24970         fi
24971         cat >> confdefs.h <<EOF
24972 #define SLAPD_LDAP $MFLAG
24973 EOF
24974
24975 fi
24976
24977 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24978         BUILD_SLAPD=yes
24979         BUILD_LDBM=$ol_enable_ldbm
24980         if test "$ol_enable_ldbm" = mod ; then
24981                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24982                 MFLAG=SLAPD_MOD_DYNAMIC
24983         else
24984                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24985                 MFLAG=SLAPD_MOD_STATIC
24986         fi
24987         cat >> confdefs.h <<EOF
24988 #define SLAPD_LDBM $MFLAG
24989 EOF
24990
24991 fi
24992
24993 if test "$ol_enable_meta" != no ; then
24994         BUILD_SLAPD=yes
24995         BUILD_META=$ol_enable_meta
24996         BUILD_REWRITE=yes
24997         if test "$ol_enable_meta" = mod ; then
24998                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24999                 MFLAG=SLAPD_MOD_DYNAMIC
25000         else
25001                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25002                 MFLAG=SLAPD_MOD_STATIC
25003         fi
25004         cat >> confdefs.h <<EOF
25005 #define SLAPD_META $MFLAG
25006 EOF
25007
25008 fi
25009
25010 if test "$ol_enable_monitor" != no ; then
25011         BUILD_SLAPD=yes
25012         BUILD_MONITOR=$ol_enable_monitor
25013         if test "$ol_enable_monitor" = mod ; then
25014                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25015                 MFLAG=SLAPD_MOD_DYNAMIC
25016         else
25017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25018                 MFLAG=SLAPD_MOD_STATIC
25019         fi
25020         cat >> confdefs.h <<EOF
25021 #define SLAPD_MONITOR $MFLAG
25022 EOF
25023
25024 fi
25025
25026 if test "$ol_enable_null" != no ; then
25027         BUILD_SLAPD=yes
25028         BUILD_NULL=$ol_enable_null
25029         if test "$ol_enable_null" = mod ; then
25030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25031                 MFLAG=SLAPD_MOD_DYNAMIC
25032         else
25033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25034                 MFLAG=SLAPD_MOD_STATIC
25035         fi
25036         cat >> confdefs.h <<EOF
25037 #define SLAPD_NULL $MFLAG
25038 EOF
25039
25040 fi
25041
25042 if test "$ol_enable_passwd" != no ; then
25043         BUILD_SLAPD=yes
25044         BUILD_PASSWD=$ol_enable_passwd
25045         if test "$ol_enable_passwd" = mod ; then
25046                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25047                 MFLAG=SLAPD_MOD_DYNAMIC
25048         else
25049                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25050                 MFLAG=SLAPD_MOD_STATIC
25051         fi
25052         cat >> confdefs.h <<EOF
25053 #define SLAPD_PASSWD $MFLAG
25054 EOF
25055
25056 fi
25057
25058 if test "$ol_link_perl" != no ; then
25059         BUILD_SLAPD=yes
25060         BUILD_PERL=$ol_enable_perl
25061         if test "$ol_enable_perl" = mod ; then
25062                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25063                 MFLAG=SLAPD_MOD_DYNAMIC
25064         else
25065                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25066                 MFLAG=SLAPD_MOD_STATIC
25067         fi
25068         cat >> confdefs.h <<EOF
25069 #define SLAPD_PERL $MFLAG
25070 EOF
25071
25072 fi
25073
25074 if test "$ol_enable_relay" != no ; then
25075         BUILD_SLAPD=yes
25076         BUILD_RELAY=$ol_enable_relay
25077         if test "$ol_enable_relay" = mod ; then
25078                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25079                 MFLAG=SLAPD_MOD_DYNAMIC
25080         else
25081                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25082                 MFLAG=SLAPD_MOD_STATIC
25083         fi
25084         cat >> confdefs.h <<EOF
25085 #define SLAPD_RELAY $MFLAG
25086 EOF
25087
25088 fi
25089
25090 if test "$ol_enable_shell" != no ; then
25091         if test "$ol_link_thread" != no ; then
25092                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25093         fi
25094         BUILD_SLAPD=yes
25095         BUILD_SHELL=$ol_enable_shell
25096         if test "$ol_enable_shell" = mod ; then
25097                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25098                 MFLAG=SLAPD_MOD_DYNAMIC
25099         else
25100                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25101                 MFLAG=SLAPD_MOD_STATIC
25102         fi
25103         cat >> confdefs.h <<EOF
25104 #define SLAPD_SHELL $MFLAG
25105 EOF
25106
25107 fi
25108
25109 if test "$ol_link_sql" != no ; then
25110         BUILD_SLAPD=yes
25111         BUILD_SQL=$ol_enable_sql
25112         if test "$ol_enable_sql" = mod; then
25113                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25114                 MFLAG=SLAPD_MOD_DYNAMIC
25115         else
25116                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25117                 MFLAG=SLAPD_MOD_STATIC
25118         fi
25119         cat >> confdefs.h <<EOF
25120 #define SLAPD_SQL $MFLAG
25121 EOF
25122
25123 fi
25124
25125 if test "$ol_enable_denyop" != no ; then
25126         BUILD_DENYOP=$ol_enable_denyop
25127         if test "$ol_enable_denyop" = mod ; then
25128                 MFLAG=SLAPD_MOD_DYNAMIC
25129                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25130         else
25131                 MFLAG=SLAPD_MOD_STATIC
25132         fi
25133         cat >> confdefs.h <<EOF
25134 #define SLAPD_OVER_DENYOP $MFLAG
25135 EOF
25136
25137 fi
25138
25139 if test "$ol_enable_dyngroup" != no ; then
25140         BUILD_DYNGROUP=$ol_enable_dyngroup
25141         if test "$ol_enable_dyngroup" = mod ; then
25142                 MFLAG=SLAPD_MOD_DYNAMIC
25143                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25144         else
25145                 MFLAG=SLAPD_MOD_STATIC
25146         fi
25147         cat >> confdefs.h <<EOF
25148 #define SLAPD_OVER_DYNGROUP $MFLAG
25149 EOF
25150
25151 fi
25152
25153 if test "$ol_enable_dynlist" != no ; then
25154         BUILD_DYNLIST=$ol_enable_dynlist
25155         if test "$ol_enable_dynlist" = mod ; then
25156                 MFLAG=SLAPD_MOD_DYNAMIC
25157                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25158         else
25159                 MFLAG=SLAPD_MOD_STATIC
25160         fi
25161         cat >> confdefs.h <<EOF
25162 #define SLAPD_OVER_DYNLIST $MFLAG
25163 EOF
25164
25165 fi
25166
25167 if test "$ol_enable_glue" != no ; then
25168         BUILD_GLUE=$ol_enable_glue
25169         if test "$ol_enable_glue" = mod ; then
25170                 MFLAG=SLAPD_MOD_DYNAMIC
25171                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25172         else
25173                 MFLAG=SLAPD_MOD_STATIC
25174         fi
25175         cat >> confdefs.h <<EOF
25176 #define SLAPD_OVER_GLUE $MFLAG
25177 EOF
25178
25179 fi
25180
25181 if test "$ol_enable_lastmod" != no ; then
25182         BUILD_LASTMOD=$ol_enable_lastmod
25183         if test "$ol_enable_lastmod" = mod ; then
25184                 MFLAG=SLAPD_MOD_DYNAMIC
25185                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25186         else
25187                 MFLAG=SLAPD_MOD_STATIC
25188         fi
25189         cat >> confdefs.h <<EOF
25190 #define SLAPD_OVER_LASTMOD $MFLAG
25191 EOF
25192
25193 fi
25194
25195 if test "$ol_enable_ppolicy" != no ; then
25196         BUILD_PPOLICY=$ol_enable_ppolicy
25197         if test "$ol_enable_ppolicy" = mod ; then
25198                 MFLAG=SLAPD_MOD_DYNAMIC
25199                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25200         else
25201                 MFLAG=SLAPD_MOD_STATIC
25202         fi
25203         cat >> confdefs.h <<EOF
25204 #define SLAPD_OVER_PPOLICY $MFLAG
25205 EOF
25206
25207 fi
25208
25209 if test "$ol_enable_proxycache" != no ; then
25210         BUILD_PROXYCACHE=$ol_enable_proxycache
25211         if test "$ol_enable_proxycache" = mod ; then
25212                 MFLAG=SLAPD_MOD_DYNAMIC
25213                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25214         else
25215                 MFLAG=SLAPD_MOD_STATIC
25216         fi
25217         cat >> confdefs.h <<EOF
25218 #define SLAPD_OVER_PROXYCACHE $MFLAG
25219 EOF
25220
25221 fi
25222
25223 if test "$ol_enable_refint" != no ; then
25224         BUILD_REFINT=$ol_enable_refint
25225         if test "$ol_enable_refint" = mod ; then
25226                 MFLAG=SLAPD_MOD_DYNAMIC
25227                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25228         else
25229                 MFLAG=SLAPD_MOD_STATIC
25230         fi
25231         cat >> confdefs.h <<EOF
25232 #define SLAPD_OVER_REFINT $MFLAG
25233 EOF
25234
25235 fi
25236
25237 if test "$ol_enable_rwm" != no ; then
25238         BUILD_REWRITE=yes
25239         BUILD_RWM=$ol_enable_rwm
25240         if test "$ol_enable_rwm" = mod ; then
25241                 MFLAG=SLAPD_MOD_DYNAMIC
25242                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25243         else
25244                 MFLAG=SLAPD_MOD_STATIC
25245         fi
25246         cat >> confdefs.h <<EOF
25247 #define SLAPD_OVER_RWM $MFLAG
25248 EOF
25249
25250 fi
25251
25252 if test "$ol_enable_syncprov" != no ; then
25253         BUILD_SYNCPROV=$ol_enable_syncprov
25254         if test "$ol_enable_syncprov" = mod ; then
25255                 MFLAG=SLAPD_MOD_DYNAMIC
25256                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25257         else
25258                 MFLAG=SLAPD_MOD_STATIC
25259         fi
25260         cat >> confdefs.h <<EOF
25261 #define SLAPD_OVER_SYNCPROV $MFLAG
25262 EOF
25263
25264 fi
25265
25266 if test "$ol_enable_translucent" != no ; then
25267         BUILD_TRANSLUCENT=$ol_enable_translucent
25268         if test "$ol_enable_translucent" = mod ; then
25269                 MFLAG=SLAPD_MOD_DYNAMIC
25270                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25271         else
25272                 MFLAG=SLAPD_MOD_STATIC
25273         fi
25274         cat >> confdefs.h <<EOF
25275 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25276 EOF
25277
25278 fi
25279
25280 if test "$ol_enable_unique" != no ; then
25281         BUILD_UNIQUE=$ol_enable_unique
25282         if test "$ol_enable_unique" = mod ; then
25283                 MFLAG=SLAPD_MOD_DYNAMIC
25284                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25285         else
25286                 MFLAG=SLAPD_MOD_STATIC
25287         fi
25288         cat >> confdefs.h <<EOF
25289 #define SLAPD_OVER_UNIQUE $MFLAG
25290 EOF
25291
25292 fi
25293
25294 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25295         $BUILD_SLAPD = yes ; then
25296         BUILD_SLURPD=yes
25297 fi
25298
25299 if test "$ol_enable_rewrite" != no ; then
25300         cat >> confdefs.h <<\EOF
25301 #define ENABLE_REWRITE 1
25302 EOF
25303
25304         BUILD_REWRITE=yes
25305 fi
25306
25307 if test "$ol_enable_slapi" != no ; then
25308         cat >> confdefs.h <<\EOF
25309 #define ENABLE_SLAPI 1
25310 EOF
25311
25312         BUILD_SLAPI=yes
25313         SLAPD_SLAPI_DEPEND=libslapi.a
25314 fi
25315
25316
25317
25318 if test "$ac_cv_mingw32" = yes ; then
25319         PLAT=NT
25320         SLAPD_MODULES_LDFLAGS=
25321 else
25322         PLAT=UNIX
25323 fi
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
25397
25398
25399
25400 # Check whether --with-xxinstall or --without-xxinstall was given.
25401 if test "${with_xxinstall+set}" = set; then
25402   withval="$with_xxinstall"
25403   :
25404 fi
25405
25406
25407
25408 trap '' 1 2 15
25409
25410 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25411
25412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25413 # Let make expand exec_prefix.
25414 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25415
25416 # Any assignment to VPATH causes Sun make to only execute
25417 # the first set of double-colon rules, so remove it if not needed.
25418 # If there is a colon in the path, we need to keep it.
25419 if test "x$srcdir" = x.; then
25420   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25421 fi
25422
25423 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25424
25425 DEFS=-DHAVE_CONFIG_H
25426
25427 # Without the "./", some shells look in PATH for config.status.
25428 : ${CONFIG_STATUS=./config.status}
25429
25430 echo creating $CONFIG_STATUS
25431 rm -f $CONFIG_STATUS
25432 cat > $CONFIG_STATUS <<EOF
25433 #! /bin/sh
25434 # Generated automatically by configure.
25435 # Run this file to recreate the current configuration.
25436 # This directory was configured as follows,
25437 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25438 #
25439 # $0 $ac_configure_args
25440 #
25441 # Compiler output produced by configure, useful for debugging
25442 # configure, is in ./config.log if it exists.
25443
25444 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25445 for ac_option
25446 do
25447   case "\$ac_option" in
25448   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25449     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25450     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25451   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25452     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25453     exit 0 ;;
25454   -help | --help | --hel | --he | --h)
25455     echo "\$ac_cs_usage"; exit 0 ;;
25456   *) echo "\$ac_cs_usage"; exit 1 ;;
25457   esac
25458 done
25459
25460 ac_given_srcdir=$srcdir
25461 ac_given_INSTALL="$INSTALL"
25462
25463 trap 'rm -fr `echo "\
25464 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25465 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25466 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25467 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25468 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25469 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25470 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25471 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25472 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25473 include/Makefile:build/top.mk:include/Makefile.in \
25474 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25475 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25476 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25477 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25478 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25479 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25480 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25481 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25482 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25483 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25484 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25485 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25486 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25487 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25488 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25489 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25490 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25491 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25492 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25493 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25494 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25495 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25496 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25497 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25498 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25499 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25500 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25501 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25502 tests/run \
25503 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25504  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25505 EOF
25506 cat >> $CONFIG_STATUS <<EOF
25507
25508 # Protect against being on the right side of a sed subst in config.status.
25509 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25510  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25511 $ac_vpsub
25512 $extrasub
25513 s%@SHELL@%$SHELL%g
25514 s%@CFLAGS@%$CFLAGS%g
25515 s%@CPPFLAGS@%$CPPFLAGS%g
25516 s%@CXXFLAGS@%$CXXFLAGS%g
25517 s%@FFLAGS@%$FFLAGS%g
25518 s%@DEFS@%$DEFS%g
25519 s%@LDFLAGS@%$LDFLAGS%g
25520 s%@LIBS@%$LIBS%g
25521 s%@exec_prefix@%$exec_prefix%g
25522 s%@prefix@%$prefix%g
25523 s%@program_transform_name@%$program_transform_name%g
25524 s%@bindir@%$bindir%g
25525 s%@sbindir@%$sbindir%g
25526 s%@libexecdir@%$libexecdir%g
25527 s%@datadir@%$datadir%g
25528 s%@sysconfdir@%$sysconfdir%g
25529 s%@sharedstatedir@%$sharedstatedir%g
25530 s%@localstatedir@%$localstatedir%g
25531 s%@libdir@%$libdir%g
25532 s%@includedir@%$includedir%g
25533 s%@oldincludedir@%$oldincludedir%g
25534 s%@infodir@%$infodir%g
25535 s%@mandir@%$mandir%g
25536 s%@host@%$host%g
25537 s%@host_alias@%$host_alias%g
25538 s%@host_cpu@%$host_cpu%g
25539 s%@host_vendor@%$host_vendor%g
25540 s%@host_os@%$host_os%g
25541 s%@target@%$target%g
25542 s%@target_alias@%$target_alias%g
25543 s%@target_cpu@%$target_cpu%g
25544 s%@target_vendor@%$target_vendor%g
25545 s%@target_os@%$target_os%g
25546 s%@build@%$build%g
25547 s%@build_alias@%$build_alias%g
25548 s%@build_cpu@%$build_cpu%g
25549 s%@build_vendor@%$build_vendor%g
25550 s%@build_os@%$build_os%g
25551 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25552 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25553 s%@INSTALL_DATA@%$INSTALL_DATA%g
25554 s%@PACKAGE@%$PACKAGE%g
25555 s%@VERSION@%$VERSION%g
25556 s%@ACLOCAL@%$ACLOCAL%g
25557 s%@AUTOCONF@%$AUTOCONF%g
25558 s%@AUTOMAKE@%$AUTOMAKE%g
25559 s%@AUTOHEADER@%$AUTOHEADER%g
25560 s%@MAKEINFO@%$MAKEINFO%g
25561 s%@install_sh@%$install_sh%g
25562 s%@AMTAR@%$AMTAR%g
25563 s%@AWK@%$AWK%g
25564 s%@AMTARFLAGS@%$AMTARFLAGS%g
25565 s%@SET_MAKE@%$SET_MAKE%g
25566 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25567 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25568 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25569 s%@top_builddir@%$top_builddir%g
25570 s%@ldap_subdir@%$ldap_subdir%g
25571 s%@CC@%$CC%g
25572 s%@AR@%$AR%g
25573 s%@LN_S@%$LN_S%g
25574 s%@OBJEXT@%$OBJEXT%g
25575 s%@EXEEXT@%$EXEEXT%g
25576 s%@ECHO@%$ECHO%g
25577 s%@RANLIB@%$RANLIB%g
25578 s%@STRIP@%$STRIP%g
25579 s%@DLLTOOL@%$DLLTOOL%g
25580 s%@AS@%$AS%g
25581 s%@OBJDUMP@%$OBJDUMP%g
25582 s%@CPP@%$CPP%g
25583 s%@LIBTOOL@%$LIBTOOL%g
25584 s%@PERLBIN@%$PERLBIN%g
25585 s%@OL_MKDEP@%$OL_MKDEP%g
25586 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25587 s%@LTSTATIC@%$LTSTATIC%g
25588 s%@LIBOBJS@%$LIBOBJS%g
25589 s%@LIBSRCS@%$LIBSRCS%g
25590 s%@PLAT@%$PLAT%g
25591 s%@WITH_SASL@%$WITH_SASL%g
25592 s%@WITH_TLS@%$WITH_TLS%g
25593 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25594 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25595 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25596 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25597 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25598 s%@BUILD_BDB@%$BUILD_BDB%g
25599 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25600 s%@BUILD_HDB@%$BUILD_HDB%g
25601 s%@BUILD_LDAP@%$BUILD_LDAP%g
25602 s%@BUILD_LDBM@%$BUILD_LDBM%g
25603 s%@BUILD_META@%$BUILD_META%g
25604 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25605 s%@BUILD_NULL@%$BUILD_NULL%g
25606 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25607 s%@BUILD_RELAY@%$BUILD_RELAY%g
25608 s%@BUILD_PERL@%$BUILD_PERL%g
25609 s%@BUILD_SHELL@%$BUILD_SHELL%g
25610 s%@BUILD_SQL@%$BUILD_SQL%g
25611 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25612 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25613 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25614 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25615 s%@BUILD_GLUE@%$BUILD_GLUE%g
25616 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25617 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25618 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25619 s%@BUILD_REFINT@%$BUILD_REFINT%g
25620 s%@BUILD_RWM@%$BUILD_RWM%g
25621 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25622 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25623 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25624 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25625 s%@LDAP_LIBS@%$LDAP_LIBS%g
25626 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25627 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25628 s%@LDBM_LIBS@%$LDBM_LIBS%g
25629 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25630 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25631 s%@WRAP_LIBS@%$WRAP_LIBS%g
25632 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25633 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25634 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25635 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25636 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25637 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25638 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25639 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25640 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25641 s%@KRB4_LIBS@%$KRB4_LIBS%g
25642 s%@KRB5_LIBS@%$KRB5_LIBS%g
25643 s%@SASL_LIBS@%$SASL_LIBS%g
25644 s%@TLS_LIBS@%$TLS_LIBS%g
25645 s%@MODULES_LIBS@%$MODULES_LIBS%g
25646 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25647 s%@LIBSLAPI@%$LIBSLAPI%g
25648 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25649 s%@AUTH_LIBS@%$AUTH_LIBS%g
25650 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25651 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25652 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25653 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25654 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25655
25656 CEOF
25657 EOF
25658
25659 cat >> $CONFIG_STATUS <<\EOF
25660
25661 # Split the substitutions into bite-sized pieces for seds with
25662 # small command number limits, like on Digital OSF/1 and HP-UX.
25663 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25664 ac_file=1 # Number of current file.
25665 ac_beg=1 # First line for current file.
25666 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25667 ac_more_lines=:
25668 ac_sed_cmds=""
25669 while $ac_more_lines; do
25670   if test $ac_beg -gt 1; then
25671     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25672   else
25673     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25674   fi
25675   if test ! -s conftest.s$ac_file; then
25676     ac_more_lines=false
25677     rm -f conftest.s$ac_file
25678   else
25679     if test -z "$ac_sed_cmds"; then
25680       ac_sed_cmds="sed -f conftest.s$ac_file"
25681     else
25682       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25683     fi
25684     ac_file=`expr $ac_file + 1`
25685     ac_beg=$ac_end
25686     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25687   fi
25688 done
25689 if test -z "$ac_sed_cmds"; then
25690   ac_sed_cmds=cat
25691 fi
25692 EOF
25693
25694 cat >> $CONFIG_STATUS <<EOF
25695
25696 CONFIG_FILES=\${CONFIG_FILES-"\
25697 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25698 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25699 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25700 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25701 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25702 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25703 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25704 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25705 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25706 include/Makefile:build/top.mk:include/Makefile.in \
25707 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25708 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25709 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25710 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25711 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25712 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25713 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25714 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25715 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25716 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25717 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25718 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25719 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25720 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25721 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25722 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25723 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25724 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25725 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25726 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25727 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25728 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25729 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25730 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25731 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25732 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25733 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25734 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25735 tests/run \
25736 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25737 "}
25738 EOF
25739 cat >> $CONFIG_STATUS <<\EOF
25740 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25741   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25742   case "$ac_file" in
25743   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25744        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25745   *) ac_file_in="${ac_file}.in" ;;
25746   esac
25747
25748   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25749
25750   # Remove last slash and all that follows it.  Not all systems have dirname.
25751   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25752   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25753     # The file is in a subdirectory.
25754     test ! -d "$ac_dir" && mkdir "$ac_dir"
25755     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25756     # A "../" for each directory in $ac_dir_suffix.
25757     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25758   else
25759     ac_dir_suffix= ac_dots=
25760   fi
25761
25762   case "$ac_given_srcdir" in
25763   .)  srcdir=.
25764       if test -z "$ac_dots"; then top_srcdir=.
25765       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25766   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25767   *) # Relative path.
25768     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25769     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25770   esac
25771
25772   case "$ac_given_INSTALL" in
25773   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25774   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25775   esac
25776
25777   echo creating "$ac_file"
25778   rm -f "$ac_file"
25779   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25780   case "$ac_file" in
25781   *[Mm]akefile*) ac_comsub="1i\\
25782 # $configure_input" ;;
25783   *) ac_comsub= ;;
25784   esac
25785
25786   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25787   sed -e "$ac_comsub
25788 s%@configure_input@%$configure_input%g
25789 s%@srcdir@%$srcdir%g
25790 s%@top_srcdir@%$top_srcdir%g
25791 s%@INSTALL@%$INSTALL%g
25792 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25793 fi; done
25794 rm -f conftest.s*
25795
25796 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25797 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25798 #
25799 # ac_d sets the value in "#define NAME VALUE" lines.
25800 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25801 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25802 ac_dC='\3'
25803 ac_dD='%g'
25804 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25805 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25806 ac_uB='\([      ]\)%\1#\2define\3'
25807 ac_uC=' '
25808 ac_uD='\4%g'
25809 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25810 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25811 ac_eB='$%\1#\2define\3'
25812 ac_eC=' '
25813 ac_eD='%g'
25814
25815 if test "${CONFIG_HEADERS+set}" != set; then
25816 EOF
25817 cat >> $CONFIG_STATUS <<EOF
25818   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25819 EOF
25820 cat >> $CONFIG_STATUS <<\EOF
25821 fi
25822 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25823   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25824   case "$ac_file" in
25825   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25826        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25827   *) ac_file_in="${ac_file}.in" ;;
25828   esac
25829
25830   echo creating $ac_file
25831
25832   rm -f conftest.frag conftest.in conftest.out
25833   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25834   cat $ac_file_inputs > conftest.in
25835
25836 EOF
25837
25838 # Transform confdefs.h into a sed script conftest.vals that substitutes
25839 # the proper values into config.h.in to produce config.h.  And first:
25840 # Protect against being on the right side of a sed subst in config.status.
25841 # Protect against being in an unquoted here document in config.status.
25842 rm -f conftest.vals
25843 cat > conftest.hdr <<\EOF
25844 s/[\\&%]/\\&/g
25845 s%[\\$`]%\\&%g
25846 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25847 s%ac_d%ac_u%gp
25848 s%ac_u%ac_e%gp
25849 EOF
25850 sed -n -f conftest.hdr confdefs.h > conftest.vals
25851 rm -f conftest.hdr
25852
25853 # This sed command replaces #undef with comments.  This is necessary, for
25854 # example, in the case of _POSIX_SOURCE, which is predefined and required
25855 # on some systems where configure will not decide to define it.
25856 cat >> conftest.vals <<\EOF
25857 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25858 EOF
25859
25860 # Break up conftest.vals because some shells have a limit on
25861 # the size of here documents, and old seds have small limits too.
25862
25863 rm -f conftest.tail
25864 while :
25865 do
25866   ac_lines=`grep -c . conftest.vals`
25867   # grep -c gives empty output for an empty file on some AIX systems.
25868   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25869   # Write a limited-size here document to conftest.frag.
25870   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25871   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25872   echo 'CEOF
25873   sed -f conftest.frag conftest.in > conftest.out
25874   rm -f conftest.in
25875   mv conftest.out conftest.in
25876 ' >> $CONFIG_STATUS
25877   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25878   rm -f conftest.vals
25879   mv conftest.tail conftest.vals
25880 done
25881 rm -f conftest.vals
25882
25883 cat >> $CONFIG_STATUS <<\EOF
25884   rm -f conftest.frag conftest.h
25885   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25886   cat conftest.in >> conftest.h
25887   rm -f conftest.in
25888   if cmp -s $ac_file conftest.h 2>/dev/null; then
25889     echo "$ac_file is unchanged"
25890     rm -f conftest.h
25891   else
25892     # Remove last slash and all that follows it.  Not all systems have dirname.
25893       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25894       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25895       # The file is in a subdirectory.
25896       test ! -d "$ac_dir" && mkdir "$ac_dir"
25897     fi
25898     rm -f $ac_file
25899     mv conftest.h $ac_file
25900   fi
25901 fi; done
25902
25903 EOF
25904 cat >> $CONFIG_STATUS <<EOF
25905 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25906 EOF
25907 cat >> $CONFIG_STATUS <<\EOF
25908
25909 chmod +x tests/run
25910 date > stamp-h
25911 BACKENDSC="servers/slapd/backends.c"
25912 echo "Making $BACKENDSC"
25913 rm -f $BACKENDSC
25914 cat > $BACKENDSC << ENDX
25915 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25916  *
25917  * Copyright 1998-2005 The OpenLDAP Foundation.
25918  * All rights reserved.
25919  *
25920  * Redistribution and use in source and binary forms, with or without
25921  * modification, are permitted only as authorized by the OpenLDAP
25922  * Public License.
25923  *
25924  * A copy of this license is available in the file LICENSE in the
25925  * top-level directory of the distribution or, alternatively, at
25926  * <http://www.OpenLDAP.org/license.html>.
25927  */
25928 /* This file is automatically generated by configure; please do not edit. */
25929
25930 #include "portable.h"
25931 #include "slap.h"
25932
25933 ENDX
25934 if test "${STATIC_BACKENDS}"; then
25935         for b in config ${STATIC_BACKENDS}; do
25936                 bb=`echo "${b}" | sed -e 's/back-//'`
25937                 cat >> $BACKENDSC << ENDX
25938 extern BI_init ${bb}_back_initialize;
25939 ENDX
25940         done
25941
25942         cat >> $BACKENDSC << ENDX
25943
25944 BackendInfo slap_binfo[] = {
25945 ENDX
25946
25947         for b in config ${STATIC_BACKENDS}; do
25948                 bb=`echo "${b}" | sed -e 's/back-//'`
25949                 echo "    Add ${bb} ..."
25950                 cat >> $BACKENDSC << ENDX
25951         { "${bb}", ${bb}_back_initialize },
25952 ENDX
25953         done
25954
25955         cat >> $BACKENDSC << ENDX
25956         { NULL, NULL },
25957 };
25958
25959 /* end of generated file */
25960 ENDX
25961 fi
25962
25963 echo Please run \"make depend\" to build dependencies
25964
25965 exit 0
25966 EOF
25967 chmod +x $CONFIG_STATUS
25968 rm -fr confdefs* $ac_clean_files
25969 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25970