]> git.sur5r.net Git - openldap/blob - configure
fix ITS#3406 wrt/ dnattr; silence warning
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.562 2005/01/09 07:42:50 kurt 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 [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-chain        LDAP Chain Response no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-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-unique       Attribute Uniqueness overlay no|yes|mod [no]"
150 ac_help="$ac_help
151
152 SLURPD (Replication Daemon) Options:"
153 ac_help="$ac_help
154   --enable-slurpd         enable building slurpd [auto]"
155 ac_help="$ac_help
156
157 Library Generation & Linking Options"
158 ac_help="$ac_help
159   --enable-static[=PKGS]  build static libraries [default=yes]"
160 ac_help="$ac_help
161   --enable-shared[=PKGS]  build shared libraries [default=yes]"
162 ac_help="$ac_help
163   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
164 ac_help="$ac_help
165   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
166
167 # Find the correct PATH separator.  Usually this is `:', but
168 # DJGPP uses `;' like DOS.
169 if test "X${PATH_SEPARATOR+set}" != Xset; then
170   UNAME=${UNAME-`uname 2>/dev/null`}
171   case X$UNAME in
172     *-DOS) lt_cv_sys_path_separator=';' ;;
173     *)     lt_cv_sys_path_separator=':' ;;
174   esac
175   PATH_SEPARATOR=$lt_cv_sys_path_separator
176 fi
177
178
179 # Check that we are running under the correct shell.
180 SHELL=${CONFIG_SHELL-/bin/sh}
181
182 case X$ECHO in
183 X*--fallback-echo)
184   # Remove one level of quotation (which was required for Make).
185   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
186   ;;
187 esac
188
189 echo=${ECHO-echo}
190 if test "X$1" = X--no-reexec; then
191   # Discard the --no-reexec flag, and continue.
192   shift
193 elif test "X$1" = X--fallback-echo; then
194   # Avoid inline document here, it may be left over
195   :
196 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
197   # Yippee, $echo works!
198   :
199 else
200   # Restart under the correct shell.
201   exec $SHELL "$0" --no-reexec ${1+"$@"}
202 fi
203
204 if test "X$1" = X--fallback-echo; then
205   # used as fallback echo
206   shift
207   cat <<EOF
208
209 EOF
210   exit 0
211 fi
212
213 # The HP-UX ksh and POSIX shell print the target directory to stdout
214 # if CDPATH is set.
215 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
216
217 if test -z "$ECHO"; then
218 if test "X${echo_test_string+set}" != Xset; then
219 # find a string as large as possible, as long as the shell can cope with it
220   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
221     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
222     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
223        echo_test_string="`eval $cmd`" &&
224        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
225     then
226       break
227     fi
228   done
229 fi
230
231 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
232    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
233    test "X$echo_testing_string" = "X$echo_test_string"; then
234   :
235 else
236   # The Solaris, AIX, and Digital Unix default echo programs unquote
237   # backslashes.  This makes it impossible to quote backslashes using
238   #   echo "$something" | sed 's/\\/\\\\/g'
239   #
240   # So, first we look for a working echo in the user's PATH.
241
242   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
243   for dir in $PATH /usr/ucb; do
244     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
245        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
246        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
247        test "X$echo_testing_string" = "X$echo_test_string"; then
248       echo="$dir/echo"
249       break
250     fi
251   done
252   IFS="$save_ifs"
253
254   if test "X$echo" = Xecho; then
255     # We didn't find a better echo, so look for alternatives.
256     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
257        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
258        test "X$echo_testing_string" = "X$echo_test_string"; then
259       # This shell has a builtin print -r that does the trick.
260       echo='print -r'
261     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
262          test "X$CONFIG_SHELL" != X/bin/ksh; then
263       # If we have ksh, try running configure again with it.
264       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
265       export ORIGINAL_CONFIG_SHELL
266       CONFIG_SHELL=/bin/ksh
267       export CONFIG_SHELL
268       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
269     else
270       # Try using printf.
271       echo='printf %s\n'
272       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
273          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
274          test "X$echo_testing_string" = "X$echo_test_string"; then
275         # Cool, printf works
276         :
277       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
282         export CONFIG_SHELL
283         SHELL="$CONFIG_SHELL"
284         export SHELL
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
287            test "X$echo_testing_string" = 'X\t' &&
288            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
289            test "X$echo_testing_string" = "X$echo_test_string"; then
290         echo="$CONFIG_SHELL $0 --fallback-echo"
291       else
292         # maybe with a smaller string...
293         prev=:
294
295         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
296           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
297           then
298             break
299           fi
300           prev="$cmd"
301         done
302
303         if test "$prev" != 'sed 50q "$0"'; then
304           echo_test_string=`eval $prev`
305           export echo_test_string
306           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
307         else
308           # Oops.  We lost completely, so just stick with echo.
309           echo=echo
310         fi
311       fi
312     fi
313   fi
314 fi
315 fi
316
317 # Copy echo and quote the copy suitably for passing to libtool from
318 # the Makefile, instead of quoting the original, which is used later.
319 ECHO=$echo
320 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
321    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
322 fi
323
324
325 ac_help="$ac_help
326   --disable-libtool-lock  avoid locking (might break parallel builds)"
327 ac_help="$ac_help
328   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
329 ac_help="$ac_help
330
331 See INSTALL file for further details."
332
333 # Initialize some variables set by options.
334 # The variables have the same names as the options, with
335 # dashes changed to underlines.
336 build=NONE
337 cache_file=./config.cache
338 exec_prefix=NONE
339 host=NONE
340 no_create=
341 nonopt=NONE
342 no_recursion=
343 prefix=NONE
344 program_prefix=NONE
345 program_suffix=NONE
346 program_transform_name=s,x,x,
347 silent=
348 site=
349 srcdir=
350 target=NONE
351 verbose=
352 x_includes=NONE
353 x_libraries=NONE
354 bindir='${exec_prefix}/bin'
355 sbindir='${exec_prefix}/sbin'
356 libexecdir='${exec_prefix}/libexec'
357 datadir='${prefix}/share'
358 sysconfdir='${prefix}/etc'
359 sharedstatedir='${prefix}/com'
360 localstatedir='${prefix}/var'
361 libdir='${exec_prefix}/lib'
362 includedir='${prefix}/include'
363 oldincludedir='/usr/include'
364 infodir='${prefix}/info'
365 mandir='${prefix}/man'
366
367 # Initialize some other variables.
368 subdirs=
369 MFLAGS= MAKEFLAGS=
370 SHELL=${CONFIG_SHELL-/bin/sh}
371 # Maximum number of lines to put in a shell here document.
372 ac_max_here_lines=12
373
374 ac_prev=
375 for ac_option
376 do
377
378   # If the previous option needs an argument, assign it.
379   if test -n "$ac_prev"; then
380     eval "$ac_prev=\$ac_option"
381     ac_prev=
382     continue
383   fi
384
385   case "$ac_option" in
386   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
387   *) ac_optarg= ;;
388   esac
389
390   # Accept the important Cygnus configure options, so we can diagnose typos.
391
392   case "$ac_option" in
393
394   -bindir | --bindir | --bindi | --bind | --bin | --bi)
395     ac_prev=bindir ;;
396   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
397     bindir="$ac_optarg" ;;
398
399   -build | --build | --buil | --bui | --bu)
400     ac_prev=build ;;
401   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
402     build="$ac_optarg" ;;
403
404   -cache-file | --cache-file | --cache-fil | --cache-fi \
405   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
406     ac_prev=cache_file ;;
407   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
408   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
409     cache_file="$ac_optarg" ;;
410
411   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
412     ac_prev=datadir ;;
413   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
414   | --da=*)
415     datadir="$ac_optarg" ;;
416
417   -disable-* | --disable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     eval "enable_${ac_feature}=no" ;;
425
426   -enable-* | --enable-*)
427     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
428     # Reject names that are not valid shell variable names.
429     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
430       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
431     fi
432     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
433     case "$ac_option" in
434       *=*) ;;
435       *) ac_optarg=yes ;;
436     esac
437     eval "enable_${ac_feature}='$ac_optarg'" ;;
438
439   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
440   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
441   | --exec | --exe | --ex)
442     ac_prev=exec_prefix ;;
443   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
444   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
445   | --exec=* | --exe=* | --ex=*)
446     exec_prefix="$ac_optarg" ;;
447
448   -gas | --gas | --ga | --g)
449     # Obsolete; use --with-gas.
450     with_gas=yes ;;
451
452   -help | --help | --hel | --he)
453     # Omit some internal or obsolete options to make the list less imposing.
454     # This message is too long to be a string in the A/UX 3.1 sh.
455     cat << EOF
456 Usage: configure [options] [host]
457 Options: [defaults in brackets after descriptions]
458 Configuration:
459   --cache-file=FILE       cache test results in FILE
460   --help                  print this message
461   --no-create             do not create output files
462   --quiet, --silent       do not print \`checking...' messages
463   --version               print the version of autoconf that created configure
464 Directory and file names:
465   --prefix=PREFIX         install architecture-independent files in PREFIX
466                           [$ac_default_prefix]
467   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
468                           [same as prefix]
469   --bindir=DIR            user executables in DIR [EPREFIX/bin]
470   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
471   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
472   --datadir=DIR           read-only architecture-independent data in DIR
473                           [PREFIX/share]
474   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
475   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
476                           [PREFIX/com]
477   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
478   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
479   --includedir=DIR        C header files in DIR [PREFIX/include]
480   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
481   --infodir=DIR           info documentation in DIR [PREFIX/info]
482   --mandir=DIR            man documentation in DIR [PREFIX/man]
483   --srcdir=DIR            find the sources in DIR [configure dir or ..]
484   --program-prefix=PREFIX prepend PREFIX to installed program names
485   --program-suffix=SUFFIX append SUFFIX to installed program names
486   --program-transform-name=PROGRAM
487                           run sed PROGRAM on installed program names
488 EOF
489     cat << EOF
490 Host type:
491   --build=BUILD           configure for building on BUILD [BUILD=HOST]
492   --host=HOST             configure for HOST [guessed]
493   --target=TARGET         configure for TARGET [TARGET=HOST]
494 Features and packages:
495   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
496   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
497   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
498   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
499   --x-includes=DIR        X include files are in DIR
500   --x-libraries=DIR       X library files are in DIR
501 EOF
502     if test -n "$ac_help"; then
503       echo "--enable and --with options recognized:$ac_help"
504     fi
505     exit 0 ;;
506
507   -host | --host | --hos | --ho)
508     ac_prev=host ;;
509   -host=* | --host=* | --hos=* | --ho=*)
510     host="$ac_optarg" ;;
511
512   -includedir | --includedir | --includedi | --included | --include \
513   | --includ | --inclu | --incl | --inc)
514     ac_prev=includedir ;;
515   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
516   | --includ=* | --inclu=* | --incl=* | --inc=*)
517     includedir="$ac_optarg" ;;
518
519   -infodir | --infodir | --infodi | --infod | --info | --inf)
520     ac_prev=infodir ;;
521   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
522     infodir="$ac_optarg" ;;
523
524   -libdir | --libdir | --libdi | --libd)
525     ac_prev=libdir ;;
526   -libdir=* | --libdir=* | --libdi=* | --libd=*)
527     libdir="$ac_optarg" ;;
528
529   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
530   | --libexe | --libex | --libe)
531     ac_prev=libexecdir ;;
532   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
533   | --libexe=* | --libex=* | --libe=*)
534     libexecdir="$ac_optarg" ;;
535
536   -localstatedir | --localstatedir | --localstatedi | --localstated \
537   | --localstate | --localstat | --localsta | --localst \
538   | --locals | --local | --loca | --loc | --lo)
539     ac_prev=localstatedir ;;
540   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
541   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
542   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
543     localstatedir="$ac_optarg" ;;
544
545   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
546     ac_prev=mandir ;;
547   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
548     mandir="$ac_optarg" ;;
549
550   -nfp | --nfp | --nf)
551     # Obsolete; use --without-fp.
552     with_fp=no ;;
553
554   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555   | --no-cr | --no-c)
556     no_create=yes ;;
557
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
560     no_recursion=yes ;;
561
562   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
563   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
564   | --oldin | --oldi | --old | --ol | --o)
565     ac_prev=oldincludedir ;;
566   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
567   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
568   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
569     oldincludedir="$ac_optarg" ;;
570
571   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
572     ac_prev=prefix ;;
573   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
574     prefix="$ac_optarg" ;;
575
576   -program-prefix | --program-prefix | --program-prefi | --program-pref \
577   | --program-pre | --program-pr | --program-p)
578     ac_prev=program_prefix ;;
579   -program-prefix=* | --program-prefix=* | --program-prefi=* \
580   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
581     program_prefix="$ac_optarg" ;;
582
583   -program-suffix | --program-suffix | --program-suffi | --program-suff \
584   | --program-suf | --program-su | --program-s)
585     ac_prev=program_suffix ;;
586   -program-suffix=* | --program-suffix=* | --program-suffi=* \
587   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
588     program_suffix="$ac_optarg" ;;
589
590   -program-transform-name | --program-transform-name \
591   | --program-transform-nam | --program-transform-na \
592   | --program-transform-n | --program-transform- \
593   | --program-transform | --program-transfor \
594   | --program-transfo | --program-transf \
595   | --program-trans | --program-tran \
596   | --progr-tra | --program-tr | --program-t)
597     ac_prev=program_transform_name ;;
598   -program-transform-name=* | --program-transform-name=* \
599   | --program-transform-nam=* | --program-transform-na=* \
600   | --program-transform-n=* | --program-transform-=* \
601   | --program-transform=* | --program-transfor=* \
602   | --program-transfo=* | --program-transf=* \
603   | --program-trans=* | --program-tran=* \
604   | --progr-tra=* | --program-tr=* | --program-t=*)
605     program_transform_name="$ac_optarg" ;;
606
607   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
608   | -silent | --silent | --silen | --sile | --sil)
609     silent=yes ;;
610
611   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
612     ac_prev=sbindir ;;
613   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
614   | --sbi=* | --sb=*)
615     sbindir="$ac_optarg" ;;
616
617   -sharedstatedir | --sharedstatedir | --sharedstatedi \
618   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
619   | --sharedst | --shareds | --shared | --share | --shar \
620   | --sha | --sh)
621     ac_prev=sharedstatedir ;;
622   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
623   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
624   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
625   | --sha=* | --sh=*)
626     sharedstatedir="$ac_optarg" ;;
627
628   -site | --site | --sit)
629     ac_prev=site ;;
630   -site=* | --site=* | --sit=*)
631     site="$ac_optarg" ;;
632
633   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
634     ac_prev=srcdir ;;
635   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
636     srcdir="$ac_optarg" ;;
637
638   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
639   | --syscon | --sysco | --sysc | --sys | --sy)
640     ac_prev=sysconfdir ;;
641   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
642   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
643     sysconfdir="$ac_optarg" ;;
644
645   -target | --target | --targe | --targ | --tar | --ta | --t)
646     ac_prev=target ;;
647   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
648     target="$ac_optarg" ;;
649
650   -v | -verbose | --verbose | --verbos | --verbo | --verb)
651     verbose=yes ;;
652
653   -version | --version | --versio | --versi | --vers)
654     echo "configure generated by autoconf version 2.13.1"
655     exit 0 ;;
656
657   -with-* | --with-*)
658     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     case "$ac_option" in
665       *=*) ;;
666       *) ac_optarg=yes ;;
667     esac
668     eval "with_${ac_package}='$ac_optarg'" ;;
669
670   -without-* | --without-*)
671     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
672     # Reject names that are not valid shell variable names.
673     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
674       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
675     fi
676     ac_package=`echo $ac_package| sed 's/-/_/g'`
677     eval "with_${ac_package}=no" ;;
678
679   --x)
680     # Obsolete; use --with-x.
681     with_x=yes ;;
682
683   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
684   | --x-incl | --x-inc | --x-in | --x-i)
685     ac_prev=x_includes ;;
686   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
687   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
688     x_includes="$ac_optarg" ;;
689
690   -x-libraries | --x-libraries | --x-librarie | --x-librari \
691   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
692     ac_prev=x_libraries ;;
693   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
694   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
695     x_libraries="$ac_optarg" ;;
696
697   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
698     ;;
699
700   *)
701     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
702       echo "configure: warning: $ac_option: invalid host type" 1>&2
703     fi
704     if test "x$nonopt" != xNONE; then
705       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
706     fi
707     nonopt="$ac_option"
708     ;;
709
710   esac
711 done
712
713 if test -n "$ac_prev"; then
714   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
715 fi
716
717 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
718
719 # File descriptor usage:
720 # 0 standard input
721 # 1 file creation
722 # 2 errors and warnings
723 # 3 some systems may open it to /dev/tty
724 # 4 used on the Kubota Titan
725 # 6 checking for... messages and results
726 # 5 compiler messages saved in config.log
727 if test "$silent" = yes; then
728   exec 6>/dev/null
729 else
730   exec 6>&1
731 fi
732 exec 5>./config.log
733
734 echo "\
735 This file contains any messages produced by compilers while
736 running configure, to aid debugging if configure makes a mistake.
737 " 1>&5
738
739 # Strip out --no-create and --no-recursion so they do not pile up.
740 # Also quote any args containing shell metacharacters.
741 ac_configure_args=
742 for ac_arg
743 do
744   case "$ac_arg" in
745   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
746   | --no-cr | --no-c) ;;
747   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
748   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
749   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
750   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
751   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
752   esac
753 done
754
755 # NLS nuisances.
756 # Only set these to C if already set.  These must not be set unconditionally
757 # because not all systems understand e.g. LANG=C (notably SCO).
758 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
759 # Non-C LC_CTYPE values break the ctype check.
760 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
761 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
762 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
763 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
764
765 # confdefs.h avoids OS command line length limits that DEFS can exceed.
766 rm -rf conftest* confdefs.h
767 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
768 echo > confdefs.h
769
770 # A filename unique to this package, relative to the directory that
771 # configure is in, which we can look for to find out if srcdir is correct.
772 ac_unique_file=build/version.sh
773
774 # Find the source files, if location was not specified.
775 if test -z "$srcdir"; then
776   ac_srcdir_defaulted=yes
777   # Try the directory containing this script, then its parent.
778   ac_prog=$0
779   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
780   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
781   srcdir=$ac_confdir
782   if test ! -r $srcdir/$ac_unique_file; then
783     srcdir=..
784   fi
785 else
786   ac_srcdir_defaulted=no
787 fi
788 if test ! -r $srcdir/$ac_unique_file; then
789   if test "$ac_srcdir_defaulted" = yes; then
790     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
791   else
792     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
793   fi
794 fi
795 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
796
797 # Prefer explicitly selected file to automatically selected ones.
798 if test -z "$CONFIG_SITE"; then
799   if test "x$prefix" != xNONE; then
800     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
801   else
802     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
803   fi
804 fi
805 for ac_site_file in $CONFIG_SITE; do
806   if test -r "$ac_site_file"; then
807     echo "loading site script $ac_site_file"
808     . "$ac_site_file"
809   fi
810 done
811
812
813 ac_ext=c
814 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
815 ac_cpp='$CPP $CPPFLAGS'
816 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
817 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
818 cross_compiling=$ac_cv_prog_cc_cross
819
820 ac_exeext=
821 ac_objext=o
822 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
823   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
824   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
825     ac_n= ac_c='
826 ' ac_t='        '
827   else
828     ac_n=-n ac_c= ac_t=
829   fi
830 else
831   ac_n= ac_c='\c' ac_t=
832 fi
833
834
835 # set unset (borrowed from autoconf 2.49c)
836 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
837   ol_unset=unset
838 else
839   ol_unset=false
840 fi
841 # unset CDPATH
842 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
843
844 ac_aux_dir=
845 for ac_dir in build $srcdir/build; do
846   if test -f $ac_dir/install-sh; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/install-sh -c"
849     break
850   elif test -f $ac_dir/install.sh; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/install.sh -c"
853     break
854   elif test -f $ac_dir/shtool; then
855     ac_aux_dir=$ac_dir
856     ac_install_sh="$ac_aux_dir/shtool install -c"
857     break
858   fi
859 done
860 if test -z "$ac_aux_dir"; then
861   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
862 fi
863 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
864 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
865 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
866
867 eval `$ac_aux_dir/version.sh`
868 if test -z "$OL_STRING"; then
869         { echo "configure: error: could not determine version" 1>&2; exit 1; }
870 fi
871
872 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
873         ac_cv_shtool="$ac_aux_dir/shtool"
874 else
875         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
876 fi
877
878 SHTOOL="$ac_cv_shtool"
879
880 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
881 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
882
883 OPENLDAP_CVS=""
884 if test -d $ac_aux_dir/CVS; then
885         OPENLDAP_CVS="(from CVS sources) "
886 fi
887
888 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
889
890
891 echo $ac_n "checking host system type""... $ac_c" 1>&6
892 echo "configure:893: checking host system type" >&5
893 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
894
895 # Make sure we can run config.sub.
896   if $ac_config_sub sun4 >/dev/null 2>&1; then :
897     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
898   fi
899
900   ac_cv_host_alias=$host
901   case "$ac_cv_host_alias" in
902   NONE)
903     case $nonopt in
904     NONE)
905       if ac_cv_host_alias=`$ac_config_guess`; then :
906       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
907       fi ;;
908     *) ac_cv_host_alias=$nonopt ;;
909     esac ;;
910   esac
911
912   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
913   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
914   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
915   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
916 else
917   echo $ac_n "(cached) $ac_c" 1>&6
918 fi
919
920 echo "$ac_t""$ac_cv_host" 1>&6
921
922 host=$ac_cv_host
923 host_alias=$ac_cv_host_alias
924 host_cpu=$ac_cv_host_cpu
925 host_vendor=$ac_cv_host_vendor
926 host_os=$ac_cv_host_os
927
928
929
930
931
932 echo $ac_n "checking target system type""... $ac_c" 1>&6
933 echo "configure:934: checking target system type" >&5
934 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
935
936 # Make sure we can run config.sub.
937   if $ac_config_sub sun4 >/dev/null 2>&1; then :
938     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
939   fi
940
941   ac_cv_target_alias=$target
942   case "$ac_cv_target_alias" in
943   NONE)
944     case $nonopt in
945     NONE)
946       ac_cv_target_alias=$host_alias ;;
947
948     *) ac_cv_target_alias=$nonopt ;;
949     esac ;;
950   esac
951
952   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
953   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
954   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
955   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
956 else
957   echo $ac_n "(cached) $ac_c" 1>&6
958 fi
959
960 echo "$ac_t""$ac_cv_target" 1>&6
961
962 target=$ac_cv_target
963 target_alias=$ac_cv_target_alias
964 target_cpu=$ac_cv_target_cpu
965 target_vendor=$ac_cv_target_vendor
966 target_os=$ac_cv_target_os
967
968
969
970
971
972 echo $ac_n "checking build system type""... $ac_c" 1>&6
973 echo "configure:974: checking build system type" >&5
974 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
975
976 # Make sure we can run config.sub.
977   if $ac_config_sub sun4 >/dev/null 2>&1; then :
978     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
979   fi
980
981   ac_cv_build_alias=$build
982   case "$ac_cv_build_alias" in
983   NONE)
984     case $nonopt in
985     NONE)
986       ac_cv_build_alias=$host_alias ;;
987
988     *) ac_cv_build_alias=$nonopt ;;
989     esac ;;
990   esac
991
992   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
993   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
994   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
995   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
996 else
997   echo $ac_n "(cached) $ac_c" 1>&6
998 fi
999
1000 echo "$ac_t""$ac_cv_build" 1>&6
1001
1002 build=$ac_cv_build
1003 build_alias=$ac_cv_build_alias
1004 build_cpu=$ac_cv_build_cpu
1005 build_vendor=$ac_cv_build_vendor
1006 build_os=$ac_cv_build_os
1007
1008
1009
1010
1011
1012 # Do some error checking and defaulting for the host and target type.
1013 # The inputs are:
1014 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1015 #
1016 # The rules are:
1017 # 1. You are not allowed to specify --host, --target, and nonopt at the
1018 #    same time.
1019 # 2. Host defaults to nonopt.
1020 # 3. If nonopt is not specified, then host defaults to the current host,
1021 #    as determined by config.guess.
1022 # 4. Target and build default to nonopt.
1023 # 5. If nonopt is not specified, then target and build default to host.
1024
1025 # The aliases save the names the user supplied, while $host etc.
1026 # will get canonicalized.
1027 case $host---$target---$nonopt in
1028 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1029 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1030 esac
1031
1032 test "$host_alias" != "$target_alias" &&
1033   test "$program_prefix$program_suffix$program_transform_name" = \
1034     NONENONEs,x,x, &&
1035   program_prefix=${target_alias}-
1036
1037
1038 # Find a good install program.  We prefer a C program (faster),
1039 # so one script is as good as another.  But avoid the broken or
1040 # incompatible versions:
1041 # SysV /etc/install, /usr/sbin/install
1042 # SunOS /usr/etc/install
1043 # IRIX /sbin/install
1044 # AIX /bin/install
1045 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1046 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1047 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1048 # ./install, which can be erroneously created by make from ./install.sh.
1049 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1050 echo "configure:1051: checking for a BSD compatible install" >&5
1051 if test -z "$INSTALL"; then
1052 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1053   echo $ac_n "(cached) $ac_c" 1>&6
1054 else
1055     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1056   for ac_dir in $PATH; do
1057     # Account for people who put trailing slashes in PATH elements.
1058     case "$ac_dir/" in
1059     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1060     *)
1061       # OSF1 and SCO ODT 3.0 have their own names for install.
1062       # Don't use installbsd from OSF since it installs stuff as root
1063       # by default.
1064       for ac_prog in ginstall scoinst install; do
1065         if test -f $ac_dir/$ac_prog; then
1066           if test $ac_prog = install &&
1067             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1068             # AIX install.  It has an incompatible calling convention.
1069             :
1070           elif test $ac_prog = install &&
1071             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1072             # program-specific install script used by HP pwplus--don't use.
1073             :
1074           else
1075             ac_cv_path_install="$ac_dir/$ac_prog -c"
1076             break 2
1077           fi
1078         fi
1079       done
1080       ;;
1081     esac
1082   done
1083   IFS="$ac_save_IFS"
1084
1085 fi
1086   if test "${ac_cv_path_install+set}" = set; then
1087     INSTALL="$ac_cv_path_install"
1088   else
1089     # As a last resort, use the slow shell script.  We don't cache a
1090     # path for INSTALL within a source directory, because that will
1091     # break other packages using the cache if that directory is
1092     # removed, or if the path is relative.
1093     INSTALL="$ac_install_sh"
1094   fi
1095 fi
1096 echo "$ac_t""$INSTALL" 1>&6
1097
1098 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1099 # It thinks the first close brace ends the variable substitution.
1100 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1101
1102 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1103
1104 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1105
1106 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1107 echo "configure:1108: checking whether build environment is sane" >&5
1108 # Just in case
1109 sleep 1
1110 echo timestamp > conftestfile
1111 # Do `set' in a subshell so we don't clobber the current shell's
1112 # arguments.  Must try -L first in case configure is actually a
1113 # symlink; some systems play weird games with the mod time of symlinks
1114 # (eg FreeBSD returns the mod time of the symlink's containing
1115 # directory).
1116 if (
1117    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1118    if test "$*" = "X"; then
1119       # -L didn't work.
1120       set X `ls -t $srcdir/configure conftestfile`
1121    fi
1122    if test "$*" != "X $srcdir/configure conftestfile" \
1123       && test "$*" != "X conftestfile $srcdir/configure"; then
1124
1125       # If neither matched, then we have a broken ls.  This can happen
1126       # if, for instance, CONFIG_SHELL is bash and it inherits a
1127       # broken ls alias from the environment.  This has actually
1128       # happened.  Such a system could not be considered "sane".
1129       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1130 alias in your environment" 1>&2; exit 1; }
1131    fi
1132
1133    test "$2" = conftestfile
1134    )
1135 then
1136    # Ok.
1137    :
1138 else
1139    { echo "configure: error: newly created file is older than distributed files!
1140 Check your system clock" 1>&2; exit 1; }
1141 fi
1142 rm -f conftest*
1143 echo "$ac_t""yes" 1>&6
1144 if test "$program_transform_name" = s,x,x,; then
1145   program_transform_name=
1146 else
1147   # Double any \ or $.  echo might interpret backslashes.
1148   cat <<\EOF_SED > conftestsed
1149 s,\\,\\\\,g; s,\$,$$,g
1150 EOF_SED
1151   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1152   rm -f conftestsed
1153 fi
1154 test "$program_prefix" != NONE &&
1155   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1156 # Use a double $ so make ignores it.
1157 test "$program_suffix" != NONE &&
1158   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1159
1160 # sed with no file args requires a program.
1161 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1162
1163 for ac_prog in mawk gawk nawk awk
1164 do
1165 # Extract the first word of "$ac_prog", so it can be a program name with args.
1166 set dummy $ac_prog; ac_word=$2
1167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1168 echo "configure:1169: checking for $ac_word" >&5
1169 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   if test -n "$AWK"; then
1173   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1174 else
1175   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1176   ac_dummy="$PATH"
1177   for ac_dir in $ac_dummy; do
1178     test -z "$ac_dir" && ac_dir=.
1179     if test -f $ac_dir/$ac_word; then
1180       ac_cv_prog_AWK="$ac_prog"
1181       break
1182     fi
1183   done
1184   IFS="$ac_save_ifs"
1185 fi
1186 fi
1187 AWK="$ac_cv_prog_AWK"
1188 if test -n "$AWK"; then
1189   echo "$ac_t""$AWK" 1>&6
1190 else
1191   echo "$ac_t""no" 1>&6
1192 fi
1193
1194 test -n "$AWK" && break
1195 done
1196
1197 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1198 echo "configure:1199: checking whether ${MAKE-make} sets \${MAKE}" >&5
1199 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1200 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftestmake <<\EOF
1204 all:
1205         @echo 'ac_maketemp="${MAKE}"'
1206 EOF
1207 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1208 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1209 if test -n "$ac_maketemp"; then
1210   eval ac_cv_prog_make_${ac_make}_set=yes
1211 else
1212   eval ac_cv_prog_make_${ac_make}_set=no
1213 fi
1214 rm -f conftestmake
1215 fi
1216 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1217   echo "$ac_t""yes" 1>&6
1218   SET_MAKE=
1219 else
1220   echo "$ac_t""no" 1>&6
1221   SET_MAKE="MAKE=${MAKE-make}"
1222 fi
1223
1224
1225
1226 PACKAGE=$OL_PACKAGE
1227
1228 VERSION=$OL_VERSION
1229
1230 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1231   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1232 fi
1233
1234
1235
1236 missing_dir=`cd $ac_aux_dir && pwd`
1237 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working aclocal" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1243    ACLOCAL=aclocal
1244    echo "$ac_t""found" 1>&6
1245 else
1246    ACLOCAL="$missing_dir/missing aclocal"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working autoconf" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOCONF=autoconf
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOCONF="$missing_dir/missing autoconf"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working automake" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (automake --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOMAKE=automake
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOMAKE="$missing_dir/missing automake"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working autoheader" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1282    AUTOHEADER=autoheader
1283    echo "$ac_t""found" 1>&6
1284 else
1285    AUTOHEADER="$missing_dir/missing autoheader"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1290 echo "configure:1291: checking for working makeinfo" >&5
1291 # Run test in a subshell; some versions of sh will print an error if
1292 # an executable is not found, even if stderr is redirected.
1293 # Redirect stdin to placate older versions of autoconf.  Sigh.
1294 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1295    MAKEINFO=makeinfo
1296    echo "$ac_t""found" 1>&6
1297 else
1298    MAKEINFO="$missing_dir/missing makeinfo"
1299    echo "$ac_t""missing" 1>&6
1300 fi
1301
1302 install_sh="$missing_dir/install-sh"
1303 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1304
1305 for ac_prog in gnutar gtar tar
1306 do
1307 # Extract the first word of "$ac_prog", so it can be a program name with args.
1308 set dummy $ac_prog; ac_word=$2
1309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310 echo "configure:1311: checking for $ac_word" >&5
1311 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1312   echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314   if test -n "$AMTAR"; then
1315   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1316 else
1317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1318   ac_dummy="$PATH"
1319   for ac_dir in $ac_dummy; do
1320     test -z "$ac_dir" && ac_dir=.
1321     if test -f $ac_dir/$ac_word; then
1322       ac_cv_prog_AMTAR="$ac_prog"
1323       break
1324     fi
1325   done
1326   IFS="$ac_save_ifs"
1327 fi
1328 fi
1329 AMTAR="$ac_cv_prog_AMTAR"
1330 if test -n "$AMTAR"; then
1331   echo "$ac_t""$AMTAR" 1>&6
1332 else
1333   echo "$ac_t""no" 1>&6
1334 fi
1335
1336 test -n "$AMTAR" && break
1337 done
1338
1339
1340 AMTARFLAGS=
1341 if test -n "$AMTAR"; then
1342   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1343         AMTARFLAGS=o
1344   fi
1345 fi
1346
1347 cat >> confdefs.h <<EOF
1348 #define OPENLDAP_PACKAGE "$PACKAGE"
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define OPENLDAP_VERSION "$VERSION"
1353 EOF
1354
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION $OL_API_INC
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1366 EOF
1367
1368 cat >> confdefs.h <<EOF
1369 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1370 EOF
1371
1372
1373 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1374
1375 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1376
1377 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1378
1379
1380
1381 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1382 echo "configure:1383: checking configure arguments" >&5
1383
1384
1385 top_builddir=`pwd`
1386
1387 ldap_subdir="/openldap"
1388
1389 # Check whether --with-subdir or --without-subdir was given.
1390 if test "${with_subdir+set}" = set; then
1391   withval="$with_subdir"
1392   case "$withval" in
1393         no) ldap_subdir=""
1394                 ;;
1395         yes)
1396                 ;;
1397         /*|\\*)
1398                 ldap_subdir="$withval"
1399                 ;;
1400         *)
1401                 ldap_subdir="/$withval"
1402                 ;;
1403 esac
1404
1405 fi
1406
1407
1408 # OpenLDAP --enable-debug
1409         # Check whether --enable-debug or --disable-debug was given.
1410 if test "${enable_debug+set}" = set; then
1411   enableval="$enable_debug"
1412   
1413         ol_arg=invalid
1414         for ol_val in auto yes no ; do
1415                 if test "$enableval" = "$ol_val" ; then
1416                         ol_arg="$ol_val"
1417                 fi
1418         done
1419         if test "$ol_arg" = "invalid" ; then
1420                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1421         fi
1422         ol_enable_debug="$ol_arg"
1423
1424 else
1425         ol_enable_debug="yes"
1426 fi
1427 # end --enable-debug
1428 # OpenLDAP --enable-dynamic
1429         # Check whether --enable-dynamic or --disable-dynamic was given.
1430 if test "${enable_dynamic+set}" = set; then
1431   enableval="$enable_dynamic"
1432   
1433         ol_arg=invalid
1434         for ol_val in auto yes no ; do
1435                 if test "$enableval" = "$ol_val" ; then
1436                         ol_arg="$ol_val"
1437                 fi
1438         done
1439         if test "$ol_arg" = "invalid" ; then
1440                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1441         fi
1442         ol_enable_dynamic="$ol_arg"
1443
1444 else
1445         ol_enable_dynamic="no"
1446 fi
1447 # end --enable-dynamic
1448 # OpenLDAP --enable-syslog
1449         # Check whether --enable-syslog or --disable-syslog was given.
1450 if test "${enable_syslog+set}" = set; then
1451   enableval="$enable_syslog"
1452   
1453         ol_arg=invalid
1454         for ol_val in auto yes no ; do
1455                 if test "$enableval" = "$ol_val" ; then
1456                         ol_arg="$ol_val"
1457                 fi
1458         done
1459         if test "$ol_arg" = "invalid" ; then
1460                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1461         fi
1462         ol_enable_syslog="$ol_arg"
1463
1464 else
1465         ol_enable_syslog="auto"
1466 fi
1467 # end --enable-syslog
1468 # OpenLDAP --enable-proctitle
1469         # Check whether --enable-proctitle or --disable-proctitle was given.
1470 if test "${enable_proctitle+set}" = set; then
1471   enableval="$enable_proctitle"
1472   
1473         ol_arg=invalid
1474         for ol_val in auto yes no ; do
1475                 if test "$enableval" = "$ol_val" ; then
1476                         ol_arg="$ol_val"
1477                 fi
1478         done
1479         if test "$ol_arg" = "invalid" ; then
1480                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1481         fi
1482         ol_enable_proctitle="$ol_arg"
1483
1484 else
1485         ol_enable_proctitle="yes"
1486 fi
1487 # end --enable-proctitle
1488 ol_enable_referrals=${ol_enable_referrals-no}
1489 ol_enable_kbind=${ol_enable_kbind-no}
1490 # OpenLDAP --enable-ipv6
1491         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1492 if test "${enable_ipv6+set}" = set; then
1493   enableval="$enable_ipv6"
1494   
1495         ol_arg=invalid
1496         for ol_val in auto yes no ; do
1497                 if test "$enableval" = "$ol_val" ; then
1498                         ol_arg="$ol_val"
1499                 fi
1500         done
1501         if test "$ol_arg" = "invalid" ; then
1502                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1503         fi
1504         ol_enable_ipv6="$ol_arg"
1505
1506 else
1507         ol_enable_ipv6="auto"
1508 fi
1509 # end --enable-ipv6
1510 # OpenLDAP --enable-local
1511         # Check whether --enable-local or --disable-local was given.
1512 if test "${enable_local+set}" = set; then
1513   enableval="$enable_local"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no ; do
1517                 if test "$enableval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1523         fi
1524         ol_enable_local="$ol_arg"
1525
1526 else
1527         ol_enable_local="auto"
1528 fi
1529 # end --enable-local
1530
1531
1532 # OpenLDAP --with-cyrus_sasl
1533         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1534 if test "${with_cyrus_sasl+set}" = set; then
1535   withval="$with_cyrus_sasl"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no  ; do
1539                 if test "$withval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1545         fi
1546         ol_with_cyrus_sasl="$ol_arg"
1547
1548 else
1549         ol_with_cyrus_sasl="auto"
1550 fi
1551 # end --with-cyrus_sasl
1552
1553 # OpenLDAP --with-fetch
1554         # Check whether --with-fetch or --without-fetch was given.
1555 if test "${with_fetch+set}" = set; then
1556   withval="$with_fetch"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no  ; do
1560                 if test "$withval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1566         fi
1567         ol_with_fetch="$ol_arg"
1568
1569 else
1570         ol_with_fetch="auto"
1571 fi
1572 # end --with-fetch
1573
1574 ol_with_kerberos=${ol_with_kerberos-auto}
1575 # OpenLDAP --with-threads
1576         # Check whether --with-threads or --without-threads was given.
1577 if test "${with_threads+set}" = set; then
1578   withval="$with_threads"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1582                 if test "$withval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1588         fi
1589         ol_with_threads="$ol_arg"
1590
1591 else
1592         ol_with_threads="auto"
1593 fi
1594 # end --with-threads
1595
1596 # OpenLDAP --with-tls
1597         # Check whether --with-tls or --without-tls was given.
1598 if test "${with_tls+set}" = set; then
1599   withval="$with_tls"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto ssleay openssl yes no  ; do
1603                 if test "$withval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1609         fi
1610         ol_with_tls="$ol_arg"
1611
1612 else
1613         ol_with_tls="auto"
1614 fi
1615 # end --with-tls
1616
1617 # OpenLDAP --with-yielding_select
1618         # Check whether --with-yielding_select or --without-yielding_select was given.
1619 if test "${with_yielding_select+set}" = set; then
1620   withval="$with_yielding_select"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no manual  ; do
1624                 if test "$withval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1630         fi
1631         ol_with_yielding_select="$ol_arg"
1632
1633 else
1634         ol_with_yielding_select="auto"
1635 fi
1636 # end --with-yielding_select
1637
1638 # OpenLDAP --with-multiple_precision
1639         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1640 if test "${with_multiple_precision+set}" = set; then
1641   withval="$with_multiple_precision"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto bignum gmp yes no  ; do
1645                 if test "$withval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1651         fi
1652         ol_with_multiple_precision="$ol_arg"
1653
1654 else
1655         ol_with_multiple_precision="auto"
1656 fi
1657 # end --with-multiple_precision
1658
1659
1660
1661 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1662 if test "${with_xxslapdoptions+set}" = set; then
1663   withval="$with_xxslapdoptions"
1664   :
1665 fi
1666
1667 # OpenLDAP --enable-slapd
1668         # Check whether --enable-slapd or --disable-slapd was given.
1669 if test "${enable_slapd+set}" = set; then
1670   enableval="$enable_slapd"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1680         fi
1681         ol_enable_slapd="$ol_arg"
1682
1683 else
1684         ol_enable_slapd="yes"
1685 fi
1686 # end --enable-slapd
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-cleartext
1708         # Check whether --enable-cleartext or --disable-cleartext was given.
1709 if test "${enable_cleartext+set}" = set; then
1710   enableval="$enable_cleartext"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1720         fi
1721         ol_enable_cleartext="$ol_arg"
1722
1723 else
1724         ol_enable_cleartext="yes"
1725 fi
1726 # end --enable-cleartext
1727 # OpenLDAP --enable-crypt
1728         # Check whether --enable-crypt or --disable-crypt was given.
1729 if test "${enable_crypt+set}" = set; then
1730   enableval="$enable_crypt"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1740         fi
1741         ol_enable_crypt="$ol_arg"
1742
1743 else
1744         ol_enable_crypt="no"
1745 fi
1746 # end --enable-crypt
1747 # OpenLDAP --enable-lmpasswd
1748         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1749 if test "${enable_lmpasswd+set}" = set; then
1750   enableval="$enable_lmpasswd"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1760         fi
1761         ol_enable_lmpasswd="$ol_arg"
1762
1763 else
1764         ol_enable_lmpasswd="no"
1765 fi
1766 # end --enable-lmpasswd
1767 # OpenLDAP --enable-spasswd
1768         # Check whether --enable-spasswd or --disable-spasswd was given.
1769 if test "${enable_spasswd+set}" = set; then
1770   enableval="$enable_spasswd"
1771   
1772         ol_arg=invalid
1773         for ol_val in auto yes no ; do
1774                 if test "$enableval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1780         fi
1781         ol_enable_spasswd="$ol_arg"
1782
1783 else
1784         ol_enable_spasswd="no"
1785 fi
1786 # end --enable-spasswd
1787 # OpenLDAP --enable-modules
1788         # Check whether --enable-modules or --disable-modules was given.
1789 if test "${enable_modules+set}" = set; then
1790   enableval="$enable_modules"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1800         fi
1801         ol_enable_modules="$ol_arg"
1802
1803 else
1804         ol_enable_modules="no"
1805 fi
1806 # end --enable-modules
1807 ol_enable_multimaster=${ol_enable_multimaster-no}
1808 # OpenLDAP --enable-rewrite
1809         # Check whether --enable-rewrite or --disable-rewrite was given.
1810 if test "${enable_rewrite+set}" = set; then
1811   enableval="$enable_rewrite"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1821         fi
1822         ol_enable_rewrite="$ol_arg"
1823
1824 else
1825         ol_enable_rewrite="auto"
1826 fi
1827 # end --enable-rewrite
1828 # OpenLDAP --enable-rlookups
1829         # Check whether --enable-rlookups or --disable-rlookups was given.
1830 if test "${enable_rlookups+set}" = set; then
1831   enableval="$enable_rlookups"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1841         fi
1842         ol_enable_rlookups="$ol_arg"
1843
1844 else
1845         ol_enable_rlookups="no"
1846 fi
1847 # end --enable-rlookups
1848 # OpenLDAP --enable-slapi
1849         # Check whether --enable-slapi or --disable-slapi was given.
1850 if test "${enable_slapi+set}" = set; then
1851   enableval="$enable_slapi"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1861         fi
1862         ol_enable_slapi="$ol_arg"
1863
1864 else
1865         ol_enable_slapi="no"
1866 fi
1867 # end --enable-slapi
1868 # OpenLDAP --enable-slp
1869         # Check whether --enable-slp or --disable-slp was given.
1870 if test "${enable_slp+set}" = set; then
1871   enableval="$enable_slp"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1881         fi
1882         ol_enable_slp="$ol_arg"
1883
1884 else
1885         ol_enable_slp="no"
1886 fi
1887 # end --enable-slp
1888 # OpenLDAP --enable-wrappers
1889         # Check whether --enable-wrappers or --disable-wrappers was given.
1890 if test "${enable_wrappers+set}" = set; then
1891   enableval="$enable_wrappers"
1892   
1893         ol_arg=invalid
1894         for ol_val in auto yes no ; do
1895                 if test "$enableval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1901         fi
1902         ol_enable_wrappers="$ol_arg"
1903
1904 else
1905         ol_enable_wrappers="no"
1906 fi
1907 # end --enable-wrappers
1908
1909 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1910         passwd perl relay shell sql"
1911
1912 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1913 if test "${with_xxslapbackends+set}" = set; then
1914   withval="$with_xxslapbackends"
1915   :
1916 fi
1917
1918
1919 # OpenLDAP --enable-backends
1920         # Check whether --enable-backends or --disable-backends was given.
1921 if test "${enable_backends+set}" = set; then
1922   enableval="$enable_backends"
1923   
1924         ol_arg=invalid
1925         for ol_val in no yes mod ; do
1926                 if test "$enableval" = "$ol_val" ; then
1927                         ol_arg="$ol_val"
1928                 fi
1929         done
1930         if test "$ol_arg" = "invalid" ; then
1931                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1932         fi
1933         ol_enable_backends="$ol_arg"
1934
1935 else
1936         ol_enable_backends="no"
1937 fi
1938 # end --enable-backends
1939 # OpenLDAP --enable-bdb
1940         # Check whether --enable-bdb or --disable-bdb was given.
1941 if test "${enable_bdb+set}" = set; then
1942   enableval="$enable_bdb"
1943   
1944         ol_arg=invalid
1945         for ol_val in no yes mod ; do
1946                 if test "$enableval" = "$ol_val" ; then
1947                         ol_arg="$ol_val"
1948                 fi
1949         done
1950         if test "$ol_arg" = "invalid" ; then
1951                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1952         fi
1953         ol_enable_bdb="$ol_arg"
1954
1955 else
1956         ol_enable_bdb="yes"
1957 fi
1958 # end --enable-bdb
1959 # OpenLDAP --enable-dnssrv
1960         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1961 if test "${enable_dnssrv+set}" = set; then
1962   enableval="$enable_dnssrv"
1963   
1964         ol_arg=invalid
1965         for ol_val in no yes mod ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1972         fi
1973         ol_enable_dnssrv="$ol_arg"
1974
1975 else
1976         ol_enable_dnssrv="no"
1977 fi
1978 # end --enable-dnssrv
1979 # OpenLDAP --enable-hdb
1980         # Check whether --enable-hdb or --disable-hdb was given.
1981 if test "${enable_hdb+set}" = set; then
1982   enableval="$enable_hdb"
1983   
1984         ol_arg=invalid
1985         for ol_val in no yes mod ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1992         fi
1993         ol_enable_hdb="$ol_arg"
1994
1995 else
1996         ol_enable_hdb="no"
1997 fi
1998 # end --enable-hdb
1999 # OpenLDAP --enable-ldap
2000         # Check whether --enable-ldap or --disable-ldap was given.
2001 if test "${enable_ldap+set}" = set; then
2002   enableval="$enable_ldap"
2003   
2004         ol_arg=invalid
2005         for ol_val in no yes mod ; do
2006                 if test "$enableval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2012         fi
2013         ol_enable_ldap="$ol_arg"
2014
2015 else
2016         ol_enable_ldap="no"
2017 fi
2018 # end --enable-ldap
2019 # OpenLDAP --enable-ldbm
2020         # Check whether --enable-ldbm or --disable-ldbm was given.
2021 if test "${enable_ldbm+set}" = set; then
2022   enableval="$enable_ldbm"
2023   
2024         ol_arg=invalid
2025         for ol_val in no yes mod ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2032         fi
2033         ol_enable_ldbm="$ol_arg"
2034
2035 else
2036         ol_enable_ldbm="no"
2037 fi
2038 # end --enable-ldbm
2039 # OpenLDAP --with-ldbm_api
2040         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2041 if test "${with_ldbm_api+set}" = set; then
2042   withval="$with_ldbm_api"
2043   
2044         ol_arg=invalid
2045         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2046                 if test "$withval" = "$ol_val" ; then
2047                         ol_arg="$ol_val"
2048                 fi
2049         done
2050         if test "$ol_arg" = "invalid" ; then
2051                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2052         fi
2053         ol_with_ldbm_api="$ol_arg"
2054
2055 else
2056         ol_with_ldbm_api="auto"
2057 fi
2058 # end --with-ldbm_api
2059
2060 # OpenLDAP --with-ldbm_type
2061         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2062 if test "${with_ldbm_type+set}" = set; then
2063   withval="$with_ldbm_type"
2064   
2065         ol_arg=invalid
2066         for ol_val in auto btree hash ; do
2067                 if test "$withval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2073         fi
2074         ol_with_ldbm_type="$ol_arg"
2075
2076 else
2077         ol_with_ldbm_type="auto"
2078 fi
2079 # end --with-ldbm_type
2080
2081 # OpenLDAP --enable-meta
2082         # Check whether --enable-meta or --disable-meta was given.
2083 if test "${enable_meta+set}" = set; then
2084   enableval="$enable_meta"
2085   
2086         ol_arg=invalid
2087         for ol_val in no yes mod ; do
2088                 if test "$enableval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2094         fi
2095         ol_enable_meta="$ol_arg"
2096
2097 else
2098         ol_enable_meta="no"
2099 fi
2100 # end --enable-meta
2101 # OpenLDAP --enable-monitor
2102         # Check whether --enable-monitor or --disable-monitor was given.
2103 if test "${enable_monitor+set}" = set; then
2104   enableval="$enable_monitor"
2105   
2106         ol_arg=invalid
2107         for ol_val in no yes mod ; do
2108                 if test "$enableval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2114         fi
2115         ol_enable_monitor="$ol_arg"
2116
2117 else
2118         ol_enable_monitor="yes"
2119 fi
2120 # end --enable-monitor
2121 # OpenLDAP --enable-null
2122         # Check whether --enable-null or --disable-null was given.
2123 if test "${enable_null+set}" = set; then
2124   enableval="$enable_null"
2125   
2126         ol_arg=invalid
2127         for ol_val in no yes mod ; do
2128                 if test "$enableval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2134         fi
2135         ol_enable_null="$ol_arg"
2136
2137 else
2138         ol_enable_null="no"
2139 fi
2140 # end --enable-null
2141 # OpenLDAP --enable-passwd
2142         # Check whether --enable-passwd or --disable-passwd was given.
2143 if test "${enable_passwd+set}" = set; then
2144   enableval="$enable_passwd"
2145   
2146         ol_arg=invalid
2147         for ol_val in no yes mod ; do
2148                 if test "$enableval" = "$ol_val" ; then
2149                         ol_arg="$ol_val"
2150                 fi
2151         done
2152         if test "$ol_arg" = "invalid" ; then
2153                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2154         fi
2155         ol_enable_passwd="$ol_arg"
2156
2157 else
2158         ol_enable_passwd="no"
2159 fi
2160 # end --enable-passwd
2161 # OpenLDAP --enable-perl
2162         # Check whether --enable-perl or --disable-perl was given.
2163 if test "${enable_perl+set}" = set; then
2164   enableval="$enable_perl"
2165   
2166         ol_arg=invalid
2167         for ol_val in no yes mod ; do
2168                 if test "$enableval" = "$ol_val" ; then
2169                         ol_arg="$ol_val"
2170                 fi
2171         done
2172         if test "$ol_arg" = "invalid" ; then
2173                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2174         fi
2175         ol_enable_perl="$ol_arg"
2176
2177 else
2178         ol_enable_perl="no"
2179 fi
2180 # end --enable-perl
2181 # OpenLDAP --enable-relay
2182         # Check whether --enable-relay or --disable-relay was given.
2183 if test "${enable_relay+set}" = set; then
2184   enableval="$enable_relay"
2185   
2186         ol_arg=invalid
2187         for ol_val in no yes mod ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2194         fi
2195         ol_enable_relay="$ol_arg"
2196
2197 else
2198         ol_enable_relay="yes"
2199 fi
2200 # end --enable-relay
2201 # OpenLDAP --enable-shell
2202         # Check whether --enable-shell or --disable-shell was given.
2203 if test "${enable_shell+set}" = set; then
2204   enableval="$enable_shell"
2205   
2206         ol_arg=invalid
2207         for ol_val in no yes mod ; do
2208                 if test "$enableval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2214         fi
2215         ol_enable_shell="$ol_arg"
2216
2217 else
2218         ol_enable_shell="no"
2219 fi
2220 # end --enable-shell
2221 # OpenLDAP --enable-sql
2222         # Check whether --enable-sql or --disable-sql was given.
2223 if test "${enable_sql+set}" = set; then
2224   enableval="$enable_sql"
2225   
2226         ol_arg=invalid
2227         for ol_val in no yes mod ; do
2228                 if test "$enableval" = "$ol_val" ; then
2229                         ol_arg="$ol_val"
2230                 fi
2231         done
2232         if test "$ol_arg" = "invalid" ; then
2233                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2234         fi
2235         ol_enable_sql="$ol_arg"
2236
2237 else
2238         ol_enable_sql="no"
2239 fi
2240 # end --enable-sql
2241
2242 Overlays="chain denyop dyngroup glue lastmod ppolicy proxycache rwm \
2243         refint syncprov unique"
2244
2245 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2246 if test "${with_xxslapoverlays+set}" = set; then
2247   withval="$with_xxslapoverlays"
2248   :
2249 fi
2250
2251
2252 # OpenLDAP --enable-overlays
2253         # Check whether --enable-overlays or --disable-overlays was given.
2254 if test "${enable_overlays+set}" = set; then
2255   enableval="$enable_overlays"
2256   
2257         ol_arg=invalid
2258         for ol_val in no yes mod ; do
2259                 if test "$enableval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2265         fi
2266         ol_enable_overlays="$ol_arg"
2267
2268 else
2269         ol_enable_overlays="no"
2270 fi
2271 # end --enable-overlays
2272 # OpenLDAP --enable-chain
2273         # Check whether --enable-chain or --disable-chain was given.
2274 if test "${enable_chain+set}" = set; then
2275   enableval="$enable_chain"
2276   
2277         ol_arg=invalid
2278         for ol_val in no yes mod ; do
2279                 if test "$enableval" = "$ol_val" ; then
2280                         ol_arg="$ol_val"
2281                 fi
2282         done
2283         if test "$ol_arg" = "invalid" ; then
2284                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2285         fi
2286         ol_enable_chain="$ol_arg"
2287
2288 else
2289         ol_enable_chain="no"
2290 fi
2291 # end --enable-chain
2292
2293 # OpenLDAP --enable-denyop
2294         # Check whether --enable-denyop or --disable-denyop was given.
2295 if test "${enable_denyop+set}" = set; then
2296   enableval="$enable_denyop"
2297   
2298         ol_arg=invalid
2299         for ol_val in no yes mod ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2306         fi
2307         ol_enable_denyop="$ol_arg"
2308
2309 else
2310         ol_enable_denyop="no"
2311 fi
2312 # end --enable-denyop
2313
2314 # OpenLDAP --enable-dyngroup
2315         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2316 if test "${enable_dyngroup+set}" = set; then
2317   enableval="$enable_dyngroup"
2318   
2319         ol_arg=invalid
2320         for ol_val in no yes mod ; do
2321                 if test "$enableval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2327         fi
2328         ol_enable_dyngroup="$ol_arg"
2329
2330 else
2331         ol_enable_dyngroup="no"
2332 fi
2333 # end --enable-dyngroup
2334
2335 # OpenLDAP --enable-glue
2336         # Check whether --enable-glue or --disable-glue was given.
2337 if test "${enable_glue+set}" = set; then
2338   enableval="$enable_glue"
2339   
2340         ol_arg=invalid
2341         for ol_val in no yes mod ; do
2342                 if test "$enableval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2348         fi
2349         ol_enable_glue="$ol_arg"
2350
2351 else
2352         ol_enable_glue="yes"
2353 fi
2354 # end --enable-glue
2355
2356 # OpenLDAP --enable-lastmod
2357         # Check whether --enable-lastmod or --disable-lastmod was given.
2358 if test "${enable_lastmod+set}" = set; then
2359   enableval="$enable_lastmod"
2360   
2361         ol_arg=invalid
2362         for ol_val in no yes mod ; do
2363                 if test "$enableval" = "$ol_val" ; then
2364                         ol_arg="$ol_val"
2365                 fi
2366         done
2367         if test "$ol_arg" = "invalid" ; then
2368                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2369         fi
2370         ol_enable_lastmod="$ol_arg"
2371
2372 else
2373         ol_enable_lastmod="no"
2374 fi
2375 # end --enable-lastmod
2376
2377 # OpenLDAP --enable-ppolicy
2378         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2379 if test "${enable_ppolicy+set}" = set; then
2380   enableval="$enable_ppolicy"
2381   
2382         ol_arg=invalid
2383         for ol_val in no yes mod ; do
2384                 if test "$enableval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2390         fi
2391         ol_enable_ppolicy="$ol_arg"
2392
2393 else
2394         ol_enable_ppolicy="no"
2395 fi
2396 # end --enable-ppolicy
2397
2398 # OpenLDAP --enable-proxycache
2399         # Check whether --enable-proxycache or --disable-proxycache was given.
2400 if test "${enable_proxycache+set}" = set; then
2401   enableval="$enable_proxycache"
2402   
2403         ol_arg=invalid
2404         for ol_val in no yes mod ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2411         fi
2412         ol_enable_proxycache="$ol_arg"
2413
2414 else
2415         ol_enable_proxycache="no"
2416 fi
2417 # end --enable-proxycache
2418
2419 # OpenLDAP --enable-refint
2420         # Check whether --enable-refint or --disable-refint was given.
2421 if test "${enable_refint+set}" = set; then
2422   enableval="$enable_refint"
2423   
2424         ol_arg=invalid
2425         for ol_val in no yes mod ; do
2426                 if test "$enableval" = "$ol_val" ; then
2427                         ol_arg="$ol_val"
2428                 fi
2429         done
2430         if test "$ol_arg" = "invalid" ; then
2431                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2432         fi
2433         ol_enable_refint="$ol_arg"
2434
2435 else
2436         ol_enable_refint="no"
2437 fi
2438 # end --enable-refint
2439
2440 # OpenLDAP --enable-rwm
2441         # Check whether --enable-rwm or --disable-rwm was given.
2442 if test "${enable_rwm+set}" = set; then
2443   enableval="$enable_rwm"
2444   
2445         ol_arg=invalid
2446         for ol_val in no yes mod ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2453         fi
2454         ol_enable_rwm="$ol_arg"
2455
2456 else
2457         ol_enable_rwm="no"
2458 fi
2459 # end --enable-rwm
2460
2461 # OpenLDAP --enable-syncprov
2462         # Check whether --enable-syncprov or --disable-syncprov was given.
2463 if test "${enable_syncprov+set}" = set; then
2464   enableval="$enable_syncprov"
2465   
2466         ol_arg=invalid
2467         for ol_val in no yes mod ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2474         fi
2475         ol_enable_syncprov="$ol_arg"
2476
2477 else
2478         ol_enable_syncprov="yes"
2479 fi
2480 # end --enable-syncprov
2481
2482 # OpenLDAP --enable-unique
2483         # Check whether --enable-unique or --disable-unique was given.
2484 if test "${enable_unique+set}" = set; then
2485   enableval="$enable_unique"
2486   
2487         ol_arg=invalid
2488         for ol_val in no yes mod ; do
2489                 if test "$enableval" = "$ol_val" ; then
2490                         ol_arg="$ol_val"
2491                 fi
2492         done
2493         if test "$ol_arg" = "invalid" ; then
2494                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2495         fi
2496         ol_enable_unique="$ol_arg"
2497
2498 else
2499         ol_enable_unique="no"
2500 fi
2501 # end --enable-unique
2502
2503
2504
2505 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2506 if test "${with_xxslurpdoptions+set}" = set; then
2507   withval="$with_xxslurpdoptions"
2508   :
2509 fi
2510
2511 # OpenLDAP --enable-slurpd
2512         # Check whether --enable-slurpd or --disable-slurpd was given.
2513 if test "${enable_slurpd+set}" = set; then
2514   enableval="$enable_slurpd"
2515   
2516         ol_arg=invalid
2517         for ol_val in auto yes no ; do
2518                 if test "$enableval" = "$ol_val" ; then
2519                         ol_arg="$ol_val"
2520                 fi
2521         done
2522         if test "$ol_arg" = "invalid" ; then
2523                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2524         fi
2525         ol_enable_slurpd="$ol_arg"
2526
2527 else
2528         ol_enable_slurpd="auto"
2529 fi
2530 # end --enable-slurpd
2531
2532 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2533 if test "${with_xxliboptions+set}" = set; then
2534   withval="$with_xxliboptions"
2535   :
2536 fi
2537
2538 # Check whether --enable-static or --disable-static was given.
2539 if test "${enable_static+set}" = set; then
2540   enableval="$enable_static"
2541   p=${PACKAGE-default}
2542 case $enableval in
2543 yes) enable_static=yes ;;
2544 no) enable_static=no ;;
2545 *)
2546   enable_static=no
2547   # Look at the argument we got.  We use all the common list separators.
2548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2549   for pkg in $enableval; do
2550     if test "X$pkg" = "X$p"; then
2551       enable_static=yes
2552     fi
2553   done
2554   IFS="$ac_save_ifs"
2555   ;;
2556 esac
2557 else
2558   enable_static=yes
2559 fi
2560
2561 # Check whether --enable-shared or --disable-shared was given.
2562 if test "${enable_shared+set}" = set; then
2563   enableval="$enable_shared"
2564   p=${PACKAGE-default}
2565 case $enableval in
2566 yes) enable_shared=yes ;;
2567 no) enable_shared=no ;;
2568 *)
2569   enable_shared=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_shared=yes
2575     fi
2576   done
2577   IFS="$ac_save_ifs"
2578   ;;
2579 esac
2580 else
2581   enable_shared=yes
2582 fi
2583
2584
2585
2586 # Activate any backends that were not explicitly enabled.
2587 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2588 if test $ol_enable_backends != no ; then
2589         for i in $Backends; do
2590                 eval "ol_tmp=\$ol_enable_$i"
2591                 if test $ol_tmp = no ; then
2592                         eval "ol_enable_$i=$ol_enable_backends"
2593                 fi
2594         done
2595 fi
2596 # Activate the overlays
2597 if test $ol_enable_overlays != no ; then
2598         for i in $Overlays; do
2599                 eval "ol_tmp=\$ol_enable_$i"
2600                 if test $ol_tmp = no ; then
2601                         eval "ol_enable_$i=$ol_enable_overlays"
2602                 fi
2603         done
2604 fi
2605
2606 # validate options
2607 if test $ol_enable_slapd = no ; then
2608                 if test $ol_enable_slapi = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2610         fi
2611         if test $ol_enable_backends != no ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2613         fi
2614         for i in $Backends; do
2615                 eval "ol_tmp=\$ol_enable_$i"
2616                 if test $ol_tmp != no ; then
2617                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2618                         eval "ol_enable_$i=no"
2619                 fi
2620         done
2621         if test $ol_enable_modules = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2623         fi
2624         if test $ol_enable_multimaster = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2626         fi
2627         if test $ol_enable_wrappers = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2629         fi
2630         if test $ol_enable_rlookups = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2632         fi
2633         if test $ol_enable_aci = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2635         fi
2636         if test $ol_with_ldbm_api != auto ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2638         fi
2639         if test $ol_with_ldbm_type != auto ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2641         fi
2642         if test $ol_enable_slurpd = yes ; then
2643                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2644         fi
2645         if test $ol_enable_rewrite = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2647         fi
2648                 if test $ol_enable_overlays != no ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2650         fi
2651         for i in $Overlays; do
2652                 eval "ol_tmp=\$ol_enable_$i"
2653                 if test $ol_tmp != no ; then
2654                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2655                         eval "ol_enable_$i=no"
2656                 fi
2657         done
2658
2659         # force settings to no
2660         ol_enable_slapi=no
2661
2662         ol_enable_backends=no
2663         ol_enable_overlays=no
2664         ol_enable_modules=no
2665         ol_enable_multimaster=no
2666         ol_enable_rlookups=no
2667         ol_enable_aci=no
2668         ol_enable_wrappers=no
2669
2670         ol_with_ldbm_api=no
2671         ol_with_ldbm_type=no
2672
2673         ol_enable_slurpd=no
2674
2675         ol_enable_rewrite=no
2676
2677 elif test $ol_enable_ldbm = no ; then
2678         
2679         if test $ol_with_ldbm_api != auto ; then
2680                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2681         fi
2682
2683         if test $ol_with_ldbm_type != auto ; then
2684                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2685         fi
2686
2687         if test $ol_enable_modules != yes -a \
2688                 $ol_enable_bdb = no -a \
2689                 $ol_enable_dnssrv = no -a \
2690                 $ol_enable_hdb = no -a \
2691                 $ol_enable_ldap = no -a \
2692                 $ol_enable_meta = no -a \
2693                 $ol_enable_monitor = no -a \
2694                 $ol_enable_null = no -a \
2695                 $ol_enable_passwd = no -a \
2696                 $ol_enable_perl = no -a \
2697                 $ol_enable_relay = no -a \
2698                 $ol_enable_shell = no -a \
2699                 $ol_enable_sql = no ; then
2700
2701                 if test $ol_enable_slapd = yes ; then
2702                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2703                 else
2704                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2705                         ol_enable_slapd=no
2706                 fi
2707         fi
2708
2709         ol_with_ldbm_api=no
2710         ol_with_ldbm_type=no
2711
2712         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2713                 ol_with_ldbm_api=berkeley
2714         fi
2715
2716 else
2717                 if test $ol_with_ldbm_api = gdbm -a \
2718                 $ol_with_ldbm_type = btree ; then
2719                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2720         fi
2721         if test $ol_with_ldbm_api = mdbm -a \
2722                 $ol_with_ldbm_type = btree ; then
2723                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2724         fi
2725         if test $ol_with_ldbm_api = ndbm -a \
2726                 $ol_with_ldbm_type = btree ; then
2727                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2728         fi
2729
2730         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2731                 if test $ol_with_ldbm_api = auto ; then
2732                         ol_with_ldbm_api=berkeley
2733                 elif test $ol_with_ldbm_api != berkeley ; then
2734                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2735                 fi
2736         fi
2737 fi
2738
2739 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2740         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2741 fi
2742
2743 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2744         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2745 fi
2746
2747 if test $ol_enable_slurpd = yes ; then
2748                 if test $ol_with_threads = no ; then
2749                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2750         fi
2751 fi
2752
2753 if test $ol_enable_lmpasswd = yes ; then
2754         if test $ol_with_tls = no ; then
2755                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2756         fi
2757 fi
2758
2759 if test $ol_enable_kbind = yes ; then
2760         if test $ol_with_kerberos = no ; then
2761                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2762         elif test $ol_with_kerberos = auto ; then
2763                 ol_with_kerberos=yes
2764         fi
2765
2766 elif test $ol_enable_kbind = no ; then
2767         if test $ol_with_kerberos = auto ; then
2768                 ol_with_kerberos=no
2769         elif test $ol_with_kerberos != no ; then
2770                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2771                 ol_with_kerberos=no
2772         fi
2773 fi
2774
2775 if test $ol_enable_spasswd = yes ; then
2776         if test $ol_with_cyrus_sasl = no ; then
2777                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2778         fi
2779         ol_with_cyrus_sasl=yes
2780 fi
2781
2782 echo "$ac_t""done" 1>&6
2783
2784 LDAP_LIBS=
2785 LDBM_LIBS=
2786 LTHREAD_LIBS=
2787 LUTIL_LIBS=
2788
2789 SLAPD_LIBS=
2790 SLURPD_LIBS=
2791
2792 BUILD_SLAPD=no
2793 BUILD_SLURPD=no
2794
2795 BUILD_THREAD=no
2796
2797 BUILD_SLAPI=no
2798 SLAPD_SLAPI_DEPEND=
2799
2800 BUILD_BDB=no
2801 BUILD_DNSSRV=no
2802 BUILD_HDB=no
2803 BUILD_LDAP=no
2804 BUILD_LDBM=no
2805 BUILD_META=no
2806 BUILD_MONITOR=no
2807 BUILD_NULL=no
2808 BUILD_PASSWD=no
2809 BUILD_PERL=no
2810 BUILD_RELAY=no
2811 BUILD_SHELL=no
2812 BUILD_SQL=no
2813
2814 BUILD_CHAIN=no
2815 BUILD_DENYOP=no
2816 BUILD_DYNGROUP=no
2817 BUILD_GLUE=no
2818 BUILD_LASTMOD=no
2819 BUILD_PPOLICY=no
2820 BUILD_PROXYCACHE=no
2821 BUILD_REFINT=no
2822 BUILD_RWM=no
2823 BUILD_SYNCPROV=no
2824 BUILD_UNIQUE=no
2825
2826 SLAPD_DYNAMIC_OVERLAYS=
2827
2828 SLAPD_MODULES_LDFLAGS=
2829 SLAPD_MODULES_CPPFLAGS=
2830
2831 SLAPD_STATIC_BACKENDS=
2832 SLAPD_DYNAMIC_BACKENDS=
2833
2834 SLAPD_PERL_LDFLAGS=
2835 MOD_PERL_LDFLAGS=
2836 PERL_CPPFLAGS=
2837
2838 SLAPD_SQL_LDFLAGS=
2839 SLAPD_SQL_LIBS=
2840 SLAPD_SQL_INCLUDES=
2841
2842 KRB4_LIBS=
2843 KRB5_LIBS=
2844 SASL_LIBS=
2845 TLS_LIBS=
2846 MODULES_LIBS=
2847 SLAPI_LIBS=
2848 LIBSLAPI=
2849 LIBSLAPITOOLS=
2850 AUTH_LIBS=
2851
2852 SLAPD_SLP_LIBS=
2853 SLAPD_GMP_LIBS=
2854
2855
2856 cat >> confdefs.h <<\EOF
2857 #define HAVE_MKVERSION 1
2858 EOF
2859
2860
2861
2862
2863 ol_aix_threads=no
2864 case "$target" in
2865 *-*-aix*)       if test -z "$CC" ; then
2866                 case "$ol_with_threads" in
2867                 auto | yes |  posix) ol_aix_threads=yes ;;
2868                 esac
2869         fi
2870 ;;
2871 esac
2872
2873 if test $ol_aix_threads = yes ; then
2874         if test -z "${CC}" ; then
2875                 for ac_prog in cc_r xlc_r cc
2876 do
2877 # Extract the first word of "$ac_prog", so it can be a program name with args.
2878 set dummy $ac_prog; ac_word=$2
2879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2880 echo "configure:2881: checking for $ac_word" >&5
2881 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   if test -n "$CC"; then
2885   ac_cv_prog_CC="$CC" # Let the user override the test.
2886 else
2887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2888   ac_dummy="$PATH"
2889   for ac_dir in $ac_dummy; do
2890     test -z "$ac_dir" && ac_dir=.
2891     if test -f $ac_dir/$ac_word; then
2892       ac_cv_prog_CC="$ac_prog"
2893       break
2894     fi
2895   done
2896   IFS="$ac_save_ifs"
2897 fi
2898 fi
2899 CC="$ac_cv_prog_CC"
2900 if test -n "$CC"; then
2901   echo "$ac_t""$CC" 1>&6
2902 else
2903   echo "$ac_t""no" 1>&6
2904 fi
2905
2906 test -n "$CC" && break
2907 done
2908
2909
2910                 if test "$CC" = cc ; then
2911                                                 if test $ol_with_threads != auto ; then
2912                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2913                         else
2914                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2915                         fi
2916                         ol_with_threads=no
2917                 fi
2918         fi
2919
2920         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2921                 ol_with_threads=posix
2922                 ol_cv_pthread_create=yes
2923         fi
2924 fi
2925
2926 if test -z "${CC}"; then
2927         for ac_prog in cc gcc
2928 do
2929 # Extract the first word of "$ac_prog", so it can be a program name with args.
2930 set dummy $ac_prog; ac_word=$2
2931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2932 echo "configure:2933: checking for $ac_word" >&5
2933 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   if test -n "$CC"; then
2937   ac_cv_prog_CC="$CC" # Let the user override the test.
2938 else
2939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2940   ac_dummy="$PATH"
2941   for ac_dir in $ac_dummy; do
2942     test -z "$ac_dir" && ac_dir=.
2943     if test -f $ac_dir/$ac_word; then
2944       ac_cv_prog_CC="$ac_prog"
2945       break
2946     fi
2947   done
2948   IFS="$ac_save_ifs"
2949 fi
2950 fi
2951 CC="$ac_cv_prog_CC"
2952 if test -n "$CC"; then
2953   echo "$ac_t""$CC" 1>&6
2954 else
2955   echo "$ac_t""no" 1>&6
2956 fi
2957
2958 test -n "$CC" && break
2959 done
2960 test -n "$CC" || CC="missing"
2961
2962
2963         if test "${CC}" = "missing" ; then
2964                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2965         fi
2966 fi
2967
2968 if test -z "${AR}"; then
2969         for ac_prog in ar gar
2970 do
2971 # Extract the first word of "$ac_prog", so it can be a program name with args.
2972 set dummy $ac_prog; ac_word=$2
2973 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2974 echo "configure:2975: checking for $ac_word" >&5
2975 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2976   echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978   if test -n "$AR"; then
2979   ac_cv_prog_AR="$AR" # Let the user override the test.
2980 else
2981   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2982   ac_dummy="$PATH"
2983   for ac_dir in $ac_dummy; do
2984     test -z "$ac_dir" && ac_dir=.
2985     if test -f $ac_dir/$ac_word; then
2986       ac_cv_prog_AR="$ac_prog"
2987       break
2988     fi
2989   done
2990   IFS="$ac_save_ifs"
2991 fi
2992 fi
2993 AR="$ac_cv_prog_AR"
2994 if test -n "$AR"; then
2995   echo "$ac_t""$AR" 1>&6
2996 else
2997   echo "$ac_t""no" 1>&6
2998 fi
2999
3000 test -n "$AR" && break
3001 done
3002 test -n "$AR" || AR="missing"
3003
3004
3005         if test "${AR}" = "missing" ; then
3006                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3007         fi
3008 fi
3009
3010
3011
3012 # Find the correct PATH separator.  Usually this is `:', but
3013 # DJGPP uses `;' like DOS.
3014 if test "X${PATH_SEPARATOR+set}" != Xset; then
3015   UNAME=${UNAME-`uname 2>/dev/null`}
3016   case X$UNAME in
3017     *-DOS) lt_cv_sys_path_separator=';' ;;
3018     *)     lt_cv_sys_path_separator=':' ;;
3019   esac
3020   PATH_SEPARATOR=$lt_cv_sys_path_separator
3021 fi
3022
3023 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3024 echo "configure:3025: checking for Cygwin environment" >&5
3025 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3026   echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028   cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031
3032 int main() {
3033
3034 #ifndef __CYGWIN__
3035 #define __CYGWIN__ __CYGWIN32__
3036 #endif
3037 return __CYGWIN__;
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3041   rm -rf conftest*
3042   ac_cv_cygwin=yes
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -rf conftest*
3047   ac_cv_cygwin=no
3048 fi
3049 rm -f conftest*
3050 fi
3051
3052 echo "$ac_t""$ac_cv_cygwin" 1>&6
3053 CYGWIN=
3054 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3055 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3056 echo "configure:3057: checking for mingw32 environment" >&5
3057 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3058   echo $ac_n "(cached) $ac_c" 1>&6
3059 else
3060   cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3063
3064 int main() {
3065 return __MINGW32__;
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3069   rm -rf conftest*
3070   ac_cv_mingw32=yes
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   ac_cv_mingw32=no
3076 fi
3077 rm -f conftest*
3078 fi
3079
3080 echo "$ac_t""$ac_cv_mingw32" 1>&6
3081 MINGW32=
3082 test "$ac_cv_mingw32" = yes && MINGW32=yes
3083 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3084 echo "configure:3085: checking for EMX OS/2 environment" >&5
3085 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   cat > conftest.$ac_ext <<EOF
3089 #line 3090 "configure"
3090 #include "confdefs.h"
3091
3092 int main() {
3093 return __EMX__;
3094 ; return 0; }
3095 EOF
3096 if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3097   rm -rf conftest*
3098   ac_cv_emxos2=yes
3099 else
3100   echo "configure: failed program was:" >&5
3101   cat conftest.$ac_ext >&5
3102   rm -rf conftest*
3103   ac_cv_emxos2=no
3104 fi
3105 rm -f conftest*
3106 fi
3107
3108 echo "$ac_t""$ac_cv_emxos2" 1>&6
3109 EMXOS2=
3110 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3111 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3112 echo "configure:3113: checking how to run the C preprocessor" >&5
3113 # On Suns, sometimes $CPP names a directory.
3114 if test -n "$CPP" && test -d "$CPP"; then
3115   CPP=
3116 fi
3117 if test -z "$CPP"; then
3118 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3119   echo $ac_n "(cached) $ac_c" 1>&6
3120 else
3121     # This must be in double quotes, not single quotes, because CPP may get
3122   # substituted into the Makefile and "${CC-cc}" will confuse make.
3123   CPP="${CC-cc} -E"
3124   # On the NeXT, cc -E runs the code through the compiler's parser,
3125   # not just through cpp.
3126   cat > conftest.$ac_ext <<EOF
3127 #line 3128 "configure"
3128 #include "confdefs.h"
3129 #include <assert.h>
3130 Syntax Error
3131 EOF
3132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3133 { (eval echo configure:3134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3135 if test -z "$ac_err"; then
3136   :
3137 else
3138   echo "$ac_err" >&5
3139   echo "configure: failed program was:" >&5
3140   cat conftest.$ac_ext >&5
3141   rm -rf conftest*
3142   CPP="${CC-cc} -E -traditional-cpp"
3143   cat > conftest.$ac_ext <<EOF
3144 #line 3145 "configure"
3145 #include "confdefs.h"
3146 #include <assert.h>
3147 Syntax Error
3148 EOF
3149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3150 { (eval echo configure:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3152 if test -z "$ac_err"; then
3153   :
3154 else
3155   echo "$ac_err" >&5
3156   echo "configure: failed program was:" >&5
3157   cat conftest.$ac_ext >&5
3158   rm -rf conftest*
3159   CPP="${CC-cc} -nologo -E"
3160   cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163 #include <assert.h>
3164 Syntax Error
3165 EOF
3166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3167 { (eval echo configure:3168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3169 if test -z "$ac_err"; then
3170   :
3171 else
3172   echo "$ac_err" >&5
3173   echo "configure: failed program was:" >&5
3174   cat conftest.$ac_ext >&5
3175   rm -rf conftest*
3176   CPP=/lib/cpp
3177 fi
3178 rm -f conftest*
3179 fi
3180 rm -f conftest*
3181 fi
3182 rm -f conftest*
3183   ac_cv_prog_CPP="$CPP"
3184 fi
3185   CPP="$ac_cv_prog_CPP"
3186 else
3187   ac_cv_prog_CPP="$CPP"
3188 fi
3189 echo "$ac_t""$CPP" 1>&6
3190
3191 # Check whether --enable-fast-install or --disable-fast-install was given.
3192 if test "${enable_fast_install+set}" = set; then
3193   enableval="$enable_fast_install"
3194   p=${PACKAGE-default}
3195 case $enableval in
3196 yes) enable_fast_install=yes ;;
3197 no) enable_fast_install=no ;;
3198 *)
3199   enable_fast_install=no
3200   # Look at the argument we got.  We use all the common list separators.
3201   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3202   for pkg in $enableval; do
3203     if test "X$pkg" = "X$p"; then
3204       enable_fast_install=yes
3205     fi
3206   done
3207   IFS="$ac_save_ifs"
3208   ;;
3209 esac
3210 else
3211   enable_fast_install=yes
3212 fi
3213
3214 # Extract the first word of "gcc", so it can be a program name with args.
3215 set dummy gcc; ac_word=$2
3216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3217 echo "configure:3218: checking for $ac_word" >&5
3218 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   if test -n "$CC"; then
3222   ac_cv_prog_CC="$CC" # Let the user override the test.
3223 else
3224   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3225   ac_dummy="$PATH"
3226   for ac_dir in $ac_dummy; do
3227     test -z "$ac_dir" && ac_dir=.
3228     if test -f $ac_dir/$ac_word; then
3229       ac_cv_prog_CC="gcc"
3230       break
3231     fi
3232   done
3233   IFS="$ac_save_ifs"
3234 fi
3235 fi
3236 CC="$ac_cv_prog_CC"
3237 if test -n "$CC"; then
3238   echo "$ac_t""$CC" 1>&6
3239 else
3240   echo "$ac_t""no" 1>&6
3241 fi
3242
3243 if test -z "$CC"; then
3244   # Extract the first word of "cc", so it can be a program name with args.
3245 set dummy cc; ac_word=$2
3246 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3247 echo "configure:3248: checking for $ac_word" >&5
3248 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3249   echo $ac_n "(cached) $ac_c" 1>&6
3250 else
3251   if test -n "$CC"; then
3252   ac_cv_prog_CC="$CC" # Let the user override the test.
3253 else
3254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3255   ac_prog_rejected=no
3256   ac_dummy="$PATH"
3257   for ac_dir in $ac_dummy; do
3258     test -z "$ac_dir" && ac_dir=.
3259     if test -f $ac_dir/$ac_word; then
3260       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3261         ac_prog_rejected=yes
3262         continue
3263       fi
3264       ac_cv_prog_CC="cc"
3265       break
3266     fi
3267   done
3268   IFS="$ac_save_ifs"
3269 if test $ac_prog_rejected = yes; then
3270   # We found a bogon in the path, so make sure we never use it.
3271   set dummy $ac_cv_prog_CC
3272   shift
3273   if test $# -gt 0; then
3274     # We chose a different compiler from the bogus one.
3275     # However, it has the same basename, so the bogon will be chosen
3276     # first if we set CC to just the basename; use the full file name.
3277     shift
3278     set dummy "$ac_dir/$ac_word" "$@"
3279     shift
3280     ac_cv_prog_CC="$@"
3281   fi
3282 fi
3283 fi
3284 fi
3285 CC="$ac_cv_prog_CC"
3286 if test -n "$CC"; then
3287   echo "$ac_t""$CC" 1>&6
3288 else
3289   echo "$ac_t""no" 1>&6
3290 fi
3291
3292   if test -z "$CC"; then
3293     case "`uname -s`" in
3294     *win32* | *WIN32* | *CYGWIN*)
3295       # Extract the first word of "cl", so it can be a program name with args.
3296 set dummy cl; ac_word=$2
3297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3298 echo "configure:3299: checking for $ac_word" >&5
3299 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3300   echo $ac_n "(cached) $ac_c" 1>&6
3301 else
3302   if test -n "$CC"; then
3303   ac_cv_prog_CC="$CC" # Let the user override the test.
3304 else
3305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3306   ac_dummy="$PATH"
3307   for ac_dir in $ac_dummy; do
3308     test -z "$ac_dir" && ac_dir=.
3309     if test -f $ac_dir/$ac_word; then
3310       ac_cv_prog_CC="cl"
3311       break
3312     fi
3313   done
3314   IFS="$ac_save_ifs"
3315 fi
3316 fi
3317 CC="$ac_cv_prog_CC"
3318 if test -n "$CC"; then
3319   echo "$ac_t""$CC" 1>&6
3320 else
3321   echo "$ac_t""no" 1>&6
3322 fi
3323  ;;
3324     esac
3325   fi
3326   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3327 fi
3328
3329 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3330 echo "configure:3331: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3331
3332 ac_ext=c
3333 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3334 ac_cpp='$CPP $CPPFLAGS'
3335 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3336 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3337 cross_compiling=$ac_cv_prog_cc_cross
3338
3339 cat > conftest.$ac_ext << EOF
3340
3341 #line 3342 "configure"
3342 #include "confdefs.h"
3343
3344 main(){return(0);}
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3347   ac_cv_prog_cc_works=yes
3348   # If we can't run a trivial program, we are probably using a cross compiler.
3349   if (./conftest; exit) 2>/dev/null; then
3350     ac_cv_prog_cc_cross=no
3351   else
3352     ac_cv_prog_cc_cross=yes
3353   fi
3354 else
3355   echo "configure: failed program was:" >&5
3356   cat conftest.$ac_ext >&5
3357   ac_cv_prog_cc_works=no
3358 fi
3359 rm -fr conftest*
3360 ac_ext=c
3361 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3362 ac_cpp='$CPP $CPPFLAGS'
3363 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3364 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3365 cross_compiling=$ac_cv_prog_cc_cross
3366
3367 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3368 if test $ac_cv_prog_cc_works = no; then
3369   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3370 fi
3371 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3372 echo "configure:3373: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3373 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3374 cross_compiling=$ac_cv_prog_cc_cross
3375
3376 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3377 echo "configure:3378: checking whether we are using GNU C" >&5
3378 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3379   echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381   cat > conftest.c <<EOF
3382 #ifdef __GNUC__
3383   yes;
3384 #endif
3385 EOF
3386 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3387   ac_cv_prog_gcc=yes
3388 else
3389   ac_cv_prog_gcc=no
3390 fi
3391 fi
3392
3393 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3394
3395 if test $ac_cv_prog_gcc = yes; then
3396   GCC=yes
3397 else
3398   GCC=
3399 fi
3400
3401 ac_test_CFLAGS="${CFLAGS+set}"
3402 ac_save_CFLAGS="$CFLAGS"
3403 CFLAGS=
3404 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3405 echo "configure:3406: checking whether ${CC-cc} accepts -g" >&5
3406 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   echo 'void f(){}' > conftest.c
3410 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3411   ac_cv_prog_cc_g=yes
3412 else
3413   ac_cv_prog_cc_g=no
3414 fi
3415 rm -f conftest*
3416
3417 fi
3418
3419 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3420 if test "$ac_test_CFLAGS" = set; then
3421   CFLAGS="$ac_save_CFLAGS"
3422 elif test $ac_cv_prog_cc_g = yes; then
3423   if test "$GCC" = yes; then
3424     CFLAGS="-g -O2"
3425   else
3426     CFLAGS="-g"
3427   fi
3428 else
3429   if test "$GCC" = yes; then
3430     CFLAGS="-O2"
3431   else
3432     CFLAGS=
3433   fi
3434 fi
3435
3436 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3437 if test "${with_gnu_ld+set}" = set; then
3438   withval="$with_gnu_ld"
3439   test "$withval" = no || with_gnu_ld=yes
3440 else
3441   with_gnu_ld=no
3442 fi
3443
3444 ac_prog=ld
3445 if test "$GCC" = yes; then
3446   # Check if gcc -print-prog-name=ld gives a path.
3447   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3448 echo "configure:3449: checking for ld used by GCC" >&5
3449   case $host in
3450   *-*-mingw*)
3451     # gcc leaves a trailing carriage return which upsets mingw
3452     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3453   *)
3454     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3455   esac
3456   case $ac_prog in
3457     # Accept absolute paths.
3458     [\\/]* | [A-Za-z]:[\\/]*)
3459       re_direlt='/[^/][^/]*/\.\./'
3460       # Canonicalize the path of ld
3461       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3462       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3463         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3464       done
3465       test -z "$LD" && LD="$ac_prog"
3466       ;;
3467   "")
3468     # If it fails, then pretend we aren't using GCC.
3469     ac_prog=ld
3470     ;;
3471   *)
3472     # If it is relative, then search for the first ld in PATH.
3473     with_gnu_ld=unknown
3474     ;;
3475   esac
3476 elif test "$with_gnu_ld" = yes; then
3477   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3478 echo "configure:3479: checking for GNU ld" >&5
3479 else
3480   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3481 echo "configure:3482: checking for non-GNU ld" >&5
3482 fi
3483 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   if test -z "$LD"; then
3487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3488   for ac_dir in $PATH; do
3489     test -z "$ac_dir" && ac_dir=.
3490     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3491       lt_cv_path_LD="$ac_dir/$ac_prog"
3492       # Check to see if the program is GNU ld.  I'd rather use --version,
3493       # but apparently some GNU ld's only accept -v.
3494       # Break only if it was the GNU/non-GNU ld that we prefer.
3495       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3496         test "$with_gnu_ld" != no && break
3497       else
3498         test "$with_gnu_ld" != yes && break
3499       fi
3500     fi
3501   done
3502   IFS="$ac_save_ifs"
3503 else
3504   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3505 fi
3506 fi
3507
3508 LD="$lt_cv_path_LD"
3509 if test -n "$LD"; then
3510   echo "$ac_t""$LD" 1>&6
3511 else
3512   echo "$ac_t""no" 1>&6
3513 fi
3514 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3515 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3516 echo "configure:3517: checking if the linker ($LD) is GNU ld" >&5
3517 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3521 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3522   lt_cv_prog_gnu_ld=yes
3523 else
3524   lt_cv_prog_gnu_ld=no
3525 fi
3526 fi
3527
3528 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3529 with_gnu_ld=$lt_cv_prog_gnu_ld
3530
3531
3532 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3533 echo "configure:3534: checking for $LD option to reload object files" >&5
3534 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3535   echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537   lt_cv_ld_reload_flag='-r'
3538 fi
3539
3540 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3541 reload_flag=$lt_cv_ld_reload_flag
3542 test -n "$reload_flag" && reload_flag=" $reload_flag"
3543
3544 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3545 echo "configure:3546: checking for BSD-compatible nm" >&5
3546 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3547   echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549   if test -n "$NM"; then
3550   # Let the user override the test.
3551   lt_cv_path_NM="$NM"
3552 else
3553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3554   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3555     test -z "$ac_dir" && ac_dir=.
3556     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3557     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3558       # Check to see if the nm accepts a BSD-compat flag.
3559       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3560       #   nm: unknown option "B" ignored
3561       # Tru64's nm complains that /dev/null is an invalid object file
3562       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3563         lt_cv_path_NM="$tmp_nm -B"
3564         break
3565       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3566         lt_cv_path_NM="$tmp_nm -p"
3567         break
3568       else
3569         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3570         continue # so that we can try to find one that supports BSD flags
3571       fi
3572     fi
3573   done
3574   IFS="$ac_save_ifs"
3575   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3576 fi
3577 fi
3578
3579 NM="$lt_cv_path_NM"
3580 echo "$ac_t""$NM" 1>&6
3581
3582 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3583 echo "configure:3584: checking for a sed that does not truncate output" >&5
3584 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3585   echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587   # Loop through the user's path and test for sed and gsed.
3588 # Then use that list of sed's as ones to test for truncation.
3589 as_executable_p="test -f"
3590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591 for as_dir in $PATH
3592 do
3593   IFS=$as_save_IFS
3594   test -z "$as_dir" && as_dir=.
3595   for ac_prog in sed gsed; do
3596     for ac_exec_ext in '' $ac_executable_extensions; do
3597       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3598         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3599       fi
3600     done
3601   done
3602 done
3603
3604   # Create a temporary directory, and hook for its removal unless debugging.
3605 $debug ||
3606 {
3607   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3608   trap '{ (exit 1); exit 1; }' 1 2 13 15
3609 }
3610
3611 # Create a (secure) tmp directory for tmp files.
3612 : ${TMPDIR=/tmp}
3613 {
3614   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3615   test -n "$tmp" && test -d "$tmp"
3616 }  ||
3617 {
3618   tmp=$TMPDIR/sed$$-$RANDOM
3619   (umask 077 && mkdir $tmp)
3620 } ||
3621 {
3622    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3623    { (exit 1); exit 1; }
3624 }
3625   _max=0
3626   _count=0
3627   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3628   # along with /bin/sed that truncates output.
3629   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3630     test ! -f ${_sed} && break
3631     cat /dev/null > "$tmp/sed.in"
3632     _count=0
3633     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3634     # Check for GNU sed and select it if it is found.
3635     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3636       lt_cv_path_SED=${_sed}
3637       break
3638     fi
3639     while true; do
3640       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3641       mv "$tmp/sed.tmp" "$tmp/sed.in"
3642       cp "$tmp/sed.in" "$tmp/sed.nl"
3643       echo >>"$tmp/sed.nl"
3644       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3645       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3646       # 40000 chars as input seems more than enough
3647       test $_count -gt 10 && break
3648       _count=`expr $_count + 1`
3649       if test $_count -gt $_max; then
3650         _max=$_count
3651         lt_cv_path_SED=$_sed
3652       fi
3653     done
3654   done
3655   rm -rf "$tmp"
3656
3657 fi
3658
3659 if test "X$SED" != "X"; then
3660   lt_cv_path_SED=$SED
3661 else
3662   SED=$lt_cv_path_SED
3663 fi
3664 echo "$ac_t""$SED" 1>&6
3665
3666 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3667 echo "configure:3668: checking whether ln -s works" >&5
3668 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   rm -f conftestdata
3672 if ln -s X conftestdata 2>/dev/null
3673 then
3674   rm -f conftestdata
3675   ac_cv_prog_LN_S="ln -s"
3676 else
3677   ac_cv_prog_LN_S=ln
3678 fi
3679 fi
3680 LN_S="$ac_cv_prog_LN_S"
3681 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3682   echo "$ac_t""yes" 1>&6
3683 else
3684   echo "$ac_t""no" 1>&6
3685 fi
3686
3687 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3688 echo "configure:3689: checking how to recognise dependent libraries" >&5
3689 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   lt_cv_file_magic_cmd='$MAGIC_CMD'
3693 lt_cv_file_magic_test_file=
3694 lt_cv_deplibs_check_method='unknown'
3695 # Need to set the preceding variable on all platforms that support
3696 # interlibrary dependencies.
3697 # 'none' -- dependencies not supported.
3698 # `unknown' -- same as none, but documents that we really don't know.
3699 # 'pass_all' -- all dependencies passed with no checks.
3700 # 'test_compile' -- check by making test program.
3701 # 'file_magic [[regex]]' -- check by looking for files in library path
3702 # which responds to the $file_magic_cmd with a given egrep regex.
3703 # If you have `file' or equivalent on your system and you're not sure
3704 # whether `pass_all' will *always* work, you probably want this one.
3705
3706 case $host_os in
3707 aix4* | aix5*)
3708   lt_cv_deplibs_check_method=pass_all
3709   ;;
3710
3711 beos*)
3712   lt_cv_deplibs_check_method=pass_all
3713   ;;
3714
3715 bsdi4*)
3716   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3717   lt_cv_file_magic_cmd='/usr/bin/file -L'
3718   lt_cv_file_magic_test_file=/shlib/libc.so
3719   ;;
3720
3721 cygwin* | mingw* | pw32*)
3722   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3723   lt_cv_file_magic_cmd='$OBJDUMP -f'
3724   ;;
3725
3726 darwin* | rhapsody*)
3727   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3728   lt_cv_file_magic_cmd='/usr/bin/file -L'
3729   case "$host_os" in
3730   rhapsody* | darwin1.[012])
3731     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3732     ;;
3733   *) # Darwin 1.3 on
3734     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3735     ;;
3736   esac
3737   ;;
3738
3739 freebsd*)
3740   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3741     case $host_cpu in
3742     i*86 )
3743       # Not sure whether the presence of OpenBSD here was a mistake.
3744       # Let's accept both of them until this is cleared up.
3745       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3746       lt_cv_file_magic_cmd=/usr/bin/file
3747       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3748       ;;
3749     esac
3750   else
3751     lt_cv_deplibs_check_method=pass_all
3752   fi
3753   ;;
3754
3755 gnu*)
3756   lt_cv_deplibs_check_method=pass_all
3757   ;;
3758
3759 hpux10.20*|hpux11*)
3760   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3761   lt_cv_file_magic_cmd=/usr/bin/file
3762   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3763   ;;
3764
3765 irix5* | irix6* | nonstopux*)
3766   case $host_os in
3767   irix5* | nonstopux*)
3768     # this will be overridden with pass_all, but let us keep it just in case
3769     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3770     ;;
3771   *)
3772     case $LD in
3773     *-32|*"-32 ") libmagic=32-bit;;
3774     *-n32|*"-n32 ") libmagic=N32;;
3775     *-64|*"-64 ") libmagic=64-bit;;
3776     *) libmagic=never-match;;
3777     esac
3778     # this will be overridden with pass_all, but let us keep it just in case
3779     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3780     ;;
3781   esac
3782   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3783   lt_cv_deplibs_check_method=pass_all
3784   ;;
3785
3786 # This must be Linux ELF.
3787 linux-gnu*)
3788   case $host_cpu in
3789   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3790     lt_cv_deplibs_check_method=pass_all ;;
3791   *)
3792     # glibc up to 2.1.1 does not perform some relocations on ARM
3793     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3794   esac
3795   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3796   ;;
3797
3798 netbsd*)
3799   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3800     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3801   else
3802     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3803   fi
3804   ;;
3805
3806 newos6*)
3807   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3810   ;;
3811
3812 openbsd*)
3813   lt_cv_file_magic_cmd=/usr/bin/file
3814   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3815   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3816     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3817   else
3818     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3819   fi
3820   ;;
3821
3822 openedition*)
3823   lt_cv_deplibs_check_method=pass_all
3824   ;;
3825
3826 osf3* | osf4* | osf5*)
3827   # this will be overridden with pass_all, but let us keep it just in case
3828   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3829   lt_cv_file_magic_test_file=/shlib/libc.so
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 sco3.2v5*)
3834   lt_cv_deplibs_check_method=pass_all
3835   ;;
3836
3837 solaris*)
3838   lt_cv_deplibs_check_method=pass_all
3839   lt_cv_file_magic_test_file=/lib/libc.so
3840   ;;
3841
3842 sysv5uw[78]* | sysv4*uw2*)
3843   lt_cv_deplibs_check_method=pass_all
3844   ;;
3845
3846 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3847   case $host_vendor in
3848   motorola)
3849     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]'
3850     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3851     ;;
3852   ncr)
3853     lt_cv_deplibs_check_method=pass_all
3854     ;;
3855   sequent)
3856     lt_cv_file_magic_cmd='/bin/file'
3857     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3858     ;;
3859   sni)
3860     lt_cv_file_magic_cmd='/bin/file'
3861     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3862     lt_cv_file_magic_test_file=/lib/libc.so
3863     ;;
3864   siemens)
3865     lt_cv_deplibs_check_method=pass_all
3866     ;;
3867   esac
3868   ;;
3869 esac
3870
3871 fi
3872
3873 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3874 file_magic_cmd=$lt_cv_file_magic_cmd
3875 deplibs_check_method=$lt_cv_deplibs_check_method
3876
3877 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3878 echo "configure:3879: checking for object suffix" >&5
3879 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   rm -f conftest*
3883 echo 'int i = 1;' > conftest.$ac_ext
3884 if { (eval echo configure:3885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885   for ac_file in conftest.*; do
3886     case $ac_file in
3887     *.c) ;;
3888     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3889     esac
3890   done
3891 else
3892   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3893 fi
3894 rm -f conftest*
3895 fi
3896
3897 echo "$ac_t""$ac_cv_objext" 1>&6
3898 OBJEXT=$ac_cv_objext
3899 ac_objext=$ac_cv_objext
3900
3901
3902
3903
3904 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3905 echo "configure:3906: checking for executable suffix" >&5
3906 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3910   ac_cv_exeext=.exe
3911 else
3912   rm -f conftest*
3913   echo 'int main () { return 0; }' > conftest.$ac_ext
3914   ac_cv_exeext=
3915   if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3916     for file in conftest.*; do
3917       case $file in
3918       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3919       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3920       esac
3921     done
3922   else
3923     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3924   fi
3925   rm -f conftest*
3926   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3927 fi
3928 fi
3929
3930 EXEEXT=""
3931 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3932 echo "$ac_t""${ac_cv_exeext}" 1>&6
3933 ac_exeext=$EXEEXT
3934
3935 if test $host != $build; then
3936   ac_tool_prefix=${host_alias}-
3937 else
3938   ac_tool_prefix=
3939 fi
3940
3941
3942
3943
3944 # Check for command to grab the raw symbol name followed by C symbol from nm.
3945 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3946 echo "configure:3947: checking command to parse $NM output" >&5
3947 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   
3951 # These are sane defaults that work on at least a few old systems.
3952 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3953
3954 # Character class describing NM global symbol codes.
3955 symcode='[BCDEGRST]'
3956
3957 # Regexp to match symbols that can be accessed directly from C.
3958 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3959
3960 # Transform the above into a raw symbol and a C symbol.
3961 symxfrm='\1 \2\3 \3'
3962
3963 # Transform an extracted symbol line into a proper C declaration
3964 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3965
3966 # Transform an extracted symbol line into symbol name and symbol address
3967 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'"
3968
3969 # Define system-specific variables.
3970 case $host_os in
3971 aix*)
3972   symcode='[BCDT]'
3973   ;;
3974 cygwin* | mingw* | pw32*)
3975   symcode='[ABCDGISTW]'
3976   ;;
3977 hpux*) # Its linker distinguishes data from code symbols
3978   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3979   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'"
3980   ;;
3981 irix* | nonstopux*)
3982   symcode='[BCDEGRST]'
3983   ;;
3984 osf*)
3985   symcode='[BCDEGQRST]'
3986   ;;
3987 solaris* | sysv5*)
3988   symcode='[BDT]'
3989   ;;
3990 sysv4)
3991   symcode='[DFNSTU]'
3992   ;;
3993 esac
3994
3995 # Handle CRLF in mingw tool chain
3996 opt_cr=
3997 case $host_os in
3998 mingw*)
3999   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4000   ;;
4001 esac
4002
4003 # If we're using GNU nm, then use its standard symbol codes.
4004 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4005   symcode='[ABCDGISTW]'
4006 fi
4007
4008 # Try without a prefix undercore, then with it.
4009 for ac_symprfx in "" "_"; do
4010
4011   # Write the raw and C identifiers.
4012 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4013
4014   # Check to see that the pipe works correctly.
4015   pipe_works=no
4016   rm -f conftest*
4017   cat > conftest.$ac_ext <<EOF
4018 #ifdef __cplusplus
4019 extern "C" {
4020 #endif
4021 char nm_test_var;
4022 void nm_test_func(){}
4023 #ifdef __cplusplus
4024 }
4025 #endif
4026 int main(){nm_test_var='a';nm_test_func();return(0);}
4027 EOF
4028
4029   if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4030     # Now try to grab the symbols.
4031     nlist=conftest.nm
4032     if { (eval echo configure:4033: \"$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
4033       # Try sorting and uniquifying the output.
4034       if sort "$nlist" | uniq > "$nlist"T; then
4035         mv -f "$nlist"T "$nlist"
4036       else
4037         rm -f "$nlist"T
4038       fi
4039
4040       # Make sure that we snagged all the symbols we need.
4041       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4042         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4043           cat <<EOF > conftest.$ac_ext
4044 #ifdef __cplusplus
4045 extern "C" {
4046 #endif
4047
4048 EOF
4049           # Now generate the symbol file.
4050           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4051
4052           cat <<EOF >> conftest.$ac_ext
4053 #if defined (__STDC__) && __STDC__
4054 # define lt_ptr void *
4055 #else
4056 # define lt_ptr char *
4057 # define const
4058 #endif
4059
4060 /* The mapping between symbol names and symbols. */
4061 const struct {
4062   const char *name;
4063   lt_ptr address;
4064 }
4065 lt_preloaded_symbols[] =
4066 {
4067 EOF
4068           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4069           cat <<\EOF >> conftest.$ac_ext
4070   {0, (lt_ptr) 0}
4071 };
4072
4073 #ifdef __cplusplus
4074 }
4075 #endif
4076 EOF
4077           # Now try linking the two files.
4078           mv conftest.$ac_objext conftstm.$ac_objext
4079           save_LIBS="$LIBS"
4080           save_CFLAGS="$CFLAGS"
4081           LIBS="conftstm.$ac_objext"
4082           CFLAGS="$CFLAGS$no_builtin_flag"
4083           if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4084             pipe_works=yes
4085           fi
4086           LIBS="$save_LIBS"
4087           CFLAGS="$save_CFLAGS"
4088         else
4089           echo "cannot find nm_test_func in $nlist" >&5
4090         fi
4091       else
4092         echo "cannot find nm_test_var in $nlist" >&5
4093       fi
4094     else
4095       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4096     fi
4097   else
4098     echo "$progname: failed program was:" >&5
4099     cat conftest.$ac_ext >&5
4100   fi
4101   rm -f conftest* conftst*
4102
4103   # Do not use the global_symbol_pipe unless it works.
4104   if test "$pipe_works" = yes; then
4105     break
4106   else
4107     lt_cv_sys_global_symbol_pipe=
4108   fi
4109 done
4110
4111 fi
4112
4113 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4114 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4115   global_symbol_to_cdecl=
4116   global_symbol_to_c_name_address=
4117 else
4118   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4119   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4120 fi
4121 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4122 then
4123   echo "$ac_t""failed" 1>&6
4124 else
4125   echo "$ac_t""ok" 1>&6
4126 fi
4127
4128 for ac_hdr in dlfcn.h
4129 do
4130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4132 echo "configure:4133: checking for $ac_hdr" >&5
4133 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <$ac_hdr>
4140 EOF
4141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4142 { (eval echo configure:4143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4144 if test -z "$ac_err"; then
4145   rm -rf conftest*
4146   eval "ac_cv_header_$ac_safe=yes"
4147 else
4148   echo "$ac_err" >&5
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   eval "ac_cv_header_$ac_safe=no"
4153 fi
4154 rm -f conftest*
4155 fi
4156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4157   echo "$ac_t""yes" 1>&6
4158     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4159   cat >> confdefs.h <<EOF
4160 #define $ac_tr_hdr 1
4161 EOF
4162  
4163 else
4164   echo "$ac_t""no" 1>&6
4165 fi
4166 done
4167
4168
4169
4170
4171
4172
4173 # Only perform the check for file, if the check method requires it
4174 case $deplibs_check_method in
4175 file_magic*)
4176   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4177     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4178 echo "configure:4179: checking for ${ac_tool_prefix}file" >&5
4179 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   case $MAGIC_CMD in
4183   /*)
4184   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4185   ;;
4186   ?:/*)
4187   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4188   ;;
4189   *)
4190   ac_save_MAGIC_CMD="$MAGIC_CMD"
4191   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4192   ac_dummy="/usr/bin:$PATH"
4193   for ac_dir in $ac_dummy; do
4194     test -z "$ac_dir" && ac_dir=.
4195     if test -f $ac_dir/${ac_tool_prefix}file; then
4196       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4197       if test -n "$file_magic_test_file"; then
4198         case $deplibs_check_method in
4199         "file_magic "*)
4200           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4201           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4202           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4203             egrep "$file_magic_regex" > /dev/null; then
4204             :
4205           else
4206             cat <<EOF 1>&2
4207
4208 *** Warning: the command libtool uses to detect shared libraries,
4209 *** $file_magic_cmd, produces output that libtool cannot recognize.
4210 *** The result is that libtool may fail to recognize shared libraries
4211 *** as such.  This will affect the creation of libtool libraries that
4212 *** depend on shared libraries, but programs linked with such libtool
4213 *** libraries will work regardless of this problem.  Nevertheless, you
4214 *** may want to report the problem to your system manager and/or to
4215 *** bug-libtool@gnu.org
4216
4217 EOF
4218           fi ;;
4219         esac
4220       fi
4221       break
4222     fi
4223   done
4224   IFS="$ac_save_ifs"
4225   MAGIC_CMD="$ac_save_MAGIC_CMD"
4226   ;;
4227 esac
4228 fi
4229
4230 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4231 if test -n "$MAGIC_CMD"; then
4232   echo "$ac_t""$MAGIC_CMD" 1>&6
4233 else
4234   echo "$ac_t""no" 1>&6
4235 fi
4236
4237 if test -z "$lt_cv_path_MAGIC_CMD"; then
4238   if test -n "$ac_tool_prefix"; then
4239     echo $ac_n "checking for file""... $ac_c" 1>&6
4240 echo "configure:4241: checking for file" >&5
4241 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4242   echo $ac_n "(cached) $ac_c" 1>&6
4243 else
4244   case $MAGIC_CMD in
4245   /*)
4246   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4247   ;;
4248   ?:/*)
4249   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4250   ;;
4251   *)
4252   ac_save_MAGIC_CMD="$MAGIC_CMD"
4253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4254   ac_dummy="/usr/bin:$PATH"
4255   for ac_dir in $ac_dummy; do
4256     test -z "$ac_dir" && ac_dir=.
4257     if test -f $ac_dir/file; then
4258       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4259       if test -n "$file_magic_test_file"; then
4260         case $deplibs_check_method in
4261         "file_magic "*)
4262           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4263           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4264           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4265             egrep "$file_magic_regex" > /dev/null; then
4266             :
4267           else
4268             cat <<EOF 1>&2
4269
4270 *** Warning: the command libtool uses to detect shared libraries,
4271 *** $file_magic_cmd, produces output that libtool cannot recognize.
4272 *** The result is that libtool may fail to recognize shared libraries
4273 *** as such.  This will affect the creation of libtool libraries that
4274 *** depend on shared libraries, but programs linked with such libtool
4275 *** libraries will work regardless of this problem.  Nevertheless, you
4276 *** may want to report the problem to your system manager and/or to
4277 *** bug-libtool@gnu.org
4278
4279 EOF
4280           fi ;;
4281         esac
4282       fi
4283       break
4284     fi
4285   done
4286   IFS="$ac_save_ifs"
4287   MAGIC_CMD="$ac_save_MAGIC_CMD"
4288   ;;
4289 esac
4290 fi
4291
4292 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4293 if test -n "$MAGIC_CMD"; then
4294   echo "$ac_t""$MAGIC_CMD" 1>&6
4295 else
4296   echo "$ac_t""no" 1>&6
4297 fi
4298
4299   else
4300     MAGIC_CMD=:
4301   fi
4302 fi
4303
4304   fi
4305   ;;
4306 esac
4307
4308 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4309 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4310 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4311 echo "configure:4312: checking for $ac_word" >&5
4312 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4313   echo $ac_n "(cached) $ac_c" 1>&6
4314 else
4315   if test -n "$RANLIB"; then
4316   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4317 else
4318   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4319   ac_dummy="$PATH"
4320   for ac_dir in $ac_dummy; do
4321     test -z "$ac_dir" && ac_dir=.
4322     if test -f $ac_dir/$ac_word; then
4323       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4324       break
4325     fi
4326   done
4327   IFS="$ac_save_ifs"
4328 fi
4329 fi
4330 RANLIB="$ac_cv_prog_RANLIB"
4331 if test -n "$RANLIB"; then
4332   echo "$ac_t""$RANLIB" 1>&6
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336
4337
4338 if test -z "$ac_cv_prog_RANLIB"; then
4339 if test -n "$ac_tool_prefix"; then
4340   # Extract the first word of "ranlib", so it can be a program name with args.
4341 set dummy ranlib; ac_word=$2
4342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4343 echo "configure:4344: checking for $ac_word" >&5
4344 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4345   echo $ac_n "(cached) $ac_c" 1>&6
4346 else
4347   if test -n "$RANLIB"; then
4348   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4349 else
4350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4351   ac_dummy="$PATH"
4352   for ac_dir in $ac_dummy; do
4353     test -z "$ac_dir" && ac_dir=.
4354     if test -f $ac_dir/$ac_word; then
4355       ac_cv_prog_RANLIB="ranlib"
4356       break
4357     fi
4358   done
4359   IFS="$ac_save_ifs"
4360   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4361 fi
4362 fi
4363 RANLIB="$ac_cv_prog_RANLIB"
4364 if test -n "$RANLIB"; then
4365   echo "$ac_t""$RANLIB" 1>&6
4366 else
4367   echo "$ac_t""no" 1>&6
4368 fi
4369
4370 else
4371   RANLIB=":"
4372 fi
4373 fi
4374
4375 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4376 set dummy ${ac_tool_prefix}strip; ac_word=$2
4377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4378 echo "configure:4379: checking for $ac_word" >&5
4379 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4380   echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382   if test -n "$STRIP"; then
4383   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4384 else
4385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4386   ac_dummy="$PATH"
4387   for ac_dir in $ac_dummy; do
4388     test -z "$ac_dir" && ac_dir=.
4389     if test -f $ac_dir/$ac_word; then
4390       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4391       break
4392     fi
4393   done
4394   IFS="$ac_save_ifs"
4395 fi
4396 fi
4397 STRIP="$ac_cv_prog_STRIP"
4398 if test -n "$STRIP"; then
4399   echo "$ac_t""$STRIP" 1>&6
4400 else
4401   echo "$ac_t""no" 1>&6
4402 fi
4403
4404
4405 if test -z "$ac_cv_prog_STRIP"; then
4406 if test -n "$ac_tool_prefix"; then
4407   # Extract the first word of "strip", so it can be a program name with args.
4408 set dummy strip; ac_word=$2
4409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4410 echo "configure:4411: checking for $ac_word" >&5
4411 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   if test -n "$STRIP"; then
4415   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4416 else
4417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4418   ac_dummy="$PATH"
4419   for ac_dir in $ac_dummy; do
4420     test -z "$ac_dir" && ac_dir=.
4421     if test -f $ac_dir/$ac_word; then
4422       ac_cv_prog_STRIP="strip"
4423       break
4424     fi
4425   done
4426   IFS="$ac_save_ifs"
4427   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4428 fi
4429 fi
4430 STRIP="$ac_cv_prog_STRIP"
4431 if test -n "$STRIP"; then
4432   echo "$ac_t""$STRIP" 1>&6
4433 else
4434   echo "$ac_t""no" 1>&6
4435 fi
4436
4437 else
4438   STRIP=":"
4439 fi
4440 fi
4441
4442
4443 enable_dlopen=yes
4444 enable_win32_dll=yes
4445
4446 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4447 if test "${enable_libtool_lock+set}" = set; then
4448   enableval="$enable_libtool_lock"
4449   :
4450 fi
4451
4452 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4453
4454 # Some flags need to be propagated to the compiler or linker for good
4455 # libtool support.
4456 case $host in
4457 *-*-irix6*)
4458   # Find out which ABI we are using.
4459   echo '#line 4460 "configure"' > conftest.$ac_ext
4460   if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4461     case `/usr/bin/file conftest.$ac_objext` in
4462     *32-bit*)
4463       LD="${LD-ld} -32"
4464       ;;
4465     *N32*)
4466       LD="${LD-ld} -n32"
4467       ;;
4468     *64-bit*)
4469       LD="${LD-ld} -64"
4470       ;;
4471     esac
4472   fi
4473   rm -rf conftest*
4474   ;;
4475
4476 *-*-sco3.2v5*)
4477   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4478   SAVE_CFLAGS="$CFLAGS"
4479   CFLAGS="$CFLAGS -belf"
4480   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4481 echo "configure:4482: checking whether the C compiler needs -belf" >&5
4482 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   
4486      ac_ext=c
4487 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4488 ac_cpp='$CPP $CPPFLAGS'
4489 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4490 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4491 cross_compiling=$ac_cv_prog_cc_cross
4492
4493      cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496
4497 int main() {
4498
4499 ; return 0; }
4500 EOF
4501 if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=yes
4504 else
4505   echo "configure: failed program was:" >&5
4506   cat conftest.$ac_ext >&5
4507   rm -rf conftest*
4508   lt_cv_cc_needs_belf=no
4509 fi
4510 rm -f conftest*
4511      ac_ext=c
4512 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4513 ac_cpp='$CPP $CPPFLAGS'
4514 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4515 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4516 cross_compiling=$ac_cv_prog_cc_cross
4517
4518 fi
4519
4520 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4521   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4522     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4523     CFLAGS="$SAVE_CFLAGS"
4524   fi
4525   ;;
4526
4527 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4528   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4529 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4531 echo "configure:4532: checking for $ac_word" >&5
4532 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   if test -n "$DLLTOOL"; then
4536   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4537 else
4538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4539   ac_dummy="$PATH"
4540   for ac_dir in $ac_dummy; do
4541     test -z "$ac_dir" && ac_dir=.
4542     if test -f $ac_dir/$ac_word; then
4543       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4544       break
4545     fi
4546   done
4547   IFS="$ac_save_ifs"
4548 fi
4549 fi
4550 DLLTOOL="$ac_cv_prog_DLLTOOL"
4551 if test -n "$DLLTOOL"; then
4552   echo "$ac_t""$DLLTOOL" 1>&6
4553 else
4554   echo "$ac_t""no" 1>&6
4555 fi
4556
4557
4558 if test -z "$ac_cv_prog_DLLTOOL"; then
4559 if test -n "$ac_tool_prefix"; then
4560   # Extract the first word of "dlltool", so it can be a program name with args.
4561 set dummy dlltool; ac_word=$2
4562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4563 echo "configure:4564: checking for $ac_word" >&5
4564 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   if test -n "$DLLTOOL"; then
4568   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4569 else
4570   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4571   ac_dummy="$PATH"
4572   for ac_dir in $ac_dummy; do
4573     test -z "$ac_dir" && ac_dir=.
4574     if test -f $ac_dir/$ac_word; then
4575       ac_cv_prog_DLLTOOL="dlltool"
4576       break
4577     fi
4578   done
4579   IFS="$ac_save_ifs"
4580   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4581 fi
4582 fi
4583 DLLTOOL="$ac_cv_prog_DLLTOOL"
4584 if test -n "$DLLTOOL"; then
4585   echo "$ac_t""$DLLTOOL" 1>&6
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590 else
4591   DLLTOOL="false"
4592 fi
4593 fi
4594
4595   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4596 set dummy ${ac_tool_prefix}as; ac_word=$2
4597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4598 echo "configure:4599: checking for $ac_word" >&5
4599 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4600   echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602   if test -n "$AS"; then
4603   ac_cv_prog_AS="$AS" # Let the user override the test.
4604 else
4605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4606   ac_dummy="$PATH"
4607   for ac_dir in $ac_dummy; do
4608     test -z "$ac_dir" && ac_dir=.
4609     if test -f $ac_dir/$ac_word; then
4610       ac_cv_prog_AS="${ac_tool_prefix}as"
4611       break
4612     fi
4613   done
4614   IFS="$ac_save_ifs"
4615 fi
4616 fi
4617 AS="$ac_cv_prog_AS"
4618 if test -n "$AS"; then
4619   echo "$ac_t""$AS" 1>&6
4620 else
4621   echo "$ac_t""no" 1>&6
4622 fi
4623
4624
4625 if test -z "$ac_cv_prog_AS"; then
4626 if test -n "$ac_tool_prefix"; then
4627   # Extract the first word of "as", so it can be a program name with args.
4628 set dummy as; ac_word=$2
4629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4630 echo "configure:4631: checking for $ac_word" >&5
4631 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4632   echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634   if test -n "$AS"; then
4635   ac_cv_prog_AS="$AS" # Let the user override the test.
4636 else
4637   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4638   ac_dummy="$PATH"
4639   for ac_dir in $ac_dummy; do
4640     test -z "$ac_dir" && ac_dir=.
4641     if test -f $ac_dir/$ac_word; then
4642       ac_cv_prog_AS="as"
4643       break
4644     fi
4645   done
4646   IFS="$ac_save_ifs"
4647   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4648 fi
4649 fi
4650 AS="$ac_cv_prog_AS"
4651 if test -n "$AS"; then
4652   echo "$ac_t""$AS" 1>&6
4653 else
4654   echo "$ac_t""no" 1>&6
4655 fi
4656
4657 else
4658   AS="false"
4659 fi
4660 fi
4661
4662   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4663 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_word" >&5
4666 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   if test -n "$OBJDUMP"; then
4670   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4671 else
4672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4673   ac_dummy="$PATH"
4674   for ac_dir in $ac_dummy; do
4675     test -z "$ac_dir" && ac_dir=.
4676     if test -f $ac_dir/$ac_word; then
4677       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4678       break
4679     fi
4680   done
4681   IFS="$ac_save_ifs"
4682 fi
4683 fi
4684 OBJDUMP="$ac_cv_prog_OBJDUMP"
4685 if test -n "$OBJDUMP"; then
4686   echo "$ac_t""$OBJDUMP" 1>&6
4687 else
4688   echo "$ac_t""no" 1>&6
4689 fi
4690
4691
4692 if test -z "$ac_cv_prog_OBJDUMP"; then
4693 if test -n "$ac_tool_prefix"; then
4694   # Extract the first word of "objdump", so it can be a program name with args.
4695 set dummy objdump; ac_word=$2
4696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4697 echo "configure:4698: checking for $ac_word" >&5
4698 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4699   echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701   if test -n "$OBJDUMP"; then
4702   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4703 else
4704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4705   ac_dummy="$PATH"
4706   for ac_dir in $ac_dummy; do
4707     test -z "$ac_dir" && ac_dir=.
4708     if test -f $ac_dir/$ac_word; then
4709       ac_cv_prog_OBJDUMP="objdump"
4710       break
4711     fi
4712   done
4713   IFS="$ac_save_ifs"
4714   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4715 fi
4716 fi
4717 OBJDUMP="$ac_cv_prog_OBJDUMP"
4718 if test -n "$OBJDUMP"; then
4719   echo "$ac_t""$OBJDUMP" 1>&6
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724 else
4725   OBJDUMP="false"
4726 fi
4727 fi
4728
4729
4730   # recent cygwin and mingw systems supply a stub DllMain which the user
4731   # can override, but on older systems we have to supply one
4732   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4733 echo "configure:4734: checking if libtool should supply DllMain function" >&5
4734 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4735   echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737   cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740
4741 int main() {
4742 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4743       DllMain (0, 0, 0);
4744 ; return 0; }
4745 EOF
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=no
4749 else
4750   echo "configure: failed program was:" >&5
4751   cat conftest.$ac_ext >&5
4752   rm -rf conftest*
4753   lt_cv_need_dllmain=yes
4754 fi
4755 rm -f conftest*
4756 fi
4757
4758 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4759
4760   case $host/$CC in
4761   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4762     # old mingw systems require "-dll" to link a DLL, while more recent ones
4763     # require "-mdll"
4764     SAVE_CFLAGS="$CFLAGS"
4765     CFLAGS="$CFLAGS -mdll"
4766     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4767 echo "configure:4768: checking how to link DLLs" >&5
4768 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774
4775 int main() {
4776
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-mdll
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   lt_cv_cc_dll_switch=-dll
4787 fi
4788 rm -f conftest*
4789 fi
4790
4791 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4792     CFLAGS="$SAVE_CFLAGS" ;;
4793   *-*-cygwin* | *-*-pw32*)
4794     # cygwin systems need to pass --dll to the linker, and not link
4795     # crt.o which will require a WinMain@16 definition.
4796     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4797   esac
4798   ;;
4799   
4800 esac
4801
4802 # Sed substitution that helps us do robust quoting.  It backslashifies
4803 # metacharacters that are still active within double-quoted strings.
4804 Xsed='sed -e s/^X//'
4805 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4806
4807 # Same as above, but do not quote variable references.
4808 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4809
4810 # Sed substitution to delay expansion of an escaped shell variable in a
4811 # double_quote_subst'ed string.
4812 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4813
4814 # Constants:
4815 rm="rm -f"
4816
4817 # Global variables:
4818 default_ofile=libtool
4819 can_build_shared=yes
4820
4821 # All known linkers require a `.a' archive for static linking (except M$VC,
4822 # which needs '.lib').
4823 libext=a
4824 ltmain="$ac_aux_dir/ltmain.sh"
4825 ofile="$default_ofile"
4826 with_gnu_ld="$lt_cv_prog_gnu_ld"
4827 need_locks="$enable_libtool_lock"
4828
4829 old_CC="$CC"
4830 old_CFLAGS="$CFLAGS"
4831
4832 # Set sane defaults for various variables
4833 test -z "$AR" && AR=ar
4834 test -z "$AR_FLAGS" && AR_FLAGS=cru
4835 test -z "$AS" && AS=as
4836 test -z "$CC" && CC=cc
4837 test -z "$DLLTOOL" && DLLTOOL=dlltool
4838 test -z "$LD" && LD=ld
4839 test -z "$LN_S" && LN_S="ln -s"
4840 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4841 test -z "$NM" && NM=nm
4842 test -z "$OBJDUMP" && OBJDUMP=objdump
4843 test -z "$RANLIB" && RANLIB=:
4844 test -z "$STRIP" && STRIP=:
4845 test -z "$ac_objext" && ac_objext=o
4846
4847 if test x"$host" != x"$build"; then
4848   ac_tool_prefix=${host_alias}-
4849 else
4850   ac_tool_prefix=
4851 fi
4852
4853 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4854 case $host_os in
4855 linux-gnu*) ;;
4856 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4857 esac
4858
4859 case $host_os in
4860 aix3*)
4861   # AIX sometimes has problems with the GCC collect2 program.  For some
4862   # reason, if we set the COLLECT_NAMES environment variable, the problems
4863   # vanish in a puff of smoke.
4864   if test "X${COLLECT_NAMES+set}" != Xset; then
4865     COLLECT_NAMES=
4866     export COLLECT_NAMES
4867   fi
4868   ;;
4869 esac
4870
4871 # Determine commands to create old-style static archives.
4872 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4873 old_postinstall_cmds='chmod 644 $oldlib'
4874 old_postuninstall_cmds=
4875
4876 if test -n "$RANLIB"; then
4877   case $host_os in
4878   openbsd*)
4879     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4880     ;;
4881   *)
4882     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4883     ;;
4884   esac
4885   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4886 fi
4887
4888 # Allow CC to be a program name with arguments.
4889 set dummy $CC
4890 compiler="$2"
4891
4892 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4893 echo "configure:4894: checking for objdir" >&5
4894 rm -f .libs 2>/dev/null
4895 mkdir .libs 2>/dev/null
4896 if test -d .libs; then
4897   objdir=.libs
4898 else
4899   # MS-DOS does not allow filenames that begin with a dot.
4900   objdir=_libs
4901 fi
4902 rmdir .libs 2>/dev/null
4903 echo "$ac_t""$objdir" 1>&6
4904
4905
4906 # Check whether --with-pic or --without-pic was given.
4907 if test "${with_pic+set}" = set; then
4908   withval="$with_pic"
4909   pic_mode="$withval"
4910 else
4911   pic_mode=default
4912 fi
4913
4914 test -z "$pic_mode" && pic_mode=default
4915
4916 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4917 # in isolation, and that seeing it set (from the cache) indicates that
4918 # the associated values are set (in the cache) correctly too.
4919 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4920 echo "configure:4921: checking for $compiler option to produce PIC" >&5
4921 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4922   echo $ac_n "(cached) $ac_c" 1>&6
4923 else
4924    lt_cv_prog_cc_pic=
4925   lt_cv_prog_cc_shlib=
4926   lt_cv_prog_cc_wl=
4927   lt_cv_prog_cc_static=
4928   lt_cv_prog_cc_no_builtin=
4929   lt_cv_prog_cc_can_build_shared=$can_build_shared
4930
4931   if test "$GCC" = yes; then
4932     lt_cv_prog_cc_wl='-Wl,'
4933     lt_cv_prog_cc_static='-static'
4934
4935     case $host_os in
4936     aix*)
4937       # Below there is a dirty hack to force normal static linking with -ldl
4938       # The problem is because libdl dynamically linked with both libc and
4939       # libC (AIX C++ library), which obviously doesn't included in libraries
4940       # list by gcc. This cause undefined symbols with -static flags.
4941       # This hack allows C programs to be linked with "-static -ldl", but
4942       # not sure about C++ programs.
4943       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4944       ;;
4945     amigaos*)
4946       # FIXME: we need at least 68020 code to build shared libraries, but
4947       # adding the `-m68020' flag to GCC prevents building anything better,
4948       # like `-m68040'.
4949       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4950       ;;
4951     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4952       # PIC is the default for these OSes.
4953       ;;
4954     darwin* | rhapsody*)
4955       # PIC is the default on this platform
4956       # Common symbols not allowed in MH_DYLIB files
4957       lt_cv_prog_cc_pic='-fno-common'
4958       ;;
4959     cygwin* | mingw* | pw32* | os2*)
4960       # This hack is so that the source file can tell whether it is being
4961       # built for inclusion in a dll (and should export symbols for example).
4962       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4963       ;;
4964     sysv4*MP*)
4965       if test -d /usr/nec; then
4966          lt_cv_prog_cc_pic=-Kconform_pic
4967       fi
4968       ;;
4969     *)
4970       lt_cv_prog_cc_pic='-fPIC'
4971       ;;
4972     esac
4973   else
4974     # PORTME Check for PIC flags for the system compiler.
4975     case $host_os in
4976     aix3* | aix4* | aix5*)
4977       lt_cv_prog_cc_wl='-Wl,'
4978       # All AIX code is PIC.
4979       if test "$host_cpu" = ia64; then
4980         # AIX 5 now supports IA64 processor
4981         lt_cv_prog_cc_static='-Bstatic'
4982       else
4983         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4984       fi
4985       ;;
4986
4987     hpux9* | hpux10* | hpux11*)
4988       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4989       lt_cv_prog_cc_wl='-Wl,'
4990       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4991       lt_cv_prog_cc_pic='+Z'
4992       ;;
4993
4994     irix5* | irix6* | nonstopux*)
4995       lt_cv_prog_cc_wl='-Wl,'
4996       lt_cv_prog_cc_static='-non_shared'
4997       # PIC (with -KPIC) is the default.
4998       ;;
4999
5000     cygwin* | mingw* | pw32* | os2*)
5001       # This hack is so that the source file can tell whether it is being
5002       # built for inclusion in a dll (and should export symbols for example).
5003       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5004       ;;
5005
5006     newsos6)
5007       lt_cv_prog_cc_pic='-KPIC'
5008       lt_cv_prog_cc_static='-Bstatic'
5009       ;;
5010     
5011     openedition)
5012       # XPLINK code is PIC by default
5013       ;;
5014
5015     osf3* | osf4* | osf5*)
5016       # All OSF/1 code is PIC.
5017       lt_cv_prog_cc_wl='-Wl,'
5018       lt_cv_prog_cc_static='-non_shared'
5019       ;;
5020
5021     sco3.2v5*)
5022       lt_cv_prog_cc_pic='-Kpic'
5023       lt_cv_prog_cc_static='-dn'
5024       lt_cv_prog_cc_shlib='-belf'
5025       ;;
5026
5027     solaris*)
5028       lt_cv_prog_cc_pic='-KPIC'
5029       lt_cv_prog_cc_static='-Bstatic'
5030       lt_cv_prog_cc_wl='-Wl,'
5031       ;;
5032
5033     sunos4*)
5034       lt_cv_prog_cc_pic='-PIC'
5035       lt_cv_prog_cc_static='-Bstatic'
5036       lt_cv_prog_cc_wl='-Qoption ld '
5037       ;;
5038
5039     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5040       lt_cv_prog_cc_pic='-KPIC'
5041       lt_cv_prog_cc_static='-Bstatic'
5042       lt_cv_prog_cc_wl='-Wl,'
5043       ;;
5044
5045     uts4*)
5046       lt_cv_prog_cc_pic='-pic'
5047       lt_cv_prog_cc_static='-Bstatic'
5048       ;;
5049
5050     sysv4*MP*)
5051       if test -d /usr/nec ;then
5052         lt_cv_prog_cc_pic='-Kconform_pic'
5053         lt_cv_prog_cc_static='-Bstatic'
5054       fi
5055       ;;
5056
5057     *)
5058       lt_cv_prog_cc_can_build_shared=no
5059       ;;
5060     esac
5061   fi
5062
5063 fi
5064
5065 if test -z "$lt_cv_prog_cc_pic"; then
5066   echo "$ac_t""none" 1>&6
5067 else
5068   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5069
5070   # Check to make sure the pic_flag actually works.
5071   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5072 echo "configure:5073: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5073   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5074   echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076       save_CFLAGS="$CFLAGS"
5077     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5078     cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081
5082 int main() {
5083
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5087   rm -rf conftest*
5088         case $host_os in
5089       hpux9* | hpux10* | hpux11*)
5090         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5091         # they create non-PIC objects.  So, if there were any warnings, we
5092         # assume that PIC is not supported.
5093         if test -s conftest.err; then
5094           lt_cv_prog_cc_pic_works=no
5095         else
5096           lt_cv_prog_cc_pic_works=yes
5097         fi
5098         ;;
5099       *)
5100         lt_cv_prog_cc_pic_works=yes
5101         ;;
5102       esac
5103     
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108         lt_cv_prog_cc_pic_works=no
5109     
5110 fi
5111 rm -f conftest*
5112     CFLAGS="$save_CFLAGS"
5113   
5114 fi
5115
5116
5117   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5118     lt_cv_prog_cc_pic=
5119     lt_cv_prog_cc_can_build_shared=no
5120   else
5121     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5122   fi
5123
5124   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5125 fi
5126
5127 # Check for any special shared library compilation flags.
5128 if test -n "$lt_cv_prog_cc_shlib"; then
5129   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5130   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5131   else
5132    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5133     lt_cv_prog_cc_can_build_shared=no
5134   fi
5135 fi
5136
5137 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5138 echo "configure:5139: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5139 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5140   echo $ac_n "(cached) $ac_c" 1>&6
5141 else
5142     lt_cv_prog_cc_static_works=no
5143   save_LDFLAGS="$LDFLAGS"
5144   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5145   cat > conftest.$ac_ext <<EOF
5146 #line 5147 "configure"
5147 #include "confdefs.h"
5148
5149 int main() {
5150
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5154   rm -rf conftest*
5155   lt_cv_prog_cc_static_works=yes
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159 fi
5160 rm -f conftest*
5161   LDFLAGS="$save_LDFLAGS"
5162
5163 fi
5164
5165
5166 # Belt *and* braces to stop my trousers falling down:
5167 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5168 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5169
5170 pic_flag="$lt_cv_prog_cc_pic"
5171 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5172 wl="$lt_cv_prog_cc_wl"
5173 link_static_flag="$lt_cv_prog_cc_static"
5174 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5175 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5176
5177
5178 # Check to see if options -o and -c are simultaneously supported by compiler
5179 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5180 echo "configure:5181: checking if $compiler supports -c -o file.$ac_objext" >&5
5181 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5182   echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184   
5185 $rm -r conftest 2>/dev/null
5186 mkdir conftest
5187 cd conftest
5188 echo "int some_variable = 0;" > conftest.$ac_ext
5189 mkdir out
5190 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5191 # that will create temporary files in the current directory regardless of
5192 # the output directory.  Thus, making CWD read-only will cause this test
5193 # to fail, enabling locking or at least warning the user not to do parallel
5194 # builds.
5195 chmod -w .
5196 save_CFLAGS="$CFLAGS"
5197 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5198 compiler_c_o=no
5199 if { (eval echo configure:5200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5200   # The compiler can only warn and ignore the option if not recognized
5201   # So say no if there are warnings
5202   if test -s out/conftest.err; then
5203     lt_cv_compiler_c_o=no
5204   else
5205     lt_cv_compiler_c_o=yes
5206   fi
5207 else
5208   # Append any errors to the config.log.
5209   cat out/conftest.err 1>&5
5210   lt_cv_compiler_c_o=no
5211 fi
5212 CFLAGS="$save_CFLAGS"
5213 chmod u+w .
5214 $rm conftest* out/*
5215 rmdir out
5216 cd ..
5217 rmdir conftest
5218 $rm -r conftest 2>/dev/null
5219
5220 fi
5221
5222 compiler_c_o=$lt_cv_compiler_c_o
5223 echo "$ac_t""$compiler_c_o" 1>&6
5224
5225 if test x"$compiler_c_o" = x"yes"; then
5226   # Check to see if we can write to a .lo
5227   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5228 echo "configure:5229: checking if $compiler supports -c -o file.lo" >&5
5229   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5230   echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232   
5233   lt_cv_compiler_o_lo=no
5234   save_CFLAGS="$CFLAGS"
5235   CFLAGS="$CFLAGS -c -o conftest.lo"
5236   save_objext="$ac_objext"
5237   ac_objext=lo
5238   cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241
5242 int main() {
5243 int some_variable = 0;
5244 ; return 0; }
5245 EOF
5246 if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5247   rm -rf conftest*
5248       # The compiler can only warn and ignore the option if not recognized
5249     # So say no if there are warnings
5250     if test -s conftest.err; then
5251       lt_cv_compiler_o_lo=no
5252     else
5253       lt_cv_compiler_o_lo=yes
5254     fi
5255   
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259 fi
5260 rm -f conftest*
5261   ac_objext="$save_objext"
5262   CFLAGS="$save_CFLAGS"
5263   
5264 fi
5265
5266   compiler_o_lo=$lt_cv_compiler_o_lo
5267   echo "$ac_t""$compiler_o_lo" 1>&6
5268 else
5269   compiler_o_lo=no
5270 fi
5271
5272 # Check to see if we can do hard links to lock some files if needed
5273 hard_links="nottested"
5274 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5275   # do not overwrite the value of need_locks provided by the user
5276   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5277 echo "configure:5278: checking if we can lock with hard links" >&5
5278   hard_links=yes
5279   $rm conftest*
5280   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5281   touch conftest.a
5282   ln conftest.a conftest.b 2>&5 || hard_links=no
5283   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5284   echo "$ac_t""$hard_links" 1>&6
5285   if test "$hard_links" = no; then
5286     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5287     need_locks=warn
5288   fi
5289 else
5290   need_locks=no
5291 fi
5292
5293 if test "$GCC" = yes; then
5294   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5295   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5296 echo "configure:5297: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5297   echo "int some_variable = 0;" > conftest.$ac_ext
5298   save_CFLAGS="$CFLAGS"
5299   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5300   compiler_rtti_exceptions=no
5301   cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304
5305 int main() {
5306 int some_variable = 0;
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5310   rm -rf conftest*
5311       # The compiler can only warn and ignore the option if not recognized
5312     # So say no if there are warnings
5313     if test -s conftest.err; then
5314       compiler_rtti_exceptions=no
5315     else
5316       compiler_rtti_exceptions=yes
5317     fi
5318   
5319 else
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322 fi
5323 rm -f conftest*
5324   CFLAGS="$save_CFLAGS"
5325   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5326
5327   if test "$compiler_rtti_exceptions" = "yes"; then
5328     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5329   else
5330     no_builtin_flag=' -fno-builtin'
5331   fi
5332 fi
5333
5334 # See if the linker supports building shared libraries.
5335 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5336 echo "configure:5337: checking whether the linker ($LD) supports shared libraries" >&5
5337
5338 allow_undefined_flag=
5339 no_undefined_flag=
5340 need_lib_prefix=unknown
5341 need_version=unknown
5342 # when you set need_version to no, make sure it does not cause -set_version
5343 # flags to be left without arguments
5344 archive_cmds=
5345 archive_expsym_cmds=
5346 old_archive_from_new_cmds=
5347 old_archive_from_expsyms_cmds=
5348 export_dynamic_flag_spec=
5349 whole_archive_flag_spec=
5350 thread_safe_flag_spec=
5351 hardcode_into_libs=no
5352 hardcode_libdir_flag_spec=
5353 hardcode_libdir_separator=
5354 hardcode_direct=no
5355 hardcode_minus_L=no
5356 hardcode_shlibpath_var=unsupported
5357 runpath_var=
5358 link_all_deplibs=unknown
5359 always_export_symbols=no
5360 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5361 # include_expsyms should be a list of space-separated symbols to be *always*
5362 # included in the symbol list
5363 include_expsyms=
5364 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5365 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5366 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5367 # as well as any symbol that contains `d'.
5368 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5369 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5370 # platforms (ab)use it in PIC code, but their linkers get confused if
5371 # the symbol is explicitly referenced.  Since portable code cannot
5372 # rely on this symbol name, it's probably fine to never include it in
5373 # preloaded symbol tables.
5374 extract_expsyms_cmds=
5375
5376 case $host_os in
5377 cygwin* | mingw* | pw32*)
5378   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5379   # When not using gcc, we currently assume that we are using
5380   # Microsoft Visual C++.
5381   if test "$GCC" != yes; then
5382     with_gnu_ld=no
5383   fi
5384   ;;
5385 openbsd*)
5386   with_gnu_ld=no
5387   ;;
5388 esac
5389
5390 ld_shlibs=yes
5391 if test "$with_gnu_ld" = yes; then
5392   # If archive_cmds runs LD, not CC, wlarc should be empty
5393   wlarc='${wl}'
5394
5395   # See if GNU ld supports shared libraries.
5396   case $host_os in
5397   aix3* | aix4* | aix5*)
5398     # On AIX, the GNU linker is very broken
5399     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5400     ld_shlibs=no
5401     cat <<EOF 1>&2
5402
5403 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5404 *** to be unable to reliably create shared libraries on AIX.
5405 *** Therefore, libtool is disabling shared libraries support.  If you
5406 *** really care for shared libraries, you may want to modify your PATH
5407 *** so that a non-GNU linker is found, and then restart.
5408
5409 EOF
5410     ;;
5411
5412   amigaos*)
5413     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)'
5414     hardcode_libdir_flag_spec='-L$libdir'
5415     hardcode_minus_L=yes
5416
5417     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5418     # that the semantics of dynamic libraries on AmigaOS, at least up
5419     # to version 4, is to share data among multiple programs linked
5420     # with the same dynamic library.  Since this doesn't match the
5421     # behavior of shared libraries on other platforms, we can use
5422     # them.
5423     ld_shlibs=no
5424     ;;
5425
5426   beos*)
5427     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5428       allow_undefined_flag=unsupported
5429       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5430       # support --undefined.  This deserves some investigation.  FIXME
5431       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5432     else
5433       ld_shlibs=no
5434     fi
5435     ;;
5436
5437   cygwin* | mingw* | pw32*)
5438     # hardcode_libdir_flag_spec is actually meaningless, as there is
5439     # no search path for DLLs.
5440     hardcode_libdir_flag_spec='-L$libdir'
5441     allow_undefined_flag=unsupported
5442     always_export_symbols=yes
5443
5444     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5445       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5446       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5447       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5448       else $CC -o impgen impgen.c ; fi)~
5449       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5450
5451     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5452
5453     # cygwin and mingw dlls have different entry points and sets of symbols
5454     # to exclude.
5455     # FIXME: what about values for MSVC?
5456     dll_entry=__cygwin_dll_entry@12
5457     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5458     case $host_os in
5459     mingw*)
5460       # mingw values
5461       dll_entry=_DllMainCRTStartup@12
5462       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5463       ;;
5464     esac
5465
5466     # mingw and cygwin differ, and it's simplest to just exclude the union
5467     # of the two symbol sets.
5468     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5469
5470     # recent cygwin and mingw systems supply a stub DllMain which the user
5471     # can override, but on older systems we have to supply one (in ltdll.c)
5472     if test "x$lt_cv_need_dllmain" = "xyes"; then
5473       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5474       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~
5475         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5476     else
5477       ltdll_obj=
5478       ltdll_cmds=
5479     fi
5480
5481     # Extract the symbol export list from an `--export-all' def file,
5482     # then regenerate the def file from the symbol export list, so that
5483     # the compiled dll only exports the symbol export list.
5484     # Be careful not to strip the DATA tag left be newer dlltools.
5485     export_symbols_cmds="$ltdll_cmds"'
5486       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5487       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5488
5489     # If the export-symbols file already is a .def file (1st line
5490     # is EXPORTS), use it as is.
5491     # If DATA tags from a recent dlltool are present, honour them!
5492     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5493         cp $export_symbols $output_objdir/$soname-def;
5494       else
5495         echo EXPORTS > $output_objdir/$soname-def;
5496         _lt_hint=1;
5497         cat $export_symbols | while read symbol; do
5498          set dummy \$symbol;
5499          case \$# in
5500            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5501            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5502            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5503          esac;
5504          _lt_hint=`expr 1 + \$_lt_hint`;
5505         done;
5506       fi~
5507       '"$ltdll_cmds"'
5508       $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~
5509       $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~
5510       $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~
5511       $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~
5512       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5513     ;;
5514
5515   netbsd*)
5516     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5517       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5518       wlarc=
5519     else
5520       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5521       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5522     fi
5523     ;;
5524
5525   solaris* | sysv5*)
5526     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5527       ld_shlibs=no
5528       cat <<EOF 1>&2
5529
5530 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5531 *** create shared libraries on Solaris systems.  Therefore, libtool
5532 *** is disabling shared libraries support.  We urge you to upgrade GNU
5533 *** binutils to release 2.9.1 or newer.  Another option is to modify
5534 *** your PATH or compiler configuration so that the native linker is
5535 *** used, and then restart.
5536
5537 EOF
5538     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5539       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5540       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5541     else
5542       ld_shlibs=no
5543     fi
5544     ;;
5545
5546   sunos4*)
5547     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5548     wlarc=
5549     hardcode_direct=yes
5550     hardcode_shlibpath_var=no
5551     ;;
5552
5553   *)
5554     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5555       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5556       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5557     else
5558       ld_shlibs=no
5559     fi
5560     ;;
5561   esac
5562
5563   if test "$ld_shlibs" = yes; then
5564     runpath_var=LD_RUN_PATH
5565     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5566     export_dynamic_flag_spec='${wl}--export-dynamic'
5567     case $host_os in
5568     cygwin* | mingw* | pw32*)
5569       # dlltool doesn't understand --whole-archive et. al.
5570       whole_archive_flag_spec=
5571       ;;
5572     *)
5573       # ancient GNU ld didn't support --whole-archive et. al.
5574       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5575         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5576       else
5577         whole_archive_flag_spec=
5578       fi
5579       ;;
5580     esac
5581   fi
5582 else
5583   # PORTME fill in a description of your system's linker (not GNU ld)
5584   case $host_os in
5585   aix3*)
5586     allow_undefined_flag=unsupported
5587     always_export_symbols=yes
5588     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'
5589     # Note: this linker hardcodes the directories in LIBPATH if there
5590     # are no directories specified by -L.
5591     hardcode_minus_L=yes
5592     if test "$GCC" = yes && test -z "$link_static_flag"; then
5593       # Neither direct hardcoding nor static linking is supported with a
5594       # broken collect2.
5595       hardcode_direct=unsupported
5596     fi
5597     ;;
5598
5599   aix4* | aix5*)
5600     if test "$host_cpu" = ia64; then
5601       # On IA64, the linker does run time linking by default, so we don't
5602       # have to do anything special.
5603       aix_use_runtimelinking=no
5604       exp_sym_flag='-Bexport'
5605       no_entry_flag=""
5606     else
5607       aix_use_runtimelinking=no
5608
5609       # Test if we are trying to use run time linking or normal
5610       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5611       # need to do runtime linking.
5612       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5613         for ld_flag in $LDFLAGS; do
5614           case $ld_flag in
5615           *-brtl*)
5616             aix_use_runtimelinking=yes
5617             break
5618           ;;
5619           esac
5620         done
5621       esac
5622
5623       exp_sym_flag='-bexport'
5624       no_entry_flag='-bnoentry'
5625     fi
5626
5627     # When large executables or shared objects are built, AIX ld can
5628     # have problems creating the table of contents.  If linking a library
5629     # or program results in "error TOC overflow" add -mminimal-toc to
5630     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5631     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5632
5633     hardcode_direct=yes
5634     archive_cmds=''
5635     hardcode_libdir_separator=':'
5636     if test "$GCC" = yes; then
5637       case $host_os in aix4.[012]|aix4.[012].*)
5638         collect2name=`${CC} -print-prog-name=collect2`
5639         if test -f "$collect2name" && \
5640           strings "$collect2name" | grep resolve_lib_name >/dev/null
5641         then
5642           # We have reworked collect2
5643           hardcode_direct=yes
5644         else
5645           # We have old collect2
5646           hardcode_direct=unsupported
5647           # It fails to find uninstalled libraries when the uninstalled
5648           # path is not listed in the libpath.  Setting hardcode_minus_L
5649           # to unsupported forces relinking
5650           hardcode_minus_L=yes
5651           hardcode_libdir_flag_spec='-L$libdir'
5652           hardcode_libdir_separator=
5653         fi
5654       esac
5655
5656       shared_flag='-shared'
5657     else
5658       # not using gcc
5659       if test "$host_cpu" = ia64; then
5660         shared_flag='${wl}-G'
5661       else
5662         if test "$aix_use_runtimelinking" = yes; then
5663           shared_flag='${wl}-G'
5664         else
5665           shared_flag='${wl}-bM:SRE'
5666         fi
5667       fi
5668     fi
5669
5670     # It seems that -bexpall can do strange things, so it is better to
5671     # generate a list of symbols to export.
5672     always_export_symbols=yes
5673     if test "$aix_use_runtimelinking" = yes; then
5674       # Warning - without using the other runtime loading flags (-brtl),
5675       # -berok will link without error, but may produce a broken library.
5676       allow_undefined_flag='-berok'
5677       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5678       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"
5679     else
5680       if test "$host_cpu" = ia64; then
5681         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5682         allow_undefined_flag="-z nodefs"
5683         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"
5684       else
5685         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5686         # Warning - without using the other run time loading flags,
5687         # -berok will link without error, but may produce a broken library.
5688         allow_undefined_flag='${wl}-berok'
5689         # This is a bit strange, but is similar to how AIX traditionally builds
5690         # it's shared libraries.
5691         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'
5692       fi
5693     fi
5694     ;;
5695
5696   amigaos*)
5697     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)'
5698     hardcode_libdir_flag_spec='-L$libdir'
5699     hardcode_minus_L=yes
5700     # see comment about different semantics on the GNU ld section
5701     ld_shlibs=no
5702     ;;
5703
5704   cygwin* | mingw* | pw32*)
5705     # When not using gcc, we currently assume that we are using
5706     # Microsoft Visual C++.
5707     # hardcode_libdir_flag_spec is actually meaningless, as there is
5708     # no search path for DLLs.
5709     hardcode_libdir_flag_spec=' '
5710     allow_undefined_flag=unsupported
5711     # Tell ltmain to make .lib files, not .a files.
5712     libext=lib
5713     # FIXME: Setting linknames here is a bad hack.
5714     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5715     # The linker will automatically build a .lib file if we build a DLL.
5716     old_archive_from_new_cmds='true'
5717     # FIXME: Should let the user specify the lib program.
5718     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5719     fix_srcfile_path='`cygpath -w "$srcfile"`'
5720     ;;
5721
5722   darwin* | rhapsody*)
5723     case "$host_os" in
5724     rhapsody* | darwin1.[012])
5725       allow_undefined_flag='-undefined suppress'
5726       ;;
5727     *) # Darwin 1.3 on
5728       allow_undefined_flag='-flat_namespace -undefined suppress'
5729       ;;
5730     esac
5731     # FIXME: Relying on posixy $() will cause problems for
5732     #        cross-compilation, but unfortunately the echo tests do not
5733     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5734     #        `"' quotes if we put them in here... so don't!
5735     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)'
5736     # We need to add '_' to the symbols in $export_symbols first
5737     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5738     hardcode_direct=yes
5739     hardcode_shlibpath_var=no
5740     whole_archive_flag_spec='-all_load $convenience'
5741     ;;
5742
5743   freebsd1*)
5744     ld_shlibs=no
5745     ;;
5746
5747   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5748   # support.  Future versions do this automatically, but an explicit c++rt0.o
5749   # does not break anything, and helps significantly (at the cost of a little
5750   # extra space).
5751   freebsd2.2*)
5752     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5753     hardcode_libdir_flag_spec='-R$libdir'
5754     hardcode_direct=yes
5755     hardcode_shlibpath_var=no
5756     ;;
5757
5758   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5759   freebsd2*)
5760     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5761     hardcode_direct=yes
5762     hardcode_minus_L=yes
5763     hardcode_shlibpath_var=no
5764     ;;
5765
5766   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5767   freebsd*)
5768     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5769     hardcode_libdir_flag_spec='-R$libdir'
5770     hardcode_direct=yes
5771     hardcode_shlibpath_var=no
5772     ;;
5773
5774   hpux9* | hpux10* | hpux11*)
5775     case $host_os in
5776     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' ;;
5777     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5778     esac
5779     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5780     hardcode_libdir_separator=:
5781     hardcode_direct=yes
5782     hardcode_minus_L=yes # Not in the search PATH, but as the default
5783                          # location of the library.
5784     export_dynamic_flag_spec='${wl}-E'
5785     ;;
5786
5787   irix5* | irix6* | nonstopux*)
5788     if test "$GCC" = yes; then
5789       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'
5790       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5791     else
5792       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'
5793       hardcode_libdir_flag_spec='-rpath $libdir'
5794     fi
5795     hardcode_libdir_separator=:
5796     link_all_deplibs=yes
5797     ;;
5798
5799   netbsd*)
5800     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5801       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5802     else
5803       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5804     fi
5805     hardcode_libdir_flag_spec='-R$libdir'
5806     hardcode_direct=yes
5807     hardcode_shlibpath_var=no
5808     ;;
5809
5810   newsos6)
5811     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5812     hardcode_direct=yes
5813     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5814     hardcode_libdir_separator=:
5815     hardcode_shlibpath_var=no
5816     ;;
5817
5818   openbsd*)
5819     hardcode_direct=yes
5820     hardcode_shlibpath_var=no
5821     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5822       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5823       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5824       export_dynamic_flag_spec='${wl}-E'
5825     else
5826       case "$host_os" in
5827       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5828         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5829         hardcode_libdir_flag_spec='-R$libdir'
5830         ;;
5831       *)
5832         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5833         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5834         ;;
5835       esac
5836     fi
5837     ;;
5838
5839   openedition*)
5840     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5841         cp \$linknames \$output_objdir && linknames=''"
5842     export_dynamic_flag_spec="-Wl,DLL"
5843     ;;
5844
5845   os2*)
5846     hardcode_libdir_flag_spec='-L$libdir'
5847     hardcode_minus_L=yes
5848     allow_undefined_flag=unsupported
5849     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'
5850     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5851     ;;
5852
5853   osf3*)
5854     if test "$GCC" = yes; then
5855       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5856       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'
5857     else
5858       allow_undefined_flag=' -expect_unresolved \*'
5859       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'
5860     fi
5861     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5862     hardcode_libdir_separator=:
5863     ;;
5864
5865   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5866     if test "$GCC" = yes; then
5867       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5868       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'
5869       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5870     else
5871       allow_undefined_flag=' -expect_unresolved \*'
5872       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'
5873       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5874       $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'
5875
5876       #Both c and cxx compiler support -rpath directly
5877       hardcode_libdir_flag_spec='-rpath $libdir'
5878     fi
5879     hardcode_libdir_separator=:
5880     ;;
5881
5882   sco3.2v5*)
5883     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5884     hardcode_shlibpath_var=no
5885     runpath_var=LD_RUN_PATH
5886     hardcode_runpath_var=yes
5887     export_dynamic_flag_spec='${wl}-Bexport'
5888     ;;
5889
5890   solaris*)
5891     # gcc --version < 3.0 without binutils cannot create self contained
5892     # shared libraries reliably, requiring libgcc.a to resolve some of
5893     # the object symbols generated in some cases.  Libraries that use
5894     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5895     # a copy of libgcc.a into every shared library to guarantee resolving
5896     # such symbols causes other problems:  According to Tim Van Holder
5897     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5898     # (to the application) exception stack for one thing.
5899     no_undefined_flag=' -z defs'
5900     if test "$GCC" = yes; then
5901       case `$CC --version 2>/dev/null` in
5902       [12].*)
5903         cat <<EOF 1>&2
5904
5905 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5906 *** create self contained shared libraries on Solaris systems, without
5907 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5908 *** -no-undefined support, which will at least allow you to build shared
5909 *** libraries.  However, you may find that when you link such libraries
5910 *** into an application without using GCC, you have to manually add
5911 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5912 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5913 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5914
5915 EOF
5916         no_undefined_flag=
5917         ;;
5918       esac
5919     fi
5920     # $CC -shared without GNU ld will not create a library from C++
5921     # object files and a static libstdc++, better avoid it by now
5922     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5923     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5924                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5925     hardcode_libdir_flag_spec='-R$libdir'
5926     hardcode_shlibpath_var=no
5927     case $host_os in
5928     solaris2.[0-5] | solaris2.[0-5].*) ;;
5929     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5930       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5931     esac
5932     link_all_deplibs=yes
5933     ;;
5934
5935   sunos4*)
5936     if test "x$host_vendor" = xsequent; then
5937       # Use $CC to link under sequent, because it throws in some extra .o
5938       # files that make .init and .fini sections work.
5939       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5940     else
5941       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5942     fi
5943     hardcode_libdir_flag_spec='-L$libdir'
5944     hardcode_direct=yes
5945     hardcode_minus_L=yes
5946     hardcode_shlibpath_var=no
5947     ;;
5948
5949   sysv4)
5950     case $host_vendor in
5951       sni)
5952         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953         hardcode_direct=yes # is this really true???
5954         ;;
5955       siemens)
5956         ## LD is ld it makes a PLAMLIB
5957         ## CC just makes a GrossModule.
5958         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5959         reload_cmds='$CC -r -o $output$reload_objs'
5960         hardcode_direct=no
5961         ;;
5962       motorola)
5963         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5964         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5965         ;;
5966     esac
5967     runpath_var='LD_RUN_PATH'
5968     hardcode_shlibpath_var=no
5969     ;;
5970
5971   sysv4.3*)
5972     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5973     hardcode_shlibpath_var=no
5974     export_dynamic_flag_spec='-Bexport'
5975     ;;
5976
5977   sysv5*)
5978     no_undefined_flag=' -z text'
5979     # $CC -shared without GNU ld will not create a library from C++
5980     # object files and a static libstdc++, better avoid it by now
5981     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5982     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5983                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5984     hardcode_libdir_flag_spec=
5985     hardcode_shlibpath_var=no
5986     runpath_var='LD_RUN_PATH'
5987     ;;
5988
5989   uts4*)
5990     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5991     hardcode_libdir_flag_spec='-L$libdir'
5992     hardcode_shlibpath_var=no
5993     ;;
5994
5995   dgux*)
5996     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5997     hardcode_libdir_flag_spec='-L$libdir'
5998     hardcode_shlibpath_var=no
5999     ;;
6000
6001   sysv4*MP*)
6002     if test -d /usr/nec; then
6003       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004       hardcode_shlibpath_var=no
6005       runpath_var=LD_RUN_PATH
6006       hardcode_runpath_var=yes
6007       ld_shlibs=yes
6008     fi
6009     ;;
6010
6011   sysv4.2uw2*)
6012     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6013     hardcode_direct=yes
6014     hardcode_minus_L=no
6015     hardcode_shlibpath_var=no
6016     hardcode_runpath_var=yes
6017     runpath_var=LD_RUN_PATH
6018     ;;
6019
6020   sysv5uw7* | unixware7*)
6021     no_undefined_flag='${wl}-z ${wl}text'
6022     if test "$GCC" = yes; then
6023       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6024     else
6025       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6026     fi
6027     runpath_var='LD_RUN_PATH'
6028     hardcode_shlibpath_var=no
6029     ;;
6030
6031   *)
6032     ld_shlibs=no
6033     ;;
6034   esac
6035 fi
6036 echo "$ac_t""$ld_shlibs" 1>&6
6037 test "$ld_shlibs" = no && can_build_shared=no
6038
6039 # Check hardcoding attributes.
6040 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6041 echo "configure:6042: checking how to hardcode library paths into programs" >&5
6042 hardcode_action=
6043 if test -n "$hardcode_libdir_flag_spec" || \
6044    test -n "$runpath_var"; then
6045
6046   # We can hardcode non-existant directories.
6047   if test "$hardcode_direct" != no &&
6048      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6049      # have to relink, otherwise we might link with an installed library
6050      # when we should be linking with a yet-to-be-installed one
6051      ## test "$hardcode_shlibpath_var" != no &&
6052      test "$hardcode_minus_L" != no; then
6053     # Linking always hardcodes the temporary library directory.
6054     hardcode_action=relink
6055   else
6056     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6057     hardcode_action=immediate
6058   fi
6059 else
6060   # We cannot hardcode anything, or else we can only hardcode existing
6061   # directories.
6062   hardcode_action=unsupported
6063 fi
6064 echo "$ac_t""$hardcode_action" 1>&6
6065
6066 striplib=
6067 old_striplib=
6068 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6069 echo "configure:6070: checking whether stripping libraries is possible" >&5
6070 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6071   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6072   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6073   echo "$ac_t""yes" 1>&6
6074 else
6075   echo "$ac_t""no" 1>&6
6076 fi
6077
6078 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6079 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6080
6081 # PORTME Fill in your ld.so characteristics
6082 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6083 echo "configure:6084: checking dynamic linker characteristics" >&5
6084 library_names_spec=
6085 libname_spec='lib$name'
6086 soname_spec=
6087 postinstall_cmds=
6088 postuninstall_cmds=
6089 finish_cmds=
6090 finish_eval=
6091 shlibpath_var=
6092 shlibpath_overrides_runpath=unknown
6093 version_type=none
6094 dynamic_linker="$host_os ld.so"
6095 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6096 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6097
6098 case $host_os in
6099 aix3*)
6100   version_type=linux
6101   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6102   shlibpath_var=LIBPATH
6103
6104   # AIX has no versioning support, so we append a major version to the name.
6105   soname_spec='${libname}${release}.so$major'
6106   ;;
6107
6108 aix4* | aix5*)
6109   version_type=linux
6110   need_lib_prefix=no
6111   need_version=no
6112   hardcode_into_libs=yes
6113   if test "$host_cpu" = ia64; then
6114     # AIX 5 supports IA64
6115     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6116     shlibpath_var=LD_LIBRARY_PATH
6117   else
6118     # With GCC up to 2.95.x, collect2 would create an import file
6119     # for dependence libraries.  The import file would start with
6120     # the line `#! .'.  This would cause the generated library to
6121     # depend on `.', always an invalid library.  This was fixed in
6122     # development snapshots of GCC prior to 3.0.
6123     case $host_os in
6124       aix4 | aix4.[01] | aix4.[01].*)
6125         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6126              echo ' yes '
6127              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6128           :
6129         else
6130           can_build_shared=no
6131         fi
6132         ;;
6133     esac
6134     # AIX (on Power*) has no versioning support, so currently we can
6135     # not hardcode correct soname into executable. Probably we can
6136     # add versioning support to collect2, so additional links can
6137     # be useful in future.
6138     if test "$aix_use_runtimelinking" = yes; then
6139       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6140       # instead of lib<name>.a to let people know that these are not
6141       # typical AIX shared libraries.
6142       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6143     else
6144       # We preserve .a as extension for shared libraries through AIX4.2
6145       # and later when we are not doing run time linking.
6146       library_names_spec='${libname}${release}.a $libname.a'
6147       soname_spec='${libname}${release}.so$major'
6148     fi
6149     shlibpath_var=LIBPATH
6150   fi
6151   hardcode_into_libs=yes
6152   ;;
6153
6154 amigaos*)
6155   library_names_spec='$libname.ixlibrary $libname.a'
6156   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6157   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'
6158   ;;
6159
6160 beos*)
6161   library_names_spec='${libname}.so'
6162   dynamic_linker="$host_os ld.so"
6163   shlibpath_var=LIBRARY_PATH
6164   ;;
6165
6166 bsdi4*)
6167   version_type=linux
6168   need_version=no
6169   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6170   soname_spec='${libname}${release}.so$major'
6171   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6172   shlibpath_var=LD_LIBRARY_PATH
6173   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6174   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6175   export_dynamic_flag_spec=-rdynamic
6176   # the default ld.so.conf also contains /usr/contrib/lib and
6177   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6178   # libtool to hard-code these into programs
6179   ;;
6180
6181 cygwin* | mingw* | pw32*)
6182   version_type=windows
6183   need_version=no
6184   need_lib_prefix=no
6185   case $GCC,$host_os in
6186   yes,cygwin*)
6187     library_names_spec='$libname.dll.a'
6188     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6189     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6190       dldir=$destdir/`dirname \$dlpath`~
6191       test -d \$dldir || mkdir -p \$dldir~
6192       $install_prog .libs/$dlname \$dldir/$dlname'
6193     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6194       dlpath=$dir/\$dldll~
6195        $rm \$dlpath'
6196     ;;
6197   yes,mingw*)
6198     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6199     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6200     ;;
6201   yes,pw32*)
6202     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6203     ;;
6204   *)
6205     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6206     ;;
6207   esac
6208   dynamic_linker='Win32 ld.exe'
6209   # FIXME: first we should search . and the directory the executable is in
6210   shlibpath_var=PATH
6211   ;;
6212
6213 darwin* | rhapsody*)
6214   dynamic_linker="$host_os dyld"
6215   version_type=darwin
6216   need_lib_prefix=no
6217   need_version=no
6218   # FIXME: Relying on posixy $() will cause problems for
6219   #        cross-compilation, but unfortunately the echo tests do not
6220   #        yet detect zsh echo's removal of \ escapes.
6221   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)'
6222   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6223   shlibpath_overrides_runpath=yes
6224   shlibpath_var=DYLD_LIBRARY_PATH
6225   ;;
6226
6227 freebsd1*)
6228   dynamic_linker=no
6229   ;;
6230
6231 freebsd*)
6232   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6233   version_type=freebsd-$objformat
6234   case $version_type in
6235     freebsd-elf*)
6236       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6237       need_version=no
6238       need_lib_prefix=no
6239       ;;
6240     freebsd-*)
6241       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6242       need_version=yes
6243       ;;
6244   esac
6245   shlibpath_var=LD_LIBRARY_PATH
6246   case $host_os in
6247   freebsd2*)
6248     shlibpath_overrides_runpath=yes
6249     ;;
6250   *)
6251     shlibpath_overrides_runpath=no
6252     hardcode_into_libs=yes
6253     ;;
6254   esac
6255   ;;
6256
6257 gnu*)
6258   version_type=linux
6259   need_lib_prefix=no
6260   need_version=no
6261   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6262   soname_spec='${libname}${release}.so$major'
6263   shlibpath_var=LD_LIBRARY_PATH
6264   hardcode_into_libs=yes
6265   ;;
6266
6267 hpux9* | hpux10* | hpux11*)
6268   # Give a soname corresponding to the major version so that dld.sl refuses to
6269   # link against other versions.
6270   dynamic_linker="$host_os dld.sl"
6271   version_type=sunos
6272   need_lib_prefix=no
6273   need_version=no
6274   shlibpath_var=SHLIB_PATH
6275   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6276   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6277   soname_spec='${libname}${release}.sl$major'
6278   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6279   postinstall_cmds='chmod 555 $lib'
6280   ;;
6281
6282 irix5* | irix6* | nonstopux*)
6283   case $host_os in
6284     nonstopux*) version_type=nonstopux ;;
6285     *)          version_type=irix ;;
6286   esac
6287   need_lib_prefix=no
6288   need_version=no
6289   soname_spec='${libname}${release}.so$major'
6290   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6291   case $host_os in
6292   irix5* | nonstopux*)
6293     libsuff= shlibsuff=
6294     ;;
6295   *)
6296     case $LD in # libtool.m4 will add one of these switches to LD
6297     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6298     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6299     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6300     *) libsuff= shlibsuff= libmagic=never-match;;
6301     esac
6302     ;;
6303   esac
6304   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6305   shlibpath_overrides_runpath=no
6306   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6307   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6308   ;;
6309
6310 # No shared lib support for Linux oldld, aout, or coff.
6311 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6312   dynamic_linker=no
6313   ;;
6314
6315 # This must be Linux ELF.
6316 linux-gnu*)
6317   version_type=linux
6318   need_lib_prefix=no
6319   need_version=no
6320   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6321   soname_spec='${libname}${release}.so$major'
6322   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6323   shlibpath_var=LD_LIBRARY_PATH
6324   shlibpath_overrides_runpath=no
6325   # This implies no fast_install, which is unacceptable.
6326   # Some rework will be needed to allow for fast_install
6327   # before this can be enabled.
6328   hardcode_into_libs=yes
6329
6330   # We used to test for /lib/ld.so.1 and disable shared libraries on
6331   # powerpc, because MkLinux only supported shared libraries with the
6332   # GNU dynamic linker.  Since this was broken with cross compilers,
6333   # most powerpc-linux boxes support dynamic linking these days and
6334   # people can always --disable-shared, the test was removed, and we
6335   # assume the GNU/Linux dynamic linker is in use.
6336   dynamic_linker='GNU/Linux ld.so'
6337   ;;
6338
6339 netbsd*)
6340   version_type=sunos
6341   need_lib_prefix=no
6342   need_version=no
6343   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6344     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6345     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6346     dynamic_linker='NetBSD (a.out) ld.so'
6347   else
6348     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6349     soname_spec='${libname}${release}.so$major'
6350     dynamic_linker='NetBSD ld.elf_so'
6351   fi
6352   shlibpath_var=LD_LIBRARY_PATH
6353   shlibpath_overrides_runpath=yes
6354   hardcode_into_libs=yes
6355   ;;
6356
6357 newsos6)
6358   version_type=linux
6359   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6360   shlibpath_var=LD_LIBRARY_PATH
6361   shlibpath_overrides_runpath=yes
6362   ;;
6363
6364 openbsd*)
6365   version_type=sunos
6366   need_lib_prefix=no
6367   need_version=no
6368   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6369     case "$host_os" in
6370     openbsd2.[89] | openbsd2.[89].*)
6371       shlibpath_overrides_runpath=no
6372       ;;
6373     *)
6374       shlibpath_overrides_runpath=yes
6375       ;;
6376     esac
6377   else
6378     shlibpath_overrides_runpath=yes
6379   fi
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6381   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   ;;
6384
6385 openedition*)
6386   need_lib_prefix=no
6387   need_version=no
6388   shlibpath_overrides_runpath=yes
6389   shlibpath_var=LIBPATH
6390   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6391   # the library's exports are in libname.x; this is the file that must
6392   # actually be linked with to use a DLL.
6393   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6394   ;;
6395
6396 os2*)
6397   libname_spec='$name'
6398   need_lib_prefix=no
6399   library_names_spec='$libname.dll $libname.a'
6400   dynamic_linker='OS/2 ld.exe'
6401   shlibpath_var=LIBPATH
6402   ;;
6403
6404 osf3* | osf4* | osf5*)
6405   version_type=osf
6406   need_version=no
6407   soname_spec='${libname}${release}.so$major'
6408   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6409   shlibpath_var=LD_LIBRARY_PATH
6410   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6411   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6412   hardcode_into_libs=yes
6413   ;;
6414
6415 sco3.2v5*)
6416   version_type=osf
6417   soname_spec='${libname}${release}.so$major'
6418   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6419   shlibpath_var=LD_LIBRARY_PATH
6420   ;;
6421
6422 solaris*)
6423   version_type=linux
6424   need_lib_prefix=no
6425   need_version=no
6426   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6427   soname_spec='${libname}${release}.so$major'
6428   shlibpath_var=LD_LIBRARY_PATH
6429   shlibpath_overrides_runpath=yes
6430   hardcode_into_libs=yes
6431   # ldd complains unless libraries are executable
6432   postinstall_cmds='chmod +x $lib'
6433   ;;
6434
6435 sunos4*)
6436   version_type=sunos
6437   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6438   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6439   shlibpath_var=LD_LIBRARY_PATH
6440   shlibpath_overrides_runpath=yes
6441   if test "$with_gnu_ld" = yes; then
6442     need_lib_prefix=no
6443   fi
6444   need_version=yes
6445   ;;
6446
6447 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6448   version_type=linux
6449   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6450   soname_spec='${libname}${release}.so$major'
6451   shlibpath_var=LD_LIBRARY_PATH
6452   case $host_vendor in
6453     sni)
6454       shlibpath_overrides_runpath=no
6455       need_lib_prefix=no
6456       export_dynamic_flag_spec='${wl}-Blargedynsym'
6457       runpath_var=LD_RUN_PATH
6458       ;;
6459     siemens)
6460       need_lib_prefix=no
6461       ;;
6462     motorola)
6463       need_lib_prefix=no
6464       need_version=no
6465       shlibpath_overrides_runpath=no
6466       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6467       ;;
6468   esac
6469   ;;
6470
6471 uts4*)
6472   version_type=linux
6473   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6474   soname_spec='${libname}${release}.so$major'
6475   shlibpath_var=LD_LIBRARY_PATH
6476   ;;
6477
6478 dgux*)
6479   version_type=linux
6480   need_lib_prefix=no
6481   need_version=no
6482   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6483   soname_spec='${libname}${release}.so$major'
6484   shlibpath_var=LD_LIBRARY_PATH
6485   ;;
6486
6487 sysv4*MP*)
6488   if test -d /usr/nec ;then
6489     version_type=linux
6490     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6491     soname_spec='$libname.so.$major'
6492     shlibpath_var=LD_LIBRARY_PATH
6493   fi
6494   ;;
6495
6496 *)
6497   dynamic_linker=no
6498   ;;
6499 esac
6500 echo "$ac_t""$dynamic_linker" 1>&6
6501 test "$dynamic_linker" = no && can_build_shared=no
6502
6503 # Report the final consequences.
6504 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6505 echo "configure:6506: checking if libtool supports shared libraries" >&5
6506 echo "$ac_t""$can_build_shared" 1>&6
6507
6508 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6509 echo "configure:6510: checking whether to build shared libraries" >&5
6510 test "$can_build_shared" = "no" && enable_shared=no
6511
6512 # On AIX, shared libraries and static libraries use the same namespace, and
6513 # are all built from PIC.
6514 case "$host_os" in
6515 aix3*)
6516   test "$enable_shared" = yes && enable_static=no
6517   if test -n "$RANLIB"; then
6518     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6519     postinstall_cmds='$RANLIB $lib'
6520   fi
6521   ;;
6522
6523 aix4*)
6524   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6525     test "$enable_shared" = yes && enable_static=no
6526   fi
6527   ;;
6528 esac
6529 echo "$ac_t""$enable_shared" 1>&6
6530
6531 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6532 echo "configure:6533: checking whether to build static libraries" >&5
6533 # Make sure either enable_shared or enable_static is yes.
6534 test "$enable_shared" = yes || enable_static=yes
6535 echo "$ac_t""$enable_static" 1>&6
6536
6537 if test "$hardcode_action" = relink; then
6538   # Fast installation is not supported
6539   enable_fast_install=no
6540 elif test "$shlibpath_overrides_runpath" = yes ||
6541      test "$enable_shared" = no; then
6542   # Fast installation is not necessary
6543   enable_fast_install=needless
6544 fi
6545
6546 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6547 if test "$GCC" = yes; then
6548   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6549 fi
6550
6551 if test "x$enable_dlopen" != xyes; then
6552   enable_dlopen=unknown
6553   enable_dlopen_self=unknown
6554   enable_dlopen_self_static=unknown
6555 else
6556   lt_cv_dlopen=no
6557   lt_cv_dlopen_libs=
6558
6559   case $host_os in
6560   beos*)
6561     lt_cv_dlopen="load_add_on"
6562     lt_cv_dlopen_libs=
6563     lt_cv_dlopen_self=yes
6564     ;;
6565
6566   cygwin* | mingw* | pw32*)
6567     lt_cv_dlopen="LoadLibrary"
6568     lt_cv_dlopen_libs=
6569    ;;
6570
6571   *)
6572     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6573 echo "configure:6574: checking for dllload" >&5
6574 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6575   echo $ac_n "(cached) $ac_c" 1>&6
6576 else
6577   cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 /* System header to define __stub macros and hopefully few prototypes,
6581     which can conflict with char dllload(); below.  */
6582 #include <assert.h>
6583 /* Override any gcc2 internal prototype to avoid an error.  */
6584 /* We use char because int might match the return type of a gcc2
6585     builtin and then its argument prototype would still apply.  */
6586 char dllload();
6587 char (*f)();
6588
6589 int main() {
6590
6591 /* The GNU C library defines this for functions which it implements
6592     to always fail with ENOSYS.  Some functions are actually named
6593     something starting with __ and the normal name is an alias.  */
6594 #if defined (__stub_dllload) || defined (__stub___dllload)
6595 choke me
6596 #else
6597 f = dllload;
6598 #endif
6599
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6603   rm -rf conftest*
6604   eval "ac_cv_func_dllload=yes"
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   eval "ac_cv_func_dllload=no"
6610 fi
6611 rm -f conftest*
6612 fi
6613
6614 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6615   echo "$ac_t""yes" 1>&6
6616   lt_cv_dlopen="dllload"
6617 else
6618   echo "$ac_t""no" 1>&6
6619 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6620 echo "configure:6621: checking for shl_load" >&5
6621 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6622   echo $ac_n "(cached) $ac_c" 1>&6
6623 else
6624   cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 /* System header to define __stub macros and hopefully few prototypes,
6628     which can conflict with char shl_load(); below.  */
6629 #include <assert.h>
6630 /* Override any gcc2 internal prototype to avoid an error.  */
6631 /* We use char because int might match the return type of a gcc2
6632     builtin and then its argument prototype would still apply.  */
6633 char shl_load();
6634 char (*f)();
6635
6636 int main() {
6637
6638 /* The GNU C library defines this for functions which it implements
6639     to always fail with ENOSYS.  Some functions are actually named
6640     something starting with __ and the normal name is an alias.  */
6641 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6642 choke me
6643 #else
6644 f = shl_load;
6645 #endif
6646
6647 ; return 0; }
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6650   rm -rf conftest*
6651   eval "ac_cv_func_shl_load=yes"
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   eval "ac_cv_func_shl_load=no"
6657 fi
6658 rm -f conftest*
6659 fi
6660
6661 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6662   echo "$ac_t""yes" 1>&6
6663   lt_cv_dlopen="shl_load"
6664 else
6665   echo "$ac_t""no" 1>&6
6666 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6667 echo "configure:6668: checking for shl_load in -ldld" >&5
6668 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   ac_save_LIBS="$LIBS"
6673 LIBS="-ldld  $LIBS"
6674 cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* Override any gcc2 internal prototype to avoid an error.  */
6678 /* We use char because int might match the return type of a gcc2
6679     builtin and then its argument prototype would still apply.  */
6680 char shl_load();
6681
6682 int main() {
6683 shl_load()
6684 ; return 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=yes"
6689 else
6690   echo "configure: failed program was:" >&5
6691   cat conftest.$ac_ext >&5
6692   rm -rf conftest*
6693   eval "ac_cv_lib_$ac_lib_var=no"
6694 fi
6695 rm -f conftest*
6696 LIBS="$ac_save_LIBS"
6697
6698 fi
6699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6700   echo "$ac_t""yes" 1>&6
6701   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6702 else
6703   echo "$ac_t""no" 1>&6
6704 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6705 echo "configure:6706: checking for dlopen" >&5
6706 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6707   echo $ac_n "(cached) $ac_c" 1>&6
6708 else
6709   cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* System header to define __stub macros and hopefully few prototypes,
6713     which can conflict with char dlopen(); below.  */
6714 #include <assert.h>
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char dlopen();
6719 char (*f)();
6720
6721 int main() {
6722
6723 /* The GNU C library defines this for functions which it implements
6724     to always fail with ENOSYS.  Some functions are actually named
6725     something starting with __ and the normal name is an alias.  */
6726 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6727 choke me
6728 #else
6729 f = dlopen;
6730 #endif
6731
6732 ; return 0; }
6733 EOF
6734 if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6735   rm -rf conftest*
6736   eval "ac_cv_func_dlopen=yes"
6737 else
6738   echo "configure: failed program was:" >&5
6739   cat conftest.$ac_ext >&5
6740   rm -rf conftest*
6741   eval "ac_cv_func_dlopen=no"
6742 fi
6743 rm -f conftest*
6744 fi
6745
6746 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748   lt_cv_dlopen="dlopen"
6749 else
6750   echo "$ac_t""no" 1>&6
6751 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6752 echo "configure:6753: checking for dlopen in -ldl" >&5
6753 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6755   echo $ac_n "(cached) $ac_c" 1>&6
6756 else
6757   ac_save_LIBS="$LIBS"
6758 LIBS="-ldl  $LIBS"
6759 cat > conftest.$ac_ext <<EOF
6760 #line 6761 "configure"
6761 #include "confdefs.h"
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 /* We use char because int might match the return type of a gcc2
6764     builtin and then its argument prototype would still apply.  */
6765 char dlopen();
6766
6767 int main() {
6768 dlopen()
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_lib_$ac_lib_var=no"
6779 fi
6780 rm -f conftest*
6781 LIBS="$ac_save_LIBS"
6782
6783 fi
6784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6787 else
6788   echo "$ac_t""no" 1>&6
6789 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6790 echo "configure:6791: checking for dlopen in -lsvld" >&5
6791 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   ac_save_LIBS="$LIBS"
6796 LIBS="-lsvld  $LIBS"
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error.  */
6801 /* We use char because int might match the return type of a gcc2
6802     builtin and then its argument prototype would still apply.  */
6803 char dlopen();
6804
6805 int main() {
6806 dlopen()
6807 ; return 0; }
6808 EOF
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=yes"
6812 else
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=no"
6817 fi
6818 rm -f conftest*
6819 LIBS="$ac_save_LIBS"
6820
6821 fi
6822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dld_link in -ldld" >&5
6829 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   ac_save_LIBS="$LIBS"
6834 LIBS="-ldld  $LIBS"
6835 cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char dld_link();
6842
6843 int main() {
6844 dld_link()
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_lib_$ac_lib_var=no"
6855 fi
6856 rm -f conftest*
6857 LIBS="$ac_save_LIBS"
6858
6859 fi
6860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6863 else
6864   echo "$ac_t""no" 1>&6
6865 fi
6866
6867               
6868 fi
6869
6870             
6871 fi
6872
6873           
6874 fi
6875
6876         
6877 fi
6878
6879       
6880 fi
6881
6882     
6883 fi
6884
6885     ;;
6886   esac
6887
6888   if test "x$lt_cv_dlopen" != xno; then
6889     enable_dlopen=yes
6890   else
6891     enable_dlopen=no
6892   fi
6893
6894   case $lt_cv_dlopen in
6895   dlopen)
6896     save_CPPFLAGS="$CPPFLAGS"
6897         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6898
6899     save_LDFLAGS="$LDFLAGS"
6900     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6901
6902     save_LIBS="$LIBS"
6903     LIBS="$lt_cv_dlopen_libs $LIBS"
6904
6905     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6906 echo "configure:6907: checking whether a program can dlopen itself" >&5
6907 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6908   echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910           if test "$cross_compiling" = yes; then :
6911   lt_cv_dlopen_self=cross
6912 else
6913     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6914   lt_status=$lt_dlunknown
6915   cat > conftest.$ac_ext <<EOF
6916 #line 6917 "configure"
6917 #include "confdefs.h"
6918
6919 #if HAVE_DLFCN_H
6920 #include <dlfcn.h>
6921 #endif
6922
6923 #include <stdio.h>
6924
6925 #ifdef RTLD_GLOBAL
6926 #  define LT_DLGLOBAL           RTLD_GLOBAL
6927 #else
6928 #  ifdef DL_GLOBAL
6929 #    define LT_DLGLOBAL         DL_GLOBAL
6930 #  else
6931 #    define LT_DLGLOBAL         0
6932 #  endif
6933 #endif
6934
6935 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6936    find out it does not work in some platform. */
6937 #ifndef LT_DLLAZY_OR_NOW
6938 #  ifdef RTLD_LAZY
6939 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6940 #  else
6941 #    ifdef DL_LAZY
6942 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6943 #    else
6944 #      ifdef RTLD_NOW
6945 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6946 #      else
6947 #        ifdef DL_NOW
6948 #          define LT_DLLAZY_OR_NOW      DL_NOW
6949 #        else
6950 #          define LT_DLLAZY_OR_NOW      0
6951 #        endif
6952 #      endif
6953 #    endif
6954 #  endif
6955 #endif
6956
6957 #ifdef __cplusplus
6958 extern "C" void exit (int);
6959 #endif
6960
6961 void fnord() { int i=42;}
6962 int main ()
6963 {
6964   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6965   int status = $lt_dlunknown;
6966
6967   if (self)
6968     {
6969       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6970       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6971       /* dlclose (self); */
6972     }
6973
6974     exit (status);
6975 }
6976 EOF
6977   if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6978     (./conftest; exit; ) 2>/dev/null
6979     lt_status=$?
6980     case x$lt_status in
6981       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6982       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6983       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6984     esac
6985   else :
6986     # compilation failed
6987     lt_cv_dlopen_self=no
6988   fi
6989 fi
6990 rm -fr conftest*
6991
6992     
6993 fi
6994
6995 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6996
6997     if test "x$lt_cv_dlopen_self" = xyes; then
6998       LDFLAGS="$LDFLAGS $link_static_flag"
6999       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7000 echo "configure:7001: checking whether a statically linked program can dlopen itself" >&5
7001 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7002   echo $ac_n "(cached) $ac_c" 1>&6
7003 else
7004           if test "$cross_compiling" = yes; then :
7005   lt_cv_dlopen_self_static=cross
7006 else
7007     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7008   lt_status=$lt_dlunknown
7009   cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012
7013 #if HAVE_DLFCN_H
7014 #include <dlfcn.h>
7015 #endif
7016
7017 #include <stdio.h>
7018
7019 #ifdef RTLD_GLOBAL
7020 #  define LT_DLGLOBAL           RTLD_GLOBAL
7021 #else
7022 #  ifdef DL_GLOBAL
7023 #    define LT_DLGLOBAL         DL_GLOBAL
7024 #  else
7025 #    define LT_DLGLOBAL         0
7026 #  endif
7027 #endif
7028
7029 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7030    find out it does not work in some platform. */
7031 #ifndef LT_DLLAZY_OR_NOW
7032 #  ifdef RTLD_LAZY
7033 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7034 #  else
7035 #    ifdef DL_LAZY
7036 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7037 #    else
7038 #      ifdef RTLD_NOW
7039 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7040 #      else
7041 #        ifdef DL_NOW
7042 #          define LT_DLLAZY_OR_NOW      DL_NOW
7043 #        else
7044 #          define LT_DLLAZY_OR_NOW      0
7045 #        endif
7046 #      endif
7047 #    endif
7048 #  endif
7049 #endif
7050
7051 #ifdef __cplusplus
7052 extern "C" void exit (int);
7053 #endif
7054
7055 void fnord() { int i=42;}
7056 int main ()
7057 {
7058   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7059   int status = $lt_dlunknown;
7060
7061   if (self)
7062     {
7063       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7064       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7065       /* dlclose (self); */
7066     }
7067
7068     exit (status);
7069 }
7070 EOF
7071   if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7072     (./conftest; exit; ) 2>/dev/null
7073     lt_status=$?
7074     case x$lt_status in
7075       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7076       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7077       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7078     esac
7079   else :
7080     # compilation failed
7081     lt_cv_dlopen_self_static=no
7082   fi
7083 fi
7084 rm -fr conftest*
7085
7086       
7087 fi
7088
7089 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7090     fi
7091
7092     CPPFLAGS="$save_CPPFLAGS"
7093     LDFLAGS="$save_LDFLAGS"
7094     LIBS="$save_LIBS"
7095     ;;
7096   esac
7097
7098   case $lt_cv_dlopen_self in
7099   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7100   *) enable_dlopen_self=unknown ;;
7101   esac
7102
7103   case $lt_cv_dlopen_self_static in
7104   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7105   *) enable_dlopen_self_static=unknown ;;
7106   esac
7107 fi
7108
7109
7110 if test "$enable_shared" = yes && test "$GCC" = yes; then
7111   case $archive_cmds in
7112   *'~'*)
7113     # FIXME: we may have to deal with multi-command sequences.
7114     ;;
7115   '$CC '*)
7116     # Test whether the compiler implicitly links with -lc since on some
7117     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7118     # to ld, don't add -lc before -lgcc.
7119     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7120 echo "configure:7121: checking whether -lc should be explicitly linked in" >&5
7121     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124   $rm conftest*
7125     echo 'static int dummy;' > conftest.$ac_ext
7126
7127     if { (eval echo configure:7128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7128       soname=conftest
7129       lib=conftest
7130       libobjs=conftest.$ac_objext
7131       deplibs=
7132       wl=$lt_cv_prog_cc_wl
7133       compiler_flags=-v
7134       linker_flags=-v
7135       verstring=
7136       output_objdir=.
7137       libname=conftest
7138       save_allow_undefined_flag=$allow_undefined_flag
7139       allow_undefined_flag=
7140       if { (eval echo configure:7141: \"$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; }
7141       then
7142         lt_cv_archive_cmds_need_lc=no
7143       else
7144         lt_cv_archive_cmds_need_lc=yes
7145       fi
7146       allow_undefined_flag=$save_allow_undefined_flag
7147     else
7148       cat conftest.err 1>&5
7149     fi
7150 fi
7151
7152     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7153     ;;
7154   esac
7155 fi
7156 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7157
7158 # The second clause should only fire when bootstrapping the
7159 # libtool distribution, otherwise you forgot to ship ltmain.sh
7160 # with your package, and you will get complaints that there are
7161 # no rules to generate ltmain.sh.
7162 if test -f "$ltmain"; then
7163   :
7164 else
7165   # If there is no Makefile yet, we rely on a make rule to execute
7166   # `config.status --recheck' to rerun these tests and create the
7167   # libtool script then.
7168   test -f Makefile && make "$ltmain"
7169 fi
7170
7171 if test -f "$ltmain"; then
7172   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7173   $rm -f "${ofile}T"
7174
7175   echo creating $ofile
7176
7177   # Now quote all the things that may contain metacharacters while being
7178   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7179   # variables and quote the copies for generation of the libtool script.
7180   for var in echo old_CC old_CFLAGS SED \
7181     AR AR_FLAGS CC LD LN_S NM SHELL \
7182     reload_flag reload_cmds wl \
7183     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7184     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7185     library_names_spec soname_spec \
7186     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7187     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7188     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7189     old_striplib striplib file_magic_cmd export_symbols_cmds \
7190     deplibs_check_method allow_undefined_flag no_undefined_flag \
7191     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7192     global_symbol_to_c_name_address \
7193     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7194     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7195     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7196
7197     case $var in
7198     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7199     old_postinstall_cmds | old_postuninstall_cmds | \
7200     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7201     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7202     postinstall_cmds | postuninstall_cmds | \
7203     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7204       # Double-quote double-evaled strings.
7205       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7206       ;;
7207     *)
7208       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7209       ;;
7210     esac
7211   done
7212
7213   cat <<__EOF__ > "${ofile}T"
7214 #! $SHELL
7215
7216 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7217 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7218 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7219 #
7220 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7221 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7222 #
7223 # This program is free software; you can redistribute it and/or modify
7224 # it under the terms of the GNU General Public License as published by
7225 # the Free Software Foundation; either version 2 of the License, or
7226 # (at your option) any later version.
7227 #
7228 # This program is distributed in the hope that it will be useful, but
7229 # WITHOUT ANY WARRANTY; without even the implied warranty of
7230 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7231 # General Public License for more details.
7232 #
7233 # You should have received a copy of the GNU General Public License
7234 # along with this program; if not, write to the Free Software
7235 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7236 #
7237 # As a special exception to the GNU General Public License, if you
7238 # distribute this file as part of a program that contains a
7239 # configuration script generated by Autoconf, you may include it under
7240 # the same distribution terms that you use for the rest of that program.
7241
7242 # A sed that does not truncate output.
7243 SED=$lt_SED
7244
7245 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7246 Xsed="${SED} -e s/^X//"
7247
7248 # The HP-UX ksh and POSIX shell print the target directory to stdout
7249 # if CDPATH is set.
7250 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7251
7252 # ### BEGIN LIBTOOL CONFIG
7253
7254 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7255
7256 # Shell to use when invoking shell scripts.
7257 SHELL=$lt_SHELL
7258
7259 # Whether or not to build shared libraries.
7260 build_libtool_libs=$enable_shared
7261
7262 # Whether or not to build static libraries.
7263 build_old_libs=$enable_static
7264
7265 # Whether or not to add -lc for building shared libraries.
7266 build_libtool_need_lc=$need_lc
7267
7268 # Whether or not to optimize for fast installation.
7269 fast_install=$enable_fast_install
7270
7271 # The host system.
7272 host_alias=$host_alias
7273 host=$host
7274
7275 # An echo program that does not interpret backslashes.
7276 echo=$lt_echo
7277
7278 # The archiver.
7279 AR=$lt_AR
7280 AR_FLAGS=$lt_AR_FLAGS
7281
7282 # The default C compiler.
7283 CC=$lt_CC
7284
7285 # Is the compiler the GNU C compiler?
7286 with_gcc=$GCC
7287
7288 # The linker used to build libraries.
7289 LD=$lt_LD
7290
7291 # Whether we need hard or soft links.
7292 LN_S=$lt_LN_S
7293
7294 # A BSD-compatible nm program.
7295 NM=$lt_NM
7296
7297 # A symbol stripping program
7298 STRIP=$STRIP
7299
7300 # Used to examine libraries when file_magic_cmd begins "file"
7301 MAGIC_CMD=$MAGIC_CMD
7302
7303 # Used on cygwin: DLL creation program.
7304 DLLTOOL="$DLLTOOL"
7305
7306 # Used on cygwin: object dumper.
7307 OBJDUMP="$OBJDUMP"
7308
7309 # Used on cygwin: assembler.
7310 AS="$AS"
7311
7312 # The name of the directory that contains temporary libtool files.
7313 objdir=$objdir
7314
7315 # How to create reloadable object files.
7316 reload_flag=$lt_reload_flag
7317 reload_cmds=$lt_reload_cmds
7318
7319 # How to pass a linker flag through the compiler.
7320 wl=$lt_wl
7321
7322 # Object file suffix (normally "o").
7323 objext="$ac_objext"
7324
7325 # Old archive suffix (normally "a").
7326 libext="$libext"
7327
7328 # Executable file suffix (normally "").
7329 exeext="$exeext"
7330
7331 # Additional compiler flags for building library objects.
7332 pic_flag=$lt_pic_flag
7333 pic_mode=$pic_mode
7334
7335 # Does compiler simultaneously support -c and -o options?
7336 compiler_c_o=$lt_compiler_c_o
7337
7338 # Can we write directly to a .lo ?
7339 compiler_o_lo=$lt_compiler_o_lo
7340
7341 # Must we lock files when doing compilation ?
7342 need_locks=$lt_need_locks
7343
7344 # Do we need the lib prefix for modules?
7345 need_lib_prefix=$need_lib_prefix
7346
7347 # Do we need a version for libraries?
7348 need_version=$need_version
7349
7350 # Whether dlopen is supported.
7351 dlopen_support=$enable_dlopen
7352
7353 # Whether dlopen of programs is supported.
7354 dlopen_self=$enable_dlopen_self
7355
7356 # Whether dlopen of statically linked programs is supported.
7357 dlopen_self_static=$enable_dlopen_self_static
7358
7359 # Compiler flag to prevent dynamic linking.
7360 link_static_flag=$lt_link_static_flag
7361
7362 # Compiler flag to turn off builtin functions.
7363 no_builtin_flag=$lt_no_builtin_flag
7364
7365 # Compiler flag to allow reflexive dlopens.
7366 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7367
7368 # Compiler flag to generate shared objects directly from archives.
7369 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7370
7371 # Compiler flag to generate thread-safe objects.
7372 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7373
7374 # Library versioning type.
7375 version_type=$version_type
7376
7377 # Format of library name prefix.
7378 libname_spec=$lt_libname_spec
7379
7380 # List of archive names.  First name is the real one, the rest are links.
7381 # The last name is the one that the linker finds with -lNAME.
7382 library_names_spec=$lt_library_names_spec
7383
7384 # The coded name of the library, if different from the real name.
7385 soname_spec=$lt_soname_spec
7386
7387 # Commands used to build and install an old-style archive.
7388 RANLIB=$lt_RANLIB
7389 old_archive_cmds=$lt_old_archive_cmds
7390 old_postinstall_cmds=$lt_old_postinstall_cmds
7391 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7392
7393 # Create an old-style archive from a shared archive.
7394 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7395
7396 # Create a temporary old-style archive to link instead of a shared archive.
7397 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7398
7399 # Commands used to build and install a shared archive.
7400 archive_cmds=$lt_archive_cmds
7401 archive_expsym_cmds=$lt_archive_expsym_cmds
7402 postinstall_cmds=$lt_postinstall_cmds
7403 postuninstall_cmds=$lt_postuninstall_cmds
7404
7405 # Commands to strip libraries.
7406 old_striplib=$lt_old_striplib
7407 striplib=$lt_striplib
7408
7409 # Method to check whether dependent libraries are shared objects.
7410 deplibs_check_method=$lt_deplibs_check_method
7411
7412 # Command to use when deplibs_check_method == file_magic.
7413 file_magic_cmd=$lt_file_magic_cmd
7414
7415 # Flag that allows shared libraries with undefined symbols to be built.
7416 allow_undefined_flag=$lt_allow_undefined_flag
7417
7418 # Flag that forces no undefined symbols.
7419 no_undefined_flag=$lt_no_undefined_flag
7420
7421 # Commands used to finish a libtool library installation in a directory.
7422 finish_cmds=$lt_finish_cmds
7423
7424 # Same as above, but a single script fragment to be evaled but not shown.
7425 finish_eval=$lt_finish_eval
7426
7427 # Take the output of nm and produce a listing of raw symbols and C names.
7428 global_symbol_pipe=$lt_global_symbol_pipe
7429
7430 # Transform the output of nm in a proper C declaration
7431 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7432
7433 # Transform the output of nm in a C name address pair
7434 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7435
7436 # This is the shared library runtime path variable.
7437 runpath_var=$runpath_var
7438
7439 # This is the shared library path variable.
7440 shlibpath_var=$shlibpath_var
7441
7442 # Is shlibpath searched before the hard-coded library search path?
7443 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7444
7445 # How to hardcode a shared library path into an executable.
7446 hardcode_action=$hardcode_action
7447
7448 # Whether we should hardcode library paths into libraries.
7449 hardcode_into_libs=$hardcode_into_libs
7450
7451 # Flag to hardcode \$libdir into a binary during linking.
7452 # This must work even if \$libdir does not exist.
7453 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7454
7455 # Whether we need a single -rpath flag with a separated argument.
7456 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7457
7458 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7459 # resulting binary.
7460 hardcode_direct=$hardcode_direct
7461
7462 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7463 # resulting binary.
7464 hardcode_minus_L=$hardcode_minus_L
7465
7466 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7467 # the resulting binary.
7468 hardcode_shlibpath_var=$hardcode_shlibpath_var
7469
7470 # Variables whose values should be saved in libtool wrapper scripts and
7471 # restored at relink time.
7472 variables_saved_for_relink="$variables_saved_for_relink"
7473
7474 # Whether libtool must link a program against all its dependency libraries.
7475 link_all_deplibs=$link_all_deplibs
7476
7477 # Compile-time system search path for libraries
7478 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7479
7480 # Run-time system search path for libraries
7481 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7482
7483 # Fix the shell variable \$srcfile for the compiler.
7484 fix_srcfile_path="$fix_srcfile_path"
7485
7486 # Set to yes if exported symbols are required.
7487 always_export_symbols=$always_export_symbols
7488
7489 # The commands to list exported symbols.
7490 export_symbols_cmds=$lt_export_symbols_cmds
7491
7492 # The commands to extract the exported symbol list from a shared archive.
7493 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7494
7495 # Symbols that should not be listed in the preloaded symbols.
7496 exclude_expsyms=$lt_exclude_expsyms
7497
7498 # Symbols that must always be exported.
7499 include_expsyms=$lt_include_expsyms
7500
7501 # ### END LIBTOOL CONFIG
7502
7503 __EOF__
7504
7505   case $host_os in
7506   aix3*)
7507     cat <<\EOF >> "${ofile}T"
7508
7509 # AIX sometimes has problems with the GCC collect2 program.  For some
7510 # reason, if we set the COLLECT_NAMES environment variable, the problems
7511 # vanish in a puff of smoke.
7512 if test "X${COLLECT_NAMES+set}" != Xset; then
7513   COLLECT_NAMES=
7514   export COLLECT_NAMES
7515 fi
7516 EOF
7517     ;;
7518   esac
7519
7520   case $host_os in
7521   cygwin* | mingw* | pw32* | os2*)
7522     cat <<'EOF' >> "${ofile}T"
7523       # This is a source program that is used to create dlls on Windows
7524       # Don't remove nor modify the starting and closing comments
7525 # /* ltdll.c starts here */
7526 # #define WIN32_LEAN_AND_MEAN
7527 # #include <windows.h>
7528 # #undef WIN32_LEAN_AND_MEAN
7529 # #include <stdio.h>
7530 #
7531 # #ifndef __CYGWIN__
7532 # #  ifdef __CYGWIN32__
7533 # #    define __CYGWIN__ __CYGWIN32__
7534 # #  endif
7535 # #endif
7536 #
7537 # #ifdef __cplusplus
7538 # extern "C" {
7539 # #endif
7540 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7541 # #ifdef __cplusplus
7542 # }
7543 # #endif
7544 #
7545 # #ifdef __CYGWIN__
7546 # #include <cygwin/cygwin_dll.h>
7547 # DECLARE_CYGWIN_DLL( DllMain );
7548 # #endif
7549 # HINSTANCE __hDllInstance_base;
7550 #
7551 # BOOL APIENTRY
7552 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7553 # {
7554 #   __hDllInstance_base = hInst;
7555 #   return TRUE;
7556 # }
7557 # /* ltdll.c ends here */
7558         # This is a source program that is used to create import libraries
7559         # on Windows for dlls which lack them. Don't remove nor modify the
7560         # starting and closing comments
7561 # /* impgen.c starts here */
7562 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7563 #
7564 #  This file is part of GNU libtool.
7565 #
7566 #  This program is free software; you can redistribute it and/or modify
7567 #  it under the terms of the GNU General Public License as published by
7568 #  the Free Software Foundation; either version 2 of the License, or
7569 #  (at your option) any later version.
7570 #
7571 #  This program is distributed in the hope that it will be useful,
7572 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7573 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7574 #  GNU General Public License for more details.
7575 #
7576 #  You should have received a copy of the GNU General Public License
7577 #  along with this program; if not, write to the Free Software
7578 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7579 #  */
7580 #
7581 # #include <stdio.h>            /* for printf() */
7582 # #include <unistd.h>           /* for open(), lseek(), read() */
7583 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7584 # #include <string.h>           /* for strdup() */
7585 #
7586 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7587 # #ifndef O_BINARY
7588 # #define O_BINARY 0
7589 # #endif
7590 #
7591 # static unsigned int
7592 # pe_get16 (fd, offset)
7593 #      int fd;
7594 #      int offset;
7595 # {
7596 #   unsigned char b[2];
7597 #   lseek (fd, offset, SEEK_SET);
7598 #   read (fd, b, 2);
7599 #   return b[0] + (b[1]<<8);
7600 # }
7601 #
7602 # static unsigned int
7603 # pe_get32 (fd, offset)
7604 #     int fd;
7605 #     int offset;
7606 # {
7607 #   unsigned char b[4];
7608 #   lseek (fd, offset, SEEK_SET);
7609 #   read (fd, b, 4);
7610 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7611 # }
7612 #
7613 # static unsigned int
7614 # pe_as32 (ptr)
7615 #      void *ptr;
7616 # {
7617 #   unsigned char *b = ptr;
7618 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7619 # }
7620 #
7621 # int
7622 # main (argc, argv)
7623 #     int argc;
7624 #     char *argv[];
7625 # {
7626 #     int dll;
7627 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7628 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7629 #     unsigned long name_rvas, nexp;
7630 #     unsigned char *expdata, *erva;
7631 #     char *filename, *dll_name;
7632 #
7633 #     filename = argv[1];
7634 #
7635 #     dll = open(filename, O_RDONLY|O_BINARY);
7636 #     if (dll < 1)
7637 #       return 1;
7638 #
7639 #     dll_name = filename;
7640 #
7641 #     for (i=0; filename[i]; i++)
7642 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7643 #           dll_name = filename + i +1;
7644 #
7645 #     pe_header_offset = pe_get32 (dll, 0x3c);
7646 #     opthdr_ofs = pe_header_offset + 4 + 20;
7647 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7648 #
7649 #     if (num_entries < 1) /* no exports */
7650 #       return 1;
7651 #
7652 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7653 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7654 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7655 #     secptr = (pe_header_offset + 4 + 20 +
7656 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7657 #
7658 #     expptr = 0;
7659 #     for (i = 0; i < nsections; i++)
7660 #     {
7661 #       char sname[8];
7662 #       unsigned long secptr1 = secptr + 40 * i;
7663 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7664 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7665 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7666 #       lseek(dll, secptr1, SEEK_SET);
7667 #       read(dll, sname, 8);
7668 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7669 #       {
7670 #           expptr = fptr + (export_rva - vaddr);
7671 #           if (export_rva + export_size > vaddr + vsize)
7672 #               export_size = vsize - (export_rva - vaddr);
7673 #           break;
7674 #       }
7675 #     }
7676 #
7677 #     expdata = (unsigned char*)malloc(export_size);
7678 #     lseek (dll, expptr, SEEK_SET);
7679 #     read (dll, expdata, export_size);
7680 #     erva = expdata - export_rva;
7681 #
7682 #     nexp = pe_as32 (expdata+24);
7683 #     name_rvas = pe_as32 (expdata+32);
7684 #
7685 #     printf ("EXPORTS\n");
7686 #     for (i = 0; i<nexp; i++)
7687 #     {
7688 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7689 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7690 #     }
7691 #
7692 #     return 0;
7693 # }
7694 # /* impgen.c ends here */
7695
7696 EOF
7697     ;;
7698   esac
7699
7700   # We use sed instead of cat because bash on DJGPP gets confused if
7701   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7702   # text mode, it properly converts lines to CR/LF.  This bash problem
7703   # is reportedly fixed, but why not run on old versions too?
7704   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7705
7706   mv -f "${ofile}T" "$ofile" || \
7707     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7708   chmod +x "$ofile"
7709 fi
7710
7711
7712
7713
7714
7715 # This can be used to rebuild libtool when needed
7716 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7717
7718 # Always use our own libtool.
7719 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7720
7721 # Prevent multiple expansion
7722
7723
7724
7725 ol_link_perl=no
7726 if test $ol_enable_perl != no ; then
7727         # Extract the first word of "perl", so it can be a program name with args.
7728 set dummy perl; ac_word=$2
7729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7730 echo "configure:7731: checking for $ac_word" >&5
7731 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7732   echo $ac_n "(cached) $ac_c" 1>&6
7733 else
7734   case "$PERLBIN" in
7735   /*)
7736   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7737   ;;
7738   ?:/*)
7739   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7740   ;;
7741   *)
7742   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7743   ac_dummy="$PATH"
7744   for ac_dir in $ac_dummy; do 
7745     test -z "$ac_dir" && ac_dir=.
7746     if test -f $ac_dir/$ac_word; then
7747       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7748       break
7749     fi
7750   done
7751   IFS="$ac_save_ifs"
7752   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7753   ;;
7754 esac
7755 fi
7756 PERLBIN="$ac_cv_path_PERLBIN"
7757 if test -n "$PERLBIN"; then
7758   echo "$ac_t""$PERLBIN" 1>&6
7759 else
7760   echo "$ac_t""no" 1>&6
7761 fi
7762
7763
7764         if test "no$PERLBIN" = "no" ; then
7765                 if test $ol_enable_perl = yes ; then
7766                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7767                 fi
7768
7769         else
7770                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7771                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7772
7773                 if test x"$ol_enable_perl" = "xyes" ; then
7774                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7775                 else
7776                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7777                 fi
7778                                 ol_link_perl=yes
7779         fi
7780 fi
7781
7782 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7783 echo "configure:7784: checking how to run the C preprocessor" >&5
7784 # On Suns, sometimes $CPP names a directory.
7785 if test -n "$CPP" && test -d "$CPP"; then
7786   CPP=
7787 fi
7788 if test -z "$CPP"; then
7789 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7790   echo $ac_n "(cached) $ac_c" 1>&6
7791 else
7792     # This must be in double quotes, not single quotes, because CPP may get
7793   # substituted into the Makefile and "${CC-cc}" will confuse make.
7794   CPP="${CC-cc} -E"
7795   # On the NeXT, cc -E runs the code through the compiler's parser,
7796   # not just through cpp.
7797   cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 #include <assert.h>
7801 Syntax Error
7802 EOF
7803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7804 { (eval echo configure:7805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7806 if test -z "$ac_err"; then
7807   :
7808 else
7809   echo "$ac_err" >&5
7810   echo "configure: failed program was:" >&5
7811   cat conftest.$ac_ext >&5
7812   rm -rf conftest*
7813   CPP="${CC-cc} -E -traditional-cpp"
7814   cat > conftest.$ac_ext <<EOF
7815 #line 7816 "configure"
7816 #include "confdefs.h"
7817 #include <assert.h>
7818 Syntax Error
7819 EOF
7820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7821 { (eval echo configure:7822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7823 if test -z "$ac_err"; then
7824   :
7825 else
7826   echo "$ac_err" >&5
7827   echo "configure: failed program was:" >&5
7828   cat conftest.$ac_ext >&5
7829   rm -rf conftest*
7830   CPP="${CC-cc} -nologo -E"
7831   cat > conftest.$ac_ext <<EOF
7832 #line 7833 "configure"
7833 #include "confdefs.h"
7834 #include <assert.h>
7835 Syntax Error
7836 EOF
7837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7838 { (eval echo configure:7839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7840 if test -z "$ac_err"; then
7841   :
7842 else
7843   echo "$ac_err" >&5
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   CPP=/lib/cpp
7848 fi
7849 rm -f conftest*
7850 fi
7851 rm -f conftest*
7852 fi
7853 rm -f conftest*
7854   ac_cv_prog_CPP="$CPP"
7855 fi
7856   CPP="$ac_cv_prog_CPP"
7857 else
7858   ac_cv_prog_CPP="$CPP"
7859 fi
7860 echo "$ac_t""$CPP" 1>&6
7861
7862
7863
7864 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7865 echo "configure:7866: checking for Cygwin environment" >&5
7866 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7867   echo $ac_n "(cached) $ac_c" 1>&6
7868 else
7869   cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872
7873 int main() {
7874
7875 #ifndef __CYGWIN__
7876 #define __CYGWIN__ __CYGWIN32__
7877 #endif
7878 return __CYGWIN__;
7879 ; return 0; }
7880 EOF
7881 if { (eval echo configure:7882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7882   rm -rf conftest*
7883   ac_cv_cygwin=yes
7884 else
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   ac_cv_cygwin=no
7889 fi
7890 rm -f conftest*
7891 fi
7892
7893 echo "$ac_t""$ac_cv_cygwin" 1>&6
7894 CYGWIN=
7895 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7896 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7897 echo "configure:7898: checking for mingw32 environment" >&5
7898 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7899   echo $ac_n "(cached) $ac_c" 1>&6
7900 else
7901   cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904
7905 int main() {
7906 return __MINGW32__;
7907 ; return 0; }
7908 EOF
7909 if { (eval echo configure:7910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7910   rm -rf conftest*
7911   ac_cv_mingw32=yes
7912 else
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   ac_cv_mingw32=no
7917 fi
7918 rm -f conftest*
7919 fi
7920
7921 echo "$ac_t""$ac_cv_mingw32" 1>&6
7922 MINGW32=
7923 test "$ac_cv_mingw32" = yes && MINGW32=yes
7924
7925
7926
7927 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7928 echo "configure:7929: checking for executable suffix" >&5
7929 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7930   echo $ac_n "(cached) $ac_c" 1>&6
7931 else
7932   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7933   ac_cv_exeext=.exe
7934 else
7935   rm -f conftest*
7936   echo 'int main () { return 0; }' > conftest.$ac_ext
7937   ac_cv_exeext=
7938   if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7939     for file in conftest.*; do
7940       case $file in
7941       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7942       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7943       esac
7944     done
7945   else
7946     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7947   fi
7948   rm -f conftest*
7949   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7950 fi
7951 fi
7952
7953 EXEEXT=""
7954 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7955 echo "$ac_t""${ac_cv_exeext}" 1>&6
7956 ac_exeext=$EXEEXT
7957
7958 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7959 echo "configure:7960: checking for object suffix" >&5
7960 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7961   echo $ac_n "(cached) $ac_c" 1>&6
7962 else
7963   rm -f conftest*
7964 echo 'int i = 1;' > conftest.$ac_ext
7965 if { (eval echo configure:7966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7966   for ac_file in conftest.*; do
7967     case $ac_file in
7968     *.c) ;;
7969     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7970     esac
7971   done
7972 else
7973   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7974 fi
7975 rm -f conftest*
7976 fi
7977
7978 echo "$ac_t""$ac_cv_objext" 1>&6
7979 OBJEXT=$ac_cv_objext
7980 ac_objext=$ac_cv_objext
7981
7982
7983 cat >> confdefs.h <<EOF
7984 #define EXEEXT "${EXEEXT}"
7985 EOF
7986
7987
7988 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7989 echo "configure:7990: checking for be_app in -lbe" >&5
7990 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7991 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   ac_save_LIBS="$LIBS"
7995 LIBS="-lbe -lroot -lnet $LIBS"
7996 cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999 /* Override any gcc2 internal prototype to avoid an error.  */
8000 /* We use char because int might match the return type of a gcc2
8001     builtin and then its argument prototype would still apply.  */
8002 char be_app();
8003
8004 int main() {
8005 be_app()
8006 ; return 0; }
8007 EOF
8008 if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8009   rm -rf conftest*
8010   eval "ac_cv_lib_$ac_lib_var=yes"
8011 else
8012   echo "configure: failed program was:" >&5
8013   cat conftest.$ac_ext >&5
8014   rm -rf conftest*
8015   eval "ac_cv_lib_$ac_lib_var=no"
8016 fi
8017 rm -f conftest*
8018 LIBS="$ac_save_LIBS"
8019
8020 fi
8021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8022   echo "$ac_t""yes" 1>&6
8023   LIBS="$LIBS -lbe -lroot -lnet"
8024 else
8025   echo "$ac_t""no" 1>&6
8026 :
8027 fi
8028
8029
8030
8031
8032
8033 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8034 echo "configure:8035: checking for ${CC-cc} option to accept ANSI C" >&5
8035 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8036   echo $ac_n "(cached) $ac_c" 1>&6
8037 else
8038   am_cv_prog_cc_stdc=no
8039 ac_save_CC="$CC"
8040 # Don't try gcc -ansi; that turns off useful extensions and
8041 # breaks some systems' header files.
8042 # AIX                   -qlanglvl=ansi
8043 # Ultrix and OSF/1      -std1
8044 # HP-UX 10.20 and later -Ae
8045 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8046 # SVR4                  -Xc -D__EXTENSIONS__
8047 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8048 do
8049   CC="$ac_save_CC $ac_arg"
8050   cat > conftest.$ac_ext <<EOF
8051 #line 8052 "configure"
8052 #include "confdefs.h"
8053 #include <stdarg.h>
8054 #include <stdio.h>
8055 #include <sys/types.h>
8056 #include <sys/stat.h>
8057 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8058 struct buf { int x; };
8059 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8060 static char *e (p, i)
8061      char **p;
8062      int i;
8063 {
8064   return p[i];
8065 }
8066 static char *f (char * (*g) (char **, int), char **p, ...)
8067 {
8068   char *s;
8069   va_list v;
8070   va_start (v,p);
8071   s = g (p, va_arg (v,int));
8072   va_end (v);
8073   return s;
8074 }
8075 int test (int i, double x);
8076 struct s1 {int (*f) (int a);};
8077 struct s2 {int (*f) (double a);};
8078 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8079 int argc;
8080 char **argv;
8081
8082 int main() {
8083
8084 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8085
8086 ; return 0; }
8087 EOF
8088 if { (eval echo configure:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8089   rm -rf conftest*
8090   am_cv_prog_cc_stdc="$ac_arg"; break
8091 else
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094 fi
8095 rm -f conftest*
8096 done
8097 CC="$ac_save_CC"
8098
8099 fi
8100
8101 if test -z "$am_cv_prog_cc_stdc"; then
8102   echo "$ac_t""none needed" 1>&6
8103 else
8104   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8105 fi
8106 case "x$am_cv_prog_cc_stdc" in
8107   x|xno) ;;
8108   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8109 esac
8110
8111 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8112         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8113 fi
8114
8115 # test for make depend flag
8116 OL_MKDEP=
8117 OL_MKDEP_FLAGS=
8118 if test -z "${MKDEP}"; then
8119         OL_MKDEP="${CC-cc}"
8120         if test -z "${MKDEP_FLAGS}"; then
8121                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8122 echo "configure:8123: checking for ${OL_MKDEP} depend flag" >&5
8123 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8124   echo $ac_n "(cached) $ac_c" 1>&6
8125 else
8126   
8127                         ol_cv_mkdep=no
8128                         for flag in "-M" "-xM"; do
8129                                 cat > conftest.c <<EOF
8130  noCode;
8131 EOF
8132                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8133                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8134                                 then
8135                                         if test ! -f conftest."${ac_object}" ; then
8136                                                 ol_cv_mkdep=$flag
8137                                                 OL_MKDEP_FLAGS="$flag"
8138                                                 break
8139                                         fi
8140                                 fi
8141                         done
8142                         rm -f conftest*
8143                 
8144 fi
8145
8146 echo "$ac_t""$ol_cv_mkdep" 1>&6
8147         else
8148                 cc_cv_mkdep=yes
8149                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8150         fi
8151 else
8152         cc_cv_mkdep=yes
8153         OL_MKDEP="${MKDEP}"
8154         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8155 fi
8156
8157
8158
8159 if test "${ol_cv_mkdep}" = no ; then
8160         # this will soon become an error
8161         echo "configure: warning: do not know how to generate dependencies" 1>&2
8162 fi
8163
8164 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8165 echo "configure:8166: checking for afopen in -ls" >&5
8166 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8168   echo $ac_n "(cached) $ac_c" 1>&6
8169 else
8170   ac_save_LIBS="$LIBS"
8171 LIBS="-ls  $LIBS"
8172 cat > conftest.$ac_ext <<EOF
8173 #line 8174 "configure"
8174 #include "confdefs.h"
8175 /* Override any gcc2 internal prototype to avoid an error.  */
8176 /* We use char because int might match the return type of a gcc2
8177     builtin and then its argument prototype would still apply.  */
8178 char afopen();
8179
8180 int main() {
8181 afopen()
8182 ; return 0; }
8183 EOF
8184 if { (eval echo configure:8185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8185   rm -rf conftest*
8186   eval "ac_cv_lib_$ac_lib_var=yes"
8187 else
8188   echo "configure: failed program was:" >&5
8189   cat conftest.$ac_ext >&5
8190   rm -rf conftest*
8191   eval "ac_cv_lib_$ac_lib_var=no"
8192 fi
8193 rm -f conftest*
8194 LIBS="$ac_save_LIBS"
8195
8196 fi
8197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8198   echo "$ac_t""yes" 1>&6
8199   
8200         AUTH_LIBS=-ls
8201         cat >> confdefs.h <<\EOF
8202 #define HAVE_AIX_SECURITY 1
8203 EOF
8204
8205
8206 else
8207   echo "$ac_t""no" 1>&6
8208 fi
8209
8210
8211 case "$target" in
8212 *-ibm-openedition)
8213         ac_cv_func_getopt=no
8214         cat >> confdefs.h <<\EOF
8215 #define BOTH_STRINGS_H 1
8216 EOF
8217
8218         ;;
8219 esac
8220
8221 ol_link_modules=no
8222 WITH_MODULES_ENABLED=no
8223 if test $ol_enable_modules != no ; then
8224         for ac_hdr in ltdl.h
8225 do
8226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8228 echo "configure:8229: checking for $ac_hdr" >&5
8229 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8230   echo $ac_n "(cached) $ac_c" 1>&6
8231 else
8232   cat > conftest.$ac_ext <<EOF
8233 #line 8234 "configure"
8234 #include "confdefs.h"
8235 #include <$ac_hdr>
8236 EOF
8237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8238 { (eval echo configure:8239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8240 if test -z "$ac_err"; then
8241   rm -rf conftest*
8242   eval "ac_cv_header_$ac_safe=yes"
8243 else
8244   echo "$ac_err" >&5
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   eval "ac_cv_header_$ac_safe=no"
8249 fi
8250 rm -f conftest*
8251 fi
8252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8253   echo "$ac_t""yes" 1>&6
8254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8255   cat >> confdefs.h <<EOF
8256 #define $ac_tr_hdr 1
8257 EOF
8258  
8259 else
8260   echo "$ac_t""no" 1>&6
8261 fi
8262 done
8263
8264
8265         if test $ac_cv_header_ltdl_h = no ; then
8266                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8267         fi
8268
8269         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8270 echo "configure:8271: checking for lt_dlinit in -lltdl" >&5
8271 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   ac_save_LIBS="$LIBS"
8276 LIBS="-lltdl  $LIBS"
8277 cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* Override any gcc2 internal prototype to avoid an error.  */
8281 /* We use char because int might match the return type of a gcc2
8282     builtin and then its argument prototype would still apply.  */
8283 char lt_dlinit();
8284
8285 int main() {
8286 lt_dlinit()
8287 ; return 0; }
8288 EOF
8289 if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8290   rm -rf conftest*
8291   eval "ac_cv_lib_$ac_lib_var=yes"
8292 else
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -rf conftest*
8296   eval "ac_cv_lib_$ac_lib_var=no"
8297 fi
8298 rm -f conftest*
8299 LIBS="$ac_save_LIBS"
8300
8301 fi
8302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304   
8305                 MODULES_LIBS=-lltdl
8306                 cat >> confdefs.h <<\EOF
8307 #define HAVE_LIBLTDL 1
8308 EOF
8309
8310         
8311 else
8312   echo "$ac_t""no" 1>&6
8313 fi
8314
8315
8316         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8317                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8318         fi
8319         ol_link_modules=yes
8320         WITH_MODULES_ENABLED=yes
8321
8322 else
8323         for i in $Backends; do
8324                 eval "ol_tmp=\$ol_enable_$i"
8325                 if test $ol_tmp = mod ; then
8326                         echo "configure: warning: building static $i backend" 1>&2
8327                         eval "ol_enable_$i=yes"
8328                 fi
8329         done
8330         for i in $Overlays; do
8331                 eval "ol_tmp=\$ol_enable_$i"
8332                 if test $ol_tmp = mod ; then
8333                         echo "configure: warning: building static $i overlay" 1>&2
8334                         eval "ol_enable_$i=yes"
8335                 fi
8336         done
8337 fi
8338
8339 # test for EBCDIC
8340 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8341 echo "configure:8342: checking for EBCDIC" >&5
8342 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8343   echo $ac_n "(cached) $ac_c" 1>&6
8344 else
8345   
8346         cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349
8350 #if !('M' == 0xd4)
8351 #include <__ASCII__/generate_error.h>
8352 #endif
8353
8354 EOF
8355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8356 { (eval echo configure:8357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8358 if test -z "$ac_err"; then
8359   rm -rf conftest*
8360   ol_cv_cpp_ebcdic=yes
8361 else
8362   echo "$ac_err" >&5
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   ol_cv_cpp_ebcdic=no
8367 fi
8368 rm -f conftest*
8369 fi
8370
8371 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8372 if test $ol_cv_cpp_ebcdic = yes ; then
8373         cat >> confdefs.h <<\EOF
8374 #define HAVE_EBCDIC 1
8375 EOF
8376
8377 fi
8378
8379 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8380 echo "configure:8381: checking for ANSI C header files" >&5
8381 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8382   echo $ac_n "(cached) $ac_c" 1>&6
8383 else
8384   cat > conftest.$ac_ext <<EOF
8385 #line 8386 "configure"
8386 #include "confdefs.h"
8387 #include <stdlib.h>
8388 #include <stdarg.h>
8389 #include <string.h>
8390 #include <float.h>
8391 EOF
8392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8393 { (eval echo configure:8394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8395 if test -z "$ac_err"; then
8396   rm -rf conftest*
8397   ol_cv_header_stdc=yes
8398 else
8399   echo "$ac_err" >&5
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   ol_cv_header_stdc=no
8404 fi
8405 rm -f conftest*
8406
8407 if test $ol_cv_header_stdc = yes; then
8408   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8409 cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412 #include <string.h>
8413 EOF
8414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8415   egrep "memchr" >/dev/null 2>&1; then
8416   :
8417 else
8418   rm -rf conftest*
8419   ol_cv_header_stdc=no
8420 fi
8421 rm -f conftest*
8422
8423 fi
8424
8425 if test $ol_cv_header_stdc = yes; then
8426   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8427 cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 #include <stdlib.h>
8431 EOF
8432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8433   egrep "free" >/dev/null 2>&1; then
8434   :
8435 else
8436   rm -rf conftest*
8437   ol_cv_header_stdc=no
8438 fi
8439 rm -f conftest*
8440
8441 fi
8442
8443 if test $ol_cv_header_stdc = yes; then
8444   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8445 if test "$cross_compiling" = yes; then
8446   :
8447 else
8448   cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 #include <ctype.h>
8452 #ifndef HAVE_EBCDIC
8453 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8454 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8455 #else
8456 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8457                 || ('j' <= (c) && (c) <= 'r') \
8458                 || ('s' <= (c) && (c) <= 'z'))
8459 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8460 #endif
8461 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8462 int main () { int i; for (i = 0; i < 256; i++)
8463 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8464 exit (0); }
8465
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8468 then
8469   :
8470 else
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -fr conftest*
8474   ol_cv_header_stdc=no
8475 fi
8476 rm -fr conftest*
8477 fi
8478
8479 fi
8480 fi
8481
8482 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8483 if test $ol_cv_header_stdc = yes; then
8484   cat >> confdefs.h <<\EOF
8485 #define STDC_HEADERS 1
8486 EOF
8487
8488 fi
8489 ac_cv_header_stdc=disable
8490
8491
8492 if test $ol_cv_header_stdc != yes; then
8493         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8494 fi
8495
8496 ac_header_dirent=no
8497 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8498 do
8499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8500 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8501 echo "configure:8502: checking for $ac_hdr that defines DIR" >&5
8502 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8503   echo $ac_n "(cached) $ac_c" 1>&6
8504 else
8505   cat > conftest.$ac_ext <<EOF
8506 #line 8507 "configure"
8507 #include "confdefs.h"
8508 #include <sys/types.h>
8509 #include <$ac_hdr>
8510 int main() {
8511 DIR *dirp = 0;
8512 ; return 0; }
8513 EOF
8514 if { (eval echo configure:8515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8515   rm -rf conftest*
8516   eval "ac_cv_header_dirent_$ac_safe=yes"
8517 else
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520   rm -rf conftest*
8521   eval "ac_cv_header_dirent_$ac_safe=no"
8522 fi
8523 rm -f conftest*
8524 fi
8525 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8526   echo "$ac_t""yes" 1>&6
8527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8528   cat >> confdefs.h <<EOF
8529 #define $ac_tr_hdr 1
8530 EOF
8531  ac_header_dirent=$ac_hdr; break
8532 else
8533   echo "$ac_t""no" 1>&6
8534 fi
8535 done
8536 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8537 if test $ac_header_dirent = dirent.h; then
8538 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8539 echo "configure:8540: checking for opendir in -ldir" >&5
8540 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   ac_save_LIBS="$LIBS"
8545 LIBS="-ldir  $LIBS"
8546 cat > conftest.$ac_ext <<EOF
8547 #line 8548 "configure"
8548 #include "confdefs.h"
8549 /* Override any gcc2 internal prototype to avoid an error.  */
8550 /* We use char because int might match the return type of a gcc2
8551     builtin and then its argument prototype would still apply.  */
8552 char opendir();
8553
8554 int main() {
8555 opendir()
8556 ; return 0; }
8557 EOF
8558 if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8559   rm -rf conftest*
8560   eval "ac_cv_lib_$ac_lib_var=yes"
8561 else
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_lib_$ac_lib_var=no"
8566 fi
8567 rm -f conftest*
8568 LIBS="$ac_save_LIBS"
8569
8570 fi
8571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8572   echo "$ac_t""yes" 1>&6
8573   LIBS="$LIBS -ldir"
8574 else
8575   echo "$ac_t""no" 1>&6
8576 fi
8577
8578 else
8579 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8580 echo "configure:8581: checking for opendir in -lx" >&5
8581 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585   ac_save_LIBS="$LIBS"
8586 LIBS="-lx  $LIBS"
8587 cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 /* Override any gcc2 internal prototype to avoid an error.  */
8591 /* We use char because int might match the return type of a gcc2
8592     builtin and then its argument prototype would still apply.  */
8593 char opendir();
8594
8595 int main() {
8596 opendir()
8597 ; return 0; }
8598 EOF
8599 if { (eval echo configure:8600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8600   rm -rf conftest*
8601   eval "ac_cv_lib_$ac_lib_var=yes"
8602 else
8603   echo "configure: failed program was:" >&5
8604   cat conftest.$ac_ext >&5
8605   rm -rf conftest*
8606   eval "ac_cv_lib_$ac_lib_var=no"
8607 fi
8608 rm -f conftest*
8609 LIBS="$ac_save_LIBS"
8610
8611 fi
8612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614   LIBS="$LIBS -lx"
8615 else
8616   echo "$ac_t""no" 1>&6
8617 fi
8618
8619 fi
8620
8621 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8622 echo "configure:8623: checking for sys/wait.h that is POSIX.1 compatible" >&5
8623 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8624   echo $ac_n "(cached) $ac_c" 1>&6
8625 else
8626   cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 #include <sys/types.h>
8630 #include <sys/wait.h>
8631 #ifndef WEXITSTATUS
8632 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8633 #endif
8634 #ifndef WIFEXITED
8635 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8636 #endif
8637 int main() {
8638 int s;
8639 wait (&s);
8640 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8641 ; return 0; }
8642 EOF
8643 if { (eval echo configure:8644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8644   rm -rf conftest*
8645   ac_cv_header_sys_wait_h=yes
8646 else
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   ac_cv_header_sys_wait_h=no
8651 fi
8652 rm -f conftest*
8653 fi
8654
8655 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8656 if test $ac_cv_header_sys_wait_h = yes; then
8657   cat >> confdefs.h <<\EOF
8658 #define HAVE_SYS_WAIT_H 1
8659 EOF
8660
8661 fi
8662
8663 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8664 echo "configure:8665: checking POSIX termios" >&5
8665 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 #include <sys/types.h>
8672 #include <unistd.h>
8673 #include <termios.h>
8674 int main() {
8675 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8676    tcgetattr(0, 0);
8677 ; return 0; }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8680   rm -rf conftest*
8681   am_cv_sys_posix_termios=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   am_cv_sys_posix_termios=no
8687 fi
8688 rm -f conftest*
8689 fi
8690
8691 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8692
8693
8694  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8695 echo "configure:8696: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8696 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8697   echo $ac_n "(cached) $ac_c" 1>&6
8698 else
8699   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8700
8701   gwinsz_in_termios_h=no
8702   if test $am_cv_sys_posix_termios = yes; then
8703     cat > conftest.$ac_ext <<EOF
8704 #line 8705 "configure"
8705 #include "confdefs.h"
8706 #include <sys/types.h>
8707 #     include <termios.h>
8708 #     ifdef TIOCGWINSZ
8709         yes
8710 #     endif
8711     
8712 EOF
8713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8714   egrep "yes" >/dev/null 2>&1; then
8715   rm -rf conftest*
8716   gwinsz_in_termios_h=yes
8717 fi
8718 rm -f conftest*
8719
8720   fi
8721
8722   if test $gwinsz_in_termios_h = no; then
8723     cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726 #include <sys/types.h>
8727 #     include <sys/ioctl.h>
8728 #     ifdef TIOCGWINSZ
8729         yes
8730 #     endif
8731     
8732 EOF
8733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8734   egrep "yes" >/dev/null 2>&1; then
8735   rm -rf conftest*
8736   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8737 fi
8738 rm -f conftest*
8739
8740   fi
8741   
8742 fi
8743
8744 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8745   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8746     cat >> confdefs.h <<\EOF
8747 #define GWINSZ_IN_SYS_IOCTL 1
8748 EOF
8749
8750   fi
8751
8752 if test $am_cv_sys_posix_termios = yes ; then
8753         cat >> confdefs.h <<\EOF
8754 #define HAVE_POSIX_TERMIOS 1
8755 EOF
8756
8757 fi
8758
8759 for ac_hdr in \
8760         arpa/inet.h             \
8761         arpa/nameser.h  \
8762         assert.h                \
8763         bits/types.h    \
8764         conio.h                 \
8765         crypt.h                 \
8766         direct.h                \
8767         errno.h                 \
8768         fcntl.h                 \
8769         filio.h                 \
8770         getopt.h                \
8771         grp.h                   \
8772         io.h                    \
8773         libutil.h               \
8774         limits.h                \
8775         locale.h                \
8776         netinet/tcp.h   \
8777         malloc.h                \
8778         memory.h                \
8779         psap.h                  \
8780         pwd.h                   \
8781         process.h               \
8782         resolv.h                \
8783         sgtty.h                 \
8784         shadow.h                \
8785         stddef.h                \
8786         string.h                \
8787         strings.h               \
8788         sysexits.h              \
8789         sys/file.h              \
8790         sys/filio.h             \
8791         sys/errno.h             \
8792         sys/ioctl.h             \
8793         sys/param.h             \
8794         sys/resource.h  \
8795         sys/select.h    \
8796         sys/socket.h    \
8797         sys/stat.h              \
8798         sys/syslog.h    \
8799         sys/time.h              \
8800         sys/types.h             \
8801         sys/ucred.h             \
8802         sys/uio.h               \
8803         syslog.h                \
8804         termios.h               \
8805         unistd.h                \
8806         winsock.h               \
8807         winsock2.h              \
8808
8809 do
8810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8812 echo "configure:8813: checking for $ac_hdr" >&5
8813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8814   echo $ac_n "(cached) $ac_c" 1>&6
8815 else
8816   cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 #include <$ac_hdr>
8820 EOF
8821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8822 { (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8824 if test -z "$ac_err"; then
8825   rm -rf conftest*
8826   eval "ac_cv_header_$ac_safe=yes"
8827 else
8828   echo "$ac_err" >&5
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_header_$ac_safe=no"
8833 fi
8834 rm -f conftest*
8835 fi
8836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8837   echo "$ac_t""yes" 1>&6
8838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8839   cat >> confdefs.h <<EOF
8840 #define $ac_tr_hdr 1
8841 EOF
8842  
8843 else
8844   echo "$ac_t""no" 1>&6
8845 fi
8846 done
8847
8848
8849
8850 for ac_func in sigaction sigset 
8851 do
8852 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8853 echo "configure:8854: checking for $ac_func" >&5
8854 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860 /* System header to define __stub macros and hopefully few prototypes,
8861     which can conflict with char $ac_func(); below.  */
8862 #include <assert.h>
8863 /* Override any gcc2 internal prototype to avoid an error.  */
8864 /* We use char because int might match the return type of a gcc2
8865     builtin and then its argument prototype would still apply.  */
8866 char $ac_func();
8867 char (*f)();
8868
8869 int main() {
8870
8871 /* The GNU C library defines this for functions which it implements
8872     to always fail with ENOSYS.  Some functions are actually named
8873     something starting with __ and the normal name is an alias.  */
8874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8875 choke me
8876 #else
8877 f = $ac_func;
8878 #endif
8879
8880 ; return 0; }
8881 EOF
8882 if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8883   rm -rf conftest*
8884   eval "ac_cv_func_$ac_func=yes"
8885 else
8886   echo "configure: failed program was:" >&5
8887   cat conftest.$ac_ext >&5
8888   rm -rf conftest*
8889   eval "ac_cv_func_$ac_func=no"
8890 fi
8891 rm -f conftest*
8892 fi
8893
8894 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8895   echo "$ac_t""yes" 1>&6
8896     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8897   cat >> confdefs.h <<EOF
8898 #define $ac_tr_func 1
8899 EOF
8900  
8901 else
8902   echo "$ac_t""no" 1>&6
8903 fi
8904 done
8905
8906
8907 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8908         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8909 echo "configure:8910: checking for sigset in -lV3" >&5
8910 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   ac_save_LIBS="$LIBS"
8915 LIBS="-lV3  $LIBS"
8916 cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* Override any gcc2 internal prototype to avoid an error.  */
8920 /* We use char because int might match the return type of a gcc2
8921     builtin and then its argument prototype would still apply.  */
8922 char sigset();
8923
8924 int main() {
8925 sigset()
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   eval "ac_cv_lib_$ac_lib_var=yes"
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=no"
8936 fi
8937 rm -f conftest*
8938 LIBS="$ac_save_LIBS"
8939
8940 fi
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_lib 1
8947 EOF
8948
8949   LIBS="-lV3 $LIBS"
8950
8951 else
8952   echo "$ac_t""no" 1>&6
8953 fi
8954
8955 fi
8956
8957 if test "$ac_cv_header_winsock_h" = yes; then
8958 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8959 echo "configure:8960: checking for winsock" >&5
8960 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   save_LIBS="$LIBS"
8964 for curlib in ws2_32 wsock32; do
8965         LIBS="$LIBS -l$curlib"
8966         cat > conftest.$ac_ext <<EOF
8967 #line 8968 "configure"
8968 #include "confdefs.h"
8969 #include <winsock.h>
8970                         
8971 int main() {
8972
8973                         socket(0,0,0);
8974                         select(0,NULL,NULL,NULL,NULL);
8975                         closesocket(0);
8976                         gethostname(NULL,0);
8977                         
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8981   rm -rf conftest*
8982   ol_cv_winsock=yes
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   ol_cv_winsock=no
8988 fi
8989 rm -f conftest*
8990
8991         if test $ol_cv_winsock = yes; then
8992                 cat >> confdefs.h <<\EOF
8993 #define HAVE_WINSOCK 1
8994 EOF
8995
8996                 ac_cv_func_socket=yes
8997                 ac_cv_func_select=yes
8998                 ac_cv_func_closesocket=yes
8999                 ac_cv_func_gethostname=yes
9000                 if test $curlib = ws2_32; then
9001                         ol_cv_winsock=winsock2
9002                         cat >> confdefs.h <<\EOF
9003 #define HAVE_WINSOCK2 1
9004 EOF
9005
9006                 fi
9007                 break
9008         fi
9009         LIBS="$save_LIBS"
9010 done
9011 fi
9012
9013 echo "$ac_t""$ol_cv_winsock" 1>&6
9014 fi
9015
9016
9017 echo $ac_n "checking for socket""... $ac_c" 1>&6
9018 echo "configure:9019: checking for socket" >&5
9019 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9020   echo $ac_n "(cached) $ac_c" 1>&6
9021 else
9022   cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 /* System header to define __stub macros and hopefully few prototypes,
9026     which can conflict with char socket(); below.  */
9027 #include <assert.h>
9028 /* Override any gcc2 internal prototype to avoid an error.  */
9029 /* We use char because int might match the return type of a gcc2
9030     builtin and then its argument prototype would still apply.  */
9031 char socket();
9032 char (*f)();
9033
9034 int main() {
9035
9036 /* The GNU C library defines this for functions which it implements
9037     to always fail with ENOSYS.  Some functions are actually named
9038     something starting with __ and the normal name is an alias.  */
9039 #if defined (__stub_socket) || defined (__stub___socket)
9040 choke me
9041 #else
9042 f = socket;
9043 #endif
9044
9045 ; return 0; }
9046 EOF
9047 if { (eval echo configure:9048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9048   rm -rf conftest*
9049   eval "ac_cv_func_socket=yes"
9050 else
9051   echo "configure: failed program was:" >&5
9052   cat conftest.$ac_ext >&5
9053   rm -rf conftest*
9054   eval "ac_cv_func_socket=no"
9055 fi
9056 rm -f conftest*
9057 fi
9058
9059 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9060   echo "$ac_t""yes" 1>&6
9061   :
9062 else
9063   echo "$ac_t""no" 1>&6
9064         
9065         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9066 echo "configure:9067: checking for main in -lsocket" >&5
9067 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9069   echo $ac_n "(cached) $ac_c" 1>&6
9070 else
9071   ac_save_LIBS="$LIBS"
9072 LIBS="-lsocket  $LIBS"
9073 cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9076
9077 int main() {
9078 main()
9079 ; return 0; }
9080 EOF
9081 if { (eval echo configure:9082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9082   rm -rf conftest*
9083   eval "ac_cv_lib_$ac_lib_var=yes"
9084 else
9085   echo "configure: failed program was:" >&5
9086   cat conftest.$ac_ext >&5
9087   rm -rf conftest*
9088   eval "ac_cv_lib_$ac_lib_var=no"
9089 fi
9090 rm -f conftest*
9091 LIBS="$ac_save_LIBS"
9092
9093 fi
9094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9095   echo "$ac_t""yes" 1>&6
9096     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9097     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9098   cat >> confdefs.h <<EOF
9099 #define $ac_tr_lib 1
9100 EOF
9101
9102   LIBS="-lsocket $LIBS"
9103
9104 else
9105   echo "$ac_t""no" 1>&6
9106 fi
9107
9108         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9109 echo "configure:9110: checking for main in -lnet" >&5
9110 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9112   echo $ac_n "(cached) $ac_c" 1>&6
9113 else
9114   ac_save_LIBS="$LIBS"
9115 LIBS="-lnet  $LIBS"
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119
9120 int main() {
9121 main()
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   eval "ac_cv_lib_$ac_lib_var=yes"
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   eval "ac_cv_lib_$ac_lib_var=no"
9132 fi
9133 rm -f conftest*
9134 LIBS="$ac_save_LIBS"
9135
9136 fi
9137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9138   echo "$ac_t""yes" 1>&6
9139     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9141   cat >> confdefs.h <<EOF
9142 #define $ac_tr_lib 1
9143 EOF
9144
9145   LIBS="-lnet $LIBS"
9146
9147 else
9148   echo "$ac_t""no" 1>&6
9149 fi
9150
9151         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9152 echo "configure:9153: checking for main in -lnsl_s" >&5
9153 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   ac_save_LIBS="$LIBS"
9158 LIBS="-lnsl_s  $LIBS"
9159 cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9162
9163 int main() {
9164 main()
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_lib_$ac_lib_var=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=no"
9175 fi
9176 rm -f conftest*
9177 LIBS="$ac_save_LIBS"
9178
9179 fi
9180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9181   echo "$ac_t""yes" 1>&6
9182     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9183     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9184   cat >> confdefs.h <<EOF
9185 #define $ac_tr_lib 1
9186 EOF
9187
9188   LIBS="-lnsl_s $LIBS"
9189
9190 else
9191   echo "$ac_t""no" 1>&6
9192 fi
9193
9194         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9195 echo "configure:9196: checking for main in -lnsl" >&5
9196 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9198   echo $ac_n "(cached) $ac_c" 1>&6
9199 else
9200   ac_save_LIBS="$LIBS"
9201 LIBS="-lnsl  $LIBS"
9202 cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205
9206 int main() {
9207 main()
9208 ; return 0; }
9209 EOF
9210 if { (eval echo configure:9211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9211   rm -rf conftest*
9212   eval "ac_cv_lib_$ac_lib_var=yes"
9213 else
9214   echo "configure: failed program was:" >&5
9215   cat conftest.$ac_ext >&5
9216   rm -rf conftest*
9217   eval "ac_cv_lib_$ac_lib_var=no"
9218 fi
9219 rm -f conftest*
9220 LIBS="$ac_save_LIBS"
9221
9222 fi
9223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9224   echo "$ac_t""yes" 1>&6
9225     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9226     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9227   cat >> confdefs.h <<EOF
9228 #define $ac_tr_lib 1
9229 EOF
9230
9231   LIBS="-lnsl $LIBS"
9232
9233 else
9234   echo "$ac_t""no" 1>&6
9235 fi
9236
9237         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9238 echo "configure:9239: checking for socket in -linet" >&5
9239 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9241   echo $ac_n "(cached) $ac_c" 1>&6
9242 else
9243   ac_save_LIBS="$LIBS"
9244 LIBS="-linet  $LIBS"
9245 cat > conftest.$ac_ext <<EOF
9246 #line 9247 "configure"
9247 #include "confdefs.h"
9248 /* Override any gcc2 internal prototype to avoid an error.  */
9249 /* We use char because int might match the return type of a gcc2
9250     builtin and then its argument prototype would still apply.  */
9251 char socket();
9252
9253 int main() {
9254 socket()
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_lib_$ac_lib_var=no"
9265 fi
9266 rm -f conftest*
9267 LIBS="$ac_save_LIBS"
9268
9269 fi
9270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9271   echo "$ac_t""yes" 1>&6
9272     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9274   cat >> confdefs.h <<EOF
9275 #define $ac_tr_lib 1
9276 EOF
9277
9278   LIBS="-linet $LIBS"
9279
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283
9284         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9285 echo "configure:9286: checking for main in -lgen" >&5
9286 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   ac_save_LIBS="$LIBS"
9291 LIBS="-lgen  $LIBS"
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295
9296 int main() {
9297 main()
9298 ; return 0; }
9299 EOF
9300 if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9301   rm -rf conftest*
9302   eval "ac_cv_lib_$ac_lib_var=yes"
9303 else
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=no"
9308 fi
9309 rm -f conftest*
9310 LIBS="$ac_save_LIBS"
9311
9312 fi
9313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9314   echo "$ac_t""yes" 1>&6
9315     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9317   cat >> confdefs.h <<EOF
9318 #define $ac_tr_lib 1
9319 EOF
9320
9321   LIBS="-lgen $LIBS"
9322
9323 else
9324   echo "$ac_t""no" 1>&6
9325 fi
9326
9327
9328 fi
9329
9330
9331 echo $ac_n "checking for select""... $ac_c" 1>&6
9332 echo "configure:9333: checking for select" >&5
9333 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 /* System header to define __stub macros and hopefully few prototypes,
9340     which can conflict with char select(); below.  */
9341 #include <assert.h>
9342 /* Override any gcc2 internal prototype to avoid an error.  */
9343 /* We use char because int might match the return type of a gcc2
9344     builtin and then its argument prototype would still apply.  */
9345 char select();
9346 char (*f)();
9347
9348 int main() {
9349
9350 /* The GNU C library defines this for functions which it implements
9351     to always fail with ENOSYS.  Some functions are actually named
9352     something starting with __ and the normal name is an alias.  */
9353 #if defined (__stub_select) || defined (__stub___select)
9354 choke me
9355 #else
9356 f = select;
9357 #endif
9358
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362   rm -rf conftest*
9363   eval "ac_cv_func_select=yes"
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   eval "ac_cv_func_select=no"
9369 fi
9370 rm -f conftest*
9371 fi
9372
9373 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9374   echo "$ac_t""yes" 1>&6
9375   :
9376 else
9377   echo "$ac_t""no" 1>&6
9378 { echo "configure: error: select() required." 1>&2; exit 1; }
9379 fi
9380
9381
9382 if test "${ac_cv_header_winsock_h}" != yes; then
9383                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9384 echo "configure:9385: checking types of arguments for select()" >&5
9385  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9389   echo $ac_n "(cached) $ac_c" 1>&6
9390 else
9391     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9392   echo $ac_n "(cached) $ac_c" 1>&6
9393 else
9394      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9395      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9396       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9397        cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 #ifdef HAVE_SYS_TYPES_H
9401 #include <sys/types.h>
9402 #endif
9403 #ifdef HAVE_SYS_TIME_H
9404 #include <sys/time.h>
9405 #endif
9406 #ifdef HAVE_SYS_SELECT_H
9407 #include <sys/select.h>
9408 #endif
9409 #ifdef HAVE_SYS_SOCKET_H
9410 #include <sys/socket.h>
9411 #endif
9412 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);
9413 int main() {
9414
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9418   rm -rf conftest*
9419           ac_not_found=no ; break 3
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   ac_not_found=yes
9425 fi
9426 rm -f conftest*
9427       done
9428      done
9429     done
9430    
9431 fi
9432   
9433 fi
9434  
9435 fi
9436  if test "$ac_not_found" = yes; then
9437   ac_cv_func_select_arg1=int 
9438   ac_cv_func_select_arg234='int *' 
9439   ac_cv_func_select_arg5='struct timeval *'
9440  fi
9441  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9442  cat >> confdefs.h <<EOF
9443 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9444 EOF
9445
9446  cat >> confdefs.h <<EOF
9447 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9448 EOF
9449
9450  cat >> confdefs.h <<EOF
9451 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9452 EOF
9453
9454
9455 fi
9456
9457
9458 for ac_func in poll 
9459 do
9460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9461 echo "configure:9462: checking for $ac_func" >&5
9462 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465   cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 /* System header to define __stub macros and hopefully few prototypes,
9469     which can conflict with char $ac_func(); below.  */
9470 #include <assert.h>
9471 /* Override any gcc2 internal prototype to avoid an error.  */
9472 /* We use char because int might match the return type of a gcc2
9473     builtin and then its argument prototype would still apply.  */
9474 char $ac_func();
9475 char (*f)();
9476
9477 int main() {
9478
9479 /* The GNU C library defines this for functions which it implements
9480     to always fail with ENOSYS.  Some functions are actually named
9481     something starting with __ and the normal name is an alias.  */
9482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9483 choke me
9484 #else
9485 f = $ac_func;
9486 #endif
9487
9488 ; return 0; }
9489 EOF
9490 if { (eval echo configure:9491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9491   rm -rf conftest*
9492   eval "ac_cv_func_$ac_func=yes"
9493 else
9494   echo "configure: failed program was:" >&5
9495   cat conftest.$ac_ext >&5
9496   rm -rf conftest*
9497   eval "ac_cv_func_$ac_func=no"
9498 fi
9499 rm -f conftest*
9500 fi
9501
9502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9503   echo "$ac_t""yes" 1>&6
9504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9505   cat >> confdefs.h <<EOF
9506 #define $ac_tr_func 1
9507 EOF
9508  
9509 else
9510   echo "$ac_t""no" 1>&6
9511 fi
9512 done
9513
9514 for ac_hdr in poll.h 
9515 do
9516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9518 echo "configure:9519: checking for $ac_hdr" >&5
9519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522   cat > conftest.$ac_ext <<EOF
9523 #line 9524 "configure"
9524 #include "confdefs.h"
9525 #include <$ac_hdr>
9526 EOF
9527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9528 { (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9530 if test -z "$ac_err"; then
9531   rm -rf conftest*
9532   eval "ac_cv_header_$ac_safe=yes"
9533 else
9534   echo "$ac_err" >&5
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_header_$ac_safe=no"
9539 fi
9540 rm -f conftest*
9541 fi
9542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9543   echo "$ac_t""yes" 1>&6
9544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9545   cat >> confdefs.h <<EOF
9546 #define $ac_tr_hdr 1
9547 EOF
9548  
9549 else
9550   echo "$ac_t""no" 1>&6
9551 fi
9552 done
9553
9554
9555 for ac_hdr in sys/epoll.h 
9556 do
9557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9559 echo "configure:9560: checking for $ac_hdr" >&5
9560 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9561   echo $ac_n "(cached) $ac_c" 1>&6
9562 else
9563   cat > conftest.$ac_ext <<EOF
9564 #line 9565 "configure"
9565 #include "confdefs.h"
9566 #include <$ac_hdr>
9567 EOF
9568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9569 { (eval echo configure:9570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9571 if test -z "$ac_err"; then
9572   rm -rf conftest*
9573   eval "ac_cv_header_$ac_safe=yes"
9574 else
9575   echo "$ac_err" >&5
9576   echo "configure: failed program was:" >&5
9577   cat conftest.$ac_ext >&5
9578   rm -rf conftest*
9579   eval "ac_cv_header_$ac_safe=no"
9580 fi
9581 rm -f conftest*
9582 fi
9583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9584   echo "$ac_t""yes" 1>&6
9585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9586   cat >> confdefs.h <<EOF
9587 #define $ac_tr_hdr 1
9588 EOF
9589  
9590 else
9591   echo "$ac_t""no" 1>&6
9592 fi
9593 done
9594
9595 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9596 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9597 echo "configure:9598: checking for epoll system call" >&5
9598 if test "$cross_compiling" = yes; then
9599   echo "$ac_t""no" 1>&6
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 int main(int argc, char *argv)
9605 {
9606         int epfd = epoll_create(256);
9607         exit (epfd == -1 ? 1 : 0);
9608 }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9611 then
9612   echo "$ac_t""yes" 1>&6
9613 cat >> confdefs.h <<\EOF
9614 #define HAVE_EPOLL 1
9615 EOF
9616
9617 else
9618   echo "configure: failed program was:" >&5
9619   cat conftest.$ac_ext >&5
9620   rm -fr conftest*
9621   echo "$ac_t""no" 1>&6
9622 fi
9623 rm -fr conftest*
9624 fi
9625
9626 fi
9627
9628 # strerror checks
9629 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9630 echo "configure:9631: checking declaration of sys_errlist" >&5
9631 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9632   echo $ac_n "(cached) $ac_c" 1>&6
9633 else
9634   
9635         cat > conftest.$ac_ext <<EOF
9636 #line 9637 "configure"
9637 #include "confdefs.h"
9638
9639 #include <stdio.h>
9640 #include <sys/types.h>
9641 #include <errno.h>
9642 #ifdef WINNT
9643 #include <stdlib.h>
9644 #endif 
9645 int main() {
9646 char *c = (char *) *sys_errlist
9647 ; return 0; }
9648 EOF
9649 if { (eval echo configure:9650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9650   rm -rf conftest*
9651   ol_cv_dcl_sys_errlist=yes
9652         ol_cv_have_sys_errlist=yes
9653 else
9654   echo "configure: failed program was:" >&5
9655   cat conftest.$ac_ext >&5
9656   rm -rf conftest*
9657   ol_cv_dcl_sys_errlist=no
9658 fi
9659 rm -f conftest*
9660 fi
9661
9662 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9663 #
9664 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9665 if test $ol_cv_dcl_sys_errlist = no ; then
9666         cat >> confdefs.h <<\EOF
9667 #define DECL_SYS_ERRLIST 1
9668 EOF
9669
9670
9671         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9672 echo "configure:9673: checking existence of sys_errlist" >&5
9673 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9674   echo $ac_n "(cached) $ac_c" 1>&6
9675 else
9676   
9677                 cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #include <errno.h>
9681 int main() {
9682 char *c = (char *) *sys_errlist
9683 ; return 0; }
9684 EOF
9685 if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9686   rm -rf conftest*
9687   ol_cv_have_sys_errlist=yes
9688 else
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691   rm -rf conftest*
9692   ol_cv_have_sys_errlist=no
9693 fi
9694 rm -f conftest*
9695 fi
9696
9697 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9698 fi
9699 if test $ol_cv_have_sys_errlist = yes ; then
9700         cat >> confdefs.h <<\EOF
9701 #define HAVE_SYS_ERRLIST 1
9702 EOF
9703
9704 fi
9705  for ac_func in strerror strerror_r
9706 do
9707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9708 echo "configure:9709: checking for $ac_func" >&5
9709 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   cat > conftest.$ac_ext <<EOF
9713 #line 9714 "configure"
9714 #include "confdefs.h"
9715 /* System header to define __stub macros and hopefully few prototypes,
9716     which can conflict with char $ac_func(); below.  */
9717 #include <assert.h>
9718 /* Override any gcc2 internal prototype to avoid an error.  */
9719 /* We use char because int might match the return type of a gcc2
9720     builtin and then its argument prototype would still apply.  */
9721 char $ac_func();
9722 char (*f)();
9723
9724 int main() {
9725
9726 /* The GNU C library defines this for functions which it implements
9727     to always fail with ENOSYS.  Some functions are actually named
9728     something starting with __ and the normal name is an alias.  */
9729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9730 choke me
9731 #else
9732 f = $ac_func;
9733 #endif
9734
9735 ; return 0; }
9736 EOF
9737 if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9738   rm -rf conftest*
9739   eval "ac_cv_func_$ac_func=yes"
9740 else
9741   echo "configure: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743   rm -rf conftest*
9744   eval "ac_cv_func_$ac_func=no"
9745 fi
9746 rm -f conftest*
9747 fi
9748
9749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9750   echo "$ac_t""yes" 1>&6
9751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9752   cat >> confdefs.h <<EOF
9753 #define $ac_tr_func 1
9754 EOF
9755  
9756 else
9757   echo "$ac_t""no" 1>&6
9758 fi
9759 done
9760
9761 ol_cv_func_strerror_r=no
9762 if test "${ac_cv_func_strerror_r}" = yes ; then
9763         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9764 echo "configure:9765: checking non-posix strerror_r" >&5
9765 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9766   echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768   
9769         cat > conftest.$ac_ext <<EOF
9770 #line 9771 "configure"
9771 #include "confdefs.h"
9772 #include <string.h>
9773 EOF
9774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9775   egrep "strerror_r" >/dev/null 2>&1; then
9776   rm -rf conftest*
9777   ol_decl_strerror_r=yes
9778 else
9779   rm -rf conftest*
9780   ol_decl_strerror_r=no
9781 fi
9782 rm -f conftest*
9783
9784         if test $ol_decl_strerror_r = yes ; then
9785                 cat > conftest.$ac_ext <<EOF
9786 #line 9787 "configure"
9787 #include "confdefs.h"
9788 #include <string.h>
9789 int main() {
9790    /* from autoconf 2.59 */
9791                                 char buf[100];
9792                                 char x = *strerror_r (0, buf, sizeof buf);
9793                                 char *p = strerror_r (0, buf, sizeof buf);
9794                         
9795 ; return 0; }
9796 EOF
9797 if { (eval echo configure:9798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9798   rm -rf conftest*
9799   ol_cv_nonposix_strerror_r=yes
9800 else
9801   echo "configure: failed program was:" >&5
9802   cat conftest.$ac_ext >&5
9803   rm -rf conftest*
9804   ol_cv_nonposix_strerror_r=no
9805 fi
9806 rm -f conftest*
9807         else
9808                 if test "$cross_compiling" = yes; then
9809   ol_cv_nonposix_strerror=no
9810 else
9811   cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814
9815                         main() {
9816                                 char buf[100];
9817                                 buf[0] = 0;
9818                                 strerror_r( 1, buf, sizeof buf );
9819                                 exit( buf[0] == 0 );
9820                         }
9821                         
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9824 then
9825   ol_cv_nonposix_strerror_r=yes
9826 else
9827   echo "configure: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   rm -fr conftest*
9830   ol_cv_nonposix_strerror=no
9831 fi
9832 rm -fr conftest*
9833 fi
9834
9835         fi
9836         
9837 fi
9838
9839 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9840 if test $ol_cv_nonposix_strerror_r = yes ; then
9841         cat >> confdefs.h <<\EOF
9842 #define HAVE_NONPOSIX_STRERROR_R 1
9843 EOF
9844
9845 fi
9846
9847 elif test "${ac_cv_func_strerror}" = no ; then
9848         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9849 echo "configure:9850: checking declaration of sys_errlist" >&5
9850 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9851   echo $ac_n "(cached) $ac_c" 1>&6
9852 else
9853   
9854         cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857
9858 #include <stdio.h>
9859 #include <sys/types.h>
9860 #include <errno.h>
9861 #ifdef WINNT
9862 #include <stdlib.h>
9863 #endif 
9864 int main() {
9865 char *c = (char *) *sys_errlist
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9869   rm -rf conftest*
9870   ol_cv_dcl_sys_errlist=yes
9871         ol_cv_have_sys_errlist=yes
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875   rm -rf conftest*
9876   ol_cv_dcl_sys_errlist=no
9877 fi
9878 rm -f conftest*
9879 fi
9880
9881 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9882 #
9883 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9884 if test $ol_cv_dcl_sys_errlist = no ; then
9885         cat >> confdefs.h <<\EOF
9886 #define DECL_SYS_ERRLIST 1
9887 EOF
9888
9889
9890         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9891 echo "configure:9892: checking existence of sys_errlist" >&5
9892 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9893   echo $ac_n "(cached) $ac_c" 1>&6
9894 else
9895   
9896                 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 #include <errno.h>
9900 int main() {
9901 char *c = (char *) *sys_errlist
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9905   rm -rf conftest*
9906   ol_cv_have_sys_errlist=yes
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   ol_cv_have_sys_errlist=no
9912 fi
9913 rm -f conftest*
9914 fi
9915
9916 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9917 fi
9918 if test $ol_cv_have_sys_errlist = yes ; then
9919         cat >> confdefs.h <<\EOF
9920 #define HAVE_SYS_ERRLIST 1
9921 EOF
9922
9923 fi
9924
9925 fi
9926
9927
9928 for ac_hdr in regex.h 
9929 do
9930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9932 echo "configure:9933: checking for $ac_hdr" >&5
9933 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 #include <$ac_hdr>
9940 EOF
9941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9942 { (eval echo configure:9943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9944 if test -z "$ac_err"; then
9945   rm -rf conftest*
9946   eval "ac_cv_header_$ac_safe=yes"
9947 else
9948   echo "$ac_err" >&5
9949   echo "configure: failed program was:" >&5
9950   cat conftest.$ac_ext >&5
9951   rm -rf conftest*
9952   eval "ac_cv_header_$ac_safe=no"
9953 fi
9954 rm -f conftest*
9955 fi
9956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9957   echo "$ac_t""yes" 1>&6
9958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9959   cat >> confdefs.h <<EOF
9960 #define $ac_tr_hdr 1
9961 EOF
9962  
9963 else
9964   echo "$ac_t""no" 1>&6
9965 fi
9966 done
9967
9968 if test "$ac_cv_header_regex_h" != yes ; then
9969         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9970 fi
9971
9972 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9973 echo "configure:9974: checking for library containing regfree" >&5
9974 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9975   echo $ac_n "(cached) $ac_c" 1>&6
9976 else
9977   ac_func_search_save_LIBS="$LIBS"
9978 ac_cv_search_regfree="no"
9979 cat > conftest.$ac_ext <<EOF
9980 #line 9981 "configure"
9981 #include "confdefs.h"
9982 /* Override any gcc2 internal prototype to avoid an error.  */
9983 /* We use char because int might match the return type of a gcc2
9984     builtin and then its argument prototype would still apply.  */
9985 char regfree();
9986
9987 int main() {
9988 regfree()
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9992   rm -rf conftest*
9993   ac_cv_search_regfree="none required"
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997 fi
9998 rm -f conftest*
9999 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10000 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10001 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 /* We use char because int might match the return type of a gcc2
10006     builtin and then its argument prototype would still apply.  */
10007 char regfree();
10008
10009 int main() {
10010 regfree()
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10014   rm -rf conftest*
10015   ac_cv_search_regfree="-l$ac_lib"
10016 break
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020 fi
10021 rm -f conftest*
10022 done
10023 LIBS="$ac_func_search_save_LIBS"
10024 fi
10025
10026 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10027 if test "$ac_cv_search_regfree" != "no"; then
10028   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10029   :
10030 else :
10031   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10032 fi
10033
10034
10035 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10036 echo "configure:10037: checking for compatible POSIX regex" >&5
10037 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   
10041         if test "$cross_compiling" = yes; then
10042   ol_cv_c_posix_regex=cross
10043 else
10044   cat > conftest.$ac_ext <<EOF
10045 #line 10046 "configure"
10046 #include "confdefs.h"
10047
10048 #include <sys/types.h>
10049 #include <regex.h>
10050 static char *pattern, *string;
10051 main()
10052 {
10053         int rc;
10054         regex_t re;
10055
10056         pattern = "^A";
10057
10058         if(regcomp(&re, pattern, 0)) {
10059                 return -1;
10060         }
10061         
10062         string = "ALL MATCH";
10063         
10064         rc = regexec(&re, string, 0, (void*)0, 0);
10065
10066         regfree(&re);
10067
10068         return rc;
10069 }
10070 EOF
10071 if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10072 then
10073   ol_cv_c_posix_regex=yes
10074 else
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -fr conftest*
10078   ol_cv_c_posix_regex=no
10079 fi
10080 rm -fr conftest*
10081 fi
10082
10083 fi
10084
10085 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10086
10087 if test "$ol_cv_c_posix_regex" = no ; then
10088         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10089 fi
10090
10091
10092 have_uuid=no
10093 for ac_hdr in sys/uuid.h
10094 do
10095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10097 echo "configure:10098: checking for $ac_hdr" >&5
10098 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10099   echo $ac_n "(cached) $ac_c" 1>&6
10100 else
10101   cat > conftest.$ac_ext <<EOF
10102 #line 10103 "configure"
10103 #include "confdefs.h"
10104 #include <$ac_hdr>
10105 EOF
10106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10107 { (eval echo configure:10108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10109 if test -z "$ac_err"; then
10110   rm -rf conftest*
10111   eval "ac_cv_header_$ac_safe=yes"
10112 else
10113   echo "$ac_err" >&5
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -rf conftest*
10117   eval "ac_cv_header_$ac_safe=no"
10118 fi
10119 rm -f conftest*
10120 fi
10121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10122   echo "$ac_t""yes" 1>&6
10123     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10124   cat >> confdefs.h <<EOF
10125 #define $ac_tr_hdr 1
10126 EOF
10127  
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131 done
10132
10133 if test $ac_cv_header_sys_uuid_h = yes ; then
10134         save_LIBS="$LIBS"
10135         
10136 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10137 echo "configure:10138: checking for library containing uuid_to_str" >&5
10138 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   ac_func_search_save_LIBS="$LIBS"
10142 ac_cv_search_uuid_to_str="no"
10143 cat > conftest.$ac_ext <<EOF
10144 #line 10145 "configure"
10145 #include "confdefs.h"
10146 /* Override any gcc2 internal prototype to avoid an error.  */
10147 /* We use char because int might match the return type of a gcc2
10148     builtin and then its argument prototype would still apply.  */
10149 char uuid_to_str();
10150
10151 int main() {
10152 uuid_to_str()
10153 ; return 0; }
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10156   rm -rf conftest*
10157   ac_cv_search_uuid_to_str="none required"
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161 fi
10162 rm -f conftest*
10163 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10164 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10165 cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 /* Override any gcc2 internal prototype to avoid an error.  */
10169 /* We use char because int might match the return type of a gcc2
10170     builtin and then its argument prototype would still apply.  */
10171 char uuid_to_str();
10172
10173 int main() {
10174 uuid_to_str()
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   ac_cv_search_uuid_to_str="-l$ac_lib"
10180 break
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184 fi
10185 rm -f conftest*
10186 done
10187 LIBS="$ac_func_search_save_LIBS"
10188 fi
10189
10190 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10191 if test "$ac_cv_search_uuid_to_str" != "no"; then
10192   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10193   have_uuid=yes
10194 else :
10195   :
10196 fi
10197         LIBS="$save_LIBS"
10198
10199         if test have_uuid = yes ; then
10200                 cat >> confdefs.h <<\EOF
10201 #define HAVE_UUID_TO_STR 1
10202 EOF
10203
10204
10205                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10206                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10207         fi
10208 fi
10209
10210 if test $have_uuid = no ; then
10211         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10212 echo "configure:10213: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10213         save_LIBS="$LIBS"
10214         LIBS="$LIBS -lrpcrt4"
10215         cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218
10219                 int __stdcall UuidCreate(void *);
10220                 int __stdcall UuidToStringA(void *,void **);
10221                 
10222 int main() {
10223
10224                 UuidCreate(0);
10225                 UuidToStringA(0,0);
10226                 
10227 ; return 0; }
10228 EOF
10229 if { (eval echo configure:10230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10230   rm -rf conftest*
10231   need_rpcrt=yes
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   need_rpcrt=no
10237 fi
10238 rm -f conftest*
10239         if test $need_rpcrt = yes; then
10240                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10241         fi
10242         LIBS="$save_LIBS"
10243         echo "$ac_t""$need_rpcrt" 1>&6
10244 fi
10245
10246 ol_link_dnssrv=no
10247 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10248 echo "configure:10249: checking for res_query" >&5
10249 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10250   echo $ac_n "(cached) $ac_c" 1>&6
10251 else
10252   cat > conftest.$ac_ext <<EOF
10253 #line 10254 "configure"
10254 #include "confdefs.h"
10255 /* System header to define __stub macros and hopefully few prototypes,
10256     which can conflict with char res_query(); below.  */
10257 #include <assert.h>
10258 /* Override any gcc2 internal prototype to avoid an error.  */
10259 /* We use char because int might match the return type of a gcc2
10260     builtin and then its argument prototype would still apply.  */
10261 char res_query();
10262 char (*f)();
10263
10264 int main() {
10265
10266 /* The GNU C library defines this for functions which it implements
10267     to always fail with ENOSYS.  Some functions are actually named
10268     something starting with __ and the normal name is an alias.  */
10269 #if defined (__stub_res_query) || defined (__stub___res_query)
10270 choke me
10271 #else
10272 f = res_query;
10273 #endif
10274
10275 ; return 0; }
10276 EOF
10277 if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10278   rm -rf conftest*
10279   eval "ac_cv_func_res_query=yes"
10280 else
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -rf conftest*
10284   eval "ac_cv_func_res_query=no"
10285 fi
10286 rm -f conftest*
10287 fi
10288
10289 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10290   echo "$ac_t""yes" 1>&6
10291   :
10292 else
10293   echo "$ac_t""no" 1>&6
10294 fi
10295
10296 if test $ac_cv_func_res_query = no ; then 
10297         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10298 echo "configure:10299: checking for __res_query" >&5
10299 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10300   echo $ac_n "(cached) $ac_c" 1>&6
10301 else
10302   cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305 /* System header to define __stub macros and hopefully few prototypes,
10306     which can conflict with char __res_query(); below.  */
10307 #include <assert.h>
10308 /* Override any gcc2 internal prototype to avoid an error.  */
10309 /* We use char because int might match the return type of a gcc2
10310     builtin and then its argument prototype would still apply.  */
10311 char __res_query();
10312 char (*f)();
10313
10314 int main() {
10315
10316 /* The GNU C library defines this for functions which it implements
10317     to always fail with ENOSYS.  Some functions are actually named
10318     something starting with __ and the normal name is an alias.  */
10319 #if defined (__stub___res_query) || defined (__stub_____res_query)
10320 choke me
10321 #else
10322 f = __res_query;
10323 #endif
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   eval "ac_cv_func___res_query=yes"
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   eval "ac_cv_func___res_query=no"
10335 fi
10336 rm -f conftest*
10337 fi
10338
10339 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10340   echo "$ac_t""yes" 1>&6
10341   :
10342 else
10343   echo "$ac_t""no" 1>&6
10344 fi
10345
10346         ac_cv_func_res_query=$ac_cv_func___res_query
10347 fi
10348
10349 if test $ac_cv_func_res_query = no ; then 
10350         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10351 echo "configure:10352: checking for res_query in -lbind" >&5
10352 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   ac_save_LIBS="$LIBS"
10357 LIBS="-lbind  $LIBS"
10358 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361 /* Override any gcc2 internal prototype to avoid an error.  */
10362 /* We use char because int might match the return type of a gcc2
10363     builtin and then its argument prototype would still apply.  */
10364 char res_query();
10365
10366 int main() {
10367 res_query()
10368 ; return 0; }
10369 EOF
10370 if { (eval echo configure:10371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10371   rm -rf conftest*
10372   eval "ac_cv_lib_$ac_lib_var=yes"
10373 else
10374   echo "configure: failed program was:" >&5
10375   cat conftest.$ac_ext >&5
10376   rm -rf conftest*
10377   eval "ac_cv_lib_$ac_lib_var=no"
10378 fi
10379 rm -f conftest*
10380 LIBS="$ac_save_LIBS"
10381
10382 fi
10383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10384   echo "$ac_t""yes" 1>&6
10385     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10386     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10387   cat >> confdefs.h <<EOF
10388 #define $ac_tr_lib 1
10389 EOF
10390
10391   LIBS="-lbind $LIBS"
10392
10393 else
10394   echo "$ac_t""no" 1>&6
10395 fi
10396
10397         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10398 fi
10399
10400 if test $ac_cv_func_res_query = no ; then 
10401         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10402 echo "configure:10403: checking for __res_query in -lbind" >&5
10403 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   ac_save_LIBS="$LIBS"
10408 LIBS="-lbind  $LIBS"
10409 cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412 /* Override any gcc2 internal prototype to avoid an error.  */
10413 /* We use char because int might match the return type of a gcc2
10414     builtin and then its argument prototype would still apply.  */
10415 char __res_query();
10416
10417 int main() {
10418 __res_query()
10419 ; return 0; }
10420 EOF
10421 if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10422   rm -rf conftest*
10423   eval "ac_cv_lib_$ac_lib_var=yes"
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=no"
10429 fi
10430 rm -f conftest*
10431 LIBS="$ac_save_LIBS"
10432
10433 fi
10434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10435   echo "$ac_t""yes" 1>&6
10436     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10437     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10438   cat >> confdefs.h <<EOF
10439 #define $ac_tr_lib 1
10440 EOF
10441
10442   LIBS="-lbind $LIBS"
10443
10444 else
10445   echo "$ac_t""no" 1>&6
10446 fi
10447
10448         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10449 fi
10450
10451 if test $ac_cv_func_res_query = no ; then 
10452         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10453 echo "configure:10454: checking for res_query in -lresolv" >&5
10454 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10455 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   ac_save_LIBS="$LIBS"
10459 LIBS="-lresolv  $LIBS"
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 /* Override any gcc2 internal prototype to avoid an error.  */
10464 /* We use char because int might match the return type of a gcc2
10465     builtin and then its argument prototype would still apply.  */
10466 char res_query();
10467
10468 int main() {
10469 res_query()
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   eval "ac_cv_lib_$ac_lib_var=yes"
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_lib_$ac_lib_var=no"
10480 fi
10481 rm -f conftest*
10482 LIBS="$ac_save_LIBS"
10483
10484 fi
10485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10488     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10489   cat >> confdefs.h <<EOF
10490 #define $ac_tr_lib 1
10491 EOF
10492
10493   LIBS="-lresolv $LIBS"
10494
10495 else
10496   echo "$ac_t""no" 1>&6
10497 fi
10498
10499         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10500 fi
10501
10502 if test $ac_cv_func_res_query = no ; then 
10503         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10504 echo "configure:10505: checking for __res_query in -lresolv" >&5
10505 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   ac_save_LIBS="$LIBS"
10510 LIBS="-lresolv  $LIBS"
10511 cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514 /* Override any gcc2 internal prototype to avoid an error.  */
10515 /* We use char because int might match the return type of a gcc2
10516     builtin and then its argument prototype would still apply.  */
10517 char __res_query();
10518
10519 int main() {
10520 __res_query()
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=yes"
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_lib_$ac_lib_var=no"
10531 fi
10532 rm -f conftest*
10533 LIBS="$ac_save_LIBS"
10534
10535 fi
10536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10540   cat >> confdefs.h <<EOF
10541 #define $ac_tr_lib 1
10542 EOF
10543
10544   LIBS="-lresolv $LIBS"
10545
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549
10550         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10551 fi
10552
10553 if test $ac_cv_func_res_query = no ; then 
10554         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10555 echo "configure:10556: checking for _res_9_query in -lresolv" >&5
10556 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   ac_save_LIBS="$LIBS"
10561 LIBS="-lresolv  $LIBS"
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 /* Override any gcc2 internal prototype to avoid an error.  */
10566 /* We use char because int might match the return type of a gcc2
10567     builtin and then its argument prototype would still apply.  */
10568 char _res_9_query();
10569
10570 int main() {
10571 _res_9_query()
10572 ; return 0; }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=yes"
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=no"
10582 fi
10583 rm -f conftest*
10584 LIBS="$ac_save_LIBS"
10585
10586 fi
10587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10590     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10591   cat >> confdefs.h <<EOF
10592 #define $ac_tr_lib 1
10593 EOF
10594
10595   LIBS="-lresolv $LIBS"
10596
10597 else
10598   echo "$ac_t""no" 1>&6
10599 fi
10600
10601         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10602 fi
10603
10604 if test "$ac_cv_func_res_query" = yes ; then
10605         cat >> confdefs.h <<\EOF
10606 #define HAVE_RES_QUERY 1
10607 EOF
10608
10609
10610         if test $ol_enable_dnssrv != no ; then
10611                 ol_link_dnssrv=yes
10612         fi
10613 fi
10614
10615 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10616         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10617 fi
10618
10619 for ac_func in hstrerror 
10620 do
10621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10622 echo "configure:10623: checking for $ac_func" >&5
10623 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629 /* System header to define __stub macros and hopefully few prototypes,
10630     which can conflict with char $ac_func(); below.  */
10631 #include <assert.h>
10632 /* Override any gcc2 internal prototype to avoid an error.  */
10633 /* We use char because int might match the return type of a gcc2
10634     builtin and then its argument prototype would still apply.  */
10635 char $ac_func();
10636 char (*f)();
10637
10638 int main() {
10639
10640 /* The GNU C library defines this for functions which it implements
10641     to always fail with ENOSYS.  Some functions are actually named
10642     something starting with __ and the normal name is an alias.  */
10643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10644 choke me
10645 #else
10646 f = $ac_func;
10647 #endif
10648
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10652   rm -rf conftest*
10653   eval "ac_cv_func_$ac_func=yes"
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   eval "ac_cv_func_$ac_func=no"
10659 fi
10660 rm -f conftest*
10661 fi
10662
10663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10666   cat >> confdefs.h <<EOF
10667 #define $ac_tr_func 1
10668 EOF
10669  
10670 else
10671   echo "$ac_t""no" 1>&6
10672 fi
10673 done
10674
10675
10676 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10677 do
10678 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10679 echo "configure:10680: checking for $ac_func" >&5
10680 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10681   echo $ac_n "(cached) $ac_c" 1>&6
10682 else
10683   cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 /* System header to define __stub macros and hopefully few prototypes,
10687     which can conflict with char $ac_func(); below.  */
10688 #include <assert.h>
10689 /* Override any gcc2 internal prototype to avoid an error.  */
10690 /* We use char because int might match the return type of a gcc2
10691     builtin and then its argument prototype would still apply.  */
10692 char $ac_func();
10693 char (*f)();
10694
10695 int main() {
10696
10697 /* The GNU C library defines this for functions which it implements
10698     to always fail with ENOSYS.  Some functions are actually named
10699     something starting with __ and the normal name is an alias.  */
10700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10701 choke me
10702 #else
10703 f = $ac_func;
10704 #endif
10705
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   eval "ac_cv_func_$ac_func=yes"
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   eval "ac_cv_func_$ac_func=no"
10716 fi
10717 rm -f conftest*
10718 fi
10719
10720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10721   echo "$ac_t""yes" 1>&6
10722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10723   cat >> confdefs.h <<EOF
10724 #define $ac_tr_func 1
10725 EOF
10726  
10727 else
10728   echo "$ac_t""no" 1>&6
10729 fi
10730 done
10731
10732
10733 ol_link_ipv6=no
10734 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10735         if test $ol_enable_ipv6 = yes ; then
10736                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10737         fi
10738 elif test $ol_enable_ipv6 != no ; then
10739         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10740 echo "configure:10741: checking INET6_ADDRSTRLEN" >&5
10741 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   
10745                 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748
10749 #                       include <netinet/in.h>
10750 #                       ifdef INET6_ADDRSTRLEN
10751                                 __has_inet6_addrstrlen__;
10752 #                       endif
10753                 
10754 EOF
10755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10756   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10757   rm -rf conftest*
10758   ol_cv_inet6_addrstrlen=yes
10759 else
10760   rm -rf conftest*
10761   ol_cv_inet6_addrstrlen=no
10762 fi
10763 rm -f conftest*
10764
10765 fi
10766
10767 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10768
10769
10770         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10771 echo "configure:10772: checking struct sockaddr_storage" >&5
10772 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10773   echo $ac_n "(cached) $ac_c" 1>&6
10774 else
10775   
10776                 cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779
10780 #include <sys/types.h>
10781 #include <sys/socket.h>
10782
10783 int main() {
10784
10785                         struct sockaddr_storage ss;
10786
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10790   rm -rf conftest*
10791   ol_cv_struct_sockaddr_storage=yes
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   ol_cv_struct_sockaddr_storage=no
10797 fi
10798 rm -f conftest*
10799 fi
10800
10801 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10802
10803         if test $ol_cv_inet6_addrstrlen = yes \
10804                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10805                 ol_link_ipv6=yes
10806         elif test $ol_enable_ipv6 = yes \
10807                         -a $ol_cv_inet6_addrstrlen = no ; then
10808                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10809         elif test $ol_enable_ipv6 = yes \
10810                         -a $ol_cv_struct_sockaddr_storage = no ; then
10811                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10812         fi
10813 fi
10814
10815 if test $ol_enable_local != no ; then
10816         for ac_hdr in sys/un.h 
10817 do
10818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10820 echo "configure:10821: checking for $ac_hdr" >&5
10821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 #include <$ac_hdr>
10828 EOF
10829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10830 { (eval echo configure:10831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10832 if test -z "$ac_err"; then
10833   rm -rf conftest*
10834   eval "ac_cv_header_$ac_safe=yes"
10835 else
10836   echo "$ac_err" >&5
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=no"
10841 fi
10842 rm -f conftest*
10843 fi
10844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10845   echo "$ac_t""yes" 1>&6
10846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10847   cat >> confdefs.h <<EOF
10848 #define $ac_tr_hdr 1
10849 EOF
10850  
10851 else
10852   echo "$ac_t""no" 1>&6
10853 fi
10854 done
10855
10856
10857         if test $ol_enable_local = auto ; then
10858                 ol_enable_local=$ac_cv_header_sys_un_h
10859         elif test $ac_cv_header_sys_un_h = no ; then
10860                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10861         fi
10862 fi
10863
10864 ol_link_kbind=no
10865 ol_link_krb5=no
10866 ol_link_krb4=no
10867
10868 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10869         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10870         -o $ol_with_kerberos = k425 ; then
10871
10872         for ac_hdr in krb5.h
10873 do
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_hdr>
10884 EOF
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10889   rm -rf conftest*
10890   eval "ac_cv_header_$ac_safe=yes"
10891 else
10892   echo "$ac_err" >&5
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=no"
10897 fi
10898 rm -f conftest*
10899 fi
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903   cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10905 EOF
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912
10913         if test $ac_cv_header_krb5_h = yes ; then
10914                                 for ac_hdr in heim_err.h
10915 do
10916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10918 echo "configure:10919: checking for $ac_hdr" >&5
10919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10920   echo $ac_n "(cached) $ac_c" 1>&6
10921 else
10922   cat > conftest.$ac_ext <<EOF
10923 #line 10924 "configure"
10924 #include "confdefs.h"
10925 #include <$ac_hdr>
10926 EOF
10927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10928 { (eval echo configure:10929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10930 if test -z "$ac_err"; then
10931   rm -rf conftest*
10932   eval "ac_cv_header_$ac_safe=yes"
10933 else
10934   echo "$ac_err" >&5
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   eval "ac_cv_header_$ac_safe=no"
10939 fi
10940 rm -f conftest*
10941 fi
10942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10943   echo "$ac_t""yes" 1>&6
10944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10945   cat >> confdefs.h <<EOF
10946 #define $ac_tr_hdr 1
10947 EOF
10948  
10949 else
10950   echo "$ac_t""no" 1>&6
10951 fi
10952 done
10953
10954                 if test $ac_cv_header_heim_err_h = yes ; then
10955                         krb5_impl=heimdal
10956                 else
10957                         krb5_impl=mit
10958                 fi
10959
10960                 if test $krb5_impl = mit; then
10961                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10962 echo "configure:10963: checking for main in -lk5crypto" >&5
10963 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10965   echo $ac_n "(cached) $ac_c" 1>&6
10966 else
10967   ac_save_LIBS="$LIBS"
10968 LIBS="-lk5crypto  $LIBS"
10969 cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972
10973 int main() {
10974 main()
10975 ; return 0; }
10976 EOF
10977 if { (eval echo configure:10978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10978   rm -rf conftest*
10979   eval "ac_cv_lib_$ac_lib_var=yes"
10980 else
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   eval "ac_cv_lib_$ac_lib_var=no"
10985 fi
10986 rm -f conftest*
10987 LIBS="$ac_save_LIBS"
10988
10989 fi
10990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10991   echo "$ac_t""yes" 1>&6
10992   krb5crypto=k5crypto
10993 else
10994   echo "$ac_t""no" 1>&6
10995 krb5crypto=crypto
10996 fi
10997
10998
10999                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11000 echo "configure:11001: checking for main in -lkrb5" >&5
11001 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11003   echo $ac_n "(cached) $ac_c" 1>&6
11004 else
11005   ac_save_LIBS="$LIBS"
11006 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
11007 cat > conftest.$ac_ext <<EOF
11008 #line 11009 "configure"
11009 #include "confdefs.h"
11010
11011 int main() {
11012 main()
11013 ; return 0; }
11014 EOF
11015 if { (eval echo configure:11016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11016   rm -rf conftest*
11017   eval "ac_cv_lib_$ac_lib_var=yes"
11018 else
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -rf conftest*
11022   eval "ac_cv_lib_$ac_lib_var=no"
11023 fi
11024 rm -f conftest*
11025 LIBS="$ac_save_LIBS"
11026
11027 fi
11028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11029   echo "$ac_t""yes" 1>&6
11030   have_krb5=yes
11031                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
11032 else
11033   echo "$ac_t""no" 1>&6
11034 have_krb5=no
11035 fi
11036
11037
11038                 elif test $krb5_impl = heimdal; then
11039                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11040 echo "configure:11041: checking for main in -ldes" >&5
11041 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11043   echo $ac_n "(cached) $ac_c" 1>&6
11044 else
11045   ac_save_LIBS="$LIBS"
11046 LIBS="-ldes  $LIBS"
11047 cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050
11051 int main() {
11052 main()
11053 ; return 0; }
11054 EOF
11055 if { (eval echo configure:11056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11056   rm -rf conftest*
11057   eval "ac_cv_lib_$ac_lib_var=yes"
11058 else
11059   echo "configure: failed program was:" >&5
11060   cat conftest.$ac_ext >&5
11061   rm -rf conftest*
11062   eval "ac_cv_lib_$ac_lib_var=no"
11063 fi
11064 rm -f conftest*
11065 LIBS="$ac_save_LIBS"
11066
11067 fi
11068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11069   echo "$ac_t""yes" 1>&6
11070   krb5crypto=des
11071 else
11072   echo "$ac_t""no" 1>&6
11073 krb5crypto=crypto
11074 fi
11075
11076
11077                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11078 echo "configure:11079: checking for main in -lkrb5" >&5
11079 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11080 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   ac_save_LIBS="$LIBS"
11084 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11085 cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088
11089 int main() {
11090 main()
11091 ; return 0; }
11092 EOF
11093 if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11094   rm -rf conftest*
11095   eval "ac_cv_lib_$ac_lib_var=yes"
11096 else
11097   echo "configure: failed program was:" >&5
11098   cat conftest.$ac_ext >&5
11099   rm -rf conftest*
11100   eval "ac_cv_lib_$ac_lib_var=no"
11101 fi
11102 rm -f conftest*
11103 LIBS="$ac_save_LIBS"
11104
11105 fi
11106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11107   echo "$ac_t""yes" 1>&6
11108   have_krb5=yes
11109                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11110 else
11111   echo "$ac_t""no" 1>&6
11112 have_krb5=no
11113 fi
11114
11115
11116                         cat >> confdefs.h <<\EOF
11117 #define HAVE_HEIMDAL_KERBEROS 1
11118 EOF
11119
11120
11121                 else
11122                         have_krb5=no
11123                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11124                 fi
11125
11126                 if test $have_krb5 = yes ; then
11127                         ol_link_krb5=yes
11128
11129                         cat >> confdefs.h <<\EOF
11130 #define HAVE_KRB5 1
11131 EOF
11132
11133
11134                         if test $ol_with_kerberos = k5only ; then
11135                                 ol_with_kerberos=found
11136                         fi
11137
11138                 elif test $ol_with_kerberos != auto ; then
11139                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11140                 fi
11141
11142         fi
11143 fi
11144
11145 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11146         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11147
11148         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11149 do
11150 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11151 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11152 echo "configure:11153: checking for $ac_hdr" >&5
11153 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11154   echo $ac_n "(cached) $ac_c" 1>&6
11155 else
11156   cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 #include <$ac_hdr>
11160 EOF
11161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11162 { (eval echo configure:11163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11164 if test -z "$ac_err"; then
11165   rm -rf conftest*
11166   eval "ac_cv_header_$ac_safe=yes"
11167 else
11168   echo "$ac_err" >&5
11169   echo "configure: failed program was:" >&5
11170   cat conftest.$ac_ext >&5
11171   rm -rf conftest*
11172   eval "ac_cv_header_$ac_safe=no"
11173 fi
11174 rm -f conftest*
11175 fi
11176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11177   echo "$ac_t""yes" 1>&6
11178     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11179   cat >> confdefs.h <<EOF
11180 #define $ac_tr_hdr 1
11181 EOF
11182  
11183 else
11184   echo "$ac_t""no" 1>&6
11185 fi
11186 done
11187
11188
11189         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11190                 if test $krb5_impl = mit; then
11191                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11192 echo "configure:11193: checking for main in -lkrb4" >&5
11193 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   ac_save_LIBS="$LIBS"
11198 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11199 cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202
11203 int main() {
11204 main()
11205 ; return 0; }
11206 EOF
11207 if { (eval echo configure:11208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11208   rm -rf conftest*
11209   eval "ac_cv_lib_$ac_lib_var=yes"
11210 else
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   eval "ac_cv_lib_$ac_lib_var=no"
11215 fi
11216 rm -f conftest*
11217 LIBS="$ac_save_LIBS"
11218
11219 fi
11220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11221   echo "$ac_t""yes" 1>&6
11222   have_k425=yes
11223                                 KRB4_LIBS="-lkrb4 -ldes425"
11224 else
11225   echo "$ac_t""no" 1>&6
11226 have_k425=no
11227 fi
11228
11229
11230                 elif test $krb5_impl = heimdal; then
11231                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11232 echo "configure:11233: checking for main in -lkrb4" >&5
11233 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   ac_save_LIBS="$LIBS"
11238 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11239 cat > conftest.$ac_ext <<EOF
11240 #line 11241 "configure"
11241 #include "confdefs.h"
11242
11243 int main() {
11244 main()
11245 ; return 0; }
11246 EOF
11247 if { (eval echo configure:11248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11248   rm -rf conftest*
11249   eval "ac_cv_lib_$ac_lib_var=yes"
11250 else
11251   echo "configure: failed program was:" >&5
11252   cat conftest.$ac_ext >&5
11253   rm -rf conftest*
11254   eval "ac_cv_lib_$ac_lib_var=no"
11255 fi
11256 rm -f conftest*
11257 LIBS="$ac_save_LIBS"
11258
11259 fi
11260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11261   echo "$ac_t""yes" 1>&6
11262   have_k425=yes
11263                                 KRB4_LIBS="-lkrb4"
11264 else
11265   echo "$ac_t""no" 1>&6
11266 have_k425=no
11267 fi
11268
11269
11270                 else
11271                         have_425=no
11272                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11273                 fi
11274
11275                 if test $have_k425 = yes ; then
11276                         ol_with_kerberos=found
11277                         ol_link_krb4=yes
11278
11279                         cat >> confdefs.h <<\EOF
11280 #define HAVE_KRB425 1
11281 EOF
11282
11283                         cat >> confdefs.h <<\EOF
11284 #define HAVE_KRB4 1
11285 EOF
11286
11287
11288                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11289 echo "configure:11290: checking for des_debug in Kerberos libraries" >&5
11290 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11291   echo $ac_n "(cached) $ac_c" 1>&6
11292 else
11293   
11294                                                                 save_LIBS="$LIBS"
11295                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11296                                 cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299
11300 #include <kerberosIV/krb.h>
11301 #include <kerberosIV/des.h>
11302 extern int des_debug;
11303
11304 int main() {
11305
11306 des_debug = 1;
11307
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   ol_cv_var_des_debug=yes
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   ol_cv_var_des_debug=no
11318 fi
11319 rm -f conftest*
11320                                                                 LIBS="$save_LIBS"
11321                         
11322 fi
11323
11324 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11325
11326                         if test $ol_cv_var_des_debug = yes ; then
11327                                 cat >> confdefs.h <<\EOF
11328 #define HAVE_DES_DEBUG 1
11329 EOF
11330
11331                         fi
11332
11333                         LIBS="$save_LIBS"
11334                 fi
11335         fi
11336 fi
11337
11338 if test $ol_link_krb5 = yes ; then
11339         ol_with_kerberos=found
11340 fi
11341
11342 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11343         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11344
11345         for ac_hdr in krb.h des.h krb-archaeology.h 
11346 do
11347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11349 echo "configure:11350: checking for $ac_hdr" >&5
11350 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11351   echo $ac_n "(cached) $ac_c" 1>&6
11352 else
11353   cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 #include <$ac_hdr>
11357 EOF
11358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11359 { (eval echo configure:11360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11361 if test -z "$ac_err"; then
11362   rm -rf conftest*
11363   eval "ac_cv_header_$ac_safe=yes"
11364 else
11365   echo "$ac_err" >&5
11366   echo "configure: failed program was:" >&5
11367   cat conftest.$ac_ext >&5
11368   rm -rf conftest*
11369   eval "ac_cv_header_$ac_safe=no"
11370 fi
11371 rm -f conftest*
11372 fi
11373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11374   echo "$ac_t""yes" 1>&6
11375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11376   cat >> confdefs.h <<EOF
11377 #define $ac_tr_hdr 1
11378 EOF
11379  
11380 else
11381   echo "$ac_t""no" 1>&6
11382 fi
11383 done
11384
11385
11386         if test $ac_cv_header_krb_h = yes ; then
11387                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11388 echo "configure:11389: checking for main in -lkrb" >&5
11389 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11391   echo $ac_n "(cached) $ac_c" 1>&6
11392 else
11393   ac_save_LIBS="$LIBS"
11394 LIBS="-lkrb -ldes $LIBS"
11395 cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398
11399 int main() {
11400 main()
11401 ; return 0; }
11402 EOF
11403 if { (eval echo configure:11404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11404   rm -rf conftest*
11405   eval "ac_cv_lib_$ac_lib_var=yes"
11406 else
11407   echo "configure: failed program was:" >&5
11408   cat conftest.$ac_ext >&5
11409   rm -rf conftest*
11410   eval "ac_cv_lib_$ac_lib_var=no"
11411 fi
11412 rm -f conftest*
11413 LIBS="$ac_save_LIBS"
11414
11415 fi
11416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11417   echo "$ac_t""yes" 1>&6
11418   have_k4=yes
11419 else
11420   echo "$ac_t""no" 1>&6
11421 have_k4=no
11422 fi
11423
11424
11425                 if test $have_k4 = yes ; then
11426                         ol_with_kerberos=found
11427                         ol_link_krb4=yes
11428
11429                         cat >> confdefs.h <<\EOF
11430 #define HAVE_KRB4 1
11431 EOF
11432
11433
11434                         KRB4_LIBS="-lkrb -ldes"
11435
11436                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11437                                 cat >> confdefs.h <<\EOF
11438 #define HAVE_KTH_KERBEROS 1
11439 EOF
11440
11441                         fi
11442                 fi
11443         fi
11444 fi
11445
11446 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11447         ol_link_kbind=yes
11448
11449 elif test $ol_enable_kbind = yes ; then
11450         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11451 fi
11452
11453 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11454         cat >> confdefs.h <<\EOF
11455 #define HAVE_KERBEROS 1
11456 EOF
11457
11458
11459 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11460         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11461 fi
11462
11463         
11464 ol_link_tls=no
11465 if test $ol_with_tls != no ; then
11466         for ac_hdr in openssl/ssl.h ssl.h
11467 do
11468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11470 echo "configure:11471: checking for $ac_hdr" >&5
11471 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11472   echo $ac_n "(cached) $ac_c" 1>&6
11473 else
11474   cat > conftest.$ac_ext <<EOF
11475 #line 11476 "configure"
11476 #include "confdefs.h"
11477 #include <$ac_hdr>
11478 EOF
11479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11480 { (eval echo configure:11481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11482 if test -z "$ac_err"; then
11483   rm -rf conftest*
11484   eval "ac_cv_header_$ac_safe=yes"
11485 else
11486   echo "$ac_err" >&5
11487   echo "configure: failed program was:" >&5
11488   cat conftest.$ac_ext >&5
11489   rm -rf conftest*
11490   eval "ac_cv_header_$ac_safe=no"
11491 fi
11492 rm -f conftest*
11493 fi
11494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11495   echo "$ac_t""yes" 1>&6
11496     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11497   cat >> confdefs.h <<EOF
11498 #define $ac_tr_hdr 1
11499 EOF
11500  
11501 else
11502   echo "$ac_t""no" 1>&6
11503 fi
11504 done
11505
11506
11507         if test $ac_cv_header_openssl_ssl_h = yes \
11508                 -o $ac_cv_header_ssl_h = yes ; then
11509                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11510 echo "configure:11511: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11511 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11513   echo $ac_n "(cached) $ac_c" 1>&6
11514 else
11515   ac_save_LIBS="$LIBS"
11516 LIBS="-lssl -lcrypto $LIBS"
11517 cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520 /* Override any gcc2 internal prototype to avoid an error.  */
11521 /* We use char because int might match the return type of a gcc2
11522     builtin and then its argument prototype would still apply.  */
11523 char SSLeay_add_ssl_algorithms();
11524
11525 int main() {
11526 SSLeay_add_ssl_algorithms()
11527 ; return 0; }
11528 EOF
11529 if { (eval echo configure:11530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11530   rm -rf conftest*
11531   eval "ac_cv_lib_$ac_lib_var=yes"
11532 else
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   eval "ac_cv_lib_$ac_lib_var=no"
11537 fi
11538 rm -f conftest*
11539 LIBS="$ac_save_LIBS"
11540
11541 fi
11542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11543   echo "$ac_t""yes" 1>&6
11544   have_ssleay=yes
11545                         need_rsaref=no
11546 else
11547   echo "$ac_t""no" 1>&6
11548 have_ssleay=no
11549 fi
11550
11551                         
11552                 if test $have_ssleay = no ; then
11553                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11554 echo "configure:11555: checking for SSL_library_init in -lssl" >&5
11555 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11557   echo $ac_n "(cached) $ac_c" 1>&6
11558 else
11559   ac_save_LIBS="$LIBS"
11560 LIBS="-lssl -lcrypto $LIBS"
11561 cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 /* Override any gcc2 internal prototype to avoid an error.  */
11565 /* We use char because int might match the return type of a gcc2
11566     builtin and then its argument prototype would still apply.  */
11567 char SSL_library_init();
11568
11569 int main() {
11570 SSL_library_init()
11571 ; return 0; }
11572 EOF
11573 if { (eval echo configure:11574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11574   rm -rf conftest*
11575   eval "ac_cv_lib_$ac_lib_var=yes"
11576 else
11577   echo "configure: failed program was:" >&5
11578   cat conftest.$ac_ext >&5
11579   rm -rf conftest*
11580   eval "ac_cv_lib_$ac_lib_var=no"
11581 fi
11582 rm -f conftest*
11583 LIBS="$ac_save_LIBS"
11584
11585 fi
11586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11587   echo "$ac_t""yes" 1>&6
11588   have_ssleay=yes
11589                                 need_rsaref=no
11590 else
11591   echo "$ac_t""no" 1>&6
11592 have_ssleay=no
11593 fi
11594
11595                 fi
11596
11597                 if test $have_ssleay = no ; then
11598                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11599 echo "configure:11600: checking for ssl3_accept in -lssl" >&5
11600 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11602   echo $ac_n "(cached) $ac_c" 1>&6
11603 else
11604   ac_save_LIBS="$LIBS"
11605 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11606 cat > conftest.$ac_ext <<EOF
11607 #line 11608 "configure"
11608 #include "confdefs.h"
11609 /* Override any gcc2 internal prototype to avoid an error.  */
11610 /* We use char because int might match the return type of a gcc2
11611     builtin and then its argument prototype would still apply.  */
11612 char ssl3_accept();
11613
11614 int main() {
11615 ssl3_accept()
11616 ; return 0; }
11617 EOF
11618 if { (eval echo configure:11619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11619   rm -rf conftest*
11620   eval "ac_cv_lib_$ac_lib_var=yes"
11621 else
11622   echo "configure: failed program was:" >&5
11623   cat conftest.$ac_ext >&5
11624   rm -rf conftest*
11625   eval "ac_cv_lib_$ac_lib_var=no"
11626 fi
11627 rm -f conftest*
11628 LIBS="$ac_save_LIBS"
11629
11630 fi
11631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11632   echo "$ac_t""yes" 1>&6
11633   have_ssleay=yes
11634                                 need_rsaref=yes
11635 else
11636   echo "$ac_t""no" 1>&6
11637 have_ssleay=no
11638 fi
11639
11640                 fi
11641
11642                 if test $have_ssleay = yes ; then
11643                         ol_with_tls=found
11644                         ol_link_tls=yes
11645
11646                         cat >> confdefs.h <<\EOF
11647 #define HAVE_SSLEAY 1
11648 EOF
11649
11650
11651                         if test $need_rsaref = yes; then
11652                                 cat >> confdefs.h <<\EOF
11653 #define HAVE_RSAREF 1
11654 EOF
11655
11656
11657                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11658                         else
11659                                 TLS_LIBS="-lssl -lcrypto"
11660                         fi
11661                 fi
11662                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11663 echo "configure:11664: checking OpenSSL library version (CRL checking capability)" >&5
11664 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11665   echo $ac_n "(cached) $ac_c" 1>&6
11666 else
11667   
11668         cat > conftest.$ac_ext <<EOF
11669 #line 11670 "configure"
11670 #include "confdefs.h"
11671
11672 #ifdef HAVE_OPENSSL_SSL_H
11673 #include <openssl/ssl.h>
11674 #else
11675 #include <ssl.h>
11676 #endif
11677
11678 /* Require 0.9.7d+ */
11679 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11680         char *__ssl_compat = "0.9.7d";
11681 #endif
11682         
11683 EOF
11684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11685   egrep "__ssl_compat" >/dev/null 2>&1; then
11686   rm -rf conftest*
11687   ol_cv_ssl_crl_compat=yes
11688 else
11689   rm -rf conftest*
11690   ol_cv_ssl_crl_compat=no
11691 fi
11692 rm -f conftest*
11693
11694 fi
11695
11696 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11697
11698                 if test $ol_cv_ssl_crl_compat = no ; then
11699                         ol_link_ssl=no
11700                 else 
11701                         cat >> confdefs.h <<\EOF
11702 #define HAVE_OPENSSL_CRL 1
11703 EOF
11704
11705                 fi
11706         fi
11707
11708 else
11709         echo "configure: warning: TLS data protection not supported!" 1>&2
11710 fi
11711
11712 WITH_TLS=no
11713 if test $ol_link_tls = yes ; then
11714         cat >> confdefs.h <<\EOF
11715 #define HAVE_TLS 1
11716 EOF
11717
11718         WITH_TLS=yes
11719
11720 elif test $ol_with_tls = auto ; then
11721         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11722         echo "configure: warning: TLS data protection not supported!" 1>&2
11723
11724 elif test $ol_with_tls != no ; then
11725         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11726 fi
11727
11728 if test $ol_enable_lmpasswd != no; then
11729         if test $ol_link_tls != yes ; then
11730                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11731         fi
11732
11733         cat >> confdefs.h <<\EOF
11734 #define SLAPD_LMHASH 1
11735 EOF
11736
11737 fi
11738
11739 ol_link_threads=no
11740
11741 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11742         -o $ol_with_threads = nt ; then
11743
11744         
11745         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11746 echo "configure:11747: checking for _beginthread" >&5
11747 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11748   echo $ac_n "(cached) $ac_c" 1>&6
11749 else
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 /* System header to define __stub macros and hopefully few prototypes,
11754     which can conflict with char _beginthread(); below.  */
11755 #include <assert.h>
11756 /* Override any gcc2 internal prototype to avoid an error.  */
11757 /* We use char because int might match the return type of a gcc2
11758     builtin and then its argument prototype would still apply.  */
11759 char _beginthread();
11760 char (*f)();
11761
11762 int main() {
11763
11764 /* The GNU C library defines this for functions which it implements
11765     to always fail with ENOSYS.  Some functions are actually named
11766     something starting with __ and the normal name is an alias.  */
11767 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11768 choke me
11769 #else
11770 f = _beginthread;
11771 #endif
11772
11773 ; return 0; }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11776   rm -rf conftest*
11777   eval "ac_cv_func__beginthread=yes"
11778 else
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781   rm -rf conftest*
11782   eval "ac_cv_func__beginthread=no"
11783 fi
11784 rm -f conftest*
11785 fi
11786
11787 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11788   echo "$ac_t""yes" 1>&6
11789   :
11790 else
11791   echo "$ac_t""no" 1>&6
11792 fi
11793
11794
11795         if test $ac_cv_func__beginthread = yes ; then
11796                 cat >> confdefs.h <<\EOF
11797 #define HAVE_NT_THREADS 1
11798 EOF
11799
11800                 ol_cv_nt_threads=yes
11801         fi
11802
11803
11804         if test "$ol_cv_nt_threads" = yes ; then
11805                 ol_link_threads=nt
11806                 ol_with_threads=found
11807                 ol_with_yielding_select=yes
11808
11809                 cat >> confdefs.h <<\EOF
11810 #define HAVE_NT_SERVICE_MANAGER 1
11811 EOF
11812
11813                 cat >> confdefs.h <<\EOF
11814 #define HAVE_NT_EVENT_LOG 1
11815 EOF
11816
11817         fi
11818
11819         if test $ol_with_threads = nt ; then
11820                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11821         fi
11822 fi
11823
11824 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11825         -o $ol_with_threads = posix ; then
11826
11827         for ac_hdr in pthread.h
11828 do
11829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11831 echo "configure:11832: checking for $ac_hdr" >&5
11832 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835   cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 #include <$ac_hdr>
11839 EOF
11840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11841 { (eval echo configure:11842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11843 if test -z "$ac_err"; then
11844   rm -rf conftest*
11845   eval "ac_cv_header_$ac_safe=yes"
11846 else
11847   echo "$ac_err" >&5
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   eval "ac_cv_header_$ac_safe=no"
11852 fi
11853 rm -f conftest*
11854 fi
11855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11856   echo "$ac_t""yes" 1>&6
11857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11858   cat >> confdefs.h <<EOF
11859 #define $ac_tr_hdr 1
11860 EOF
11861  
11862 else
11863   echo "$ac_t""no" 1>&6
11864 fi
11865 done
11866
11867
11868         if test $ac_cv_header_pthread_h = yes ; then
11869                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11870 echo "configure:11871: checking POSIX thread version" >&5
11871 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   
11875         cat > conftest.$ac_ext <<EOF
11876 #line 11877 "configure"
11877 #include "confdefs.h"
11878
11879 #               include <pthread.h>
11880         
11881 int main() {
11882
11883                 int i = PTHREAD_CREATE_JOINABLE;
11884         
11885 ; return 0; }
11886 EOF
11887 if { (eval echo configure:11888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11888   rm -rf conftest*
11889   
11890         cat > conftest.$ac_ext <<EOF
11891 #line 11892 "configure"
11892 #include "confdefs.h"
11893 #include <pthread.h>
11894 EOF
11895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11896   egrep "pthread_detach" >/dev/null 2>&1; then
11897   rm -rf conftest*
11898   ol_cv_pthread_version=10
11899 else
11900   rm -rf conftest*
11901   ol_cv_pthread_version=8
11902 fi
11903 rm -f conftest*
11904
11905 else
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -rf conftest*
11909   
11910         cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913
11914 #               include <pthread.h>
11915 #               ifdef PTHREAD_CREATE_UNDETACHED
11916                 draft7
11917 #               endif
11918         
11919 EOF
11920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11921   egrep "draft7" >/dev/null 2>&1; then
11922   rm -rf conftest*
11923   ol_cv_pthread_version=7
11924 else
11925   rm -rf conftest*
11926   
11927         cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930 #include <pthread.h>
11931 EOF
11932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11933   egrep "pthread_attr_init" >/dev/null 2>&1; then
11934   rm -rf conftest*
11935   ol_cv_pthread_version=6
11936 else
11937   rm -rf conftest*
11938   
11939         cat > conftest.$ac_ext <<EOF
11940 #line 11941 "configure"
11941 #include "confdefs.h"
11942
11943 #               include <pthread.h>
11944 #ifdef          PTHREAD_MUTEX_INITIALIZER
11945                 draft5
11946 #endif
11947         
11948 EOF
11949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11950   egrep "draft5" >/dev/null 2>&1; then
11951   rm -rf conftest*
11952   ol_cv_pthread_version=5
11953 else
11954   rm -rf conftest*
11955   ol_cv_pthread_version=4
11956 fi
11957 rm -f conftest*
11958  
11959 fi
11960 rm -f conftest*
11961  
11962 fi
11963 rm -f conftest*
11964  
11965 fi
11966 rm -f conftest*
11967
11968 fi
11969
11970 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11971
11972
11973                 if test $ol_cv_pthread_version != 0 ; then
11974                         cat >> confdefs.h <<EOF
11975 #define HAVE_PTHREADS $ol_cv_pthread_version
11976 EOF
11977
11978                 else
11979                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11980                 fi
11981
11982                 # consider threads found
11983                 ol_with_threads=found
11984
11985                 
11986         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11987 echo "configure:11988: checking for LinuxThreads pthread.h" >&5
11988 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11989   echo $ac_n "(cached) $ac_c" 1>&6
11990 else
11991   cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994 #include <pthread.h>
11995 EOF
11996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11997   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11998   rm -rf conftest*
11999   ol_cv_header_linux_threads=yes
12000 else
12001   rm -rf conftest*
12002   ol_cv_header_linux_threads=no
12003 fi
12004 rm -f conftest*
12005
12006                 
12007 fi
12008
12009 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12010         if test $ol_cv_header_linux_threads = yes; then
12011                 cat >> confdefs.h <<\EOF
12012 #define HAVE_LINUX_THREADS 1
12013 EOF
12014
12015         fi
12016
12017                 
12018         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
12019 echo "configure:12020: checking for GNU Pth pthread.h" >&5
12020 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   cat > conftest.$ac_ext <<EOF
12024 #line 12025 "configure"
12025 #include "confdefs.h"
12026 #include <pthread.h>
12027 #ifdef _POSIX_THREAD_IS_GNU_PTH
12028         __gnu_pth__;
12029 #endif
12030
12031 EOF
12032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12033   egrep "__gnu_pth__" >/dev/null 2>&1; then
12034   rm -rf conftest*
12035   ol_cv_header_gnu_pth_pthread_h=yes
12036 else
12037   rm -rf conftest*
12038   ol_cv_header_gnu_pth_pthread_h=no
12039 fi
12040 rm -f conftest*
12041
12042                 
12043 fi
12044
12045 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12046
12047
12048                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12049                         for ac_hdr in sched.h
12050 do
12051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12053 echo "configure:12054: checking for $ac_hdr" >&5
12054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12055   echo $ac_n "(cached) $ac_c" 1>&6
12056 else
12057   cat > conftest.$ac_ext <<EOF
12058 #line 12059 "configure"
12059 #include "confdefs.h"
12060 #include <$ac_hdr>
12061 EOF
12062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12063 { (eval echo configure:12064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12065 if test -z "$ac_err"; then
12066   rm -rf conftest*
12067   eval "ac_cv_header_$ac_safe=yes"
12068 else
12069   echo "$ac_err" >&5
12070   echo "configure: failed program was:" >&5
12071   cat conftest.$ac_ext >&5
12072   rm -rf conftest*
12073   eval "ac_cv_header_$ac_safe=no"
12074 fi
12075 rm -f conftest*
12076 fi
12077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12078   echo "$ac_t""yes" 1>&6
12079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12080   cat >> confdefs.h <<EOF
12081 #define $ac_tr_hdr 1
12082 EOF
12083  
12084 else
12085   echo "$ac_t""no" 1>&6
12086 fi
12087 done
12088
12089                 fi
12090
12091                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12092                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12093 echo "configure:12094: checking for pthread_create in default libraries" >&5
12094 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12095   echo $ac_n "(cached) $ac_c" 1>&6
12096 else
12097   
12098                 if test "$cross_compiling" = yes; then
12099   cat > conftest.$ac_ext <<EOF
12100 #line 12101 "configure"
12101 #include "confdefs.h"
12102 /* pthread test headers */
12103 #include <pthread.h>
12104 #if HAVE_PTHREADS < 7
12105 #include <errno.h>
12106 #endif
12107 #ifndef NULL
12108 #define NULL (void*)0
12109 #endif
12110
12111 static void *task(p)
12112         void *p;
12113 {
12114         return (void *) (p == NULL);
12115 }
12116
12117 int main() {
12118
12119         /* pthread test function */
12120 #ifndef PTHREAD_CREATE_DETACHED
12121 #define PTHREAD_CREATE_DETACHED 1
12122 #endif
12123         pthread_t t;
12124         int status;
12125         int detach = PTHREAD_CREATE_DETACHED;
12126
12127 #if HAVE_PTHREADS > 4
12128         /* Final pthreads */
12129         pthread_attr_t attr;
12130
12131         status = pthread_attr_init(&attr);
12132         if( status ) return status;
12133
12134 #if HAVE_PTHREADS < 7
12135         status = pthread_attr_setdetachstate(&attr, &detach);
12136         if( status < 0 ) status = errno;
12137 #else
12138         status = pthread_attr_setdetachstate(&attr, detach);
12139 #endif
12140         if( status ) return status;
12141         status = pthread_create( &t, &attr, task, NULL );
12142 #if HAVE_PTHREADS < 7
12143         if( status < 0 ) status = errno;
12144 #endif
12145         if( status ) return status;
12146 #else
12147         /* Draft 4 pthreads */
12148         status = pthread_create( &t, pthread_attr_default, task, NULL );
12149         if( status ) return errno;
12150
12151         /* give thread a chance to complete */
12152         /* it should remain joinable and hence detachable */
12153         sleep( 1 );
12154
12155         status = pthread_detach( &t );
12156         if( status ) return errno;
12157 #endif
12158
12159 #ifdef HAVE_LINUX_THREADS
12160         pthread_kill_other_threads_np();
12161 #endif
12162
12163         return 0;
12164
12165 ; return 0; }
12166 EOF
12167 if { (eval echo configure:12168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12168   rm -rf conftest*
12169   ol_cv_pthread_create=yes
12170 else
12171   echo "configure: failed program was:" >&5
12172   cat conftest.$ac_ext >&5
12173   rm -rf conftest*
12174   ol_cv_pthread_create=no
12175 fi
12176 rm -f conftest*
12177 else
12178   cat > conftest.$ac_ext <<EOF
12179 #line 12180 "configure"
12180 #include "confdefs.h"
12181 /* pthread test headers */
12182 #include <pthread.h>
12183 #if HAVE_PTHREADS < 7
12184 #include <errno.h>
12185 #endif
12186 #ifndef NULL
12187 #define NULL (void*)0
12188 #endif
12189
12190 static void *task(p)
12191         void *p;
12192 {
12193         return (void *) (p == NULL);
12194 }
12195
12196
12197 int main(argc, argv)
12198         int argc;
12199         char **argv;
12200 {
12201
12202         /* pthread test function */
12203 #ifndef PTHREAD_CREATE_DETACHED
12204 #define PTHREAD_CREATE_DETACHED 1
12205 #endif
12206         pthread_t t;
12207         int status;
12208         int detach = PTHREAD_CREATE_DETACHED;
12209
12210 #if HAVE_PTHREADS > 4
12211         /* Final pthreads */
12212         pthread_attr_t attr;
12213
12214         status = pthread_attr_init(&attr);
12215         if( status ) return status;
12216
12217 #if HAVE_PTHREADS < 7
12218         status = pthread_attr_setdetachstate(&attr, &detach);
12219         if( status < 0 ) status = errno;
12220 #else
12221         status = pthread_attr_setdetachstate(&attr, detach);
12222 #endif
12223         if( status ) return status;
12224         status = pthread_create( &t, &attr, task, NULL );
12225 #if HAVE_PTHREADS < 7
12226         if( status < 0 ) status = errno;
12227 #endif
12228         if( status ) return status;
12229 #else
12230         /* Draft 4 pthreads */
12231         status = pthread_create( &t, pthread_attr_default, task, NULL );
12232         if( status ) return errno;
12233
12234         /* give thread a chance to complete */
12235         /* it should remain joinable and hence detachable */
12236         sleep( 1 );
12237
12238         status = pthread_detach( &t );
12239         if( status ) return errno;
12240 #endif
12241
12242 #ifdef HAVE_LINUX_THREADS
12243         pthread_kill_other_threads_np();
12244 #endif
12245
12246         return 0;
12247
12248 }
12249
12250 EOF
12251 if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12252 then
12253   ol_cv_pthread_create=yes
12254 else
12255   echo "configure: failed program was:" >&5
12256   cat conftest.$ac_ext >&5
12257   rm -fr conftest*
12258   ol_cv_pthread_create=no
12259 fi
12260 rm -fr conftest*
12261 fi
12262
12263 fi
12264
12265 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12266
12267                 if test $ol_cv_pthread_create != no ; then
12268                         ol_link_threads=posix
12269                         ol_link_pthreads=""
12270                 fi
12271                 
12272                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12273 if test "$ol_link_threads" = no ; then
12274         # try -kthread
12275         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12276 echo "configure:12277: checking for pthread link with -kthread" >&5
12277 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12278   echo $ac_n "(cached) $ac_c" 1>&6
12279 else
12280   
12281                 # save the flags
12282                 ol_LIBS="$LIBS"
12283                 LIBS="-kthread $LIBS"
12284
12285                 if test "$cross_compiling" = yes; then
12286   cat > conftest.$ac_ext <<EOF
12287 #line 12288 "configure"
12288 #include "confdefs.h"
12289 /* pthread test headers */
12290 #include <pthread.h>
12291 #if HAVE_PTHREADS < 7
12292 #include <errno.h>
12293 #endif
12294 #ifndef NULL
12295 #define NULL (void*)0
12296 #endif
12297
12298 static void *task(p)
12299         void *p;
12300 {
12301         return (void *) (p == NULL);
12302 }
12303
12304 int main() {
12305
12306         /* pthread test function */
12307 #ifndef PTHREAD_CREATE_DETACHED
12308 #define PTHREAD_CREATE_DETACHED 1
12309 #endif
12310         pthread_t t;
12311         int status;
12312         int detach = PTHREAD_CREATE_DETACHED;
12313
12314 #if HAVE_PTHREADS > 4
12315         /* Final pthreads */
12316         pthread_attr_t attr;
12317
12318         status = pthread_attr_init(&attr);
12319         if( status ) return status;
12320
12321 #if HAVE_PTHREADS < 7
12322         status = pthread_attr_setdetachstate(&attr, &detach);
12323         if( status < 0 ) status = errno;
12324 #else
12325         status = pthread_attr_setdetachstate(&attr, detach);
12326 #endif
12327         if( status ) return status;
12328         status = pthread_create( &t, &attr, task, NULL );
12329 #if HAVE_PTHREADS < 7
12330         if( status < 0 ) status = errno;
12331 #endif
12332         if( status ) return status;
12333 #else
12334         /* Draft 4 pthreads */
12335         status = pthread_create( &t, pthread_attr_default, task, NULL );
12336         if( status ) return errno;
12337
12338         /* give thread a chance to complete */
12339         /* it should remain joinable and hence detachable */
12340         sleep( 1 );
12341
12342         status = pthread_detach( &t );
12343         if( status ) return errno;
12344 #endif
12345
12346 #ifdef HAVE_LINUX_THREADS
12347         pthread_kill_other_threads_np();
12348 #endif
12349
12350         return 0;
12351
12352 ; return 0; }
12353 EOF
12354 if { (eval echo configure:12355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12355   rm -rf conftest*
12356   ol_cv_pthread_kthread=yes
12357 else
12358   echo "configure: failed program was:" >&5
12359   cat conftest.$ac_ext >&5
12360   rm -rf conftest*
12361   ol_cv_pthread_kthread=no
12362 fi
12363 rm -f conftest*
12364 else
12365   cat > conftest.$ac_ext <<EOF
12366 #line 12367 "configure"
12367 #include "confdefs.h"
12368 /* pthread test headers */
12369 #include <pthread.h>
12370 #if HAVE_PTHREADS < 7
12371 #include <errno.h>
12372 #endif
12373 #ifndef NULL
12374 #define NULL (void*)0
12375 #endif
12376
12377 static void *task(p)
12378         void *p;
12379 {
12380         return (void *) (p == NULL);
12381 }
12382
12383
12384 int main(argc, argv)
12385         int argc;
12386         char **argv;
12387 {
12388
12389         /* pthread test function */
12390 #ifndef PTHREAD_CREATE_DETACHED
12391 #define PTHREAD_CREATE_DETACHED 1
12392 #endif
12393         pthread_t t;
12394         int status;
12395         int detach = PTHREAD_CREATE_DETACHED;
12396
12397 #if HAVE_PTHREADS > 4
12398         /* Final pthreads */
12399         pthread_attr_t attr;
12400
12401         status = pthread_attr_init(&attr);
12402         if( status ) return status;
12403
12404 #if HAVE_PTHREADS < 7
12405         status = pthread_attr_setdetachstate(&attr, &detach);
12406         if( status < 0 ) status = errno;
12407 #else
12408         status = pthread_attr_setdetachstate(&attr, detach);
12409 #endif
12410         if( status ) return status;
12411         status = pthread_create( &t, &attr, task, NULL );
12412 #if HAVE_PTHREADS < 7
12413         if( status < 0 ) status = errno;
12414 #endif
12415         if( status ) return status;
12416 #else
12417         /* Draft 4 pthreads */
12418         status = pthread_create( &t, pthread_attr_default, task, NULL );
12419         if( status ) return errno;
12420
12421         /* give thread a chance to complete */
12422         /* it should remain joinable and hence detachable */
12423         sleep( 1 );
12424
12425         status = pthread_detach( &t );
12426         if( status ) return errno;
12427 #endif
12428
12429 #ifdef HAVE_LINUX_THREADS
12430         pthread_kill_other_threads_np();
12431 #endif
12432
12433         return 0;
12434
12435 }
12436
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12439 then
12440   ol_cv_pthread_kthread=yes
12441 else
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -fr conftest*
12445   ol_cv_pthread_kthread=no
12446 fi
12447 rm -fr conftest*
12448 fi
12449
12450
12451                 # restore the LIBS
12452                 LIBS="$ol_LIBS"
12453         
12454 fi
12455
12456 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12457
12458         if test $ol_cv_pthread_kthread = yes ; then
12459                 ol_link_pthreads="-kthread"
12460                 ol_link_threads=posix
12461         fi
12462 fi
12463
12464                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12465 if test "$ol_link_threads" = no ; then
12466         # try -pthread
12467         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12468 echo "configure:12469: checking for pthread link with -pthread" >&5
12469 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12470   echo $ac_n "(cached) $ac_c" 1>&6
12471 else
12472   
12473                 # save the flags
12474                 ol_LIBS="$LIBS"
12475                 LIBS="-pthread $LIBS"
12476
12477                 if test "$cross_compiling" = yes; then
12478   cat > conftest.$ac_ext <<EOF
12479 #line 12480 "configure"
12480 #include "confdefs.h"
12481 /* pthread test headers */
12482 #include <pthread.h>
12483 #if HAVE_PTHREADS < 7
12484 #include <errno.h>
12485 #endif
12486 #ifndef NULL
12487 #define NULL (void*)0
12488 #endif
12489
12490 static void *task(p)
12491         void *p;
12492 {
12493         return (void *) (p == NULL);
12494 }
12495
12496 int main() {
12497
12498         /* pthread test function */
12499 #ifndef PTHREAD_CREATE_DETACHED
12500 #define PTHREAD_CREATE_DETACHED 1
12501 #endif
12502         pthread_t t;
12503         int status;
12504         int detach = PTHREAD_CREATE_DETACHED;
12505
12506 #if HAVE_PTHREADS > 4
12507         /* Final pthreads */
12508         pthread_attr_t attr;
12509
12510         status = pthread_attr_init(&attr);
12511         if( status ) return status;
12512
12513 #if HAVE_PTHREADS < 7
12514         status = pthread_attr_setdetachstate(&attr, &detach);
12515         if( status < 0 ) status = errno;
12516 #else
12517         status = pthread_attr_setdetachstate(&attr, detach);
12518 #endif
12519         if( status ) return status;
12520         status = pthread_create( &t, &attr, task, NULL );
12521 #if HAVE_PTHREADS < 7
12522         if( status < 0 ) status = errno;
12523 #endif
12524         if( status ) return status;
12525 #else
12526         /* Draft 4 pthreads */
12527         status = pthread_create( &t, pthread_attr_default, task, NULL );
12528         if( status ) return errno;
12529
12530         /* give thread a chance to complete */
12531         /* it should remain joinable and hence detachable */
12532         sleep( 1 );
12533
12534         status = pthread_detach( &t );
12535         if( status ) return errno;
12536 #endif
12537
12538 #ifdef HAVE_LINUX_THREADS
12539         pthread_kill_other_threads_np();
12540 #endif
12541
12542         return 0;
12543
12544 ; return 0; }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12547   rm -rf conftest*
12548   ol_cv_pthread_pthread=yes
12549 else
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   ol_cv_pthread_pthread=no
12554 fi
12555 rm -f conftest*
12556 else
12557   cat > conftest.$ac_ext <<EOF
12558 #line 12559 "configure"
12559 #include "confdefs.h"
12560 /* pthread test headers */
12561 #include <pthread.h>
12562 #if HAVE_PTHREADS < 7
12563 #include <errno.h>
12564 #endif
12565 #ifndef NULL
12566 #define NULL (void*)0
12567 #endif
12568
12569 static void *task(p)
12570         void *p;
12571 {
12572         return (void *) (p == NULL);
12573 }
12574
12575
12576 int main(argc, argv)
12577         int argc;
12578         char **argv;
12579 {
12580
12581         /* pthread test function */
12582 #ifndef PTHREAD_CREATE_DETACHED
12583 #define PTHREAD_CREATE_DETACHED 1
12584 #endif
12585         pthread_t t;
12586         int status;
12587         int detach = PTHREAD_CREATE_DETACHED;
12588
12589 #if HAVE_PTHREADS > 4
12590         /* Final pthreads */
12591         pthread_attr_t attr;
12592
12593         status = pthread_attr_init(&attr);
12594         if( status ) return status;
12595
12596 #if HAVE_PTHREADS < 7
12597         status = pthread_attr_setdetachstate(&attr, &detach);
12598         if( status < 0 ) status = errno;
12599 #else
12600         status = pthread_attr_setdetachstate(&attr, detach);
12601 #endif
12602         if( status ) return status;
12603         status = pthread_create( &t, &attr, task, NULL );
12604 #if HAVE_PTHREADS < 7
12605         if( status < 0 ) status = errno;
12606 #endif
12607         if( status ) return status;
12608 #else
12609         /* Draft 4 pthreads */
12610         status = pthread_create( &t, pthread_attr_default, task, NULL );
12611         if( status ) return errno;
12612
12613         /* give thread a chance to complete */
12614         /* it should remain joinable and hence detachable */
12615         sleep( 1 );
12616
12617         status = pthread_detach( &t );
12618         if( status ) return errno;
12619 #endif
12620
12621 #ifdef HAVE_LINUX_THREADS
12622         pthread_kill_other_threads_np();
12623 #endif
12624
12625         return 0;
12626
12627 }
12628
12629 EOF
12630 if { (eval echo configure:12631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12631 then
12632   ol_cv_pthread_pthread=yes
12633 else
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -fr conftest*
12637   ol_cv_pthread_pthread=no
12638 fi
12639 rm -fr conftest*
12640 fi
12641
12642
12643                 # restore the LIBS
12644                 LIBS="$ol_LIBS"
12645         
12646 fi
12647
12648 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12649
12650         if test $ol_cv_pthread_pthread = yes ; then
12651                 ol_link_pthreads="-pthread"
12652                 ol_link_threads=posix
12653         fi
12654 fi
12655
12656                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12657 if test "$ol_link_threads" = no ; then
12658         # try -pthreads
12659         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12660 echo "configure:12661: checking for pthread link with -pthreads" >&5
12661 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12662   echo $ac_n "(cached) $ac_c" 1>&6
12663 else
12664   
12665                 # save the flags
12666                 ol_LIBS="$LIBS"
12667                 LIBS="-pthreads $LIBS"
12668
12669                 if test "$cross_compiling" = yes; then
12670   cat > conftest.$ac_ext <<EOF
12671 #line 12672 "configure"
12672 #include "confdefs.h"
12673 /* pthread test headers */
12674 #include <pthread.h>
12675 #if HAVE_PTHREADS < 7
12676 #include <errno.h>
12677 #endif
12678 #ifndef NULL
12679 #define NULL (void*)0
12680 #endif
12681
12682 static void *task(p)
12683         void *p;
12684 {
12685         return (void *) (p == NULL);
12686 }
12687
12688 int main() {
12689
12690         /* pthread test function */
12691 #ifndef PTHREAD_CREATE_DETACHED
12692 #define PTHREAD_CREATE_DETACHED 1
12693 #endif
12694         pthread_t t;
12695         int status;
12696         int detach = PTHREAD_CREATE_DETACHED;
12697
12698 #if HAVE_PTHREADS > 4
12699         /* Final pthreads */
12700         pthread_attr_t attr;
12701
12702         status = pthread_attr_init(&attr);
12703         if( status ) return status;
12704
12705 #if HAVE_PTHREADS < 7
12706         status = pthread_attr_setdetachstate(&attr, &detach);
12707         if( status < 0 ) status = errno;
12708 #else
12709         status = pthread_attr_setdetachstate(&attr, detach);
12710 #endif
12711         if( status ) return status;
12712         status = pthread_create( &t, &attr, task, NULL );
12713 #if HAVE_PTHREADS < 7
12714         if( status < 0 ) status = errno;
12715 #endif
12716         if( status ) return status;
12717 #else
12718         /* Draft 4 pthreads */
12719         status = pthread_create( &t, pthread_attr_default, task, NULL );
12720         if( status ) return errno;
12721
12722         /* give thread a chance to complete */
12723         /* it should remain joinable and hence detachable */
12724         sleep( 1 );
12725
12726         status = pthread_detach( &t );
12727         if( status ) return errno;
12728 #endif
12729
12730 #ifdef HAVE_LINUX_THREADS
12731         pthread_kill_other_threads_np();
12732 #endif
12733
12734         return 0;
12735
12736 ; return 0; }
12737 EOF
12738 if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12739   rm -rf conftest*
12740   ol_cv_pthread_pthreads=yes
12741 else
12742   echo "configure: failed program was:" >&5
12743   cat conftest.$ac_ext >&5
12744   rm -rf conftest*
12745   ol_cv_pthread_pthreads=no
12746 fi
12747 rm -f conftest*
12748 else
12749   cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 /* pthread test headers */
12753 #include <pthread.h>
12754 #if HAVE_PTHREADS < 7
12755 #include <errno.h>
12756 #endif
12757 #ifndef NULL
12758 #define NULL (void*)0
12759 #endif
12760
12761 static void *task(p)
12762         void *p;
12763 {
12764         return (void *) (p == NULL);
12765 }
12766
12767
12768 int main(argc, argv)
12769         int argc;
12770         char **argv;
12771 {
12772
12773         /* pthread test function */
12774 #ifndef PTHREAD_CREATE_DETACHED
12775 #define PTHREAD_CREATE_DETACHED 1
12776 #endif
12777         pthread_t t;
12778         int status;
12779         int detach = PTHREAD_CREATE_DETACHED;
12780
12781 #if HAVE_PTHREADS > 4
12782         /* Final pthreads */
12783         pthread_attr_t attr;
12784
12785         status = pthread_attr_init(&attr);
12786         if( status ) return status;
12787
12788 #if HAVE_PTHREADS < 7
12789         status = pthread_attr_setdetachstate(&attr, &detach);
12790         if( status < 0 ) status = errno;
12791 #else
12792         status = pthread_attr_setdetachstate(&attr, detach);
12793 #endif
12794         if( status ) return status;
12795         status = pthread_create( &t, &attr, task, NULL );
12796 #if HAVE_PTHREADS < 7
12797         if( status < 0 ) status = errno;
12798 #endif
12799         if( status ) return status;
12800 #else
12801         /* Draft 4 pthreads */
12802         status = pthread_create( &t, pthread_attr_default, task, NULL );
12803         if( status ) return errno;
12804
12805         /* give thread a chance to complete */
12806         /* it should remain joinable and hence detachable */
12807         sleep( 1 );
12808
12809         status = pthread_detach( &t );
12810         if( status ) return errno;
12811 #endif
12812
12813 #ifdef HAVE_LINUX_THREADS
12814         pthread_kill_other_threads_np();
12815 #endif
12816
12817         return 0;
12818
12819 }
12820
12821 EOF
12822 if { (eval echo configure:12823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12823 then
12824   ol_cv_pthread_pthreads=yes
12825 else
12826   echo "configure: failed program was:" >&5
12827   cat conftest.$ac_ext >&5
12828   rm -fr conftest*
12829   ol_cv_pthread_pthreads=no
12830 fi
12831 rm -fr conftest*
12832 fi
12833
12834
12835                 # restore the LIBS
12836                 LIBS="$ol_LIBS"
12837         
12838 fi
12839
12840 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12841
12842         if test $ol_cv_pthread_pthreads = yes ; then
12843                 ol_link_pthreads="-pthreads"
12844                 ol_link_threads=posix
12845         fi
12846 fi
12847
12848                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12849 if test "$ol_link_threads" = no ; then
12850         # try -mthreads
12851         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12852 echo "configure:12853: checking for pthread link with -mthreads" >&5
12853 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12854   echo $ac_n "(cached) $ac_c" 1>&6
12855 else
12856   
12857                 # save the flags
12858                 ol_LIBS="$LIBS"
12859                 LIBS="-mthreads $LIBS"
12860
12861                 if test "$cross_compiling" = yes; then
12862   cat > conftest.$ac_ext <<EOF
12863 #line 12864 "configure"
12864 #include "confdefs.h"
12865 /* pthread test headers */
12866 #include <pthread.h>
12867 #if HAVE_PTHREADS < 7
12868 #include <errno.h>
12869 #endif
12870 #ifndef NULL
12871 #define NULL (void*)0
12872 #endif
12873
12874 static void *task(p)
12875         void *p;
12876 {
12877         return (void *) (p == NULL);
12878 }
12879
12880 int main() {
12881
12882         /* pthread test function */
12883 #ifndef PTHREAD_CREATE_DETACHED
12884 #define PTHREAD_CREATE_DETACHED 1
12885 #endif
12886         pthread_t t;
12887         int status;
12888         int detach = PTHREAD_CREATE_DETACHED;
12889
12890 #if HAVE_PTHREADS > 4
12891         /* Final pthreads */
12892         pthread_attr_t attr;
12893
12894         status = pthread_attr_init(&attr);
12895         if( status ) return status;
12896
12897 #if HAVE_PTHREADS < 7
12898         status = pthread_attr_setdetachstate(&attr, &detach);
12899         if( status < 0 ) status = errno;
12900 #else
12901         status = pthread_attr_setdetachstate(&attr, detach);
12902 #endif
12903         if( status ) return status;
12904         status = pthread_create( &t, &attr, task, NULL );
12905 #if HAVE_PTHREADS < 7
12906         if( status < 0 ) status = errno;
12907 #endif
12908         if( status ) return status;
12909 #else
12910         /* Draft 4 pthreads */
12911         status = pthread_create( &t, pthread_attr_default, task, NULL );
12912         if( status ) return errno;
12913
12914         /* give thread a chance to complete */
12915         /* it should remain joinable and hence detachable */
12916         sleep( 1 );
12917
12918         status = pthread_detach( &t );
12919         if( status ) return errno;
12920 #endif
12921
12922 #ifdef HAVE_LINUX_THREADS
12923         pthread_kill_other_threads_np();
12924 #endif
12925
12926         return 0;
12927
12928 ; return 0; }
12929 EOF
12930 if { (eval echo configure:12931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12931   rm -rf conftest*
12932   ol_cv_pthread_mthreads=yes
12933 else
12934   echo "configure: failed program was:" >&5
12935   cat conftest.$ac_ext >&5
12936   rm -rf conftest*
12937   ol_cv_pthread_mthreads=no
12938 fi
12939 rm -f conftest*
12940 else
12941   cat > conftest.$ac_ext <<EOF
12942 #line 12943 "configure"
12943 #include "confdefs.h"
12944 /* pthread test headers */
12945 #include <pthread.h>
12946 #if HAVE_PTHREADS < 7
12947 #include <errno.h>
12948 #endif
12949 #ifndef NULL
12950 #define NULL (void*)0
12951 #endif
12952
12953 static void *task(p)
12954         void *p;
12955 {
12956         return (void *) (p == NULL);
12957 }
12958
12959
12960 int main(argc, argv)
12961         int argc;
12962         char **argv;
12963 {
12964
12965         /* pthread test function */
12966 #ifndef PTHREAD_CREATE_DETACHED
12967 #define PTHREAD_CREATE_DETACHED 1
12968 #endif
12969         pthread_t t;
12970         int status;
12971         int detach = PTHREAD_CREATE_DETACHED;
12972
12973 #if HAVE_PTHREADS > 4
12974         /* Final pthreads */
12975         pthread_attr_t attr;
12976
12977         status = pthread_attr_init(&attr);
12978         if( status ) return status;
12979
12980 #if HAVE_PTHREADS < 7
12981         status = pthread_attr_setdetachstate(&attr, &detach);
12982         if( status < 0 ) status = errno;
12983 #else
12984         status = pthread_attr_setdetachstate(&attr, detach);
12985 #endif
12986         if( status ) return status;
12987         status = pthread_create( &t, &attr, task, NULL );
12988 #if HAVE_PTHREADS < 7
12989         if( status < 0 ) status = errno;
12990 #endif
12991         if( status ) return status;
12992 #else
12993         /* Draft 4 pthreads */
12994         status = pthread_create( &t, pthread_attr_default, task, NULL );
12995         if( status ) return errno;
12996
12997         /* give thread a chance to complete */
12998         /* it should remain joinable and hence detachable */
12999         sleep( 1 );
13000
13001         status = pthread_detach( &t );
13002         if( status ) return errno;
13003 #endif
13004
13005 #ifdef HAVE_LINUX_THREADS
13006         pthread_kill_other_threads_np();
13007 #endif
13008
13009         return 0;
13010
13011 }
13012
13013 EOF
13014 if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13015 then
13016   ol_cv_pthread_mthreads=yes
13017 else
13018   echo "configure: failed program was:" >&5
13019   cat conftest.$ac_ext >&5
13020   rm -fr conftest*
13021   ol_cv_pthread_mthreads=no
13022 fi
13023 rm -fr conftest*
13024 fi
13025
13026
13027                 # restore the LIBS
13028                 LIBS="$ol_LIBS"
13029         
13030 fi
13031
13032 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13033
13034         if test $ol_cv_pthread_mthreads = yes ; then
13035                 ol_link_pthreads="-mthreads"
13036                 ol_link_threads=posix
13037         fi
13038 fi
13039
13040                 # Pthread try link: -thread (ol_cv_pthread_thread)
13041 if test "$ol_link_threads" = no ; then
13042         # try -thread
13043         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13044 echo "configure:13045: checking for pthread link with -thread" >&5
13045 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13046   echo $ac_n "(cached) $ac_c" 1>&6
13047 else
13048   
13049                 # save the flags
13050                 ol_LIBS="$LIBS"
13051                 LIBS="-thread $LIBS"
13052
13053                 if test "$cross_compiling" = yes; then
13054   cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057 /* pthread test headers */
13058 #include <pthread.h>
13059 #if HAVE_PTHREADS < 7
13060 #include <errno.h>
13061 #endif
13062 #ifndef NULL
13063 #define NULL (void*)0
13064 #endif
13065
13066 static void *task(p)
13067         void *p;
13068 {
13069         return (void *) (p == NULL);
13070 }
13071
13072 int main() {
13073
13074         /* pthread test function */
13075 #ifndef PTHREAD_CREATE_DETACHED
13076 #define PTHREAD_CREATE_DETACHED 1
13077 #endif
13078         pthread_t t;
13079         int status;
13080         int detach = PTHREAD_CREATE_DETACHED;
13081
13082 #if HAVE_PTHREADS > 4
13083         /* Final pthreads */
13084         pthread_attr_t attr;
13085
13086         status = pthread_attr_init(&attr);
13087         if( status ) return status;
13088
13089 #if HAVE_PTHREADS < 7
13090         status = pthread_attr_setdetachstate(&attr, &detach);
13091         if( status < 0 ) status = errno;
13092 #else
13093         status = pthread_attr_setdetachstate(&attr, detach);
13094 #endif
13095         if( status ) return status;
13096         status = pthread_create( &t, &attr, task, NULL );
13097 #if HAVE_PTHREADS < 7
13098         if( status < 0 ) status = errno;
13099 #endif
13100         if( status ) return status;
13101 #else
13102         /* Draft 4 pthreads */
13103         status = pthread_create( &t, pthread_attr_default, task, NULL );
13104         if( status ) return errno;
13105
13106         /* give thread a chance to complete */
13107         /* it should remain joinable and hence detachable */
13108         sleep( 1 );
13109
13110         status = pthread_detach( &t );
13111         if( status ) return errno;
13112 #endif
13113
13114 #ifdef HAVE_LINUX_THREADS
13115         pthread_kill_other_threads_np();
13116 #endif
13117
13118         return 0;
13119
13120 ; return 0; }
13121 EOF
13122 if { (eval echo configure:13123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13123   rm -rf conftest*
13124   ol_cv_pthread_thread=yes
13125 else
13126   echo "configure: failed program was:" >&5
13127   cat conftest.$ac_ext >&5
13128   rm -rf conftest*
13129   ol_cv_pthread_thread=no
13130 fi
13131 rm -f conftest*
13132 else
13133   cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 /* pthread test headers */
13137 #include <pthread.h>
13138 #if HAVE_PTHREADS < 7
13139 #include <errno.h>
13140 #endif
13141 #ifndef NULL
13142 #define NULL (void*)0
13143 #endif
13144
13145 static void *task(p)
13146         void *p;
13147 {
13148         return (void *) (p == NULL);
13149 }
13150
13151
13152 int main(argc, argv)
13153         int argc;
13154         char **argv;
13155 {
13156
13157         /* pthread test function */
13158 #ifndef PTHREAD_CREATE_DETACHED
13159 #define PTHREAD_CREATE_DETACHED 1
13160 #endif
13161         pthread_t t;
13162         int status;
13163         int detach = PTHREAD_CREATE_DETACHED;
13164
13165 #if HAVE_PTHREADS > 4
13166         /* Final pthreads */
13167         pthread_attr_t attr;
13168
13169         status = pthread_attr_init(&attr);
13170         if( status ) return status;
13171
13172 #if HAVE_PTHREADS < 7
13173         status = pthread_attr_setdetachstate(&attr, &detach);
13174         if( status < 0 ) status = errno;
13175 #else
13176         status = pthread_attr_setdetachstate(&attr, detach);
13177 #endif
13178         if( status ) return status;
13179         status = pthread_create( &t, &attr, task, NULL );
13180 #if HAVE_PTHREADS < 7
13181         if( status < 0 ) status = errno;
13182 #endif
13183         if( status ) return status;
13184 #else
13185         /* Draft 4 pthreads */
13186         status = pthread_create( &t, pthread_attr_default, task, NULL );
13187         if( status ) return errno;
13188
13189         /* give thread a chance to complete */
13190         /* it should remain joinable and hence detachable */
13191         sleep( 1 );
13192
13193         status = pthread_detach( &t );
13194         if( status ) return errno;
13195 #endif
13196
13197 #ifdef HAVE_LINUX_THREADS
13198         pthread_kill_other_threads_np();
13199 #endif
13200
13201         return 0;
13202
13203 }
13204
13205 EOF
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13207 then
13208   ol_cv_pthread_thread=yes
13209 else
13210   echo "configure: failed program was:" >&5
13211   cat conftest.$ac_ext >&5
13212   rm -fr conftest*
13213   ol_cv_pthread_thread=no
13214 fi
13215 rm -fr conftest*
13216 fi
13217
13218
13219                 # restore the LIBS
13220                 LIBS="$ol_LIBS"
13221         
13222 fi
13223
13224 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13225
13226         if test $ol_cv_pthread_thread = yes ; then
13227                 ol_link_pthreads="-thread"
13228                 ol_link_threads=posix
13229         fi
13230 fi
13231
13232
13233                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13234 if test "$ol_link_threads" = no ; then
13235         # try -lpthread -lmach -lexc -lc_r
13236         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13237 echo "configure:13238: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13238 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13239   echo $ac_n "(cached) $ac_c" 1>&6
13240 else
13241   
13242                 # save the flags
13243                 ol_LIBS="$LIBS"
13244                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13245
13246                 if test "$cross_compiling" = yes; then
13247   cat > conftest.$ac_ext <<EOF
13248 #line 13249 "configure"
13249 #include "confdefs.h"
13250 /* pthread test headers */
13251 #include <pthread.h>
13252 #if HAVE_PTHREADS < 7
13253 #include <errno.h>
13254 #endif
13255 #ifndef NULL
13256 #define NULL (void*)0
13257 #endif
13258
13259 static void *task(p)
13260         void *p;
13261 {
13262         return (void *) (p == NULL);
13263 }
13264
13265 int main() {
13266
13267         /* pthread test function */
13268 #ifndef PTHREAD_CREATE_DETACHED
13269 #define PTHREAD_CREATE_DETACHED 1
13270 #endif
13271         pthread_t t;
13272         int status;
13273         int detach = PTHREAD_CREATE_DETACHED;
13274
13275 #if HAVE_PTHREADS > 4
13276         /* Final pthreads */
13277         pthread_attr_t attr;
13278
13279         status = pthread_attr_init(&attr);
13280         if( status ) return status;
13281
13282 #if HAVE_PTHREADS < 7
13283         status = pthread_attr_setdetachstate(&attr, &detach);
13284         if( status < 0 ) status = errno;
13285 #else
13286         status = pthread_attr_setdetachstate(&attr, detach);
13287 #endif
13288         if( status ) return status;
13289         status = pthread_create( &t, &attr, task, NULL );
13290 #if HAVE_PTHREADS < 7
13291         if( status < 0 ) status = errno;
13292 #endif
13293         if( status ) return status;
13294 #else
13295         /* Draft 4 pthreads */
13296         status = pthread_create( &t, pthread_attr_default, task, NULL );
13297         if( status ) return errno;
13298
13299         /* give thread a chance to complete */
13300         /* it should remain joinable and hence detachable */
13301         sleep( 1 );
13302
13303         status = pthread_detach( &t );
13304         if( status ) return errno;
13305 #endif
13306
13307 #ifdef HAVE_LINUX_THREADS
13308         pthread_kill_other_threads_np();
13309 #endif
13310
13311         return 0;
13312
13313 ; return 0; }
13314 EOF
13315 if { (eval echo configure:13316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13316   rm -rf conftest*
13317   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13318 else
13319   echo "configure: failed program was:" >&5
13320   cat conftest.$ac_ext >&5
13321   rm -rf conftest*
13322   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13323 fi
13324 rm -f conftest*
13325 else
13326   cat > conftest.$ac_ext <<EOF
13327 #line 13328 "configure"
13328 #include "confdefs.h"
13329 /* pthread test headers */
13330 #include <pthread.h>
13331 #if HAVE_PTHREADS < 7
13332 #include <errno.h>
13333 #endif
13334 #ifndef NULL
13335 #define NULL (void*)0
13336 #endif
13337
13338 static void *task(p)
13339         void *p;
13340 {
13341         return (void *) (p == NULL);
13342 }
13343
13344
13345 int main(argc, argv)
13346         int argc;
13347         char **argv;
13348 {
13349
13350         /* pthread test function */
13351 #ifndef PTHREAD_CREATE_DETACHED
13352 #define PTHREAD_CREATE_DETACHED 1
13353 #endif
13354         pthread_t t;
13355         int status;
13356         int detach = PTHREAD_CREATE_DETACHED;
13357
13358 #if HAVE_PTHREADS > 4
13359         /* Final pthreads */
13360         pthread_attr_t attr;
13361
13362         status = pthread_attr_init(&attr);
13363         if( status ) return status;
13364
13365 #if HAVE_PTHREADS < 7
13366         status = pthread_attr_setdetachstate(&attr, &detach);
13367         if( status < 0 ) status = errno;
13368 #else
13369         status = pthread_attr_setdetachstate(&attr, detach);
13370 #endif
13371         if( status ) return status;
13372         status = pthread_create( &t, &attr, task, NULL );
13373 #if HAVE_PTHREADS < 7
13374         if( status < 0 ) status = errno;
13375 #endif
13376         if( status ) return status;
13377 #else
13378         /* Draft 4 pthreads */
13379         status = pthread_create( &t, pthread_attr_default, task, NULL );
13380         if( status ) return errno;
13381
13382         /* give thread a chance to complete */
13383         /* it should remain joinable and hence detachable */
13384         sleep( 1 );
13385
13386         status = pthread_detach( &t );
13387         if( status ) return errno;
13388 #endif
13389
13390 #ifdef HAVE_LINUX_THREADS
13391         pthread_kill_other_threads_np();
13392 #endif
13393
13394         return 0;
13395
13396 }
13397
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13400 then
13401   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -fr conftest*
13406   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13407 fi
13408 rm -fr conftest*
13409 fi
13410
13411
13412                 # restore the LIBS
13413                 LIBS="$ol_LIBS"
13414         
13415 fi
13416
13417 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13418
13419         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13420                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13421                 ol_link_threads=posix
13422         fi
13423 fi
13424
13425                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13426 if test "$ol_link_threads" = no ; then
13427         # try -lpthread -lmach -lexc
13428         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13429 echo "configure:13430: checking for pthread link with -lpthread -lmach -lexc" >&5
13430 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13431   echo $ac_n "(cached) $ac_c" 1>&6
13432 else
13433   
13434                 # save the flags
13435                 ol_LIBS="$LIBS"
13436                 LIBS="-lpthread -lmach -lexc $LIBS"
13437
13438                 if test "$cross_compiling" = yes; then
13439   cat > conftest.$ac_ext <<EOF
13440 #line 13441 "configure"
13441 #include "confdefs.h"
13442 /* pthread test headers */
13443 #include <pthread.h>
13444 #if HAVE_PTHREADS < 7
13445 #include <errno.h>
13446 #endif
13447 #ifndef NULL
13448 #define NULL (void*)0
13449 #endif
13450
13451 static void *task(p)
13452         void *p;
13453 {
13454         return (void *) (p == NULL);
13455 }
13456
13457 int main() {
13458
13459         /* pthread test function */
13460 #ifndef PTHREAD_CREATE_DETACHED
13461 #define PTHREAD_CREATE_DETACHED 1
13462 #endif
13463         pthread_t t;
13464         int status;
13465         int detach = PTHREAD_CREATE_DETACHED;
13466
13467 #if HAVE_PTHREADS > 4
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if HAVE_PTHREADS < 7
13475         status = pthread_attr_setdetachstate(&attr, &detach);
13476         if( status < 0 ) status = errno;
13477 #else
13478         status = pthread_attr_setdetachstate(&attr, detach);
13479 #endif
13480         if( status ) return status;
13481         status = pthread_create( &t, &attr, task, NULL );
13482 #if HAVE_PTHREADS < 7
13483         if( status < 0 ) status = errno;
13484 #endif
13485         if( status ) return status;
13486 #else
13487         /* Draft 4 pthreads */
13488         status = pthread_create( &t, pthread_attr_default, task, NULL );
13489         if( status ) return errno;
13490
13491         /* give thread a chance to complete */
13492         /* it should remain joinable and hence detachable */
13493         sleep( 1 );
13494
13495         status = pthread_detach( &t );
13496         if( status ) return errno;
13497 #endif
13498
13499 #ifdef HAVE_LINUX_THREADS
13500         pthread_kill_other_threads_np();
13501 #endif
13502
13503         return 0;
13504
13505 ; return 0; }
13506 EOF
13507 if { (eval echo configure:13508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13508   rm -rf conftest*
13509   ol_cv_pthread_lpthread_lmach_lexc=yes
13510 else
13511   echo "configure: failed program was:" >&5
13512   cat conftest.$ac_ext >&5
13513   rm -rf conftest*
13514   ol_cv_pthread_lpthread_lmach_lexc=no
13515 fi
13516 rm -f conftest*
13517 else
13518   cat > conftest.$ac_ext <<EOF
13519 #line 13520 "configure"
13520 #include "confdefs.h"
13521 /* pthread test headers */
13522 #include <pthread.h>
13523 #if HAVE_PTHREADS < 7
13524 #include <errno.h>
13525 #endif
13526 #ifndef NULL
13527 #define NULL (void*)0
13528 #endif
13529
13530 static void *task(p)
13531         void *p;
13532 {
13533         return (void *) (p == NULL);
13534 }
13535
13536
13537 int main(argc, argv)
13538         int argc;
13539         char **argv;
13540 {
13541
13542         /* pthread test function */
13543 #ifndef PTHREAD_CREATE_DETACHED
13544 #define PTHREAD_CREATE_DETACHED 1
13545 #endif
13546         pthread_t t;
13547         int status;
13548         int detach = PTHREAD_CREATE_DETACHED;
13549
13550 #if HAVE_PTHREADS > 4
13551         /* Final pthreads */
13552         pthread_attr_t attr;
13553
13554         status = pthread_attr_init(&attr);
13555         if( status ) return status;
13556
13557 #if HAVE_PTHREADS < 7
13558         status = pthread_attr_setdetachstate(&attr, &detach);
13559         if( status < 0 ) status = errno;
13560 #else
13561         status = pthread_attr_setdetachstate(&attr, detach);
13562 #endif
13563         if( status ) return status;
13564         status = pthread_create( &t, &attr, task, NULL );
13565 #if HAVE_PTHREADS < 7
13566         if( status < 0 ) status = errno;
13567 #endif
13568         if( status ) return status;
13569 #else
13570         /* Draft 4 pthreads */
13571         status = pthread_create( &t, pthread_attr_default, task, NULL );
13572         if( status ) return errno;
13573
13574         /* give thread a chance to complete */
13575         /* it should remain joinable and hence detachable */
13576         sleep( 1 );
13577
13578         status = pthread_detach( &t );
13579         if( status ) return errno;
13580 #endif
13581
13582 #ifdef HAVE_LINUX_THREADS
13583         pthread_kill_other_threads_np();
13584 #endif
13585
13586         return 0;
13587
13588 }
13589
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13592 then
13593   ol_cv_pthread_lpthread_lmach_lexc=yes
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -fr conftest*
13598   ol_cv_pthread_lpthread_lmach_lexc=no
13599 fi
13600 rm -fr conftest*
13601 fi
13602
13603
13604                 # restore the LIBS
13605                 LIBS="$ol_LIBS"
13606         
13607 fi
13608
13609 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13610
13611         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13612                 ol_link_pthreads="-lpthread -lmach -lexc"
13613                 ol_link_threads=posix
13614         fi
13615 fi
13616
13617
13618                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13619 if test "$ol_link_threads" = no ; then
13620         # try -lpthread -Wl,-woff,85
13621         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13622 echo "configure:13623: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13623 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13624   echo $ac_n "(cached) $ac_c" 1>&6
13625 else
13626   
13627                 # save the flags
13628                 ol_LIBS="$LIBS"
13629                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13630
13631                 if test "$cross_compiling" = yes; then
13632   cat > conftest.$ac_ext <<EOF
13633 #line 13634 "configure"
13634 #include "confdefs.h"
13635 /* pthread test headers */
13636 #include <pthread.h>
13637 #if HAVE_PTHREADS < 7
13638 #include <errno.h>
13639 #endif
13640 #ifndef NULL
13641 #define NULL (void*)0
13642 #endif
13643
13644 static void *task(p)
13645         void *p;
13646 {
13647         return (void *) (p == NULL);
13648 }
13649
13650 int main() {
13651
13652         /* pthread test function */
13653 #ifndef PTHREAD_CREATE_DETACHED
13654 #define PTHREAD_CREATE_DETACHED 1
13655 #endif
13656         pthread_t t;
13657         int status;
13658         int detach = PTHREAD_CREATE_DETACHED;
13659
13660 #if HAVE_PTHREADS > 4
13661         /* Final pthreads */
13662         pthread_attr_t attr;
13663
13664         status = pthread_attr_init(&attr);
13665         if( status ) return status;
13666
13667 #if HAVE_PTHREADS < 7
13668         status = pthread_attr_setdetachstate(&attr, &detach);
13669         if( status < 0 ) status = errno;
13670 #else
13671         status = pthread_attr_setdetachstate(&attr, detach);
13672 #endif
13673         if( status ) return status;
13674         status = pthread_create( &t, &attr, task, NULL );
13675 #if HAVE_PTHREADS < 7
13676         if( status < 0 ) status = errno;
13677 #endif
13678         if( status ) return status;
13679 #else
13680         /* Draft 4 pthreads */
13681         status = pthread_create( &t, pthread_attr_default, task, NULL );
13682         if( status ) return errno;
13683
13684         /* give thread a chance to complete */
13685         /* it should remain joinable and hence detachable */
13686         sleep( 1 );
13687
13688         status = pthread_detach( &t );
13689         if( status ) return errno;
13690 #endif
13691
13692 #ifdef HAVE_LINUX_THREADS
13693         pthread_kill_other_threads_np();
13694 #endif
13695
13696         return 0;
13697
13698 ; return 0; }
13699 EOF
13700 if { (eval echo configure:13701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13701   rm -rf conftest*
13702   ol_cv_pthread_lib_lpthread_woff=yes
13703 else
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   ol_cv_pthread_lib_lpthread_woff=no
13708 fi
13709 rm -f conftest*
13710 else
13711   cat > conftest.$ac_ext <<EOF
13712 #line 13713 "configure"
13713 #include "confdefs.h"
13714 /* pthread test headers */
13715 #include <pthread.h>
13716 #if HAVE_PTHREADS < 7
13717 #include <errno.h>
13718 #endif
13719 #ifndef NULL
13720 #define NULL (void*)0
13721 #endif
13722
13723 static void *task(p)
13724         void *p;
13725 {
13726         return (void *) (p == NULL);
13727 }
13728
13729
13730 int main(argc, argv)
13731         int argc;
13732         char **argv;
13733 {
13734
13735         /* pthread test function */
13736 #ifndef PTHREAD_CREATE_DETACHED
13737 #define PTHREAD_CREATE_DETACHED 1
13738 #endif
13739         pthread_t t;
13740         int status;
13741         int detach = PTHREAD_CREATE_DETACHED;
13742
13743 #if HAVE_PTHREADS > 4
13744         /* Final pthreads */
13745         pthread_attr_t attr;
13746
13747         status = pthread_attr_init(&attr);
13748         if( status ) return status;
13749
13750 #if HAVE_PTHREADS < 7
13751         status = pthread_attr_setdetachstate(&attr, &detach);
13752         if( status < 0 ) status = errno;
13753 #else
13754         status = pthread_attr_setdetachstate(&attr, detach);
13755 #endif
13756         if( status ) return status;
13757         status = pthread_create( &t, &attr, task, NULL );
13758 #if HAVE_PTHREADS < 7
13759         if( status < 0 ) status = errno;
13760 #endif
13761         if( status ) return status;
13762 #else
13763         /* Draft 4 pthreads */
13764         status = pthread_create( &t, pthread_attr_default, task, NULL );
13765         if( status ) return errno;
13766
13767         /* give thread a chance to complete */
13768         /* it should remain joinable and hence detachable */
13769         sleep( 1 );
13770
13771         status = pthread_detach( &t );
13772         if( status ) return errno;
13773 #endif
13774
13775 #ifdef HAVE_LINUX_THREADS
13776         pthread_kill_other_threads_np();
13777 #endif
13778
13779         return 0;
13780
13781 }
13782
13783 EOF
13784 if { (eval echo configure:13785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13785 then
13786   ol_cv_pthread_lib_lpthread_woff=yes
13787 else
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -fr conftest*
13791   ol_cv_pthread_lib_lpthread_woff=no
13792 fi
13793 rm -fr conftest*
13794 fi
13795
13796
13797                 # restore the LIBS
13798                 LIBS="$ol_LIBS"
13799         
13800 fi
13801
13802 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13803
13804         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13805                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13806                 ol_link_threads=posix
13807         fi
13808 fi
13809
13810
13811                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13812 if test "$ol_link_threads" = no ; then
13813         # try -lpthread
13814         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13815 echo "configure:13816: checking for pthread link with -lpthread" >&5
13816 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13817   echo $ac_n "(cached) $ac_c" 1>&6
13818 else
13819   
13820                 # save the flags
13821                 ol_LIBS="$LIBS"
13822                 LIBS="-lpthread $LIBS"
13823
13824                 if test "$cross_compiling" = yes; then
13825   cat > conftest.$ac_ext <<EOF
13826 #line 13827 "configure"
13827 #include "confdefs.h"
13828 /* pthread test headers */
13829 #include <pthread.h>
13830 #if HAVE_PTHREADS < 7
13831 #include <errno.h>
13832 #endif
13833 #ifndef NULL
13834 #define NULL (void*)0
13835 #endif
13836
13837 static void *task(p)
13838         void *p;
13839 {
13840         return (void *) (p == NULL);
13841 }
13842
13843 int main() {
13844
13845         /* pthread test function */
13846 #ifndef PTHREAD_CREATE_DETACHED
13847 #define PTHREAD_CREATE_DETACHED 1
13848 #endif
13849         pthread_t t;
13850         int status;
13851         int detach = PTHREAD_CREATE_DETACHED;
13852
13853 #if HAVE_PTHREADS > 4
13854         /* Final pthreads */
13855         pthread_attr_t attr;
13856
13857         status = pthread_attr_init(&attr);
13858         if( status ) return status;
13859
13860 #if HAVE_PTHREADS < 7
13861         status = pthread_attr_setdetachstate(&attr, &detach);
13862         if( status < 0 ) status = errno;
13863 #else
13864         status = pthread_attr_setdetachstate(&attr, detach);
13865 #endif
13866         if( status ) return status;
13867         status = pthread_create( &t, &attr, task, NULL );
13868 #if HAVE_PTHREADS < 7
13869         if( status < 0 ) status = errno;
13870 #endif
13871         if( status ) return status;
13872 #else
13873         /* Draft 4 pthreads */
13874         status = pthread_create( &t, pthread_attr_default, task, NULL );
13875         if( status ) return errno;
13876
13877         /* give thread a chance to complete */
13878         /* it should remain joinable and hence detachable */
13879         sleep( 1 );
13880
13881         status = pthread_detach( &t );
13882         if( status ) return errno;
13883 #endif
13884
13885 #ifdef HAVE_LINUX_THREADS
13886         pthread_kill_other_threads_np();
13887 #endif
13888
13889         return 0;
13890
13891 ; return 0; }
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13894   rm -rf conftest*
13895   ol_cv_pthread_lpthread=yes
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -rf conftest*
13900   ol_cv_pthread_lpthread=no
13901 fi
13902 rm -f conftest*
13903 else
13904   cat > conftest.$ac_ext <<EOF
13905 #line 13906 "configure"
13906 #include "confdefs.h"
13907 /* pthread test headers */
13908 #include <pthread.h>
13909 #if HAVE_PTHREADS < 7
13910 #include <errno.h>
13911 #endif
13912 #ifndef NULL
13913 #define NULL (void*)0
13914 #endif
13915
13916 static void *task(p)
13917         void *p;
13918 {
13919         return (void *) (p == NULL);
13920 }
13921
13922
13923 int main(argc, argv)
13924         int argc;
13925         char **argv;
13926 {
13927
13928         /* pthread test function */
13929 #ifndef PTHREAD_CREATE_DETACHED
13930 #define PTHREAD_CREATE_DETACHED 1
13931 #endif
13932         pthread_t t;
13933         int status;
13934         int detach = PTHREAD_CREATE_DETACHED;
13935
13936 #if HAVE_PTHREADS > 4
13937         /* Final pthreads */
13938         pthread_attr_t attr;
13939
13940         status = pthread_attr_init(&attr);
13941         if( status ) return status;
13942
13943 #if HAVE_PTHREADS < 7
13944         status = pthread_attr_setdetachstate(&attr, &detach);
13945         if( status < 0 ) status = errno;
13946 #else
13947         status = pthread_attr_setdetachstate(&attr, detach);
13948 #endif
13949         if( status ) return status;
13950         status = pthread_create( &t, &attr, task, NULL );
13951 #if HAVE_PTHREADS < 7
13952         if( status < 0 ) status = errno;
13953 #endif
13954         if( status ) return status;
13955 #else
13956         /* Draft 4 pthreads */
13957         status = pthread_create( &t, pthread_attr_default, task, NULL );
13958         if( status ) return errno;
13959
13960         /* give thread a chance to complete */
13961         /* it should remain joinable and hence detachable */
13962         sleep( 1 );
13963
13964         status = pthread_detach( &t );
13965         if( status ) return errno;
13966 #endif
13967
13968 #ifdef HAVE_LINUX_THREADS
13969         pthread_kill_other_threads_np();
13970 #endif
13971
13972         return 0;
13973
13974 }
13975
13976 EOF
13977 if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13978 then
13979   ol_cv_pthread_lpthread=yes
13980 else
13981   echo "configure: failed program was:" >&5
13982   cat conftest.$ac_ext >&5
13983   rm -fr conftest*
13984   ol_cv_pthread_lpthread=no
13985 fi
13986 rm -fr conftest*
13987 fi
13988
13989
13990                 # restore the LIBS
13991                 LIBS="$ol_LIBS"
13992         
13993 fi
13994
13995 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13996
13997         if test $ol_cv_pthread_lpthread = yes ; then
13998                 ol_link_pthreads="-lpthread"
13999                 ol_link_threads=posix
14000         fi
14001 fi
14002
14003                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14004 if test "$ol_link_threads" = no ; then
14005         # try -lc_r
14006         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14007 echo "configure:14008: checking for pthread link with -lc_r" >&5
14008 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14009   echo $ac_n "(cached) $ac_c" 1>&6
14010 else
14011   
14012                 # save the flags
14013                 ol_LIBS="$LIBS"
14014                 LIBS="-lc_r $LIBS"
14015
14016                 if test "$cross_compiling" = yes; then
14017   cat > conftest.$ac_ext <<EOF
14018 #line 14019 "configure"
14019 #include "confdefs.h"
14020 /* pthread test headers */
14021 #include <pthread.h>
14022 #if HAVE_PTHREADS < 7
14023 #include <errno.h>
14024 #endif
14025 #ifndef NULL
14026 #define NULL (void*)0
14027 #endif
14028
14029 static void *task(p)
14030         void *p;
14031 {
14032         return (void *) (p == NULL);
14033 }
14034
14035 int main() {
14036
14037         /* pthread test function */
14038 #ifndef PTHREAD_CREATE_DETACHED
14039 #define PTHREAD_CREATE_DETACHED 1
14040 #endif
14041         pthread_t t;
14042         int status;
14043         int detach = PTHREAD_CREATE_DETACHED;
14044
14045 #if HAVE_PTHREADS > 4
14046         /* Final pthreads */
14047         pthread_attr_t attr;
14048
14049         status = pthread_attr_init(&attr);
14050         if( status ) return status;
14051
14052 #if HAVE_PTHREADS < 7
14053         status = pthread_attr_setdetachstate(&attr, &detach);
14054         if( status < 0 ) status = errno;
14055 #else
14056         status = pthread_attr_setdetachstate(&attr, detach);
14057 #endif
14058         if( status ) return status;
14059         status = pthread_create( &t, &attr, task, NULL );
14060 #if HAVE_PTHREADS < 7
14061         if( status < 0 ) status = errno;
14062 #endif
14063         if( status ) return status;
14064 #else
14065         /* Draft 4 pthreads */
14066         status = pthread_create( &t, pthread_attr_default, task, NULL );
14067         if( status ) return errno;
14068
14069         /* give thread a chance to complete */
14070         /* it should remain joinable and hence detachable */
14071         sleep( 1 );
14072
14073         status = pthread_detach( &t );
14074         if( status ) return errno;
14075 #endif
14076
14077 #ifdef HAVE_LINUX_THREADS
14078         pthread_kill_other_threads_np();
14079 #endif
14080
14081         return 0;
14082
14083 ; return 0; }
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14086   rm -rf conftest*
14087   ol_cv_pthread_lc_r=yes
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091   rm -rf conftest*
14092   ol_cv_pthread_lc_r=no
14093 fi
14094 rm -f conftest*
14095 else
14096   cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 /* pthread test headers */
14100 #include <pthread.h>
14101 #if HAVE_PTHREADS < 7
14102 #include <errno.h>
14103 #endif
14104 #ifndef NULL
14105 #define NULL (void*)0
14106 #endif
14107
14108 static void *task(p)
14109         void *p;
14110 {
14111         return (void *) (p == NULL);
14112 }
14113
14114
14115 int main(argc, argv)
14116         int argc;
14117         char **argv;
14118 {
14119
14120         /* pthread test function */
14121 #ifndef PTHREAD_CREATE_DETACHED
14122 #define PTHREAD_CREATE_DETACHED 1
14123 #endif
14124         pthread_t t;
14125         int status;
14126         int detach = PTHREAD_CREATE_DETACHED;
14127
14128 #if HAVE_PTHREADS > 4
14129         /* Final pthreads */
14130         pthread_attr_t attr;
14131
14132         status = pthread_attr_init(&attr);
14133         if( status ) return status;
14134
14135 #if HAVE_PTHREADS < 7
14136         status = pthread_attr_setdetachstate(&attr, &detach);
14137         if( status < 0 ) status = errno;
14138 #else
14139         status = pthread_attr_setdetachstate(&attr, detach);
14140 #endif
14141         if( status ) return status;
14142         status = pthread_create( &t, &attr, task, NULL );
14143 #if HAVE_PTHREADS < 7
14144         if( status < 0 ) status = errno;
14145 #endif
14146         if( status ) return status;
14147 #else
14148         /* Draft 4 pthreads */
14149         status = pthread_create( &t, pthread_attr_default, task, NULL );
14150         if( status ) return errno;
14151
14152         /* give thread a chance to complete */
14153         /* it should remain joinable and hence detachable */
14154         sleep( 1 );
14155
14156         status = pthread_detach( &t );
14157         if( status ) return errno;
14158 #endif
14159
14160 #ifdef HAVE_LINUX_THREADS
14161         pthread_kill_other_threads_np();
14162 #endif
14163
14164         return 0;
14165
14166 }
14167
14168 EOF
14169 if { (eval echo configure:14170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14170 then
14171   ol_cv_pthread_lc_r=yes
14172 else
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -fr conftest*
14176   ol_cv_pthread_lc_r=no
14177 fi
14178 rm -fr conftest*
14179 fi
14180
14181
14182                 # restore the LIBS
14183                 LIBS="$ol_LIBS"
14184         
14185 fi
14186
14187 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14188
14189         if test $ol_cv_pthread_lc_r = yes ; then
14190                 ol_link_pthreads="-lc_r"
14191                 ol_link_threads=posix
14192         fi
14193 fi
14194
14195
14196                 # Pthread try link: -threads (ol_cv_pthread_threads)
14197 if test "$ol_link_threads" = no ; then
14198         # try -threads
14199         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14200 echo "configure:14201: checking for pthread link with -threads" >&5
14201 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14202   echo $ac_n "(cached) $ac_c" 1>&6
14203 else
14204   
14205                 # save the flags
14206                 ol_LIBS="$LIBS"
14207                 LIBS="-threads $LIBS"
14208
14209                 if test "$cross_compiling" = yes; then
14210   cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213 /* pthread test headers */
14214 #include <pthread.h>
14215 #if HAVE_PTHREADS < 7
14216 #include <errno.h>
14217 #endif
14218 #ifndef NULL
14219 #define NULL (void*)0
14220 #endif
14221
14222 static void *task(p)
14223         void *p;
14224 {
14225         return (void *) (p == NULL);
14226 }
14227
14228 int main() {
14229
14230         /* pthread test function */
14231 #ifndef PTHREAD_CREATE_DETACHED
14232 #define PTHREAD_CREATE_DETACHED 1
14233 #endif
14234         pthread_t t;
14235         int status;
14236         int detach = PTHREAD_CREATE_DETACHED;
14237
14238 #if HAVE_PTHREADS > 4
14239         /* Final pthreads */
14240         pthread_attr_t attr;
14241
14242         status = pthread_attr_init(&attr);
14243         if( status ) return status;
14244
14245 #if HAVE_PTHREADS < 7
14246         status = pthread_attr_setdetachstate(&attr, &detach);
14247         if( status < 0 ) status = errno;
14248 #else
14249         status = pthread_attr_setdetachstate(&attr, detach);
14250 #endif
14251         if( status ) return status;
14252         status = pthread_create( &t, &attr, task, NULL );
14253 #if HAVE_PTHREADS < 7
14254         if( status < 0 ) status = errno;
14255 #endif
14256         if( status ) return status;
14257 #else
14258         /* Draft 4 pthreads */
14259         status = pthread_create( &t, pthread_attr_default, task, NULL );
14260         if( status ) return errno;
14261
14262         /* give thread a chance to complete */
14263         /* it should remain joinable and hence detachable */
14264         sleep( 1 );
14265
14266         status = pthread_detach( &t );
14267         if( status ) return errno;
14268 #endif
14269
14270 #ifdef HAVE_LINUX_THREADS
14271         pthread_kill_other_threads_np();
14272 #endif
14273
14274         return 0;
14275
14276 ; return 0; }
14277 EOF
14278 if { (eval echo configure:14279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14279   rm -rf conftest*
14280   ol_cv_pthread_threads=yes
14281 else
14282   echo "configure: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   rm -rf conftest*
14285   ol_cv_pthread_threads=no
14286 fi
14287 rm -f conftest*
14288 else
14289   cat > conftest.$ac_ext <<EOF
14290 #line 14291 "configure"
14291 #include "confdefs.h"
14292 /* pthread test headers */
14293 #include <pthread.h>
14294 #if HAVE_PTHREADS < 7
14295 #include <errno.h>
14296 #endif
14297 #ifndef NULL
14298 #define NULL (void*)0
14299 #endif
14300
14301 static void *task(p)
14302         void *p;
14303 {
14304         return (void *) (p == NULL);
14305 }
14306
14307
14308 int main(argc, argv)
14309         int argc;
14310         char **argv;
14311 {
14312
14313         /* pthread test function */
14314 #ifndef PTHREAD_CREATE_DETACHED
14315 #define PTHREAD_CREATE_DETACHED 1
14316 #endif
14317         pthread_t t;
14318         int status;
14319         int detach = PTHREAD_CREATE_DETACHED;
14320
14321 #if HAVE_PTHREADS > 4
14322         /* Final pthreads */
14323         pthread_attr_t attr;
14324
14325         status = pthread_attr_init(&attr);
14326         if( status ) return status;
14327
14328 #if HAVE_PTHREADS < 7
14329         status = pthread_attr_setdetachstate(&attr, &detach);
14330         if( status < 0 ) status = errno;
14331 #else
14332         status = pthread_attr_setdetachstate(&attr, detach);
14333 #endif
14334         if( status ) return status;
14335         status = pthread_create( &t, &attr, task, NULL );
14336 #if HAVE_PTHREADS < 7
14337         if( status < 0 ) status = errno;
14338 #endif
14339         if( status ) return status;
14340 #else
14341         /* Draft 4 pthreads */
14342         status = pthread_create( &t, pthread_attr_default, task, NULL );
14343         if( status ) return errno;
14344
14345         /* give thread a chance to complete */
14346         /* it should remain joinable and hence detachable */
14347         sleep( 1 );
14348
14349         status = pthread_detach( &t );
14350         if( status ) return errno;
14351 #endif
14352
14353 #ifdef HAVE_LINUX_THREADS
14354         pthread_kill_other_threads_np();
14355 #endif
14356
14357         return 0;
14358
14359 }
14360
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14363 then
14364   ol_cv_pthread_threads=yes
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   rm -fr conftest*
14369   ol_cv_pthread_threads=no
14370 fi
14371 rm -fr conftest*
14372 fi
14373
14374
14375                 # restore the LIBS
14376                 LIBS="$ol_LIBS"
14377         
14378 fi
14379
14380 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14381
14382         if test $ol_cv_pthread_threads = yes ; then
14383                 ol_link_pthreads="-threads"
14384                 ol_link_threads=posix
14385         fi
14386 fi
14387
14388
14389                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14390 if test "$ol_link_threads" = no ; then
14391         # try -lpthreads -lmach -lexc -lc_r
14392         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14393 echo "configure:14394: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14394 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14395   echo $ac_n "(cached) $ac_c" 1>&6
14396 else
14397   
14398                 # save the flags
14399                 ol_LIBS="$LIBS"
14400                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14401
14402                 if test "$cross_compiling" = yes; then
14403   cat > conftest.$ac_ext <<EOF
14404 #line 14405 "configure"
14405 #include "confdefs.h"
14406 /* pthread test headers */
14407 #include <pthread.h>
14408 #if HAVE_PTHREADS < 7
14409 #include <errno.h>
14410 #endif
14411 #ifndef NULL
14412 #define NULL (void*)0
14413 #endif
14414
14415 static void *task(p)
14416         void *p;
14417 {
14418         return (void *) (p == NULL);
14419 }
14420
14421 int main() {
14422
14423         /* pthread test function */
14424 #ifndef PTHREAD_CREATE_DETACHED
14425 #define PTHREAD_CREATE_DETACHED 1
14426 #endif
14427         pthread_t t;
14428         int status;
14429         int detach = PTHREAD_CREATE_DETACHED;
14430
14431 #if HAVE_PTHREADS > 4
14432         /* Final pthreads */
14433         pthread_attr_t attr;
14434
14435         status = pthread_attr_init(&attr);
14436         if( status ) return status;
14437
14438 #if HAVE_PTHREADS < 7
14439         status = pthread_attr_setdetachstate(&attr, &detach);
14440         if( status < 0 ) status = errno;
14441 #else
14442         status = pthread_attr_setdetachstate(&attr, detach);
14443 #endif
14444         if( status ) return status;
14445         status = pthread_create( &t, &attr, task, NULL );
14446 #if HAVE_PTHREADS < 7
14447         if( status < 0 ) status = errno;
14448 #endif
14449         if( status ) return status;
14450 #else
14451         /* Draft 4 pthreads */
14452         status = pthread_create( &t, pthread_attr_default, task, NULL );
14453         if( status ) return errno;
14454
14455         /* give thread a chance to complete */
14456         /* it should remain joinable and hence detachable */
14457         sleep( 1 );
14458
14459         status = pthread_detach( &t );
14460         if( status ) return errno;
14461 #endif
14462
14463 #ifdef HAVE_LINUX_THREADS
14464         pthread_kill_other_threads_np();
14465 #endif
14466
14467         return 0;
14468
14469 ; return 0; }
14470 EOF
14471 if { (eval echo configure:14472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14472   rm -rf conftest*
14473   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14474 else
14475   echo "configure: failed program was:" >&5
14476   cat conftest.$ac_ext >&5
14477   rm -rf conftest*
14478   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14479 fi
14480 rm -f conftest*
14481 else
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485 /* pthread test headers */
14486 #include <pthread.h>
14487 #if HAVE_PTHREADS < 7
14488 #include <errno.h>
14489 #endif
14490 #ifndef NULL
14491 #define NULL (void*)0
14492 #endif
14493
14494 static void *task(p)
14495         void *p;
14496 {
14497         return (void *) (p == NULL);
14498 }
14499
14500
14501 int main(argc, argv)
14502         int argc;
14503         char **argv;
14504 {
14505
14506         /* pthread test function */
14507 #ifndef PTHREAD_CREATE_DETACHED
14508 #define PTHREAD_CREATE_DETACHED 1
14509 #endif
14510         pthread_t t;
14511         int status;
14512         int detach = PTHREAD_CREATE_DETACHED;
14513
14514 #if HAVE_PTHREADS > 4
14515         /* Final pthreads */
14516         pthread_attr_t attr;
14517
14518         status = pthread_attr_init(&attr);
14519         if( status ) return status;
14520
14521 #if HAVE_PTHREADS < 7
14522         status = pthread_attr_setdetachstate(&attr, &detach);
14523         if( status < 0 ) status = errno;
14524 #else
14525         status = pthread_attr_setdetachstate(&attr, detach);
14526 #endif
14527         if( status ) return status;
14528         status = pthread_create( &t, &attr, task, NULL );
14529 #if HAVE_PTHREADS < 7
14530         if( status < 0 ) status = errno;
14531 #endif
14532         if( status ) return status;
14533 #else
14534         /* Draft 4 pthreads */
14535         status = pthread_create( &t, pthread_attr_default, task, NULL );
14536         if( status ) return errno;
14537
14538         /* give thread a chance to complete */
14539         /* it should remain joinable and hence detachable */
14540         sleep( 1 );
14541
14542         status = pthread_detach( &t );
14543         if( status ) return errno;
14544 #endif
14545
14546 #ifdef HAVE_LINUX_THREADS
14547         pthread_kill_other_threads_np();
14548 #endif
14549
14550         return 0;
14551
14552 }
14553
14554 EOF
14555 if { (eval echo configure:14556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14556 then
14557   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14558 else
14559   echo "configure: failed program was:" >&5
14560   cat conftest.$ac_ext >&5
14561   rm -fr conftest*
14562   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14563 fi
14564 rm -fr conftest*
14565 fi
14566
14567
14568                 # restore the LIBS
14569                 LIBS="$ol_LIBS"
14570         
14571 fi
14572
14573 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14574
14575         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14576                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14577                 ol_link_threads=posix
14578         fi
14579 fi
14580
14581                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14582 if test "$ol_link_threads" = no ; then
14583         # try -lpthreads -lmach -lexc
14584         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14585 echo "configure:14586: checking for pthread link with -lpthreads -lmach -lexc" >&5
14586 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14587   echo $ac_n "(cached) $ac_c" 1>&6
14588 else
14589   
14590                 # save the flags
14591                 ol_LIBS="$LIBS"
14592                 LIBS="-lpthreads -lmach -lexc $LIBS"
14593
14594                 if test "$cross_compiling" = yes; then
14595   cat > conftest.$ac_ext <<EOF
14596 #line 14597 "configure"
14597 #include "confdefs.h"
14598 /* pthread test headers */
14599 #include <pthread.h>
14600 #if HAVE_PTHREADS < 7
14601 #include <errno.h>
14602 #endif
14603 #ifndef NULL
14604 #define NULL (void*)0
14605 #endif
14606
14607 static void *task(p)
14608         void *p;
14609 {
14610         return (void *) (p == NULL);
14611 }
14612
14613 int main() {
14614
14615         /* pthread test function */
14616 #ifndef PTHREAD_CREATE_DETACHED
14617 #define PTHREAD_CREATE_DETACHED 1
14618 #endif
14619         pthread_t t;
14620         int status;
14621         int detach = PTHREAD_CREATE_DETACHED;
14622
14623 #if HAVE_PTHREADS > 4
14624         /* Final pthreads */
14625         pthread_attr_t attr;
14626
14627         status = pthread_attr_init(&attr);
14628         if( status ) return status;
14629
14630 #if HAVE_PTHREADS < 7
14631         status = pthread_attr_setdetachstate(&attr, &detach);
14632         if( status < 0 ) status = errno;
14633 #else
14634         status = pthread_attr_setdetachstate(&attr, detach);
14635 #endif
14636         if( status ) return status;
14637         status = pthread_create( &t, &attr, task, NULL );
14638 #if HAVE_PTHREADS < 7
14639         if( status < 0 ) status = errno;
14640 #endif
14641         if( status ) return status;
14642 #else
14643         /* Draft 4 pthreads */
14644         status = pthread_create( &t, pthread_attr_default, task, NULL );
14645         if( status ) return errno;
14646
14647         /* give thread a chance to complete */
14648         /* it should remain joinable and hence detachable */
14649         sleep( 1 );
14650
14651         status = pthread_detach( &t );
14652         if( status ) return errno;
14653 #endif
14654
14655 #ifdef HAVE_LINUX_THREADS
14656         pthread_kill_other_threads_np();
14657 #endif
14658
14659         return 0;
14660
14661 ; return 0; }
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14664   rm -rf conftest*
14665   ol_cv_pthread_lpthreads_lmach_lexc=yes
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -rf conftest*
14670   ol_cv_pthread_lpthreads_lmach_lexc=no
14671 fi
14672 rm -f conftest*
14673 else
14674   cat > conftest.$ac_ext <<EOF
14675 #line 14676 "configure"
14676 #include "confdefs.h"
14677 /* pthread test headers */
14678 #include <pthread.h>
14679 #if HAVE_PTHREADS < 7
14680 #include <errno.h>
14681 #endif
14682 #ifndef NULL
14683 #define NULL (void*)0
14684 #endif
14685
14686 static void *task(p)
14687         void *p;
14688 {
14689         return (void *) (p == NULL);
14690 }
14691
14692
14693 int main(argc, argv)
14694         int argc;
14695         char **argv;
14696 {
14697
14698         /* pthread test function */
14699 #ifndef PTHREAD_CREATE_DETACHED
14700 #define PTHREAD_CREATE_DETACHED 1
14701 #endif
14702         pthread_t t;
14703         int status;
14704         int detach = PTHREAD_CREATE_DETACHED;
14705
14706 #if HAVE_PTHREADS > 4
14707         /* Final pthreads */
14708         pthread_attr_t attr;
14709
14710         status = pthread_attr_init(&attr);
14711         if( status ) return status;
14712
14713 #if HAVE_PTHREADS < 7
14714         status = pthread_attr_setdetachstate(&attr, &detach);
14715         if( status < 0 ) status = errno;
14716 #else
14717         status = pthread_attr_setdetachstate(&attr, detach);
14718 #endif
14719         if( status ) return status;
14720         status = pthread_create( &t, &attr, task, NULL );
14721 #if HAVE_PTHREADS < 7
14722         if( status < 0 ) status = errno;
14723 #endif
14724         if( status ) return status;
14725 #else
14726         /* Draft 4 pthreads */
14727         status = pthread_create( &t, pthread_attr_default, task, NULL );
14728         if( status ) return errno;
14729
14730         /* give thread a chance to complete */
14731         /* it should remain joinable and hence detachable */
14732         sleep( 1 );
14733
14734         status = pthread_detach( &t );
14735         if( status ) return errno;
14736 #endif
14737
14738 #ifdef HAVE_LINUX_THREADS
14739         pthread_kill_other_threads_np();
14740 #endif
14741
14742         return 0;
14743
14744 }
14745
14746 EOF
14747 if { (eval echo configure:14748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14748 then
14749   ol_cv_pthread_lpthreads_lmach_lexc=yes
14750 else
14751   echo "configure: failed program was:" >&5
14752   cat conftest.$ac_ext >&5
14753   rm -fr conftest*
14754   ol_cv_pthread_lpthreads_lmach_lexc=no
14755 fi
14756 rm -fr conftest*
14757 fi
14758
14759
14760                 # restore the LIBS
14761                 LIBS="$ol_LIBS"
14762         
14763 fi
14764
14765 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14766
14767         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14768                 ol_link_pthreads="-lpthreads -lmach -lexc"
14769                 ol_link_threads=posix
14770         fi
14771 fi
14772
14773                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14774 if test "$ol_link_threads" = no ; then
14775         # try -lpthreads -lexc
14776         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14777 echo "configure:14778: checking for pthread link with -lpthreads -lexc" >&5
14778 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14779   echo $ac_n "(cached) $ac_c" 1>&6
14780 else
14781   
14782                 # save the flags
14783                 ol_LIBS="$LIBS"
14784                 LIBS="-lpthreads -lexc $LIBS"
14785
14786                 if test "$cross_compiling" = yes; then
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 /* pthread test headers */
14791 #include <pthread.h>
14792 #if HAVE_PTHREADS < 7
14793 #include <errno.h>
14794 #endif
14795 #ifndef NULL
14796 #define NULL (void*)0
14797 #endif
14798
14799 static void *task(p)
14800         void *p;
14801 {
14802         return (void *) (p == NULL);
14803 }
14804
14805 int main() {
14806
14807         /* pthread test function */
14808 #ifndef PTHREAD_CREATE_DETACHED
14809 #define PTHREAD_CREATE_DETACHED 1
14810 #endif
14811         pthread_t t;
14812         int status;
14813         int detach = PTHREAD_CREATE_DETACHED;
14814
14815 #if HAVE_PTHREADS > 4
14816         /* Final pthreads */
14817         pthread_attr_t attr;
14818
14819         status = pthread_attr_init(&attr);
14820         if( status ) return status;
14821
14822 #if HAVE_PTHREADS < 7
14823         status = pthread_attr_setdetachstate(&attr, &detach);
14824         if( status < 0 ) status = errno;
14825 #else
14826         status = pthread_attr_setdetachstate(&attr, detach);
14827 #endif
14828         if( status ) return status;
14829         status = pthread_create( &t, &attr, task, NULL );
14830 #if HAVE_PTHREADS < 7
14831         if( status < 0 ) status = errno;
14832 #endif
14833         if( status ) return status;
14834 #else
14835         /* Draft 4 pthreads */
14836         status = pthread_create( &t, pthread_attr_default, task, NULL );
14837         if( status ) return errno;
14838
14839         /* give thread a chance to complete */
14840         /* it should remain joinable and hence detachable */
14841         sleep( 1 );
14842
14843         status = pthread_detach( &t );
14844         if( status ) return errno;
14845 #endif
14846
14847 #ifdef HAVE_LINUX_THREADS
14848         pthread_kill_other_threads_np();
14849 #endif
14850
14851         return 0;
14852
14853 ; return 0; }
14854 EOF
14855 if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14856   rm -rf conftest*
14857   ol_cv_pthread_lpthreads_lexc=yes
14858 else
14859   echo "configure: failed program was:" >&5
14860   cat conftest.$ac_ext >&5
14861   rm -rf conftest*
14862   ol_cv_pthread_lpthreads_lexc=no
14863 fi
14864 rm -f conftest*
14865 else
14866   cat > conftest.$ac_ext <<EOF
14867 #line 14868 "configure"
14868 #include "confdefs.h"
14869 /* pthread test headers */
14870 #include <pthread.h>
14871 #if HAVE_PTHREADS < 7
14872 #include <errno.h>
14873 #endif
14874 #ifndef NULL
14875 #define NULL (void*)0
14876 #endif
14877
14878 static void *task(p)
14879         void *p;
14880 {
14881         return (void *) (p == NULL);
14882 }
14883
14884
14885 int main(argc, argv)
14886         int argc;
14887         char **argv;
14888 {
14889
14890         /* pthread test function */
14891 #ifndef PTHREAD_CREATE_DETACHED
14892 #define PTHREAD_CREATE_DETACHED 1
14893 #endif
14894         pthread_t t;
14895         int status;
14896         int detach = PTHREAD_CREATE_DETACHED;
14897
14898 #if HAVE_PTHREADS > 4
14899         /* Final pthreads */
14900         pthread_attr_t attr;
14901
14902         status = pthread_attr_init(&attr);
14903         if( status ) return status;
14904
14905 #if HAVE_PTHREADS < 7
14906         status = pthread_attr_setdetachstate(&attr, &detach);
14907         if( status < 0 ) status = errno;
14908 #else
14909         status = pthread_attr_setdetachstate(&attr, detach);
14910 #endif
14911         if( status ) return status;
14912         status = pthread_create( &t, &attr, task, NULL );
14913 #if HAVE_PTHREADS < 7
14914         if( status < 0 ) status = errno;
14915 #endif
14916         if( status ) return status;
14917 #else
14918         /* Draft 4 pthreads */
14919         status = pthread_create( &t, pthread_attr_default, task, NULL );
14920         if( status ) return errno;
14921
14922         /* give thread a chance to complete */
14923         /* it should remain joinable and hence detachable */
14924         sleep( 1 );
14925
14926         status = pthread_detach( &t );
14927         if( status ) return errno;
14928 #endif
14929
14930 #ifdef HAVE_LINUX_THREADS
14931         pthread_kill_other_threads_np();
14932 #endif
14933
14934         return 0;
14935
14936 }
14937
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14940 then
14941   ol_cv_pthread_lpthreads_lexc=yes
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -fr conftest*
14946   ol_cv_pthread_lpthreads_lexc=no
14947 fi
14948 rm -fr conftest*
14949 fi
14950
14951
14952                 # restore the LIBS
14953                 LIBS="$ol_LIBS"
14954         
14955 fi
14956
14957 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14958
14959         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14960                 ol_link_pthreads="-lpthreads -lexc"
14961                 ol_link_threads=posix
14962         fi
14963 fi
14964
14965
14966                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14967 if test "$ol_link_threads" = no ; then
14968         # try -lpthreads
14969         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14970 echo "configure:14971: checking for pthread link with -lpthreads" >&5
14971 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14972   echo $ac_n "(cached) $ac_c" 1>&6
14973 else
14974   
14975                 # save the flags
14976                 ol_LIBS="$LIBS"
14977                 LIBS="-lpthreads $LIBS"
14978
14979                 if test "$cross_compiling" = yes; then
14980   cat > conftest.$ac_ext <<EOF
14981 #line 14982 "configure"
14982 #include "confdefs.h"
14983 /* pthread test headers */
14984 #include <pthread.h>
14985 #if HAVE_PTHREADS < 7
14986 #include <errno.h>
14987 #endif
14988 #ifndef NULL
14989 #define NULL (void*)0
14990 #endif
14991
14992 static void *task(p)
14993         void *p;
14994 {
14995         return (void *) (p == NULL);
14996 }
14997
14998 int main() {
14999
15000         /* pthread test function */
15001 #ifndef PTHREAD_CREATE_DETACHED
15002 #define PTHREAD_CREATE_DETACHED 1
15003 #endif
15004         pthread_t t;
15005         int status;
15006         int detach = PTHREAD_CREATE_DETACHED;
15007
15008 #if HAVE_PTHREADS > 4
15009         /* Final pthreads */
15010         pthread_attr_t attr;
15011
15012         status = pthread_attr_init(&attr);
15013         if( status ) return status;
15014
15015 #if HAVE_PTHREADS < 7
15016         status = pthread_attr_setdetachstate(&attr, &detach);
15017         if( status < 0 ) status = errno;
15018 #else
15019         status = pthread_attr_setdetachstate(&attr, detach);
15020 #endif
15021         if( status ) return status;
15022         status = pthread_create( &t, &attr, task, NULL );
15023 #if HAVE_PTHREADS < 7
15024         if( status < 0 ) status = errno;
15025 #endif
15026         if( status ) return status;
15027 #else
15028         /* Draft 4 pthreads */
15029         status = pthread_create( &t, pthread_attr_default, task, NULL );
15030         if( status ) return errno;
15031
15032         /* give thread a chance to complete */
15033         /* it should remain joinable and hence detachable */
15034         sleep( 1 );
15035
15036         status = pthread_detach( &t );
15037         if( status ) return errno;
15038 #endif
15039
15040 #ifdef HAVE_LINUX_THREADS
15041         pthread_kill_other_threads_np();
15042 #endif
15043
15044         return 0;
15045
15046 ; return 0; }
15047 EOF
15048 if { (eval echo configure:15049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15049   rm -rf conftest*
15050   ol_cv_pthread_lib_lpthreads=yes
15051 else
15052   echo "configure: failed program was:" >&5
15053   cat conftest.$ac_ext >&5
15054   rm -rf conftest*
15055   ol_cv_pthread_lib_lpthreads=no
15056 fi
15057 rm -f conftest*
15058 else
15059   cat > conftest.$ac_ext <<EOF
15060 #line 15061 "configure"
15061 #include "confdefs.h"
15062 /* pthread test headers */
15063 #include <pthread.h>
15064 #if HAVE_PTHREADS < 7
15065 #include <errno.h>
15066 #endif
15067 #ifndef NULL
15068 #define NULL (void*)0
15069 #endif
15070
15071 static void *task(p)
15072         void *p;
15073 {
15074         return (void *) (p == NULL);
15075 }
15076
15077
15078 int main(argc, argv)
15079         int argc;
15080         char **argv;
15081 {
15082
15083         /* pthread test function */
15084 #ifndef PTHREAD_CREATE_DETACHED
15085 #define PTHREAD_CREATE_DETACHED 1
15086 #endif
15087         pthread_t t;
15088         int status;
15089         int detach = PTHREAD_CREATE_DETACHED;
15090
15091 #if HAVE_PTHREADS > 4
15092         /* Final pthreads */
15093         pthread_attr_t attr;
15094
15095         status = pthread_attr_init(&attr);
15096         if( status ) return status;
15097
15098 #if HAVE_PTHREADS < 7
15099         status = pthread_attr_setdetachstate(&attr, &detach);
15100         if( status < 0 ) status = errno;
15101 #else
15102         status = pthread_attr_setdetachstate(&attr, detach);
15103 #endif
15104         if( status ) return status;
15105         status = pthread_create( &t, &attr, task, NULL );
15106 #if HAVE_PTHREADS < 7
15107         if( status < 0 ) status = errno;
15108 #endif
15109         if( status ) return status;
15110 #else
15111         /* Draft 4 pthreads */
15112         status = pthread_create( &t, pthread_attr_default, task, NULL );
15113         if( status ) return errno;
15114
15115         /* give thread a chance to complete */
15116         /* it should remain joinable and hence detachable */
15117         sleep( 1 );
15118
15119         status = pthread_detach( &t );
15120         if( status ) return errno;
15121 #endif
15122
15123 #ifdef HAVE_LINUX_THREADS
15124         pthread_kill_other_threads_np();
15125 #endif
15126
15127         return 0;
15128
15129 }
15130
15131 EOF
15132 if { (eval echo configure:15133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15133 then
15134   ol_cv_pthread_lib_lpthreads=yes
15135 else
15136   echo "configure: failed program was:" >&5
15137   cat conftest.$ac_ext >&5
15138   rm -fr conftest*
15139   ol_cv_pthread_lib_lpthreads=no
15140 fi
15141 rm -fr conftest*
15142 fi
15143
15144
15145                 # restore the LIBS
15146                 LIBS="$ol_LIBS"
15147         
15148 fi
15149
15150 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15151
15152         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15153                 ol_link_pthreads="-lpthreads"
15154                 ol_link_threads=posix
15155         fi
15156 fi
15157
15158
15159                 if test $ol_link_threads != no ; then
15160                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15161
15162                                                 save_CPPFLAGS="$CPPFLAGS"
15163                         save_LIBS="$LIBS"
15164                         LIBS="$LTHREAD_LIBS $LIBS"
15165
15166                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15167 do
15168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15169 echo "configure:15170: checking for $ac_func" >&5
15170 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15171   echo $ac_n "(cached) $ac_c" 1>&6
15172 else
15173   cat > conftest.$ac_ext <<EOF
15174 #line 15175 "configure"
15175 #include "confdefs.h"
15176 /* System header to define __stub macros and hopefully few prototypes,
15177     which can conflict with char $ac_func(); below.  */
15178 #include <assert.h>
15179 /* Override any gcc2 internal prototype to avoid an error.  */
15180 /* We use char because int might match the return type of a gcc2
15181     builtin and then its argument prototype would still apply.  */
15182 char $ac_func();
15183 char (*f)();
15184
15185 int main() {
15186
15187 /* The GNU C library defines this for functions which it implements
15188     to always fail with ENOSYS.  Some functions are actually named
15189     something starting with __ and the normal name is an alias.  */
15190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15191 choke me
15192 #else
15193 f = $ac_func;
15194 #endif
15195
15196 ; return 0; }
15197 EOF
15198 if { (eval echo configure:15199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15199   rm -rf conftest*
15200   eval "ac_cv_func_$ac_func=yes"
15201 else
15202   echo "configure: failed program was:" >&5
15203   cat conftest.$ac_ext >&5
15204   rm -rf conftest*
15205   eval "ac_cv_func_$ac_func=no"
15206 fi
15207 rm -f conftest*
15208 fi
15209
15210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15211   echo "$ac_t""yes" 1>&6
15212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15213   cat >> confdefs.h <<EOF
15214 #define $ac_tr_func 1
15215 EOF
15216  
15217 else
15218   echo "$ac_t""no" 1>&6
15219 fi
15220 done
15221
15222
15223                         if test $ac_cv_func_sched_yield = no -a \
15224                                 $ac_cv_func_pthread_yield = no -a \
15225                                 $ac_cv_func_thr_yield = no ; then
15226                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15227 echo "configure:15228: checking for sched_yield in -lrt" >&5
15228 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15230   echo $ac_n "(cached) $ac_c" 1>&6
15231 else
15232   ac_save_LIBS="$LIBS"
15233 LIBS="-lrt  $LIBS"
15234 cat > conftest.$ac_ext <<EOF
15235 #line 15236 "configure"
15236 #include "confdefs.h"
15237 /* Override any gcc2 internal prototype to avoid an error.  */
15238 /* We use char because int might match the return type of a gcc2
15239     builtin and then its argument prototype would still apply.  */
15240 char sched_yield();
15241
15242 int main() {
15243 sched_yield()
15244 ; return 0; }
15245 EOF
15246 if { (eval echo configure:15247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15247   rm -rf conftest*
15248   eval "ac_cv_lib_$ac_lib_var=yes"
15249 else
15250   echo "configure: failed program was:" >&5
15251   cat conftest.$ac_ext >&5
15252   rm -rf conftest*
15253   eval "ac_cv_lib_$ac_lib_var=no"
15254 fi
15255 rm -f conftest*
15256 LIBS="$ac_save_LIBS"
15257
15258 fi
15259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15260   echo "$ac_t""yes" 1>&6
15261   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15262                                         cat >> confdefs.h <<\EOF
15263 #define HAVE_SCHED_YIELD 1
15264 EOF
15265
15266                                         ac_cv_func_sched_yield=yes
15267 else
15268   echo "$ac_t""no" 1>&6
15269 ac_cv_func_sched_yield=no
15270 fi
15271
15272                         fi
15273                         if test $ac_cv_func_sched_yield = no -a \
15274                                 $ac_cv_func_pthread_yield = no -a \
15275                                 "$ac_cv_func_thr_yield" = no ; then
15276                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15277                         fi
15278
15279                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15280 do
15281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15282 echo "configure:15283: checking for $ac_func" >&5
15283 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15284   echo $ac_n "(cached) $ac_c" 1>&6
15285 else
15286   cat > conftest.$ac_ext <<EOF
15287 #line 15288 "configure"
15288 #include "confdefs.h"
15289 /* System header to define __stub macros and hopefully few prototypes,
15290     which can conflict with char $ac_func(); below.  */
15291 #include <assert.h>
15292 /* Override any gcc2 internal prototype to avoid an error.  */
15293 /* We use char because int might match the return type of a gcc2
15294     builtin and then its argument prototype would still apply.  */
15295 char $ac_func();
15296 char (*f)();
15297
15298 int main() {
15299
15300 /* The GNU C library defines this for functions which it implements
15301     to always fail with ENOSYS.  Some functions are actually named
15302     something starting with __ and the normal name is an alias.  */
15303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15304 choke me
15305 #else
15306 f = $ac_func;
15307 #endif
15308
15309 ; return 0; }
15310 EOF
15311 if { (eval echo configure:15312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15312   rm -rf conftest*
15313   eval "ac_cv_func_$ac_func=yes"
15314 else
15315   echo "configure: failed program was:" >&5
15316   cat conftest.$ac_ext >&5
15317   rm -rf conftest*
15318   eval "ac_cv_func_$ac_func=no"
15319 fi
15320 rm -f conftest*
15321 fi
15322
15323 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15324   echo "$ac_t""yes" 1>&6
15325     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15326   cat >> confdefs.h <<EOF
15327 #define $ac_tr_func 1
15328 EOF
15329  
15330 else
15331   echo "$ac_t""no" 1>&6
15332 fi
15333 done
15334
15335
15336                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15337 echo "configure:15338: checking for pthread_detach with <pthread.h>" >&5
15338 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15339   echo $ac_n "(cached) $ac_c" 1>&6
15340 else
15341   
15342                                                                 cat > conftest.$ac_ext <<EOF
15343 #line 15344 "configure"
15344 #include "confdefs.h"
15345
15346 #include <pthread.h>
15347 #ifndef NULL
15348 #define NULL (void*)0
15349 #endif
15350
15351 int main() {
15352 pthread_detach(NULL);
15353 ; return 0; }
15354 EOF
15355 if { (eval echo configure:15356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15356   rm -rf conftest*
15357   ol_cv_func_pthread_detach=yes
15358 else
15359   echo "configure: failed program was:" >&5
15360   cat conftest.$ac_ext >&5
15361   rm -rf conftest*
15362   ol_cv_func_pthread_detach=no
15363 fi
15364 rm -f conftest*
15365                         
15366 fi
15367
15368 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15369
15370                         if test $ol_cv_func_pthread_detach = no ; then
15371                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15372                         fi
15373
15374                         cat >> confdefs.h <<\EOF
15375 #define HAVE_PTHREAD_DETACH 1
15376 EOF
15377
15378
15379                                                 for ac_func in \
15380                                 pthread_setconcurrency \
15381                                 pthread_getconcurrency \
15382                                 thr_setconcurrency \
15383                                 thr_getconcurrency \
15384                         
15385 do
15386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15387 echo "configure:15388: checking for $ac_func" >&5
15388 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15389   echo $ac_n "(cached) $ac_c" 1>&6
15390 else
15391   cat > conftest.$ac_ext <<EOF
15392 #line 15393 "configure"
15393 #include "confdefs.h"
15394 /* System header to define __stub macros and hopefully few prototypes,
15395     which can conflict with char $ac_func(); below.  */
15396 #include <assert.h>
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 /* We use char because int might match the return type of a gcc2
15399     builtin and then its argument prototype would still apply.  */
15400 char $ac_func();
15401 char (*f)();
15402
15403 int main() {
15404
15405 /* The GNU C library defines this for functions which it implements
15406     to always fail with ENOSYS.  Some functions are actually named
15407     something starting with __ and the normal name is an alias.  */
15408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15409 choke me
15410 #else
15411 f = $ac_func;
15412 #endif
15413
15414 ; return 0; }
15415 EOF
15416 if { (eval echo configure:15417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15417   rm -rf conftest*
15418   eval "ac_cv_func_$ac_func=yes"
15419 else
15420   echo "configure: failed program was:" >&5
15421   cat conftest.$ac_ext >&5
15422   rm -rf conftest*
15423   eval "ac_cv_func_$ac_func=no"
15424 fi
15425 rm -f conftest*
15426 fi
15427
15428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15429   echo "$ac_t""yes" 1>&6
15430     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15431   cat >> confdefs.h <<EOF
15432 #define $ac_tr_func 1
15433 EOF
15434  
15435 else
15436   echo "$ac_t""no" 1>&6
15437 fi
15438 done
15439
15440
15441                         
15442         for ac_func in pthread_kill_other_threads_np
15443 do
15444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15445 echo "configure:15446: checking for $ac_func" >&5
15446 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15447   echo $ac_n "(cached) $ac_c" 1>&6
15448 else
15449   cat > conftest.$ac_ext <<EOF
15450 #line 15451 "configure"
15451 #include "confdefs.h"
15452 /* System header to define __stub macros and hopefully few prototypes,
15453     which can conflict with char $ac_func(); below.  */
15454 #include <assert.h>
15455 /* Override any gcc2 internal prototype to avoid an error.  */
15456 /* We use char because int might match the return type of a gcc2
15457     builtin and then its argument prototype would still apply.  */
15458 char $ac_func();
15459 char (*f)();
15460
15461 int main() {
15462
15463 /* The GNU C library defines this for functions which it implements
15464     to always fail with ENOSYS.  Some functions are actually named
15465     something starting with __ and the normal name is an alias.  */
15466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15467 choke me
15468 #else
15469 f = $ac_func;
15470 #endif
15471
15472 ; return 0; }
15473 EOF
15474 if { (eval echo configure:15475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15475   rm -rf conftest*
15476   eval "ac_cv_func_$ac_func=yes"
15477 else
15478   echo "configure: failed program was:" >&5
15479   cat conftest.$ac_ext >&5
15480   rm -rf conftest*
15481   eval "ac_cv_func_$ac_func=no"
15482 fi
15483 rm -f conftest*
15484 fi
15485
15486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15487   echo "$ac_t""yes" 1>&6
15488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15489   cat >> confdefs.h <<EOF
15490 #define $ac_tr_func 1
15491 EOF
15492  
15493 else
15494   echo "$ac_t""no" 1>&6
15495 fi
15496 done
15497
15498         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15499 echo "configure:15500: checking for LinuxThreads implementation" >&5
15500 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15501   echo $ac_n "(cached) $ac_c" 1>&6
15502 else
15503   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15504 fi
15505
15506 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15507
15508                         
15509         
15510         
15511         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15512 echo "configure:15513: checking for LinuxThreads consistency" >&5
15513 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15514   echo $ac_n "(cached) $ac_c" 1>&6
15515 else
15516   
15517                 if test $ol_cv_header_linux_threads = yes -a \
15518                         $ol_cv_sys_linux_threads = yes; then
15519                         ol_cv_linux_threads=yes
15520                 elif test $ol_cv_header_linux_threads = no -a \
15521                         $ol_cv_sys_linux_threads = no; then
15522                         ol_cv_linux_threads=no
15523                 else
15524                         ol_cv_linux_threads=error
15525                 fi
15526         
15527 fi
15528
15529 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15530
15531
15532                         if test $ol_cv_linux_threads = error; then
15533                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15534                         fi
15535
15536                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15537 echo "configure:15538: checking if pthread_create() works" >&5
15538 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15539   echo $ac_n "(cached) $ac_c" 1>&6
15540 else
15541   
15542                         if test "$cross_compiling" = yes; then
15543                                 ol_cv_pthread_create_works=yes
15544 else
15545   cat > conftest.$ac_ext <<EOF
15546 #line 15547 "configure"
15547 #include "confdefs.h"
15548 /* pthread test headers */
15549 #include <pthread.h>
15550 #if HAVE_PTHREADS < 7
15551 #include <errno.h>
15552 #endif
15553 #ifndef NULL
15554 #define NULL (void*)0
15555 #endif
15556
15557 static void *task(p)
15558         void *p;
15559 {
15560         return (void *) (p == NULL);
15561 }
15562
15563
15564 int main(argc, argv)
15565         int argc;
15566         char **argv;
15567 {
15568
15569         /* pthread test function */
15570 #ifndef PTHREAD_CREATE_DETACHED
15571 #define PTHREAD_CREATE_DETACHED 1
15572 #endif
15573         pthread_t t;
15574         int status;
15575         int detach = PTHREAD_CREATE_DETACHED;
15576
15577 #if HAVE_PTHREADS > 4
15578         /* Final pthreads */
15579         pthread_attr_t attr;
15580
15581         status = pthread_attr_init(&attr);
15582         if( status ) return status;
15583
15584 #if HAVE_PTHREADS < 7
15585         status = pthread_attr_setdetachstate(&attr, &detach);
15586         if( status < 0 ) status = errno;
15587 #else
15588         status = pthread_attr_setdetachstate(&attr, detach);
15589 #endif
15590         if( status ) return status;
15591         status = pthread_create( &t, &attr, task, NULL );
15592 #if HAVE_PTHREADS < 7
15593         if( status < 0 ) status = errno;
15594 #endif
15595         if( status ) return status;
15596 #else
15597         /* Draft 4 pthreads */
15598         status = pthread_create( &t, pthread_attr_default, task, NULL );
15599         if( status ) return errno;
15600
15601         /* give thread a chance to complete */
15602         /* it should remain joinable and hence detachable */
15603         sleep( 1 );
15604
15605         status = pthread_detach( &t );
15606         if( status ) return errno;
15607 #endif
15608
15609 #ifdef HAVE_LINUX_THREADS
15610         pthread_kill_other_threads_np();
15611 #endif
15612
15613         return 0;
15614
15615 }
15616
15617 EOF
15618 if { (eval echo configure:15619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15619 then
15620   ol_cv_pthread_create_works=yes
15621 else
15622   echo "configure: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   rm -fr conftest*
15625   ol_cv_pthread_create_works=no
15626 fi
15627 rm -fr conftest*
15628 fi
15629
15630 fi
15631
15632 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15633
15634                         if test $ol_cv_pthread_create_works = no ; then
15635                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15636                         fi
15637
15638                                                 if test $ol_with_yielding_select = auto ; then
15639                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15640 echo "configure:15641: checking if select yields when using pthreads" >&5
15641 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15642   echo $ac_n "(cached) $ac_c" 1>&6
15643 else
15644   
15645                                 if test "$cross_compiling" = yes; then
15646   ol_cv_pthread_select_yields=cross
15647 else
15648   cat > conftest.$ac_ext <<EOF
15649 #line 15650 "configure"
15650 #include "confdefs.h"
15651
15652 #include <sys/types.h>
15653 #include <sys/time.h>
15654 #include <unistd.h>
15655 #include <pthread.h>
15656 #ifndef NULL
15657 #define NULL (void*) 0
15658 #endif
15659
15660 static int fildes[2];
15661
15662 static void *task(p)
15663         void *p;
15664 {
15665         int i;
15666         struct timeval tv;
15667
15668         fd_set rfds;
15669
15670         tv.tv_sec=10;
15671         tv.tv_usec=0;
15672
15673         FD_ZERO(&rfds);
15674         FD_SET(fildes[0], &rfds);
15675
15676         /* we're not interested in any fds */
15677         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15678
15679         if(i < 0) {
15680                 perror("select");
15681                 exit(10);
15682         }
15683
15684         exit(0); /* if we exit here, the select blocked the whole process */
15685 }
15686
15687 int main(argc, argv)
15688         int argc;
15689         char **argv;
15690 {
15691         pthread_t t;
15692
15693         /* create a pipe to select */
15694         if(pipe(&fildes[0])) {
15695                 perror("select");
15696                 exit(1);
15697         }
15698
15699 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15700         (void) pthread_setconcurrency(2);
15701 #else
15702 #ifdef HAVE_THR_SETCONCURRENCY
15703         /* Set Solaris LWP concurrency to 2 */
15704         thr_setconcurrency(2);
15705 #endif
15706 #endif
15707
15708 #if HAVE_PTHREADS < 6
15709         pthread_create(&t, pthread_attr_default, task, NULL);
15710 #else
15711         pthread_create(&t, NULL, task, NULL);
15712 #endif
15713
15714         /* make sure task runs first */
15715 #if HAVE_THR_YIELD
15716         thr_yield();
15717 #elif defined( HAVE_SCHED_YIELD )
15718         sched_yield();
15719 #elif defined( HAVE_PTHREAD_YIELD )
15720         pthread_yield();
15721 #endif
15722
15723         exit(2);
15724 }
15725 EOF
15726 if { (eval echo configure:15727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15727 then
15728   ol_cv_pthread_select_yields=no
15729 else
15730   echo "configure: failed program was:" >&5
15731   cat conftest.$ac_ext >&5
15732   rm -fr conftest*
15733   ol_cv_pthread_select_yields=yes
15734 fi
15735 rm -fr conftest*
15736 fi
15737
15738 fi
15739
15740 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15741
15742                                 if test $ol_cv_pthread_select_yields = cross ; then
15743                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15744                                 fi
15745
15746                                 if test $ol_cv_pthread_select_yields = yes ; then
15747                                         ol_with_yielding_select=yes
15748                                 fi
15749                         fi
15750
15751                                                 CPPFLAGS="$save_CPPFLAGS"
15752                         LIBS="$save_LIBS"
15753                 else
15754                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15755                 fi
15756         fi
15757
15758         if test $ol_with_threads = posix ; then
15759                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15760         fi
15761 fi
15762
15763 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15764         -o $ol_with_threads = mach ; then
15765
15766                 for ac_hdr in mach/cthreads.h cthreads.h
15767 do
15768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15770 echo "configure:15771: checking for $ac_hdr" >&5
15771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15772   echo $ac_n "(cached) $ac_c" 1>&6
15773 else
15774   cat > conftest.$ac_ext <<EOF
15775 #line 15776 "configure"
15776 #include "confdefs.h"
15777 #include <$ac_hdr>
15778 EOF
15779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15780 { (eval echo configure:15781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15782 if test -z "$ac_err"; then
15783   rm -rf conftest*
15784   eval "ac_cv_header_$ac_safe=yes"
15785 else
15786   echo "$ac_err" >&5
15787   echo "configure: failed program was:" >&5
15788   cat conftest.$ac_ext >&5
15789   rm -rf conftest*
15790   eval "ac_cv_header_$ac_safe=no"
15791 fi
15792 rm -f conftest*
15793 fi
15794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15795   echo "$ac_t""yes" 1>&6
15796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15797   cat >> confdefs.h <<EOF
15798 #define $ac_tr_hdr 1
15799 EOF
15800  
15801 else
15802   echo "$ac_t""no" 1>&6
15803 fi
15804 done
15805
15806         if test $ac_cv_header_mach_cthreads_h = yes ; then
15807                 ol_with_threads=found
15808
15809                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15810 echo "configure:15811: checking for cthread_fork" >&5
15811 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15812   echo $ac_n "(cached) $ac_c" 1>&6
15813 else
15814   cat > conftest.$ac_ext <<EOF
15815 #line 15816 "configure"
15816 #include "confdefs.h"
15817 /* System header to define __stub macros and hopefully few prototypes,
15818     which can conflict with char cthread_fork(); below.  */
15819 #include <assert.h>
15820 /* Override any gcc2 internal prototype to avoid an error.  */
15821 /* We use char because int might match the return type of a gcc2
15822     builtin and then its argument prototype would still apply.  */
15823 char cthread_fork();
15824 char (*f)();
15825
15826 int main() {
15827
15828 /* The GNU C library defines this for functions which it implements
15829     to always fail with ENOSYS.  Some functions are actually named
15830     something starting with __ and the normal name is an alias.  */
15831 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15832 choke me
15833 #else
15834 f = cthread_fork;
15835 #endif
15836
15837 ; return 0; }
15838 EOF
15839 if { (eval echo configure:15840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15840   rm -rf conftest*
15841   eval "ac_cv_func_cthread_fork=yes"
15842 else
15843   echo "configure: failed program was:" >&5
15844   cat conftest.$ac_ext >&5
15845   rm -rf conftest*
15846   eval "ac_cv_func_cthread_fork=no"
15847 fi
15848 rm -f conftest*
15849 fi
15850
15851 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15852   echo "$ac_t""yes" 1>&6
15853   ol_link_threads=yes
15854 else
15855   echo "$ac_t""no" 1>&6
15856 fi
15857
15858
15859                 if test $ol_link_threads = no ; then
15860                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15861 echo "configure:15862: checking for cthread_fork with -all_load" >&5
15862 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15863   echo $ac_n "(cached) $ac_c" 1>&6
15864 else
15865   
15866                                                                 save_LIBS="$LIBS"
15867                                 LIBS="-all_load $LIBS"
15868                                 cat > conftest.$ac_ext <<EOF
15869 #line 15870 "configure"
15870 #include "confdefs.h"
15871 #include <mach/cthreads.h>
15872 int main() {
15873
15874                                         cthread_fork((void *)0, (void *)0);
15875                                         
15876 ; return 0; }
15877 EOF
15878 if { (eval echo configure:15879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15879   rm -rf conftest*
15880   ol_cv_cthread_all_load=yes
15881 else
15882   echo "configure: failed program was:" >&5
15883   cat conftest.$ac_ext >&5
15884   rm -rf conftest*
15885   ol_cv_cthread_all_load=no
15886 fi
15887 rm -f conftest*
15888                                                                 LIBS="$save_LIBS"
15889                         
15890 fi
15891
15892 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15893
15894                         if test $ol_cv_cthread_all_load = yes ; then
15895                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15896                                 ol_link_threads=mach
15897                                 ol_with_threads=found
15898                         fi
15899                 fi
15900
15901         elif test $ac_cv_header_cthreads_h = yes ; then
15902                                 
15903                 ol_with_threads=found
15904  
15905                                 save_LIBS="$LIBS"
15906                 LIBS="$LIBS -lthreads"
15907                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15908 echo "configure:15909: checking for cthread_fork" >&5
15909 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15910   echo $ac_n "(cached) $ac_c" 1>&6
15911 else
15912   cat > conftest.$ac_ext <<EOF
15913 #line 15914 "configure"
15914 #include "confdefs.h"
15915 /* System header to define __stub macros and hopefully few prototypes,
15916     which can conflict with char cthread_fork(); below.  */
15917 #include <assert.h>
15918 /* Override any gcc2 internal prototype to avoid an error.  */
15919 /* We use char because int might match the return type of a gcc2
15920     builtin and then its argument prototype would still apply.  */
15921 char cthread_fork();
15922 char (*f)();
15923
15924 int main() {
15925
15926 /* The GNU C library defines this for functions which it implements
15927     to always fail with ENOSYS.  Some functions are actually named
15928     something starting with __ and the normal name is an alias.  */
15929 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15930 choke me
15931 #else
15932 f = cthread_fork;
15933 #endif
15934
15935 ; return 0; }
15936 EOF
15937 if { (eval echo configure:15938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15938   rm -rf conftest*
15939   eval "ac_cv_func_cthread_fork=yes"
15940 else
15941   echo "configure: failed program was:" >&5
15942   cat conftest.$ac_ext >&5
15943   rm -rf conftest*
15944   eval "ac_cv_func_cthread_fork=no"
15945 fi
15946 rm -f conftest*
15947 fi
15948
15949 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15950   echo "$ac_t""yes" 1>&6
15951   ol_link_threads=yes
15952 else
15953   echo "$ac_t""no" 1>&6
15954 fi
15955
15956                 LIBS="$save_LIBS"
15957
15958                 if test $ol_link_threads = yes ; then
15959                         LTHREAD_LIBS="-lthreads"
15960                         ol_link_threads=mach
15961                         ol_with_threads=found
15962                 else
15963                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15964                 fi
15965
15966         elif test $ol_with_threads = mach ; then
15967                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15968         fi
15969
15970         if test $ol_link_threads = mach ; then
15971                 cat >> confdefs.h <<\EOF
15972 #define HAVE_MACH_CTHREADS 1
15973 EOF
15974
15975         elif test $ol_with_threads = found ; then
15976                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15977         fi
15978 fi
15979
15980 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15981         -o $ol_with_threads = pth ; then
15982
15983         for ac_hdr in pth.h
15984 do
15985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15987 echo "configure:15988: checking for $ac_hdr" >&5
15988 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15989   echo $ac_n "(cached) $ac_c" 1>&6
15990 else
15991   cat > conftest.$ac_ext <<EOF
15992 #line 15993 "configure"
15993 #include "confdefs.h"
15994 #include <$ac_hdr>
15995 EOF
15996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15997 { (eval echo configure:15998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15999 if test -z "$ac_err"; then
16000   rm -rf conftest*
16001   eval "ac_cv_header_$ac_safe=yes"
16002 else
16003   echo "$ac_err" >&5
16004   echo "configure: failed program was:" >&5
16005   cat conftest.$ac_ext >&5
16006   rm -rf conftest*
16007   eval "ac_cv_header_$ac_safe=no"
16008 fi
16009 rm -f conftest*
16010 fi
16011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16012   echo "$ac_t""yes" 1>&6
16013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16014   cat >> confdefs.h <<EOF
16015 #define $ac_tr_hdr 1
16016 EOF
16017  
16018 else
16019   echo "$ac_t""no" 1>&6
16020 fi
16021 done
16022
16023
16024         if test $ac_cv_header_pth_h = yes ; then
16025                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16026 echo "configure:16027: checking for pth_version in -lpth" >&5
16027 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16029   echo $ac_n "(cached) $ac_c" 1>&6
16030 else
16031   ac_save_LIBS="$LIBS"
16032 LIBS="-lpth  $LIBS"
16033 cat > conftest.$ac_ext <<EOF
16034 #line 16035 "configure"
16035 #include "confdefs.h"
16036 /* Override any gcc2 internal prototype to avoid an error.  */
16037 /* We use char because int might match the return type of a gcc2
16038     builtin and then its argument prototype would still apply.  */
16039 char pth_version();
16040
16041 int main() {
16042 pth_version()
16043 ; return 0; }
16044 EOF
16045 if { (eval echo configure:16046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16046   rm -rf conftest*
16047   eval "ac_cv_lib_$ac_lib_var=yes"
16048 else
16049   echo "configure: failed program was:" >&5
16050   cat conftest.$ac_ext >&5
16051   rm -rf conftest*
16052   eval "ac_cv_lib_$ac_lib_var=no"
16053 fi
16054 rm -f conftest*
16055 LIBS="$ac_save_LIBS"
16056
16057 fi
16058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16059   echo "$ac_t""yes" 1>&6
16060   have_pth=yes
16061 else
16062   echo "$ac_t""no" 1>&6
16063 have_pth=no
16064 fi
16065
16066
16067                 if test $have_pth = yes ; then
16068                         cat >> confdefs.h <<\EOF
16069 #define HAVE_GNU_PTH 1
16070 EOF
16071
16072                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16073                         ol_link_threads=pth
16074                         ol_with_threads=found
16075
16076                         if test $ol_with_yielding_select = auto ; then
16077                                 ol_with_yielding_select=yes
16078                         fi
16079                 fi
16080         fi
16081 fi
16082
16083 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16084         -o $ol_with_threads = lwp ; then
16085
16086                 for ac_hdr in thread.h synch.h
16087 do
16088 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16089 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16090 echo "configure:16091: checking for $ac_hdr" >&5
16091 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16092   echo $ac_n "(cached) $ac_c" 1>&6
16093 else
16094   cat > conftest.$ac_ext <<EOF
16095 #line 16096 "configure"
16096 #include "confdefs.h"
16097 #include <$ac_hdr>
16098 EOF
16099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16100 { (eval echo configure:16101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16102 if test -z "$ac_err"; then
16103   rm -rf conftest*
16104   eval "ac_cv_header_$ac_safe=yes"
16105 else
16106   echo "$ac_err" >&5
16107   echo "configure: failed program was:" >&5
16108   cat conftest.$ac_ext >&5
16109   rm -rf conftest*
16110   eval "ac_cv_header_$ac_safe=no"
16111 fi
16112 rm -f conftest*
16113 fi
16114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16115   echo "$ac_t""yes" 1>&6
16116     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16117   cat >> confdefs.h <<EOF
16118 #define $ac_tr_hdr 1
16119 EOF
16120  
16121 else
16122   echo "$ac_t""no" 1>&6
16123 fi
16124 done
16125
16126         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16127                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16128 echo "configure:16129: checking for thr_create in -lthread" >&5
16129 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16130 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16131   echo $ac_n "(cached) $ac_c" 1>&6
16132 else
16133   ac_save_LIBS="$LIBS"
16134 LIBS="-lthread  $LIBS"
16135 cat > conftest.$ac_ext <<EOF
16136 #line 16137 "configure"
16137 #include "confdefs.h"
16138 /* Override any gcc2 internal prototype to avoid an error.  */
16139 /* We use char because int might match the return type of a gcc2
16140     builtin and then its argument prototype would still apply.  */
16141 char thr_create();
16142
16143 int main() {
16144 thr_create()
16145 ; return 0; }
16146 EOF
16147 if { (eval echo configure:16148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16148   rm -rf conftest*
16149   eval "ac_cv_lib_$ac_lib_var=yes"
16150 else
16151   echo "configure: failed program was:" >&5
16152   cat conftest.$ac_ext >&5
16153   rm -rf conftest*
16154   eval "ac_cv_lib_$ac_lib_var=no"
16155 fi
16156 rm -f conftest*
16157 LIBS="$ac_save_LIBS"
16158
16159 fi
16160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16161   echo "$ac_t""yes" 1>&6
16162   have_thr=yes
16163 else
16164   echo "$ac_t""no" 1>&6
16165 have_thr=no
16166 fi
16167
16168
16169                 if test $have_thr = yes ; then
16170                         cat >> confdefs.h <<\EOF
16171 #define HAVE_THR 1
16172 EOF
16173
16174                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16175                         ol_link_threads=thr
16176
16177                         if test $ol_with_yielding_select = auto ; then
16178                                 ol_with_yielding_select=yes
16179                         fi
16180
16181                                                 for ac_func in \
16182                                 thr_setconcurrency \
16183                                 thr_getconcurrency \
16184                         
16185 do
16186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16187 echo "configure:16188: checking for $ac_func" >&5
16188 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16189   echo $ac_n "(cached) $ac_c" 1>&6
16190 else
16191   cat > conftest.$ac_ext <<EOF
16192 #line 16193 "configure"
16193 #include "confdefs.h"
16194 /* System header to define __stub macros and hopefully few prototypes,
16195     which can conflict with char $ac_func(); below.  */
16196 #include <assert.h>
16197 /* Override any gcc2 internal prototype to avoid an error.  */
16198 /* We use char because int might match the return type of a gcc2
16199     builtin and then its argument prototype would still apply.  */
16200 char $ac_func();
16201 char (*f)();
16202
16203 int main() {
16204
16205 /* The GNU C library defines this for functions which it implements
16206     to always fail with ENOSYS.  Some functions are actually named
16207     something starting with __ and the normal name is an alias.  */
16208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16209 choke me
16210 #else
16211 f = $ac_func;
16212 #endif
16213
16214 ; return 0; }
16215 EOF
16216 if { (eval echo configure:16217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16217   rm -rf conftest*
16218   eval "ac_cv_func_$ac_func=yes"
16219 else
16220   echo "configure: failed program was:" >&5
16221   cat conftest.$ac_ext >&5
16222   rm -rf conftest*
16223   eval "ac_cv_func_$ac_func=no"
16224 fi
16225 rm -f conftest*
16226 fi
16227
16228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16229   echo "$ac_t""yes" 1>&6
16230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16231   cat >> confdefs.h <<EOF
16232 #define $ac_tr_func 1
16233 EOF
16234  
16235 else
16236   echo "$ac_t""no" 1>&6
16237 fi
16238 done
16239
16240                 fi
16241         fi
16242
16243                 for ac_hdr in lwp/lwp.h
16244 do
16245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16247 echo "configure:16248: checking for $ac_hdr" >&5
16248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16249   echo $ac_n "(cached) $ac_c" 1>&6
16250 else
16251   cat > conftest.$ac_ext <<EOF
16252 #line 16253 "configure"
16253 #include "confdefs.h"
16254 #include <$ac_hdr>
16255 EOF
16256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16257 { (eval echo configure:16258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16259 if test -z "$ac_err"; then
16260   rm -rf conftest*
16261   eval "ac_cv_header_$ac_safe=yes"
16262 else
16263   echo "$ac_err" >&5
16264   echo "configure: failed program was:" >&5
16265   cat conftest.$ac_ext >&5
16266   rm -rf conftest*
16267   eval "ac_cv_header_$ac_safe=no"
16268 fi
16269 rm -f conftest*
16270 fi
16271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16272   echo "$ac_t""yes" 1>&6
16273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16274   cat >> confdefs.h <<EOF
16275 #define $ac_tr_hdr 1
16276 EOF
16277  
16278 else
16279   echo "$ac_t""no" 1>&6
16280 fi
16281 done
16282
16283         if test $ac_cv_header_lwp_lwp_h = yes ; then
16284                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16285 echo "configure:16286: checking for lwp_create in -llwp" >&5
16286 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16288   echo $ac_n "(cached) $ac_c" 1>&6
16289 else
16290   ac_save_LIBS="$LIBS"
16291 LIBS="-llwp  $LIBS"
16292 cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 /* Override any gcc2 internal prototype to avoid an error.  */
16296 /* We use char because int might match the return type of a gcc2
16297     builtin and then its argument prototype would still apply.  */
16298 char lwp_create();
16299
16300 int main() {
16301 lwp_create()
16302 ; return 0; }
16303 EOF
16304 if { (eval echo configure:16305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16305   rm -rf conftest*
16306   eval "ac_cv_lib_$ac_lib_var=yes"
16307 else
16308   echo "configure: failed program was:" >&5
16309   cat conftest.$ac_ext >&5
16310   rm -rf conftest*
16311   eval "ac_cv_lib_$ac_lib_var=no"
16312 fi
16313 rm -f conftest*
16314 LIBS="$ac_save_LIBS"
16315
16316 fi
16317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16318   echo "$ac_t""yes" 1>&6
16319   have_lwp=yes
16320 else
16321   echo "$ac_t""no" 1>&6
16322 have_lwp=no
16323 fi
16324
16325
16326                 if test $have_lwp = yes ; then
16327                         cat >> confdefs.h <<\EOF
16328 #define HAVE_LWP 1
16329 EOF
16330
16331                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16332                         ol_link_threads=lwp
16333
16334                         if test $ol_with_yielding_select = auto ; then
16335                                 ol_with_yielding_select=no
16336                         fi
16337                 fi
16338         fi
16339 fi
16340
16341 if test $ol_with_yielding_select = yes ; then
16342         cat >> confdefs.h <<\EOF
16343 #define HAVE_YIELDING_SELECT 1
16344 EOF
16345
16346 fi
16347
16348 if test $ol_with_threads = manual ; then
16349                 ol_link_threads=yes
16350
16351         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16352
16353         for ac_hdr in pthread.h sched.h
16354 do
16355 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16356 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16357 echo "configure:16358: checking for $ac_hdr" >&5
16358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16359   echo $ac_n "(cached) $ac_c" 1>&6
16360 else
16361   cat > conftest.$ac_ext <<EOF
16362 #line 16363 "configure"
16363 #include "confdefs.h"
16364 #include <$ac_hdr>
16365 EOF
16366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16367 { (eval echo configure:16368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16369 if test -z "$ac_err"; then
16370   rm -rf conftest*
16371   eval "ac_cv_header_$ac_safe=yes"
16372 else
16373   echo "$ac_err" >&5
16374   echo "configure: failed program was:" >&5
16375   cat conftest.$ac_ext >&5
16376   rm -rf conftest*
16377   eval "ac_cv_header_$ac_safe=no"
16378 fi
16379 rm -f conftest*
16380 fi
16381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16382   echo "$ac_t""yes" 1>&6
16383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16384   cat >> confdefs.h <<EOF
16385 #define $ac_tr_hdr 1
16386 EOF
16387  
16388 else
16389   echo "$ac_t""no" 1>&6
16390 fi
16391 done
16392
16393         for ac_func in sched_yield pthread_yield
16394 do
16395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16396 echo "configure:16397: checking for $ac_func" >&5
16397 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16398   echo $ac_n "(cached) $ac_c" 1>&6
16399 else
16400   cat > conftest.$ac_ext <<EOF
16401 #line 16402 "configure"
16402 #include "confdefs.h"
16403 /* System header to define __stub macros and hopefully few prototypes,
16404     which can conflict with char $ac_func(); below.  */
16405 #include <assert.h>
16406 /* Override any gcc2 internal prototype to avoid an error.  */
16407 /* We use char because int might match the return type of a gcc2
16408     builtin and then its argument prototype would still apply.  */
16409 char $ac_func();
16410 char (*f)();
16411
16412 int main() {
16413
16414 /* The GNU C library defines this for functions which it implements
16415     to always fail with ENOSYS.  Some functions are actually named
16416     something starting with __ and the normal name is an alias.  */
16417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16418 choke me
16419 #else
16420 f = $ac_func;
16421 #endif
16422
16423 ; return 0; }
16424 EOF
16425 if { (eval echo configure:16426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16426   rm -rf conftest*
16427   eval "ac_cv_func_$ac_func=yes"
16428 else
16429   echo "configure: failed program was:" >&5
16430   cat conftest.$ac_ext >&5
16431   rm -rf conftest*
16432   eval "ac_cv_func_$ac_func=no"
16433 fi
16434 rm -f conftest*
16435 fi
16436
16437 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16438   echo "$ac_t""yes" 1>&6
16439     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16440   cat >> confdefs.h <<EOF
16441 #define $ac_tr_func 1
16442 EOF
16443  
16444 else
16445   echo "$ac_t""no" 1>&6
16446 fi
16447 done
16448
16449         
16450         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16451 echo "configure:16452: checking for LinuxThreads pthread.h" >&5
16452 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16453   echo $ac_n "(cached) $ac_c" 1>&6
16454 else
16455   cat > conftest.$ac_ext <<EOF
16456 #line 16457 "configure"
16457 #include "confdefs.h"
16458 #include <pthread.h>
16459 EOF
16460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16461   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16462   rm -rf conftest*
16463   ol_cv_header_linux_threads=yes
16464 else
16465   rm -rf conftest*
16466   ol_cv_header_linux_threads=no
16467 fi
16468 rm -f conftest*
16469
16470                 
16471 fi
16472
16473 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16474         if test $ol_cv_header_linux_threads = yes; then
16475                 cat >> confdefs.h <<\EOF
16476 #define HAVE_LINUX_THREADS 1
16477 EOF
16478
16479         fi
16480
16481
16482         for ac_hdr in mach/cthreads.h
16483 do
16484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16486 echo "configure:16487: checking for $ac_hdr" >&5
16487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16488   echo $ac_n "(cached) $ac_c" 1>&6
16489 else
16490   cat > conftest.$ac_ext <<EOF
16491 #line 16492 "configure"
16492 #include "confdefs.h"
16493 #include <$ac_hdr>
16494 EOF
16495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16496 { (eval echo configure:16497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16498 if test -z "$ac_err"; then
16499   rm -rf conftest*
16500   eval "ac_cv_header_$ac_safe=yes"
16501 else
16502   echo "$ac_err" >&5
16503   echo "configure: failed program was:" >&5
16504   cat conftest.$ac_ext >&5
16505   rm -rf conftest*
16506   eval "ac_cv_header_$ac_safe=no"
16507 fi
16508 rm -f conftest*
16509 fi
16510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16511   echo "$ac_t""yes" 1>&6
16512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16513   cat >> confdefs.h <<EOF
16514 #define $ac_tr_hdr 1
16515 EOF
16516  
16517 else
16518   echo "$ac_t""no" 1>&6
16519 fi
16520 done
16521
16522         for ac_hdr in lwp/lwp.h
16523 do
16524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16526 echo "configure:16527: checking for $ac_hdr" >&5
16527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16528   echo $ac_n "(cached) $ac_c" 1>&6
16529 else
16530   cat > conftest.$ac_ext <<EOF
16531 #line 16532 "configure"
16532 #include "confdefs.h"
16533 #include <$ac_hdr>
16534 EOF
16535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16536 { (eval echo configure:16537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16538 if test -z "$ac_err"; then
16539   rm -rf conftest*
16540   eval "ac_cv_header_$ac_safe=yes"
16541 else
16542   echo "$ac_err" >&5
16543   echo "configure: failed program was:" >&5
16544   cat conftest.$ac_ext >&5
16545   rm -rf conftest*
16546   eval "ac_cv_header_$ac_safe=no"
16547 fi
16548 rm -f conftest*
16549 fi
16550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16551   echo "$ac_t""yes" 1>&6
16552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16553   cat >> confdefs.h <<EOF
16554 #define $ac_tr_hdr 1
16555 EOF
16556  
16557 else
16558   echo "$ac_t""no" 1>&6
16559 fi
16560 done
16561
16562         for ac_hdr in thread.h synch.h
16563 do
16564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16566 echo "configure:16567: checking for $ac_hdr" >&5
16567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16568   echo $ac_n "(cached) $ac_c" 1>&6
16569 else
16570   cat > conftest.$ac_ext <<EOF
16571 #line 16572 "configure"
16572 #include "confdefs.h"
16573 #include <$ac_hdr>
16574 EOF
16575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16576 { (eval echo configure:16577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16578 if test -z "$ac_err"; then
16579   rm -rf conftest*
16580   eval "ac_cv_header_$ac_safe=yes"
16581 else
16582   echo "$ac_err" >&5
16583   echo "configure: failed program was:" >&5
16584   cat conftest.$ac_ext >&5
16585   rm -rf conftest*
16586   eval "ac_cv_header_$ac_safe=no"
16587 fi
16588 rm -f conftest*
16589 fi
16590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16591   echo "$ac_t""yes" 1>&6
16592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16593   cat >> confdefs.h <<EOF
16594 #define $ac_tr_hdr 1
16595 EOF
16596  
16597 else
16598   echo "$ac_t""no" 1>&6
16599 fi
16600 done
16601
16602 fi
16603
16604 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16605                         cat >> confdefs.h <<\EOF
16606 #define REENTRANT 1
16607 EOF
16608
16609         cat >> confdefs.h <<\EOF
16610 #define _REENTRANT 1
16611 EOF
16612
16613         cat >> confdefs.h <<\EOF
16614 #define THREAD_SAFE 1
16615 EOF
16616
16617         cat >> confdefs.h <<\EOF
16618 #define _THREAD_SAFE 1
16619 EOF
16620
16621         cat >> confdefs.h <<\EOF
16622 #define THREADSAFE 1
16623 EOF
16624
16625         cat >> confdefs.h <<\EOF
16626 #define _THREADSAFE 1
16627 EOF
16628
16629         cat >> confdefs.h <<\EOF
16630 #define _SGI_MP_SOURCE 1
16631 EOF
16632
16633
16634                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16635 echo "configure:16636: checking for thread specific errno" >&5
16636 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16637   echo $ac_n "(cached) $ac_c" 1>&6
16638 else
16639   
16640                 cat > conftest.$ac_ext <<EOF
16641 #line 16642 "configure"
16642 #include "confdefs.h"
16643 #include <errno.h>
16644 int main() {
16645 errno = 0;
16646 ; return 0; }
16647 EOF
16648 if { (eval echo configure:16649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16649   rm -rf conftest*
16650   ol_cv_errno_thread_specific=yes
16651 else
16652   echo "configure: failed program was:" >&5
16653   cat conftest.$ac_ext >&5
16654   rm -rf conftest*
16655   ol_cv_errno_thread_specific=no
16656 fi
16657 rm -f conftest*
16658         
16659 fi
16660
16661 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16662
16663                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16664 echo "configure:16665: checking for thread specific h_errno" >&5
16665 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16666   echo $ac_n "(cached) $ac_c" 1>&6
16667 else
16668   
16669                 cat > conftest.$ac_ext <<EOF
16670 #line 16671 "configure"
16671 #include "confdefs.h"
16672 #include <netdb.h>
16673 int main() {
16674 h_errno = 0;
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   ol_cv_h_errno_thread_specific=yes
16680 else
16681   echo "configure: failed program was:" >&5
16682   cat conftest.$ac_ext >&5
16683   rm -rf conftest*
16684   ol_cv_h_errno_thread_specific=no
16685 fi
16686 rm -f conftest*
16687         
16688 fi
16689
16690 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16691
16692         if test $ol_cv_errno_thread_specific != yes \
16693                 -o $ol_cv_h_errno_thread_specific != yes ; then
16694                 LIBS="$LTHREAD_LIBS $LIBS"
16695                 LTHREAD_LIBS=""
16696         fi
16697
16698 fi  
16699
16700 if test $ol_link_threads = no ; then
16701         if test $ol_with_threads = yes ; then
16702                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16703         fi
16704
16705         if test $ol_with_threads = auto ; then
16706                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16707                 ol_with_threads=no
16708         fi
16709
16710         cat >> confdefs.h <<\EOF
16711 #define NO_THREADS 1
16712 EOF
16713
16714         LTHREAD_LIBS=""
16715 fi
16716
16717 if test $ol_link_threads != no ; then
16718         cat >> confdefs.h <<\EOF
16719 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16720 EOF
16721
16722 fi
16723
16724 for ac_func in \
16725         ctime_r                 \
16726         gethostbyname_r gethostbyaddr_r \
16727
16728 do
16729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16730 echo "configure:16731: checking for $ac_func" >&5
16731 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16732   echo $ac_n "(cached) $ac_c" 1>&6
16733 else
16734   cat > conftest.$ac_ext <<EOF
16735 #line 16736 "configure"
16736 #include "confdefs.h"
16737 /* System header to define __stub macros and hopefully few prototypes,
16738     which can conflict with char $ac_func(); below.  */
16739 #include <assert.h>
16740 /* Override any gcc2 internal prototype to avoid an error.  */
16741 /* We use char because int might match the return type of a gcc2
16742     builtin and then its argument prototype would still apply.  */
16743 char $ac_func();
16744 char (*f)();
16745
16746 int main() {
16747
16748 /* The GNU C library defines this for functions which it implements
16749     to always fail with ENOSYS.  Some functions are actually named
16750     something starting with __ and the normal name is an alias.  */
16751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16752 choke me
16753 #else
16754 f = $ac_func;
16755 #endif
16756
16757 ; return 0; }
16758 EOF
16759 if { (eval echo configure:16760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16760   rm -rf conftest*
16761   eval "ac_cv_func_$ac_func=yes"
16762 else
16763   echo "configure: failed program was:" >&5
16764   cat conftest.$ac_ext >&5
16765   rm -rf conftest*
16766   eval "ac_cv_func_$ac_func=no"
16767 fi
16768 rm -f conftest*
16769 fi
16770
16771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16772   echo "$ac_t""yes" 1>&6
16773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16774   cat >> confdefs.h <<EOF
16775 #define $ac_tr_func 1
16776 EOF
16777  
16778 else
16779   echo "$ac_t""no" 1>&6
16780 fi
16781 done
16782
16783
16784 if test "$ac_cv_func_ctime_r" = no ; then
16785         ol_cv_func_ctime_r_nargs=0
16786 else
16787         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16788 echo "configure:16789: checking number of arguments of ctime_r" >&5
16789 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16790   echo $ac_n "(cached) $ac_c" 1>&6
16791 else
16792   cat > conftest.$ac_ext <<EOF
16793 #line 16794 "configure"
16794 #include "confdefs.h"
16795 #include <time.h>
16796 int main() {
16797 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16798 ; return 0; }
16799 EOF
16800 if { (eval echo configure:16801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16801   rm -rf conftest*
16802   ol_cv_func_ctime_r_nargs3=yes
16803 else
16804   echo "configure: failed program was:" >&5
16805   cat conftest.$ac_ext >&5
16806   rm -rf conftest*
16807   ol_cv_func_ctime_r_nargs3=no
16808 fi
16809 rm -f conftest*
16810
16811         cat > conftest.$ac_ext <<EOF
16812 #line 16813 "configure"
16813 #include "confdefs.h"
16814 #include <time.h>
16815 int main() {
16816 time_t ti; char *buffer; ctime_r(&ti,buffer);
16817 ; return 0; }
16818 EOF
16819 if { (eval echo configure:16820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16820   rm -rf conftest*
16821   ol_cv_func_ctime_r_nargs2=yes
16822 else
16823   echo "configure: failed program was:" >&5
16824   cat conftest.$ac_ext >&5
16825   rm -rf conftest*
16826   ol_cv_func_ctime_r_nargs2=no
16827 fi
16828 rm -f conftest*
16829
16830         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16831                 $ol_cv_func_ctime_r_nargs2 = no ; then
16832
16833                 ol_cv_func_ctime_r_nargs=3
16834
16835         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16836                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16837
16838                 ol_cv_func_ctime_r_nargs=2
16839
16840         else
16841                 ol_cv_func_ctime_r_nargs=0
16842         fi
16843   
16844 fi
16845
16846 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16847
16848   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16849         cat >> confdefs.h <<EOF
16850 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16851 EOF
16852
16853   fi
16854
16855 fi
16856
16857 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16858         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16859 echo "configure:16860: checking number of arguments of gethostbyname_r" >&5
16860 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16861   echo $ac_n "(cached) $ac_c" 1>&6
16862 else
16863   cat > conftest.$ac_ext <<EOF
16864 #line 16865 "configure"
16865 #include "confdefs.h"
16866 #include <sys/types.h>
16867 #include <sys/socket.h>
16868 #include <netinet/in.h>
16869 #include <netdb.h>
16870 #define BUFSIZE (sizeof(struct hostent)+10)
16871 int main() {
16872 struct hostent hent; char buffer[BUFSIZE];
16873                 int bufsize=BUFSIZE;int h_errno;
16874                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16875                         buffer, bufsize, &h_errno);
16876 ; return 0; }
16877 EOF
16878 if { (eval echo configure:16879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16879   rm -rf conftest*
16880   ol_cv_func_gethostbyname_r_nargs5=yes
16881 else
16882   echo "configure: failed program was:" >&5
16883   cat conftest.$ac_ext >&5
16884   rm -rf conftest*
16885   ol_cv_func_gethostbyname_r_nargs5=no
16886 fi
16887 rm -f conftest*
16888
16889         cat > conftest.$ac_ext <<EOF
16890 #line 16891 "configure"
16891 #include "confdefs.h"
16892 #include <sys/types.h>
16893 #include <sys/socket.h>
16894 #include <netinet/in.h>
16895 #include <netdb.h>
16896 #define BUFSIZE (sizeof(struct hostent)+10)
16897 int main() {
16898 struct hostent hent;struct hostent *rhent;
16899                 char buffer[BUFSIZE];
16900                 int bufsize=BUFSIZE;int h_errno;
16901                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16902                         &rhent, &h_errno);
16903 ; return 0; }
16904 EOF
16905 if { (eval echo configure:16906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16906   rm -rf conftest*
16907   ol_cv_func_gethostbyname_r_nargs6=yes
16908 else
16909   echo "configure: failed program was:" >&5
16910   cat conftest.$ac_ext >&5
16911   rm -rf conftest*
16912   ol_cv_func_gethostbyname_r_nargs6=no
16913 fi
16914 rm -f conftest*
16915
16916         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16917                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16918
16919                 ol_cv_func_gethostbyname_r_nargs=5
16920
16921         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16922                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16923
16924                 ol_cv_func_gethostbyname_r_nargs=6
16925
16926         else
16927                 ol_cv_func_gethostbyname_r_nargs=0
16928         fi
16929   
16930 fi
16931
16932 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16933   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16934         cat >> confdefs.h <<EOF
16935 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16936 EOF
16937
16938   fi
16939
16940 else
16941         ol_cv_func_gethostbyname_r_nargs=0
16942 fi
16943  
16944 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16945         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16946 echo "configure:16947: checking number of arguments of gethostbyaddr_r" >&5
16947 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16948   echo $ac_n "(cached) $ac_c" 1>&6
16949 else
16950   cat > conftest.$ac_ext <<EOF
16951 #line 16952 "configure"
16952 #include "confdefs.h"
16953 #include <sys/types.h>
16954 #include <sys/socket.h>
16955 #include <netinet/in.h>
16956 #include <netdb.h>
16957 #define BUFSIZE (sizeof(struct hostent)+10)
16958 int main() {
16959 struct hostent hent; char buffer[BUFSIZE]; 
16960             struct in_addr add;
16961             size_t alen=sizeof(struct in_addr);
16962             int bufsize=BUFSIZE;int h_errno;
16963                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16964                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16965 ; return 0; }
16966 EOF
16967 if { (eval echo configure:16968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16968   rm -rf conftest*
16969   ol_cv_func_gethostbyaddr_r_nargs7=yes
16970 else
16971   echo "configure: failed program was:" >&5
16972   cat conftest.$ac_ext >&5
16973   rm -rf conftest*
16974   ol_cv_func_gethostbyaddr_r_nargs7=no
16975 fi
16976 rm -f conftest*
16977
16978         cat > conftest.$ac_ext <<EOF
16979 #line 16980 "configure"
16980 #include "confdefs.h"
16981 #include <sys/types.h>
16982 #include <sys/socket.h>
16983 #include <netinet/in.h>
16984 #include <netdb.h>
16985 #define BUFSIZE (sizeof(struct hostent)+10)
16986 int main() {
16987 struct hostent hent;
16988                 struct hostent *rhent; char buffer[BUFSIZE]; 
16989                 struct in_addr add;
16990                 size_t alen=sizeof(struct in_addr);
16991                 int bufsize=BUFSIZE;int h_errno;
16992                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16993                         alen, AF_INET, &hent, buffer, bufsize, 
16994                         &rhent, &h_errno);
16995 ; return 0; }
16996 EOF
16997 if { (eval echo configure:16998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16998   rm -rf conftest*
16999   ol_cv_func_gethostbyaddr_r_nargs8=yes
17000 else
17001   echo "configure: failed program was:" >&5
17002   cat conftest.$ac_ext >&5
17003   rm -rf conftest*
17004   ol_cv_func_gethostbyaddr_r_nargs8=no
17005 fi
17006 rm -f conftest*
17007
17008         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
17009                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
17010
17011                 ol_cv_func_gethostbyaddr_r_nargs=7
17012
17013         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
17014                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
17015
17016                 ol_cv_func_gethostbyaddr_r_nargs=8
17017
17018         else
17019                 ol_cv_func_gethostbyaddr_r_nargs=0
17020         fi
17021   
17022 fi
17023
17024 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
17025   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
17026     cat >> confdefs.h <<EOF
17027 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
17028 EOF
17029
17030   fi
17031
17032 else
17033         ol_cv_func_gethostbyaddr_r_nargs=0
17034 fi
17035
17036 ol_link_ldbm=no 
17037
17038 if test $ol_with_ldbm_api = auto \
17039         -o $ol_with_ldbm_api = berkeley \
17040         -o $ol_with_ldbm_api = bcompat ; then
17041
17042         if test $ol_with_ldbm_api = bcompat; then \
17043                 for ac_hdr in db_185.h db.h
17044 do
17045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17047 echo "configure:17048: checking for $ac_hdr" >&5
17048 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17049   echo $ac_n "(cached) $ac_c" 1>&6
17050 else
17051   cat > conftest.$ac_ext <<EOF
17052 #line 17053 "configure"
17053 #include "confdefs.h"
17054 #include <$ac_hdr>
17055 EOF
17056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17057 { (eval echo configure:17058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17059 if test -z "$ac_err"; then
17060   rm -rf conftest*
17061   eval "ac_cv_header_$ac_safe=yes"
17062 else
17063   echo "$ac_err" >&5
17064   echo "configure: failed program was:" >&5
17065   cat conftest.$ac_ext >&5
17066   rm -rf conftest*
17067   eval "ac_cv_header_$ac_safe=no"
17068 fi
17069 rm -f conftest*
17070 fi
17071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17072   echo "$ac_t""yes" 1>&6
17073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17074   cat >> confdefs.h <<EOF
17075 #define $ac_tr_hdr 1
17076 EOF
17077  
17078 else
17079   echo "$ac_t""no" 1>&6
17080 fi
17081 done
17082
17083 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17084         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17085 echo "configure:17086: checking if Berkeley DB header compatibility" >&5
17086 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17087   echo $ac_n "(cached) $ac_c" 1>&6
17088 else
17089   
17090                 cat > conftest.$ac_ext <<EOF
17091 #line 17092 "configure"
17092 #include "confdefs.h"
17093
17094 #if HAVE_DB_185_H
17095 #       include <db_185.h>
17096 #else
17097 #       include <db.h>
17098 #endif
17099
17100  /* this check could be improved */
17101 #ifndef DB_VERSION_MAJOR
17102 #       define DB_VERSION_MAJOR 1
17103 #endif
17104
17105 #if DB_VERSION_MAJOR == 1 
17106         __db_version_1
17107 #endif
17108
17109 EOF
17110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17111   egrep "__db_version_1" >/dev/null 2>&1; then
17112   rm -rf conftest*
17113   ol_cv_header_db1=yes
17114 else
17115   rm -rf conftest*
17116   ol_cv_header_db1=no
17117 fi
17118 rm -f conftest*
17119
17120 fi
17121
17122 echo "$ac_t""$ol_cv_header_db1" 1>&6
17123
17124         if test $ol_cv_header_db1 = yes ; then
17125                 ol_cv_lib_db=no
17126 if test $ol_cv_lib_db = no ; then
17127         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17128 echo "configure:17129: checking for Berkeley DB link (default)" >&5
17129 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17130   echo $ac_n "(cached) $ac_c" 1>&6
17131 else
17132   
17133         ol_DB_LIB=
17134         ol_LIBS=$LIBS
17135         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17136
17137         cat > conftest.$ac_ext <<EOF
17138 #line 17139 "configure"
17139 #include "confdefs.h"
17140
17141 #ifdef HAVE_DB_185_H
17142 # include <db_185.h>
17143 #else
17144 # include <db.h>
17145 #endif
17146
17147 #ifndef DB_VERSION_MAJOR
17148 # define DB_VERSION_MAJOR 1
17149 #endif
17150
17151 #ifndef NULL
17152 #define NULL ((void*)0)
17153 #endif
17154
17155 int main() {
17156
17157 #if DB_VERSION_MAJOR > 1
17158         {
17159                 char *version;
17160                 int major, minor, patch;
17161
17162                 version = db_version( &major, &minor, &patch );
17163
17164                 if( major != DB_VERSION_MAJOR ||
17165                         minor < DB_VERSION_MINOR )
17166                 {
17167                         printf("Berkeley DB version mismatch\n"
17168                                 "\theader: %s\n\tlibrary: %s\n",
17169                                 DB_VERSION_STRING, version);
17170                         return 1;
17171                 }
17172         }
17173 #endif
17174
17175 #if DB_VERSION_MAJOR > 2
17176         db_env_create( NULL, 0 );
17177 #elif DB_VERSION_MAJOR > 1
17178         db_appexit( NULL );
17179 #else
17180         (void) dbopen( NULL, 0, 0, 0, NULL);
17181 #endif
17182
17183 ; return 0; }
17184 EOF
17185 if { (eval echo configure:17186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17186   rm -rf conftest*
17187   ol_cv_db_none=yes
17188 else
17189   echo "configure: failed program was:" >&5
17190   cat conftest.$ac_ext >&5
17191   rm -rf conftest*
17192   ol_cv_db_none=no
17193 fi
17194 rm -f conftest*
17195
17196         LIBS="$ol_LIBS"
17197
17198 fi
17199
17200 echo "$ac_t""$ol_cv_db_none" 1>&6
17201
17202         if test $ol_cv_db_none = yes ; then
17203                 ol_cv_lib_db=yes
17204         fi
17205 fi
17206
17207 if test $ol_cv_lib_db = no ; then
17208         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17209 echo "configure:17210: checking for Berkeley DB link (-ldb43)" >&5
17210 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17211   echo $ac_n "(cached) $ac_c" 1>&6
17212 else
17213   
17214         ol_DB_LIB=-ldb43
17215         ol_LIBS=$LIBS
17216         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17217
17218         cat > conftest.$ac_ext <<EOF
17219 #line 17220 "configure"
17220 #include "confdefs.h"
17221
17222 #ifdef HAVE_DB_185_H
17223 # include <db_185.h>
17224 #else
17225 # include <db.h>
17226 #endif
17227
17228 #ifndef DB_VERSION_MAJOR
17229 # define DB_VERSION_MAJOR 1
17230 #endif
17231
17232 #ifndef NULL
17233 #define NULL ((void*)0)
17234 #endif
17235
17236 int main() {
17237
17238 #if DB_VERSION_MAJOR > 1
17239         {
17240                 char *version;
17241                 int major, minor, patch;
17242
17243                 version = db_version( &major, &minor, &patch );
17244
17245                 if( major != DB_VERSION_MAJOR ||
17246                         minor < DB_VERSION_MINOR )
17247                 {
17248                         printf("Berkeley DB version mismatch\n"
17249                                 "\theader: %s\n\tlibrary: %s\n",
17250                                 DB_VERSION_STRING, version);
17251                         return 1;
17252                 }
17253         }
17254 #endif
17255
17256 #if DB_VERSION_MAJOR > 2
17257         db_env_create( NULL, 0 );
17258 #elif DB_VERSION_MAJOR > 1
17259         db_appexit( NULL );
17260 #else
17261         (void) dbopen( NULL, 0, 0, 0, NULL);
17262 #endif
17263
17264 ; return 0; }
17265 EOF
17266 if { (eval echo configure:17267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17267   rm -rf conftest*
17268   ol_cv_db_db43=yes
17269 else
17270   echo "configure: failed program was:" >&5
17271   cat conftest.$ac_ext >&5
17272   rm -rf conftest*
17273   ol_cv_db_db43=no
17274 fi
17275 rm -f conftest*
17276
17277         LIBS="$ol_LIBS"
17278
17279 fi
17280
17281 echo "$ac_t""$ol_cv_db_db43" 1>&6
17282
17283         if test $ol_cv_db_db43 = yes ; then
17284                 ol_cv_lib_db=-ldb43
17285         fi
17286 fi
17287
17288 if test $ol_cv_lib_db = no ; then
17289         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17290 echo "configure:17291: checking for Berkeley DB link (-ldb-43)" >&5
17291 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17292   echo $ac_n "(cached) $ac_c" 1>&6
17293 else
17294   
17295         ol_DB_LIB=-ldb-43
17296         ol_LIBS=$LIBS
17297         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17298
17299         cat > conftest.$ac_ext <<EOF
17300 #line 17301 "configure"
17301 #include "confdefs.h"
17302
17303 #ifdef HAVE_DB_185_H
17304 # include <db_185.h>
17305 #else
17306 # include <db.h>
17307 #endif
17308
17309 #ifndef DB_VERSION_MAJOR
17310 # define DB_VERSION_MAJOR 1
17311 #endif
17312
17313 #ifndef NULL
17314 #define NULL ((void*)0)
17315 #endif
17316
17317 int main() {
17318
17319 #if DB_VERSION_MAJOR > 1
17320         {
17321                 char *version;
17322                 int major, minor, patch;
17323
17324                 version = db_version( &major, &minor, &patch );
17325
17326                 if( major != DB_VERSION_MAJOR ||
17327                         minor < DB_VERSION_MINOR )
17328                 {
17329                         printf("Berkeley DB version mismatch\n"
17330                                 "\theader: %s\n\tlibrary: %s\n",
17331                                 DB_VERSION_STRING, version);
17332                         return 1;
17333                 }
17334         }
17335 #endif
17336
17337 #if DB_VERSION_MAJOR > 2
17338         db_env_create( NULL, 0 );
17339 #elif DB_VERSION_MAJOR > 1
17340         db_appexit( NULL );
17341 #else
17342         (void) dbopen( NULL, 0, 0, 0, NULL);
17343 #endif
17344
17345 ; return 0; }
17346 EOF
17347 if { (eval echo configure:17348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17348   rm -rf conftest*
17349   ol_cv_db_db_43=yes
17350 else
17351   echo "configure: failed program was:" >&5
17352   cat conftest.$ac_ext >&5
17353   rm -rf conftest*
17354   ol_cv_db_db_43=no
17355 fi
17356 rm -f conftest*
17357
17358         LIBS="$ol_LIBS"
17359
17360 fi
17361
17362 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17363
17364         if test $ol_cv_db_db_43 = yes ; then
17365                 ol_cv_lib_db=-ldb-43
17366         fi
17367 fi
17368
17369 if test $ol_cv_lib_db = no ; then
17370         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17371 echo "configure:17372: checking for Berkeley DB link (-ldb-4.3)" >&5
17372 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17373   echo $ac_n "(cached) $ac_c" 1>&6
17374 else
17375   
17376         ol_DB_LIB=-ldb-4.3
17377         ol_LIBS=$LIBS
17378         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17379
17380         cat > conftest.$ac_ext <<EOF
17381 #line 17382 "configure"
17382 #include "confdefs.h"
17383
17384 #ifdef HAVE_DB_185_H
17385 # include <db_185.h>
17386 #else
17387 # include <db.h>
17388 #endif
17389
17390 #ifndef DB_VERSION_MAJOR
17391 # define DB_VERSION_MAJOR 1
17392 #endif
17393
17394 #ifndef NULL
17395 #define NULL ((void*)0)
17396 #endif
17397
17398 int main() {
17399
17400 #if DB_VERSION_MAJOR > 1
17401         {
17402                 char *version;
17403                 int major, minor, patch;
17404
17405                 version = db_version( &major, &minor, &patch );
17406
17407                 if( major != DB_VERSION_MAJOR ||
17408                         minor < DB_VERSION_MINOR )
17409                 {
17410                         printf("Berkeley DB version mismatch\n"
17411                                 "\theader: %s\n\tlibrary: %s\n",
17412                                 DB_VERSION_STRING, version);
17413                         return 1;
17414                 }
17415         }
17416 #endif
17417
17418 #if DB_VERSION_MAJOR > 2
17419         db_env_create( NULL, 0 );
17420 #elif DB_VERSION_MAJOR > 1
17421         db_appexit( NULL );
17422 #else
17423         (void) dbopen( NULL, 0, 0, 0, NULL);
17424 #endif
17425
17426 ; return 0; }
17427 EOF
17428 if { (eval echo configure:17429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17429   rm -rf conftest*
17430   ol_cv_db_db_4_dot_3=yes
17431 else
17432   echo "configure: failed program was:" >&5
17433   cat conftest.$ac_ext >&5
17434   rm -rf conftest*
17435   ol_cv_db_db_4_dot_3=no
17436 fi
17437 rm -f conftest*
17438
17439         LIBS="$ol_LIBS"
17440
17441 fi
17442
17443 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17444
17445         if test $ol_cv_db_db_4_dot_3 = yes ; then
17446                 ol_cv_lib_db=-ldb-4.3
17447         fi
17448 fi
17449
17450 if test $ol_cv_lib_db = no ; then
17451         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17452 echo "configure:17453: checking for Berkeley DB link (-ldb-4-3)" >&5
17453 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17454   echo $ac_n "(cached) $ac_c" 1>&6
17455 else
17456   
17457         ol_DB_LIB=-ldb-4-3
17458         ol_LIBS=$LIBS
17459         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17460
17461         cat > conftest.$ac_ext <<EOF
17462 #line 17463 "configure"
17463 #include "confdefs.h"
17464
17465 #ifdef HAVE_DB_185_H
17466 # include <db_185.h>
17467 #else
17468 # include <db.h>
17469 #endif
17470
17471 #ifndef DB_VERSION_MAJOR
17472 # define DB_VERSION_MAJOR 1
17473 #endif
17474
17475 #ifndef NULL
17476 #define NULL ((void*)0)
17477 #endif
17478
17479 int main() {
17480
17481 #if DB_VERSION_MAJOR > 1
17482         {
17483                 char *version;
17484                 int major, minor, patch;
17485
17486                 version = db_version( &major, &minor, &patch );
17487
17488                 if( major != DB_VERSION_MAJOR ||
17489                         minor < DB_VERSION_MINOR )
17490                 {
17491                         printf("Berkeley DB version mismatch\n"
17492                                 "\theader: %s\n\tlibrary: %s\n",
17493                                 DB_VERSION_STRING, version);
17494                         return 1;
17495                 }
17496         }
17497 #endif
17498
17499 #if DB_VERSION_MAJOR > 2
17500         db_env_create( NULL, 0 );
17501 #elif DB_VERSION_MAJOR > 1
17502         db_appexit( NULL );
17503 #else
17504         (void) dbopen( NULL, 0, 0, 0, NULL);
17505 #endif
17506
17507 ; return 0; }
17508 EOF
17509 if { (eval echo configure:17510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17510   rm -rf conftest*
17511   ol_cv_db_db_4_3=yes
17512 else
17513   echo "configure: failed program was:" >&5
17514   cat conftest.$ac_ext >&5
17515   rm -rf conftest*
17516   ol_cv_db_db_4_3=no
17517 fi
17518 rm -f conftest*
17519
17520         LIBS="$ol_LIBS"
17521
17522 fi
17523
17524 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17525
17526         if test $ol_cv_db_db_4_3 = yes ; then
17527                 ol_cv_lib_db=-ldb-4-3
17528         fi
17529 fi
17530
17531 if test $ol_cv_lib_db = no ; then
17532         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17533 echo "configure:17534: checking for Berkeley DB link (-ldb42)" >&5
17534 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17535   echo $ac_n "(cached) $ac_c" 1>&6
17536 else
17537   
17538         ol_DB_LIB=-ldb42
17539         ol_LIBS=$LIBS
17540         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17541
17542         cat > conftest.$ac_ext <<EOF
17543 #line 17544 "configure"
17544 #include "confdefs.h"
17545
17546 #ifdef HAVE_DB_185_H
17547 # include <db_185.h>
17548 #else
17549 # include <db.h>
17550 #endif
17551
17552 #ifndef DB_VERSION_MAJOR
17553 # define DB_VERSION_MAJOR 1
17554 #endif
17555
17556 #ifndef NULL
17557 #define NULL ((void*)0)
17558 #endif
17559
17560 int main() {
17561
17562 #if DB_VERSION_MAJOR > 1
17563         {
17564                 char *version;
17565                 int major, minor, patch;
17566
17567                 version = db_version( &major, &minor, &patch );
17568
17569                 if( major != DB_VERSION_MAJOR ||
17570                         minor < DB_VERSION_MINOR )
17571                 {
17572                         printf("Berkeley DB version mismatch\n"
17573                                 "\theader: %s\n\tlibrary: %s\n",
17574                                 DB_VERSION_STRING, version);
17575                         return 1;
17576                 }
17577         }
17578 #endif
17579
17580 #if DB_VERSION_MAJOR > 2
17581         db_env_create( NULL, 0 );
17582 #elif DB_VERSION_MAJOR > 1
17583         db_appexit( NULL );
17584 #else
17585         (void) dbopen( NULL, 0, 0, 0, NULL);
17586 #endif
17587
17588 ; return 0; }
17589 EOF
17590 if { (eval echo configure:17591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17591   rm -rf conftest*
17592   ol_cv_db_db42=yes
17593 else
17594   echo "configure: failed program was:" >&5
17595   cat conftest.$ac_ext >&5
17596   rm -rf conftest*
17597   ol_cv_db_db42=no
17598 fi
17599 rm -f conftest*
17600
17601         LIBS="$ol_LIBS"
17602
17603 fi
17604
17605 echo "$ac_t""$ol_cv_db_db42" 1>&6
17606
17607         if test $ol_cv_db_db42 = yes ; then
17608                 ol_cv_lib_db=-ldb42
17609         fi
17610 fi
17611
17612 if test $ol_cv_lib_db = no ; then
17613         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17614 echo "configure:17615: checking for Berkeley DB link (-ldb-42)" >&5
17615 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17616   echo $ac_n "(cached) $ac_c" 1>&6
17617 else
17618   
17619         ol_DB_LIB=-ldb-42
17620         ol_LIBS=$LIBS
17621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17622
17623         cat > conftest.$ac_ext <<EOF
17624 #line 17625 "configure"
17625 #include "confdefs.h"
17626
17627 #ifdef HAVE_DB_185_H
17628 # include <db_185.h>
17629 #else
17630 # include <db.h>
17631 #endif
17632
17633 #ifndef DB_VERSION_MAJOR
17634 # define DB_VERSION_MAJOR 1
17635 #endif
17636
17637 #ifndef NULL
17638 #define NULL ((void*)0)
17639 #endif
17640
17641 int main() {
17642
17643 #if DB_VERSION_MAJOR > 1
17644         {
17645                 char *version;
17646                 int major, minor, patch;
17647
17648                 version = db_version( &major, &minor, &patch );
17649
17650                 if( major != DB_VERSION_MAJOR ||
17651                         minor < DB_VERSION_MINOR )
17652                 {
17653                         printf("Berkeley DB version mismatch\n"
17654                                 "\theader: %s\n\tlibrary: %s\n",
17655                                 DB_VERSION_STRING, version);
17656                         return 1;
17657                 }
17658         }
17659 #endif
17660
17661 #if DB_VERSION_MAJOR > 2
17662         db_env_create( NULL, 0 );
17663 #elif DB_VERSION_MAJOR > 1
17664         db_appexit( NULL );
17665 #else
17666         (void) dbopen( NULL, 0, 0, 0, NULL);
17667 #endif
17668
17669 ; return 0; }
17670 EOF
17671 if { (eval echo configure:17672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17672   rm -rf conftest*
17673   ol_cv_db_db_42=yes
17674 else
17675   echo "configure: failed program was:" >&5
17676   cat conftest.$ac_ext >&5
17677   rm -rf conftest*
17678   ol_cv_db_db_42=no
17679 fi
17680 rm -f conftest*
17681
17682         LIBS="$ol_LIBS"
17683
17684 fi
17685
17686 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17687
17688         if test $ol_cv_db_db_42 = yes ; then
17689                 ol_cv_lib_db=-ldb-42
17690         fi
17691 fi
17692
17693 if test $ol_cv_lib_db = no ; then
17694         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17695 echo "configure:17696: checking for Berkeley DB link (-ldb-4.2)" >&5
17696 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17697   echo $ac_n "(cached) $ac_c" 1>&6
17698 else
17699   
17700         ol_DB_LIB=-ldb-4.2
17701         ol_LIBS=$LIBS
17702         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17703
17704         cat > conftest.$ac_ext <<EOF
17705 #line 17706 "configure"
17706 #include "confdefs.h"
17707
17708 #ifdef HAVE_DB_185_H
17709 # include <db_185.h>
17710 #else
17711 # include <db.h>
17712 #endif
17713
17714 #ifndef DB_VERSION_MAJOR
17715 # define DB_VERSION_MAJOR 1
17716 #endif
17717
17718 #ifndef NULL
17719 #define NULL ((void*)0)
17720 #endif
17721
17722 int main() {
17723
17724 #if DB_VERSION_MAJOR > 1
17725         {
17726                 char *version;
17727                 int major, minor, patch;
17728
17729                 version = db_version( &major, &minor, &patch );
17730
17731                 if( major != DB_VERSION_MAJOR ||
17732                         minor < DB_VERSION_MINOR )
17733                 {
17734                         printf("Berkeley DB version mismatch\n"
17735                                 "\theader: %s\n\tlibrary: %s\n",
17736                                 DB_VERSION_STRING, version);
17737                         return 1;
17738                 }
17739         }
17740 #endif
17741
17742 #if DB_VERSION_MAJOR > 2
17743         db_env_create( NULL, 0 );
17744 #elif DB_VERSION_MAJOR > 1
17745         db_appexit( NULL );
17746 #else
17747         (void) dbopen( NULL, 0, 0, 0, NULL);
17748 #endif
17749
17750 ; return 0; }
17751 EOF
17752 if { (eval echo configure:17753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17753   rm -rf conftest*
17754   ol_cv_db_db_4_dot_2=yes
17755 else
17756   echo "configure: failed program was:" >&5
17757   cat conftest.$ac_ext >&5
17758   rm -rf conftest*
17759   ol_cv_db_db_4_dot_2=no
17760 fi
17761 rm -f conftest*
17762
17763         LIBS="$ol_LIBS"
17764
17765 fi
17766
17767 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17768
17769         if test $ol_cv_db_db_4_dot_2 = yes ; then
17770                 ol_cv_lib_db=-ldb-4.2
17771         fi
17772 fi
17773
17774 if test $ol_cv_lib_db = no ; then
17775         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17776 echo "configure:17777: checking for Berkeley DB link (-ldb-4-2)" >&5
17777 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17778   echo $ac_n "(cached) $ac_c" 1>&6
17779 else
17780   
17781         ol_DB_LIB=-ldb-4-2
17782         ol_LIBS=$LIBS
17783         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17784
17785         cat > conftest.$ac_ext <<EOF
17786 #line 17787 "configure"
17787 #include "confdefs.h"
17788
17789 #ifdef HAVE_DB_185_H
17790 # include <db_185.h>
17791 #else
17792 # include <db.h>
17793 #endif
17794
17795 #ifndef DB_VERSION_MAJOR
17796 # define DB_VERSION_MAJOR 1
17797 #endif
17798
17799 #ifndef NULL
17800 #define NULL ((void*)0)
17801 #endif
17802
17803 int main() {
17804
17805 #if DB_VERSION_MAJOR > 1
17806         {
17807                 char *version;
17808                 int major, minor, patch;
17809
17810                 version = db_version( &major, &minor, &patch );
17811
17812                 if( major != DB_VERSION_MAJOR ||
17813                         minor < DB_VERSION_MINOR )
17814                 {
17815                         printf("Berkeley DB version mismatch\n"
17816                                 "\theader: %s\n\tlibrary: %s\n",
17817                                 DB_VERSION_STRING, version);
17818                         return 1;
17819                 }
17820         }
17821 #endif
17822
17823 #if DB_VERSION_MAJOR > 2
17824         db_env_create( NULL, 0 );
17825 #elif DB_VERSION_MAJOR > 1
17826         db_appexit( NULL );
17827 #else
17828         (void) dbopen( NULL, 0, 0, 0, NULL);
17829 #endif
17830
17831 ; return 0; }
17832 EOF
17833 if { (eval echo configure:17834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17834   rm -rf conftest*
17835   ol_cv_db_db_4_2=yes
17836 else
17837   echo "configure: failed program was:" >&5
17838   cat conftest.$ac_ext >&5
17839   rm -rf conftest*
17840   ol_cv_db_db_4_2=no
17841 fi
17842 rm -f conftest*
17843
17844         LIBS="$ol_LIBS"
17845
17846 fi
17847
17848 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17849
17850         if test $ol_cv_db_db_4_2 = yes ; then
17851                 ol_cv_lib_db=-ldb-4-2
17852         fi
17853 fi
17854
17855 if test $ol_cv_lib_db = no ; then
17856         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17857 echo "configure:17858: checking for Berkeley DB link (-ldb-4)" >&5
17858 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17859   echo $ac_n "(cached) $ac_c" 1>&6
17860 else
17861   
17862         ol_DB_LIB=-ldb-4
17863         ol_LIBS=$LIBS
17864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17865
17866         cat > conftest.$ac_ext <<EOF
17867 #line 17868 "configure"
17868 #include "confdefs.h"
17869
17870 #ifdef HAVE_DB_185_H
17871 # include <db_185.h>
17872 #else
17873 # include <db.h>
17874 #endif
17875
17876 #ifndef DB_VERSION_MAJOR
17877 # define DB_VERSION_MAJOR 1
17878 #endif
17879
17880 #ifndef NULL
17881 #define NULL ((void*)0)
17882 #endif
17883
17884 int main() {
17885
17886 #if DB_VERSION_MAJOR > 1
17887         {
17888                 char *version;
17889                 int major, minor, patch;
17890
17891                 version = db_version( &major, &minor, &patch );
17892
17893                 if( major != DB_VERSION_MAJOR ||
17894                         minor < DB_VERSION_MINOR )
17895                 {
17896                         printf("Berkeley DB version mismatch\n"
17897                                 "\theader: %s\n\tlibrary: %s\n",
17898                                 DB_VERSION_STRING, version);
17899                         return 1;
17900                 }
17901         }
17902 #endif
17903
17904 #if DB_VERSION_MAJOR > 2
17905         db_env_create( NULL, 0 );
17906 #elif DB_VERSION_MAJOR > 1
17907         db_appexit( NULL );
17908 #else
17909         (void) dbopen( NULL, 0, 0, 0, NULL);
17910 #endif
17911
17912 ; return 0; }
17913 EOF
17914 if { (eval echo configure:17915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17915   rm -rf conftest*
17916   ol_cv_db_db_4=yes
17917 else
17918   echo "configure: failed program was:" >&5
17919   cat conftest.$ac_ext >&5
17920   rm -rf conftest*
17921   ol_cv_db_db_4=no
17922 fi
17923 rm -f conftest*
17924
17925         LIBS="$ol_LIBS"
17926
17927 fi
17928
17929 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17930
17931         if test $ol_cv_db_db_4 = yes ; then
17932                 ol_cv_lib_db=-ldb-4
17933         fi
17934 fi
17935
17936 if test $ol_cv_lib_db = no ; then
17937         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17938 echo "configure:17939: checking for Berkeley DB link (-ldb4)" >&5
17939 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17940   echo $ac_n "(cached) $ac_c" 1>&6
17941 else
17942   
17943         ol_DB_LIB=-ldb4
17944         ol_LIBS=$LIBS
17945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17946
17947         cat > conftest.$ac_ext <<EOF
17948 #line 17949 "configure"
17949 #include "confdefs.h"
17950
17951 #ifdef HAVE_DB_185_H
17952 # include <db_185.h>
17953 #else
17954 # include <db.h>
17955 #endif
17956
17957 #ifndef DB_VERSION_MAJOR
17958 # define DB_VERSION_MAJOR 1
17959 #endif
17960
17961 #ifndef NULL
17962 #define NULL ((void*)0)
17963 #endif
17964
17965 int main() {
17966
17967 #if DB_VERSION_MAJOR > 1
17968         {
17969                 char *version;
17970                 int major, minor, patch;
17971
17972                 version = db_version( &major, &minor, &patch );
17973
17974                 if( major != DB_VERSION_MAJOR ||
17975                         minor < DB_VERSION_MINOR )
17976                 {
17977                         printf("Berkeley DB version mismatch\n"
17978                                 "\theader: %s\n\tlibrary: %s\n",
17979                                 DB_VERSION_STRING, version);
17980                         return 1;
17981                 }
17982         }
17983 #endif
17984
17985 #if DB_VERSION_MAJOR > 2
17986         db_env_create( NULL, 0 );
17987 #elif DB_VERSION_MAJOR > 1
17988         db_appexit( NULL );
17989 #else
17990         (void) dbopen( NULL, 0, 0, 0, NULL);
17991 #endif
17992
17993 ; return 0; }
17994 EOF
17995 if { (eval echo configure:17996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17996   rm -rf conftest*
17997   ol_cv_db_db4=yes
17998 else
17999   echo "configure: failed program was:" >&5
18000   cat conftest.$ac_ext >&5
18001   rm -rf conftest*
18002   ol_cv_db_db4=no
18003 fi
18004 rm -f conftest*
18005
18006         LIBS="$ol_LIBS"
18007
18008 fi
18009
18010 echo "$ac_t""$ol_cv_db_db4" 1>&6
18011
18012         if test $ol_cv_db_db4 = yes ; then
18013                 ol_cv_lib_db=-ldb4
18014         fi
18015 fi
18016
18017 if test $ol_cv_lib_db = no ; then
18018         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18019 echo "configure:18020: checking for Berkeley DB link (-ldb)" >&5
18020 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18021   echo $ac_n "(cached) $ac_c" 1>&6
18022 else
18023   
18024         ol_DB_LIB=-ldb
18025         ol_LIBS=$LIBS
18026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18027
18028         cat > conftest.$ac_ext <<EOF
18029 #line 18030 "configure"
18030 #include "confdefs.h"
18031
18032 #ifdef HAVE_DB_185_H
18033 # include <db_185.h>
18034 #else
18035 # include <db.h>
18036 #endif
18037
18038 #ifndef DB_VERSION_MAJOR
18039 # define DB_VERSION_MAJOR 1
18040 #endif
18041
18042 #ifndef NULL
18043 #define NULL ((void*)0)
18044 #endif
18045
18046 int main() {
18047
18048 #if DB_VERSION_MAJOR > 1
18049         {
18050                 char *version;
18051                 int major, minor, patch;
18052
18053                 version = db_version( &major, &minor, &patch );
18054
18055                 if( major != DB_VERSION_MAJOR ||
18056                         minor < DB_VERSION_MINOR )
18057                 {
18058                         printf("Berkeley DB version mismatch\n"
18059                                 "\theader: %s\n\tlibrary: %s\n",
18060                                 DB_VERSION_STRING, version);
18061                         return 1;
18062                 }
18063         }
18064 #endif
18065
18066 #if DB_VERSION_MAJOR > 2
18067         db_env_create( NULL, 0 );
18068 #elif DB_VERSION_MAJOR > 1
18069         db_appexit( NULL );
18070 #else
18071         (void) dbopen( NULL, 0, 0, 0, NULL);
18072 #endif
18073
18074 ; return 0; }
18075 EOF
18076 if { (eval echo configure:18077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18077   rm -rf conftest*
18078   ol_cv_db_db=yes
18079 else
18080   echo "configure: failed program was:" >&5
18081   cat conftest.$ac_ext >&5
18082   rm -rf conftest*
18083   ol_cv_db_db=no
18084 fi
18085 rm -f conftest*
18086
18087         LIBS="$ol_LIBS"
18088
18089 fi
18090
18091 echo "$ac_t""$ol_cv_db_db" 1>&6
18092
18093         if test $ol_cv_db_db = yes ; then
18094                 ol_cv_lib_db=-ldb
18095         fi
18096 fi
18097
18098 if test $ol_cv_lib_db = no ; then
18099         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18100 echo "configure:18101: checking for Berkeley DB link (-ldb41)" >&5
18101 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18102   echo $ac_n "(cached) $ac_c" 1>&6
18103 else
18104   
18105         ol_DB_LIB=-ldb41
18106         ol_LIBS=$LIBS
18107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18108
18109         cat > conftest.$ac_ext <<EOF
18110 #line 18111 "configure"
18111 #include "confdefs.h"
18112
18113 #ifdef HAVE_DB_185_H
18114 # include <db_185.h>
18115 #else
18116 # include <db.h>
18117 #endif
18118
18119 #ifndef DB_VERSION_MAJOR
18120 # define DB_VERSION_MAJOR 1
18121 #endif
18122
18123 #ifndef NULL
18124 #define NULL ((void*)0)
18125 #endif
18126
18127 int main() {
18128
18129 #if DB_VERSION_MAJOR > 1
18130         {
18131                 char *version;
18132                 int major, minor, patch;
18133
18134                 version = db_version( &major, &minor, &patch );
18135
18136                 if( major != DB_VERSION_MAJOR ||
18137                         minor < DB_VERSION_MINOR )
18138                 {
18139                         printf("Berkeley DB version mismatch\n"
18140                                 "\theader: %s\n\tlibrary: %s\n",
18141                                 DB_VERSION_STRING, version);
18142                         return 1;
18143                 }
18144         }
18145 #endif
18146
18147 #if DB_VERSION_MAJOR > 2
18148         db_env_create( NULL, 0 );
18149 #elif DB_VERSION_MAJOR > 1
18150         db_appexit( NULL );
18151 #else
18152         (void) dbopen( NULL, 0, 0, 0, NULL);
18153 #endif
18154
18155 ; return 0; }
18156 EOF
18157 if { (eval echo configure:18158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18158   rm -rf conftest*
18159   ol_cv_db_db41=yes
18160 else
18161   echo "configure: failed program was:" >&5
18162   cat conftest.$ac_ext >&5
18163   rm -rf conftest*
18164   ol_cv_db_db41=no
18165 fi
18166 rm -f conftest*
18167
18168         LIBS="$ol_LIBS"
18169
18170 fi
18171
18172 echo "$ac_t""$ol_cv_db_db41" 1>&6
18173
18174         if test $ol_cv_db_db41 = yes ; then
18175                 ol_cv_lib_db=-ldb41
18176         fi
18177 fi
18178
18179 if test $ol_cv_lib_db = no ; then
18180         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18181 echo "configure:18182: checking for Berkeley DB link (-ldb-41)" >&5
18182 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18183   echo $ac_n "(cached) $ac_c" 1>&6
18184 else
18185   
18186         ol_DB_LIB=-ldb-41
18187         ol_LIBS=$LIBS
18188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18189
18190         cat > conftest.$ac_ext <<EOF
18191 #line 18192 "configure"
18192 #include "confdefs.h"
18193
18194 #ifdef HAVE_DB_185_H
18195 # include <db_185.h>
18196 #else
18197 # include <db.h>
18198 #endif
18199
18200 #ifndef DB_VERSION_MAJOR
18201 # define DB_VERSION_MAJOR 1
18202 #endif
18203
18204 #ifndef NULL
18205 #define NULL ((void*)0)
18206 #endif
18207
18208 int main() {
18209
18210 #if DB_VERSION_MAJOR > 1
18211         {
18212                 char *version;
18213                 int major, minor, patch;
18214
18215                 version = db_version( &major, &minor, &patch );
18216
18217                 if( major != DB_VERSION_MAJOR ||
18218                         minor < DB_VERSION_MINOR )
18219                 {
18220                         printf("Berkeley DB version mismatch\n"
18221                                 "\theader: %s\n\tlibrary: %s\n",
18222                                 DB_VERSION_STRING, version);
18223                         return 1;
18224                 }
18225         }
18226 #endif
18227
18228 #if DB_VERSION_MAJOR > 2
18229         db_env_create( NULL, 0 );
18230 #elif DB_VERSION_MAJOR > 1
18231         db_appexit( NULL );
18232 #else
18233         (void) dbopen( NULL, 0, 0, 0, NULL);
18234 #endif
18235
18236 ; return 0; }
18237 EOF
18238 if { (eval echo configure:18239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18239   rm -rf conftest*
18240   ol_cv_db_db_41=yes
18241 else
18242   echo "configure: failed program was:" >&5
18243   cat conftest.$ac_ext >&5
18244   rm -rf conftest*
18245   ol_cv_db_db_41=no
18246 fi
18247 rm -f conftest*
18248
18249         LIBS="$ol_LIBS"
18250
18251 fi
18252
18253 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18254
18255         if test $ol_cv_db_db_41 = yes ; then
18256                 ol_cv_lib_db=-ldb-41
18257         fi
18258 fi
18259
18260 if test $ol_cv_lib_db = no ; then
18261         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18262 echo "configure:18263: checking for Berkeley DB link (-ldb-4.1)" >&5
18263 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18264   echo $ac_n "(cached) $ac_c" 1>&6
18265 else
18266   
18267         ol_DB_LIB=-ldb-4.1
18268         ol_LIBS=$LIBS
18269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18270
18271         cat > conftest.$ac_ext <<EOF
18272 #line 18273 "configure"
18273 #include "confdefs.h"
18274
18275 #ifdef HAVE_DB_185_H
18276 # include <db_185.h>
18277 #else
18278 # include <db.h>
18279 #endif
18280
18281 #ifndef DB_VERSION_MAJOR
18282 # define DB_VERSION_MAJOR 1
18283 #endif
18284
18285 #ifndef NULL
18286 #define NULL ((void*)0)
18287 #endif
18288
18289 int main() {
18290
18291 #if DB_VERSION_MAJOR > 1
18292         {
18293                 char *version;
18294                 int major, minor, patch;
18295
18296                 version = db_version( &major, &minor, &patch );
18297
18298                 if( major != DB_VERSION_MAJOR ||
18299                         minor < DB_VERSION_MINOR )
18300                 {
18301                         printf("Berkeley DB version mismatch\n"
18302                                 "\theader: %s\n\tlibrary: %s\n",
18303                                 DB_VERSION_STRING, version);
18304                         return 1;
18305                 }
18306         }
18307 #endif
18308
18309 #if DB_VERSION_MAJOR > 2
18310         db_env_create( NULL, 0 );
18311 #elif DB_VERSION_MAJOR > 1
18312         db_appexit( NULL );
18313 #else
18314         (void) dbopen( NULL, 0, 0, 0, NULL);
18315 #endif
18316
18317 ; return 0; }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18320   rm -rf conftest*
18321   ol_cv_db_db_4_dot_1=yes
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -rf conftest*
18326   ol_cv_db_db_4_dot_1=no
18327 fi
18328 rm -f conftest*
18329
18330         LIBS="$ol_LIBS"
18331
18332 fi
18333
18334 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18335
18336         if test $ol_cv_db_db_4_dot_1 = yes ; then
18337                 ol_cv_lib_db=-ldb-4.1
18338         fi
18339 fi
18340
18341 if test $ol_cv_lib_db = no ; then
18342         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18343 echo "configure:18344: checking for Berkeley DB link (-ldb-4-1)" >&5
18344 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347   
18348         ol_DB_LIB=-ldb-4-1
18349         ol_LIBS=$LIBS
18350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18351
18352         cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355
18356 #ifdef HAVE_DB_185_H
18357 # include <db_185.h>
18358 #else
18359 # include <db.h>
18360 #endif
18361
18362 #ifndef DB_VERSION_MAJOR
18363 # define DB_VERSION_MAJOR 1
18364 #endif
18365
18366 #ifndef NULL
18367 #define NULL ((void*)0)
18368 #endif
18369
18370 int main() {
18371
18372 #if DB_VERSION_MAJOR > 1
18373         {
18374                 char *version;
18375                 int major, minor, patch;
18376
18377                 version = db_version( &major, &minor, &patch );
18378
18379                 if( major != DB_VERSION_MAJOR ||
18380                         minor < DB_VERSION_MINOR )
18381                 {
18382                         printf("Berkeley DB version mismatch\n"
18383                                 "\theader: %s\n\tlibrary: %s\n",
18384                                 DB_VERSION_STRING, version);
18385                         return 1;
18386                 }
18387         }
18388 #endif
18389
18390 #if DB_VERSION_MAJOR > 2
18391         db_env_create( NULL, 0 );
18392 #elif DB_VERSION_MAJOR > 1
18393         db_appexit( NULL );
18394 #else
18395         (void) dbopen( NULL, 0, 0, 0, NULL);
18396 #endif
18397
18398 ; return 0; }
18399 EOF
18400 if { (eval echo configure:18401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18401   rm -rf conftest*
18402   ol_cv_db_db_4_1=yes
18403 else
18404   echo "configure: failed program was:" >&5
18405   cat conftest.$ac_ext >&5
18406   rm -rf conftest*
18407   ol_cv_db_db_4_1=no
18408 fi
18409 rm -f conftest*
18410
18411         LIBS="$ol_LIBS"
18412
18413 fi
18414
18415 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18416
18417         if test $ol_cv_db_db_4_1 = yes ; then
18418                 ol_cv_lib_db=-ldb-4-1
18419         fi
18420 fi
18421
18422 if test $ol_cv_lib_db = no ; then
18423         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18424 echo "configure:18425: checking for Berkeley DB link (-ldb3)" >&5
18425 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18426   echo $ac_n "(cached) $ac_c" 1>&6
18427 else
18428   
18429         ol_DB_LIB=-ldb3
18430         ol_LIBS=$LIBS
18431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18432
18433         cat > conftest.$ac_ext <<EOF
18434 #line 18435 "configure"
18435 #include "confdefs.h"
18436
18437 #ifdef HAVE_DB_185_H
18438 # include <db_185.h>
18439 #else
18440 # include <db.h>
18441 #endif
18442
18443 #ifndef DB_VERSION_MAJOR
18444 # define DB_VERSION_MAJOR 1
18445 #endif
18446
18447 #ifndef NULL
18448 #define NULL ((void*)0)
18449 #endif
18450
18451 int main() {
18452
18453 #if DB_VERSION_MAJOR > 1
18454         {
18455                 char *version;
18456                 int major, minor, patch;
18457
18458                 version = db_version( &major, &minor, &patch );
18459
18460                 if( major != DB_VERSION_MAJOR ||
18461                         minor < DB_VERSION_MINOR )
18462                 {
18463                         printf("Berkeley DB version mismatch\n"
18464                                 "\theader: %s\n\tlibrary: %s\n",
18465                                 DB_VERSION_STRING, version);
18466                         return 1;
18467                 }
18468         }
18469 #endif
18470
18471 #if DB_VERSION_MAJOR > 2
18472         db_env_create( NULL, 0 );
18473 #elif DB_VERSION_MAJOR > 1
18474         db_appexit( NULL );
18475 #else
18476         (void) dbopen( NULL, 0, 0, 0, NULL);
18477 #endif
18478
18479 ; return 0; }
18480 EOF
18481 if { (eval echo configure:18482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18482   rm -rf conftest*
18483   ol_cv_db_db3=yes
18484 else
18485   echo "configure: failed program was:" >&5
18486   cat conftest.$ac_ext >&5
18487   rm -rf conftest*
18488   ol_cv_db_db3=no
18489 fi
18490 rm -f conftest*
18491
18492         LIBS="$ol_LIBS"
18493
18494 fi
18495
18496 echo "$ac_t""$ol_cv_db_db3" 1>&6
18497
18498         if test $ol_cv_db_db3 = yes ; then
18499                 ol_cv_lib_db=-ldb3
18500         fi
18501 fi
18502
18503 if test $ol_cv_lib_db = no ; then
18504         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18505 echo "configure:18506: checking for Berkeley DB link (-ldb-3)" >&5
18506 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18507   echo $ac_n "(cached) $ac_c" 1>&6
18508 else
18509   
18510         ol_DB_LIB=-ldb-3
18511         ol_LIBS=$LIBS
18512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18513
18514         cat > conftest.$ac_ext <<EOF
18515 #line 18516 "configure"
18516 #include "confdefs.h"
18517
18518 #ifdef HAVE_DB_185_H
18519 # include <db_185.h>
18520 #else
18521 # include <db.h>
18522 #endif
18523
18524 #ifndef DB_VERSION_MAJOR
18525 # define DB_VERSION_MAJOR 1
18526 #endif
18527
18528 #ifndef NULL
18529 #define NULL ((void*)0)
18530 #endif
18531
18532 int main() {
18533
18534 #if DB_VERSION_MAJOR > 1
18535         {
18536                 char *version;
18537                 int major, minor, patch;
18538
18539                 version = db_version( &major, &minor, &patch );
18540
18541                 if( major != DB_VERSION_MAJOR ||
18542                         minor < DB_VERSION_MINOR )
18543                 {
18544                         printf("Berkeley DB version mismatch\n"
18545                                 "\theader: %s\n\tlibrary: %s\n",
18546                                 DB_VERSION_STRING, version);
18547                         return 1;
18548                 }
18549         }
18550 #endif
18551
18552 #if DB_VERSION_MAJOR > 2
18553         db_env_create( NULL, 0 );
18554 #elif DB_VERSION_MAJOR > 1
18555         db_appexit( NULL );
18556 #else
18557         (void) dbopen( NULL, 0, 0, 0, NULL);
18558 #endif
18559
18560 ; return 0; }
18561 EOF
18562 if { (eval echo configure:18563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18563   rm -rf conftest*
18564   ol_cv_db_db_3=yes
18565 else
18566   echo "configure: failed program was:" >&5
18567   cat conftest.$ac_ext >&5
18568   rm -rf conftest*
18569   ol_cv_db_db_3=no
18570 fi
18571 rm -f conftest*
18572
18573         LIBS="$ol_LIBS"
18574
18575 fi
18576
18577 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18578
18579         if test $ol_cv_db_db_3 = yes ; then
18580                 ol_cv_lib_db=-ldb-3
18581         fi
18582 fi
18583
18584 if test $ol_cv_lib_db = no ; then
18585         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18586 echo "configure:18587: checking for Berkeley DB link (-ldb2)" >&5
18587 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18588   echo $ac_n "(cached) $ac_c" 1>&6
18589 else
18590   
18591         ol_DB_LIB=-ldb2
18592         ol_LIBS=$LIBS
18593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18594
18595         cat > conftest.$ac_ext <<EOF
18596 #line 18597 "configure"
18597 #include "confdefs.h"
18598
18599 #ifdef HAVE_DB_185_H
18600 # include <db_185.h>
18601 #else
18602 # include <db.h>
18603 #endif
18604
18605 #ifndef DB_VERSION_MAJOR
18606 # define DB_VERSION_MAJOR 1
18607 #endif
18608
18609 #ifndef NULL
18610 #define NULL ((void*)0)
18611 #endif
18612
18613 int main() {
18614
18615 #if DB_VERSION_MAJOR > 1
18616         {
18617                 char *version;
18618                 int major, minor, patch;
18619
18620                 version = db_version( &major, &minor, &patch );
18621
18622                 if( major != DB_VERSION_MAJOR ||
18623                         minor < DB_VERSION_MINOR )
18624                 {
18625                         printf("Berkeley DB version mismatch\n"
18626                                 "\theader: %s\n\tlibrary: %s\n",
18627                                 DB_VERSION_STRING, version);
18628                         return 1;
18629                 }
18630         }
18631 #endif
18632
18633 #if DB_VERSION_MAJOR > 2
18634         db_env_create( NULL, 0 );
18635 #elif DB_VERSION_MAJOR > 1
18636         db_appexit( NULL );
18637 #else
18638         (void) dbopen( NULL, 0, 0, 0, NULL);
18639 #endif
18640
18641 ; return 0; }
18642 EOF
18643 if { (eval echo configure:18644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18644   rm -rf conftest*
18645   ol_cv_db_db2=yes
18646 else
18647   echo "configure: failed program was:" >&5
18648   cat conftest.$ac_ext >&5
18649   rm -rf conftest*
18650   ol_cv_db_db2=no
18651 fi
18652 rm -f conftest*
18653
18654         LIBS="$ol_LIBS"
18655
18656 fi
18657
18658 echo "$ac_t""$ol_cv_db_db2" 1>&6
18659
18660         if test $ol_cv_db_db2 = yes ; then
18661                 ol_cv_lib_db=-ldb2
18662         fi
18663 fi
18664
18665 if test $ol_cv_lib_db = no ; then
18666         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18667 echo "configure:18668: checking for Berkeley DB link (-ldb-2)" >&5
18668 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18669   echo $ac_n "(cached) $ac_c" 1>&6
18670 else
18671   
18672         ol_DB_LIB=-ldb-2
18673         ol_LIBS=$LIBS
18674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18675
18676         cat > conftest.$ac_ext <<EOF
18677 #line 18678 "configure"
18678 #include "confdefs.h"
18679
18680 #ifdef HAVE_DB_185_H
18681 # include <db_185.h>
18682 #else
18683 # include <db.h>
18684 #endif
18685
18686 #ifndef DB_VERSION_MAJOR
18687 # define DB_VERSION_MAJOR 1
18688 #endif
18689
18690 #ifndef NULL
18691 #define NULL ((void*)0)
18692 #endif
18693
18694 int main() {
18695
18696 #if DB_VERSION_MAJOR > 1
18697         {
18698                 char *version;
18699                 int major, minor, patch;
18700
18701                 version = db_version( &major, &minor, &patch );
18702
18703                 if( major != DB_VERSION_MAJOR ||
18704                         minor < DB_VERSION_MINOR )
18705                 {
18706                         printf("Berkeley DB version mismatch\n"
18707                                 "\theader: %s\n\tlibrary: %s\n",
18708                                 DB_VERSION_STRING, version);
18709                         return 1;
18710                 }
18711         }
18712 #endif
18713
18714 #if DB_VERSION_MAJOR > 2
18715         db_env_create( NULL, 0 );
18716 #elif DB_VERSION_MAJOR > 1
18717         db_appexit( NULL );
18718 #else
18719         (void) dbopen( NULL, 0, 0, 0, NULL);
18720 #endif
18721
18722 ; return 0; }
18723 EOF
18724 if { (eval echo configure:18725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18725   rm -rf conftest*
18726   ol_cv_db_db_2=yes
18727 else
18728   echo "configure: failed program was:" >&5
18729   cat conftest.$ac_ext >&5
18730   rm -rf conftest*
18731   ol_cv_db_db_2=no
18732 fi
18733 rm -f conftest*
18734
18735         LIBS="$ol_LIBS"
18736
18737 fi
18738
18739 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18740
18741         if test $ol_cv_db_db_2 = yes ; then
18742                 ol_cv_lib_db=-ldb-2
18743         fi
18744 fi
18745
18746 if test $ol_cv_lib_db = no ; then
18747         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18748 echo "configure:18749: checking for Berkeley DB link (-ldb1)" >&5
18749 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18750   echo $ac_n "(cached) $ac_c" 1>&6
18751 else
18752   
18753         ol_DB_LIB=-ldb1
18754         ol_LIBS=$LIBS
18755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18756
18757         cat > conftest.$ac_ext <<EOF
18758 #line 18759 "configure"
18759 #include "confdefs.h"
18760
18761 #ifdef HAVE_DB_185_H
18762 # include <db_185.h>
18763 #else
18764 # include <db.h>
18765 #endif
18766
18767 #ifndef DB_VERSION_MAJOR
18768 # define DB_VERSION_MAJOR 1
18769 #endif
18770
18771 #ifndef NULL
18772 #define NULL ((void*)0)
18773 #endif
18774
18775 int main() {
18776
18777 #if DB_VERSION_MAJOR > 1
18778         {
18779                 char *version;
18780                 int major, minor, patch;
18781
18782                 version = db_version( &major, &minor, &patch );
18783
18784                 if( major != DB_VERSION_MAJOR ||
18785                         minor < DB_VERSION_MINOR )
18786                 {
18787                         printf("Berkeley DB version mismatch\n"
18788                                 "\theader: %s\n\tlibrary: %s\n",
18789                                 DB_VERSION_STRING, version);
18790                         return 1;
18791                 }
18792         }
18793 #endif
18794
18795 #if DB_VERSION_MAJOR > 2
18796         db_env_create( NULL, 0 );
18797 #elif DB_VERSION_MAJOR > 1
18798         db_appexit( NULL );
18799 #else
18800         (void) dbopen( NULL, 0, 0, 0, NULL);
18801 #endif
18802
18803 ; return 0; }
18804 EOF
18805 if { (eval echo configure:18806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18806   rm -rf conftest*
18807   ol_cv_db_db1=yes
18808 else
18809   echo "configure: failed program was:" >&5
18810   cat conftest.$ac_ext >&5
18811   rm -rf conftest*
18812   ol_cv_db_db1=no
18813 fi
18814 rm -f conftest*
18815
18816         LIBS="$ol_LIBS"
18817
18818 fi
18819
18820 echo "$ac_t""$ol_cv_db_db1" 1>&6
18821
18822         if test $ol_cv_db_db1 = yes ; then
18823                 ol_cv_lib_db=-ldb1
18824         fi
18825 fi
18826
18827 if test $ol_cv_lib_db = no ; then
18828         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18829 echo "configure:18830: checking for Berkeley DB link (-ldb-1)" >&5
18830 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18831   echo $ac_n "(cached) $ac_c" 1>&6
18832 else
18833   
18834         ol_DB_LIB=-ldb-1
18835         ol_LIBS=$LIBS
18836         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18837
18838         cat > conftest.$ac_ext <<EOF
18839 #line 18840 "configure"
18840 #include "confdefs.h"
18841
18842 #ifdef HAVE_DB_185_H
18843 # include <db_185.h>
18844 #else
18845 # include <db.h>
18846 #endif
18847
18848 #ifndef DB_VERSION_MAJOR
18849 # define DB_VERSION_MAJOR 1
18850 #endif
18851
18852 #ifndef NULL
18853 #define NULL ((void*)0)
18854 #endif
18855
18856 int main() {
18857
18858 #if DB_VERSION_MAJOR > 1
18859         {
18860                 char *version;
18861                 int major, minor, patch;
18862
18863                 version = db_version( &major, &minor, &patch );
18864
18865                 if( major != DB_VERSION_MAJOR ||
18866                         minor < DB_VERSION_MINOR )
18867                 {
18868                         printf("Berkeley DB version mismatch\n"
18869                                 "\theader: %s\n\tlibrary: %s\n",
18870                                 DB_VERSION_STRING, version);
18871                         return 1;
18872                 }
18873         }
18874 #endif
18875
18876 #if DB_VERSION_MAJOR > 2
18877         db_env_create( NULL, 0 );
18878 #elif DB_VERSION_MAJOR > 1
18879         db_appexit( NULL );
18880 #else
18881         (void) dbopen( NULL, 0, 0, 0, NULL);
18882 #endif
18883
18884 ; return 0; }
18885 EOF
18886 if { (eval echo configure:18887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18887   rm -rf conftest*
18888   ol_cv_db_db_1=yes
18889 else
18890   echo "configure: failed program was:" >&5
18891   cat conftest.$ac_ext >&5
18892   rm -rf conftest*
18893   ol_cv_db_db_1=no
18894 fi
18895 rm -f conftest*
18896
18897         LIBS="$ol_LIBS"
18898
18899 fi
18900
18901 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18902
18903         if test $ol_cv_db_db_1 = yes ; then
18904                 ol_cv_lib_db=-ldb-1
18905         fi
18906 fi
18907
18908
18909                 if test "$ol_cv_lib_db" != no ; then
18910                         ol_cv_berkeley_db=yes
18911                 fi
18912         fi
18913 fi
18914
18915         else
18916                 ol_cv_berkeley_db=no
18917 for ac_hdr in db.h
18918 do
18919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18921 echo "configure:18922: checking for $ac_hdr" >&5
18922 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18923   echo $ac_n "(cached) $ac_c" 1>&6
18924 else
18925   cat > conftest.$ac_ext <<EOF
18926 #line 18927 "configure"
18927 #include "confdefs.h"
18928 #include <$ac_hdr>
18929 EOF
18930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18931 { (eval echo configure:18932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18933 if test -z "$ac_err"; then
18934   rm -rf conftest*
18935   eval "ac_cv_header_$ac_safe=yes"
18936 else
18937   echo "$ac_err" >&5
18938   echo "configure: failed program was:" >&5
18939   cat conftest.$ac_ext >&5
18940   rm -rf conftest*
18941   eval "ac_cv_header_$ac_safe=no"
18942 fi
18943 rm -f conftest*
18944 fi
18945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18946   echo "$ac_t""yes" 1>&6
18947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18948   cat >> confdefs.h <<EOF
18949 #define $ac_tr_hdr 1
18950 EOF
18951  
18952 else
18953   echo "$ac_t""no" 1>&6
18954 fi
18955 done
18956
18957 if test $ac_cv_header_db_h = yes; then
18958         ol_cv_lib_db=no
18959 if test $ol_cv_lib_db = no ; then
18960         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18961 echo "configure:18962: checking for Berkeley DB link (default)" >&5
18962 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18963   echo $ac_n "(cached) $ac_c" 1>&6
18964 else
18965   
18966         ol_DB_LIB=
18967         ol_LIBS=$LIBS
18968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18969
18970         cat > conftest.$ac_ext <<EOF
18971 #line 18972 "configure"
18972 #include "confdefs.h"
18973
18974 #ifdef HAVE_DB_185_H
18975 # include <db_185.h>
18976 #else
18977 # include <db.h>
18978 #endif
18979
18980 #ifndef DB_VERSION_MAJOR
18981 # define DB_VERSION_MAJOR 1
18982 #endif
18983
18984 #ifndef NULL
18985 #define NULL ((void*)0)
18986 #endif
18987
18988 int main() {
18989
18990 #if DB_VERSION_MAJOR > 1
18991         {
18992                 char *version;
18993                 int major, minor, patch;
18994
18995                 version = db_version( &major, &minor, &patch );
18996
18997                 if( major != DB_VERSION_MAJOR ||
18998                         minor < DB_VERSION_MINOR )
18999                 {
19000                         printf("Berkeley DB version mismatch\n"
19001                                 "\theader: %s\n\tlibrary: %s\n",
19002                                 DB_VERSION_STRING, version);
19003                         return 1;
19004                 }
19005         }
19006 #endif
19007
19008 #if DB_VERSION_MAJOR > 2
19009         db_env_create( NULL, 0 );
19010 #elif DB_VERSION_MAJOR > 1
19011         db_appexit( NULL );
19012 #else
19013         (void) dbopen( NULL, 0, 0, 0, NULL);
19014 #endif
19015
19016 ; return 0; }
19017 EOF
19018 if { (eval echo configure:19019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19019   rm -rf conftest*
19020   ol_cv_db_none=yes
19021 else
19022   echo "configure: failed program was:" >&5
19023   cat conftest.$ac_ext >&5
19024   rm -rf conftest*
19025   ol_cv_db_none=no
19026 fi
19027 rm -f conftest*
19028
19029         LIBS="$ol_LIBS"
19030
19031 fi
19032
19033 echo "$ac_t""$ol_cv_db_none" 1>&6
19034
19035         if test $ol_cv_db_none = yes ; then
19036                 ol_cv_lib_db=yes
19037         fi
19038 fi
19039
19040 if test $ol_cv_lib_db = no ; then
19041         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19042 echo "configure:19043: checking for Berkeley DB link (-ldb43)" >&5
19043 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19044   echo $ac_n "(cached) $ac_c" 1>&6
19045 else
19046   
19047         ol_DB_LIB=-ldb43
19048         ol_LIBS=$LIBS
19049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19050
19051         cat > conftest.$ac_ext <<EOF
19052 #line 19053 "configure"
19053 #include "confdefs.h"
19054
19055 #ifdef HAVE_DB_185_H
19056 # include <db_185.h>
19057 #else
19058 # include <db.h>
19059 #endif
19060
19061 #ifndef DB_VERSION_MAJOR
19062 # define DB_VERSION_MAJOR 1
19063 #endif
19064
19065 #ifndef NULL
19066 #define NULL ((void*)0)
19067 #endif
19068
19069 int main() {
19070
19071 #if DB_VERSION_MAJOR > 1
19072         {
19073                 char *version;
19074                 int major, minor, patch;
19075
19076                 version = db_version( &major, &minor, &patch );
19077
19078                 if( major != DB_VERSION_MAJOR ||
19079                         minor < DB_VERSION_MINOR )
19080                 {
19081                         printf("Berkeley DB version mismatch\n"
19082                                 "\theader: %s\n\tlibrary: %s\n",
19083                                 DB_VERSION_STRING, version);
19084                         return 1;
19085                 }
19086         }
19087 #endif
19088
19089 #if DB_VERSION_MAJOR > 2
19090         db_env_create( NULL, 0 );
19091 #elif DB_VERSION_MAJOR > 1
19092         db_appexit( NULL );
19093 #else
19094         (void) dbopen( NULL, 0, 0, 0, NULL);
19095 #endif
19096
19097 ; return 0; }
19098 EOF
19099 if { (eval echo configure:19100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19100   rm -rf conftest*
19101   ol_cv_db_db43=yes
19102 else
19103   echo "configure: failed program was:" >&5
19104   cat conftest.$ac_ext >&5
19105   rm -rf conftest*
19106   ol_cv_db_db43=no
19107 fi
19108 rm -f conftest*
19109
19110         LIBS="$ol_LIBS"
19111
19112 fi
19113
19114 echo "$ac_t""$ol_cv_db_db43" 1>&6
19115
19116         if test $ol_cv_db_db43 = yes ; then
19117                 ol_cv_lib_db=-ldb43
19118         fi
19119 fi
19120
19121 if test $ol_cv_lib_db = no ; then
19122         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19123 echo "configure:19124: checking for Berkeley DB link (-ldb-43)" >&5
19124 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19125   echo $ac_n "(cached) $ac_c" 1>&6
19126 else
19127   
19128         ol_DB_LIB=-ldb-43
19129         ol_LIBS=$LIBS
19130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19131
19132         cat > conftest.$ac_ext <<EOF
19133 #line 19134 "configure"
19134 #include "confdefs.h"
19135
19136 #ifdef HAVE_DB_185_H
19137 # include <db_185.h>
19138 #else
19139 # include <db.h>
19140 #endif
19141
19142 #ifndef DB_VERSION_MAJOR
19143 # define DB_VERSION_MAJOR 1
19144 #endif
19145
19146 #ifndef NULL
19147 #define NULL ((void*)0)
19148 #endif
19149
19150 int main() {
19151
19152 #if DB_VERSION_MAJOR > 1
19153         {
19154                 char *version;
19155                 int major, minor, patch;
19156
19157                 version = db_version( &major, &minor, &patch );
19158
19159                 if( major != DB_VERSION_MAJOR ||
19160                         minor < DB_VERSION_MINOR )
19161                 {
19162                         printf("Berkeley DB version mismatch\n"
19163                                 "\theader: %s\n\tlibrary: %s\n",
19164                                 DB_VERSION_STRING, version);
19165                         return 1;
19166                 }
19167         }
19168 #endif
19169
19170 #if DB_VERSION_MAJOR > 2
19171         db_env_create( NULL, 0 );
19172 #elif DB_VERSION_MAJOR > 1
19173         db_appexit( NULL );
19174 #else
19175         (void) dbopen( NULL, 0, 0, 0, NULL);
19176 #endif
19177
19178 ; return 0; }
19179 EOF
19180 if { (eval echo configure:19181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19181   rm -rf conftest*
19182   ol_cv_db_db_43=yes
19183 else
19184   echo "configure: failed program was:" >&5
19185   cat conftest.$ac_ext >&5
19186   rm -rf conftest*
19187   ol_cv_db_db_43=no
19188 fi
19189 rm -f conftest*
19190
19191         LIBS="$ol_LIBS"
19192
19193 fi
19194
19195 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19196
19197         if test $ol_cv_db_db_43 = yes ; then
19198                 ol_cv_lib_db=-ldb-43
19199         fi
19200 fi
19201
19202 if test $ol_cv_lib_db = no ; then
19203         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19204 echo "configure:19205: checking for Berkeley DB link (-ldb-4.3)" >&5
19205 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19206   echo $ac_n "(cached) $ac_c" 1>&6
19207 else
19208   
19209         ol_DB_LIB=-ldb-4.3
19210         ol_LIBS=$LIBS
19211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19212
19213         cat > conftest.$ac_ext <<EOF
19214 #line 19215 "configure"
19215 #include "confdefs.h"
19216
19217 #ifdef HAVE_DB_185_H
19218 # include <db_185.h>
19219 #else
19220 # include <db.h>
19221 #endif
19222
19223 #ifndef DB_VERSION_MAJOR
19224 # define DB_VERSION_MAJOR 1
19225 #endif
19226
19227 #ifndef NULL
19228 #define NULL ((void*)0)
19229 #endif
19230
19231 int main() {
19232
19233 #if DB_VERSION_MAJOR > 1
19234         {
19235                 char *version;
19236                 int major, minor, patch;
19237
19238                 version = db_version( &major, &minor, &patch );
19239
19240                 if( major != DB_VERSION_MAJOR ||
19241                         minor < DB_VERSION_MINOR )
19242                 {
19243                         printf("Berkeley DB version mismatch\n"
19244                                 "\theader: %s\n\tlibrary: %s\n",
19245                                 DB_VERSION_STRING, version);
19246                         return 1;
19247                 }
19248         }
19249 #endif
19250
19251 #if DB_VERSION_MAJOR > 2
19252         db_env_create( NULL, 0 );
19253 #elif DB_VERSION_MAJOR > 1
19254         db_appexit( NULL );
19255 #else
19256         (void) dbopen( NULL, 0, 0, 0, NULL);
19257 #endif
19258
19259 ; return 0; }
19260 EOF
19261 if { (eval echo configure:19262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19262   rm -rf conftest*
19263   ol_cv_db_db_4_dot_3=yes
19264 else
19265   echo "configure: failed program was:" >&5
19266   cat conftest.$ac_ext >&5
19267   rm -rf conftest*
19268   ol_cv_db_db_4_dot_3=no
19269 fi
19270 rm -f conftest*
19271
19272         LIBS="$ol_LIBS"
19273
19274 fi
19275
19276 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19277
19278         if test $ol_cv_db_db_4_dot_3 = yes ; then
19279                 ol_cv_lib_db=-ldb-4.3
19280         fi
19281 fi
19282
19283 if test $ol_cv_lib_db = no ; then
19284         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19285 echo "configure:19286: checking for Berkeley DB link (-ldb-4-3)" >&5
19286 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19287   echo $ac_n "(cached) $ac_c" 1>&6
19288 else
19289   
19290         ol_DB_LIB=-ldb-4-3
19291         ol_LIBS=$LIBS
19292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19293
19294         cat > conftest.$ac_ext <<EOF
19295 #line 19296 "configure"
19296 #include "confdefs.h"
19297
19298 #ifdef HAVE_DB_185_H
19299 # include <db_185.h>
19300 #else
19301 # include <db.h>
19302 #endif
19303
19304 #ifndef DB_VERSION_MAJOR
19305 # define DB_VERSION_MAJOR 1
19306 #endif
19307
19308 #ifndef NULL
19309 #define NULL ((void*)0)
19310 #endif
19311
19312 int main() {
19313
19314 #if DB_VERSION_MAJOR > 1
19315         {
19316                 char *version;
19317                 int major, minor, patch;
19318
19319                 version = db_version( &major, &minor, &patch );
19320
19321                 if( major != DB_VERSION_MAJOR ||
19322                         minor < DB_VERSION_MINOR )
19323                 {
19324                         printf("Berkeley DB version mismatch\n"
19325                                 "\theader: %s\n\tlibrary: %s\n",
19326                                 DB_VERSION_STRING, version);
19327                         return 1;
19328                 }
19329         }
19330 #endif
19331
19332 #if DB_VERSION_MAJOR > 2
19333         db_env_create( NULL, 0 );
19334 #elif DB_VERSION_MAJOR > 1
19335         db_appexit( NULL );
19336 #else
19337         (void) dbopen( NULL, 0, 0, 0, NULL);
19338 #endif
19339
19340 ; return 0; }
19341 EOF
19342 if { (eval echo configure:19343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19343   rm -rf conftest*
19344   ol_cv_db_db_4_3=yes
19345 else
19346   echo "configure: failed program was:" >&5
19347   cat conftest.$ac_ext >&5
19348   rm -rf conftest*
19349   ol_cv_db_db_4_3=no
19350 fi
19351 rm -f conftest*
19352
19353         LIBS="$ol_LIBS"
19354
19355 fi
19356
19357 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19358
19359         if test $ol_cv_db_db_4_3 = yes ; then
19360                 ol_cv_lib_db=-ldb-4-3
19361         fi
19362 fi
19363
19364 if test $ol_cv_lib_db = no ; then
19365         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19366 echo "configure:19367: checking for Berkeley DB link (-ldb42)" >&5
19367 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19368   echo $ac_n "(cached) $ac_c" 1>&6
19369 else
19370   
19371         ol_DB_LIB=-ldb42
19372         ol_LIBS=$LIBS
19373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19374
19375         cat > conftest.$ac_ext <<EOF
19376 #line 19377 "configure"
19377 #include "confdefs.h"
19378
19379 #ifdef HAVE_DB_185_H
19380 # include <db_185.h>
19381 #else
19382 # include <db.h>
19383 #endif
19384
19385 #ifndef DB_VERSION_MAJOR
19386 # define DB_VERSION_MAJOR 1
19387 #endif
19388
19389 #ifndef NULL
19390 #define NULL ((void*)0)
19391 #endif
19392
19393 int main() {
19394
19395 #if DB_VERSION_MAJOR > 1
19396         {
19397                 char *version;
19398                 int major, minor, patch;
19399
19400                 version = db_version( &major, &minor, &patch );
19401
19402                 if( major != DB_VERSION_MAJOR ||
19403                         minor < DB_VERSION_MINOR )
19404                 {
19405                         printf("Berkeley DB version mismatch\n"
19406                                 "\theader: %s\n\tlibrary: %s\n",
19407                                 DB_VERSION_STRING, version);
19408                         return 1;
19409                 }
19410         }
19411 #endif
19412
19413 #if DB_VERSION_MAJOR > 2
19414         db_env_create( NULL, 0 );
19415 #elif DB_VERSION_MAJOR > 1
19416         db_appexit( NULL );
19417 #else
19418         (void) dbopen( NULL, 0, 0, 0, NULL);
19419 #endif
19420
19421 ; return 0; }
19422 EOF
19423 if { (eval echo configure:19424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19424   rm -rf conftest*
19425   ol_cv_db_db42=yes
19426 else
19427   echo "configure: failed program was:" >&5
19428   cat conftest.$ac_ext >&5
19429   rm -rf conftest*
19430   ol_cv_db_db42=no
19431 fi
19432 rm -f conftest*
19433
19434         LIBS="$ol_LIBS"
19435
19436 fi
19437
19438 echo "$ac_t""$ol_cv_db_db42" 1>&6
19439
19440         if test $ol_cv_db_db42 = yes ; then
19441                 ol_cv_lib_db=-ldb42
19442         fi
19443 fi
19444
19445 if test $ol_cv_lib_db = no ; then
19446         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19447 echo "configure:19448: checking for Berkeley DB link (-ldb-42)" >&5
19448 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19449   echo $ac_n "(cached) $ac_c" 1>&6
19450 else
19451   
19452         ol_DB_LIB=-ldb-42
19453         ol_LIBS=$LIBS
19454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19455
19456         cat > conftest.$ac_ext <<EOF
19457 #line 19458 "configure"
19458 #include "confdefs.h"
19459
19460 #ifdef HAVE_DB_185_H
19461 # include <db_185.h>
19462 #else
19463 # include <db.h>
19464 #endif
19465
19466 #ifndef DB_VERSION_MAJOR
19467 # define DB_VERSION_MAJOR 1
19468 #endif
19469
19470 #ifndef NULL
19471 #define NULL ((void*)0)
19472 #endif
19473
19474 int main() {
19475
19476 #if DB_VERSION_MAJOR > 1
19477         {
19478                 char *version;
19479                 int major, minor, patch;
19480
19481                 version = db_version( &major, &minor, &patch );
19482
19483                 if( major != DB_VERSION_MAJOR ||
19484                         minor < DB_VERSION_MINOR )
19485                 {
19486                         printf("Berkeley DB version mismatch\n"
19487                                 "\theader: %s\n\tlibrary: %s\n",
19488                                 DB_VERSION_STRING, version);
19489                         return 1;
19490                 }
19491         }
19492 #endif
19493
19494 #if DB_VERSION_MAJOR > 2
19495         db_env_create( NULL, 0 );
19496 #elif DB_VERSION_MAJOR > 1
19497         db_appexit( NULL );
19498 #else
19499         (void) dbopen( NULL, 0, 0, 0, NULL);
19500 #endif
19501
19502 ; return 0; }
19503 EOF
19504 if { (eval echo configure:19505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19505   rm -rf conftest*
19506   ol_cv_db_db_42=yes
19507 else
19508   echo "configure: failed program was:" >&5
19509   cat conftest.$ac_ext >&5
19510   rm -rf conftest*
19511   ol_cv_db_db_42=no
19512 fi
19513 rm -f conftest*
19514
19515         LIBS="$ol_LIBS"
19516
19517 fi
19518
19519 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19520
19521         if test $ol_cv_db_db_42 = yes ; then
19522                 ol_cv_lib_db=-ldb-42
19523         fi
19524 fi
19525
19526 if test $ol_cv_lib_db = no ; then
19527         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19528 echo "configure:19529: checking for Berkeley DB link (-ldb-4.2)" >&5
19529 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19530   echo $ac_n "(cached) $ac_c" 1>&6
19531 else
19532   
19533         ol_DB_LIB=-ldb-4.2
19534         ol_LIBS=$LIBS
19535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19536
19537         cat > conftest.$ac_ext <<EOF
19538 #line 19539 "configure"
19539 #include "confdefs.h"
19540
19541 #ifdef HAVE_DB_185_H
19542 # include <db_185.h>
19543 #else
19544 # include <db.h>
19545 #endif
19546
19547 #ifndef DB_VERSION_MAJOR
19548 # define DB_VERSION_MAJOR 1
19549 #endif
19550
19551 #ifndef NULL
19552 #define NULL ((void*)0)
19553 #endif
19554
19555 int main() {
19556
19557 #if DB_VERSION_MAJOR > 1
19558         {
19559                 char *version;
19560                 int major, minor, patch;
19561
19562                 version = db_version( &major, &minor, &patch );
19563
19564                 if( major != DB_VERSION_MAJOR ||
19565                         minor < DB_VERSION_MINOR )
19566                 {
19567                         printf("Berkeley DB version mismatch\n"
19568                                 "\theader: %s\n\tlibrary: %s\n",
19569                                 DB_VERSION_STRING, version);
19570                         return 1;
19571                 }
19572         }
19573 #endif
19574
19575 #if DB_VERSION_MAJOR > 2
19576         db_env_create( NULL, 0 );
19577 #elif DB_VERSION_MAJOR > 1
19578         db_appexit( NULL );
19579 #else
19580         (void) dbopen( NULL, 0, 0, 0, NULL);
19581 #endif
19582
19583 ; return 0; }
19584 EOF
19585 if { (eval echo configure:19586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19586   rm -rf conftest*
19587   ol_cv_db_db_4_dot_2=yes
19588 else
19589   echo "configure: failed program was:" >&5
19590   cat conftest.$ac_ext >&5
19591   rm -rf conftest*
19592   ol_cv_db_db_4_dot_2=no
19593 fi
19594 rm -f conftest*
19595
19596         LIBS="$ol_LIBS"
19597
19598 fi
19599
19600 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19601
19602         if test $ol_cv_db_db_4_dot_2 = yes ; then
19603                 ol_cv_lib_db=-ldb-4.2
19604         fi
19605 fi
19606
19607 if test $ol_cv_lib_db = no ; then
19608         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19609 echo "configure:19610: checking for Berkeley DB link (-ldb-4-2)" >&5
19610 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   
19614         ol_DB_LIB=-ldb-4-2
19615         ol_LIBS=$LIBS
19616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19617
19618         cat > conftest.$ac_ext <<EOF
19619 #line 19620 "configure"
19620 #include "confdefs.h"
19621
19622 #ifdef HAVE_DB_185_H
19623 # include <db_185.h>
19624 #else
19625 # include <db.h>
19626 #endif
19627
19628 #ifndef DB_VERSION_MAJOR
19629 # define DB_VERSION_MAJOR 1
19630 #endif
19631
19632 #ifndef NULL
19633 #define NULL ((void*)0)
19634 #endif
19635
19636 int main() {
19637
19638 #if DB_VERSION_MAJOR > 1
19639         {
19640                 char *version;
19641                 int major, minor, patch;
19642
19643                 version = db_version( &major, &minor, &patch );
19644
19645                 if( major != DB_VERSION_MAJOR ||
19646                         minor < DB_VERSION_MINOR )
19647                 {
19648                         printf("Berkeley DB version mismatch\n"
19649                                 "\theader: %s\n\tlibrary: %s\n",
19650                                 DB_VERSION_STRING, version);
19651                         return 1;
19652                 }
19653         }
19654 #endif
19655
19656 #if DB_VERSION_MAJOR > 2
19657         db_env_create( NULL, 0 );
19658 #elif DB_VERSION_MAJOR > 1
19659         db_appexit( NULL );
19660 #else
19661         (void) dbopen( NULL, 0, 0, 0, NULL);
19662 #endif
19663
19664 ; return 0; }
19665 EOF
19666 if { (eval echo configure:19667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19667   rm -rf conftest*
19668   ol_cv_db_db_4_2=yes
19669 else
19670   echo "configure: failed program was:" >&5
19671   cat conftest.$ac_ext >&5
19672   rm -rf conftest*
19673   ol_cv_db_db_4_2=no
19674 fi
19675 rm -f conftest*
19676
19677         LIBS="$ol_LIBS"
19678
19679 fi
19680
19681 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19682
19683         if test $ol_cv_db_db_4_2 = yes ; then
19684                 ol_cv_lib_db=-ldb-4-2
19685         fi
19686 fi
19687
19688 if test $ol_cv_lib_db = no ; then
19689         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19690 echo "configure:19691: checking for Berkeley DB link (-ldb-4)" >&5
19691 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19692   echo $ac_n "(cached) $ac_c" 1>&6
19693 else
19694   
19695         ol_DB_LIB=-ldb-4
19696         ol_LIBS=$LIBS
19697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19698
19699         cat > conftest.$ac_ext <<EOF
19700 #line 19701 "configure"
19701 #include "confdefs.h"
19702
19703 #ifdef HAVE_DB_185_H
19704 # include <db_185.h>
19705 #else
19706 # include <db.h>
19707 #endif
19708
19709 #ifndef DB_VERSION_MAJOR
19710 # define DB_VERSION_MAJOR 1
19711 #endif
19712
19713 #ifndef NULL
19714 #define NULL ((void*)0)
19715 #endif
19716
19717 int main() {
19718
19719 #if DB_VERSION_MAJOR > 1
19720         {
19721                 char *version;
19722                 int major, minor, patch;
19723
19724                 version = db_version( &major, &minor, &patch );
19725
19726                 if( major != DB_VERSION_MAJOR ||
19727                         minor < DB_VERSION_MINOR )
19728                 {
19729                         printf("Berkeley DB version mismatch\n"
19730                                 "\theader: %s\n\tlibrary: %s\n",
19731                                 DB_VERSION_STRING, version);
19732                         return 1;
19733                 }
19734         }
19735 #endif
19736
19737 #if DB_VERSION_MAJOR > 2
19738         db_env_create( NULL, 0 );
19739 #elif DB_VERSION_MAJOR > 1
19740         db_appexit( NULL );
19741 #else
19742         (void) dbopen( NULL, 0, 0, 0, NULL);
19743 #endif
19744
19745 ; return 0; }
19746 EOF
19747 if { (eval echo configure:19748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19748   rm -rf conftest*
19749   ol_cv_db_db_4=yes
19750 else
19751   echo "configure: failed program was:" >&5
19752   cat conftest.$ac_ext >&5
19753   rm -rf conftest*
19754   ol_cv_db_db_4=no
19755 fi
19756 rm -f conftest*
19757
19758         LIBS="$ol_LIBS"
19759
19760 fi
19761
19762 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19763
19764         if test $ol_cv_db_db_4 = yes ; then
19765                 ol_cv_lib_db=-ldb-4
19766         fi
19767 fi
19768
19769 if test $ol_cv_lib_db = no ; then
19770         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19771 echo "configure:19772: checking for Berkeley DB link (-ldb4)" >&5
19772 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19773   echo $ac_n "(cached) $ac_c" 1>&6
19774 else
19775   
19776         ol_DB_LIB=-ldb4
19777         ol_LIBS=$LIBS
19778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19779
19780         cat > conftest.$ac_ext <<EOF
19781 #line 19782 "configure"
19782 #include "confdefs.h"
19783
19784 #ifdef HAVE_DB_185_H
19785 # include <db_185.h>
19786 #else
19787 # include <db.h>
19788 #endif
19789
19790 #ifndef DB_VERSION_MAJOR
19791 # define DB_VERSION_MAJOR 1
19792 #endif
19793
19794 #ifndef NULL
19795 #define NULL ((void*)0)
19796 #endif
19797
19798 int main() {
19799
19800 #if DB_VERSION_MAJOR > 1
19801         {
19802                 char *version;
19803                 int major, minor, patch;
19804
19805                 version = db_version( &major, &minor, &patch );
19806
19807                 if( major != DB_VERSION_MAJOR ||
19808                         minor < DB_VERSION_MINOR )
19809                 {
19810                         printf("Berkeley DB version mismatch\n"
19811                                 "\theader: %s\n\tlibrary: %s\n",
19812                                 DB_VERSION_STRING, version);
19813                         return 1;
19814                 }
19815         }
19816 #endif
19817
19818 #if DB_VERSION_MAJOR > 2
19819         db_env_create( NULL, 0 );
19820 #elif DB_VERSION_MAJOR > 1
19821         db_appexit( NULL );
19822 #else
19823         (void) dbopen( NULL, 0, 0, 0, NULL);
19824 #endif
19825
19826 ; return 0; }
19827 EOF
19828 if { (eval echo configure:19829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19829   rm -rf conftest*
19830   ol_cv_db_db4=yes
19831 else
19832   echo "configure: failed program was:" >&5
19833   cat conftest.$ac_ext >&5
19834   rm -rf conftest*
19835   ol_cv_db_db4=no
19836 fi
19837 rm -f conftest*
19838
19839         LIBS="$ol_LIBS"
19840
19841 fi
19842
19843 echo "$ac_t""$ol_cv_db_db4" 1>&6
19844
19845         if test $ol_cv_db_db4 = yes ; then
19846                 ol_cv_lib_db=-ldb4
19847         fi
19848 fi
19849
19850 if test $ol_cv_lib_db = no ; then
19851         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19852 echo "configure:19853: checking for Berkeley DB link (-ldb)" >&5
19853 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19854   echo $ac_n "(cached) $ac_c" 1>&6
19855 else
19856   
19857         ol_DB_LIB=-ldb
19858         ol_LIBS=$LIBS
19859         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19860
19861         cat > conftest.$ac_ext <<EOF
19862 #line 19863 "configure"
19863 #include "confdefs.h"
19864
19865 #ifdef HAVE_DB_185_H
19866 # include <db_185.h>
19867 #else
19868 # include <db.h>
19869 #endif
19870
19871 #ifndef DB_VERSION_MAJOR
19872 # define DB_VERSION_MAJOR 1
19873 #endif
19874
19875 #ifndef NULL
19876 #define NULL ((void*)0)
19877 #endif
19878
19879 int main() {
19880
19881 #if DB_VERSION_MAJOR > 1
19882         {
19883                 char *version;
19884                 int major, minor, patch;
19885
19886                 version = db_version( &major, &minor, &patch );
19887
19888                 if( major != DB_VERSION_MAJOR ||
19889                         minor < DB_VERSION_MINOR )
19890                 {
19891                         printf("Berkeley DB version mismatch\n"
19892                                 "\theader: %s\n\tlibrary: %s\n",
19893                                 DB_VERSION_STRING, version);
19894                         return 1;
19895                 }
19896         }
19897 #endif
19898
19899 #if DB_VERSION_MAJOR > 2
19900         db_env_create( NULL, 0 );
19901 #elif DB_VERSION_MAJOR > 1
19902         db_appexit( NULL );
19903 #else
19904         (void) dbopen( NULL, 0, 0, 0, NULL);
19905 #endif
19906
19907 ; return 0; }
19908 EOF
19909 if { (eval echo configure:19910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19910   rm -rf conftest*
19911   ol_cv_db_db=yes
19912 else
19913   echo "configure: failed program was:" >&5
19914   cat conftest.$ac_ext >&5
19915   rm -rf conftest*
19916   ol_cv_db_db=no
19917 fi
19918 rm -f conftest*
19919
19920         LIBS="$ol_LIBS"
19921
19922 fi
19923
19924 echo "$ac_t""$ol_cv_db_db" 1>&6
19925
19926         if test $ol_cv_db_db = yes ; then
19927                 ol_cv_lib_db=-ldb
19928         fi
19929 fi
19930
19931 if test $ol_cv_lib_db = no ; then
19932         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19933 echo "configure:19934: checking for Berkeley DB link (-ldb41)" >&5
19934 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19935   echo $ac_n "(cached) $ac_c" 1>&6
19936 else
19937   
19938         ol_DB_LIB=-ldb41
19939         ol_LIBS=$LIBS
19940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19941
19942         cat > conftest.$ac_ext <<EOF
19943 #line 19944 "configure"
19944 #include "confdefs.h"
19945
19946 #ifdef HAVE_DB_185_H
19947 # include <db_185.h>
19948 #else
19949 # include <db.h>
19950 #endif
19951
19952 #ifndef DB_VERSION_MAJOR
19953 # define DB_VERSION_MAJOR 1
19954 #endif
19955
19956 #ifndef NULL
19957 #define NULL ((void*)0)
19958 #endif
19959
19960 int main() {
19961
19962 #if DB_VERSION_MAJOR > 1
19963         {
19964                 char *version;
19965                 int major, minor, patch;
19966
19967                 version = db_version( &major, &minor, &patch );
19968
19969                 if( major != DB_VERSION_MAJOR ||
19970                         minor < DB_VERSION_MINOR )
19971                 {
19972                         printf("Berkeley DB version mismatch\n"
19973                                 "\theader: %s\n\tlibrary: %s\n",
19974                                 DB_VERSION_STRING, version);
19975                         return 1;
19976                 }
19977         }
19978 #endif
19979
19980 #if DB_VERSION_MAJOR > 2
19981         db_env_create( NULL, 0 );
19982 #elif DB_VERSION_MAJOR > 1
19983         db_appexit( NULL );
19984 #else
19985         (void) dbopen( NULL, 0, 0, 0, NULL);
19986 #endif
19987
19988 ; return 0; }
19989 EOF
19990 if { (eval echo configure:19991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19991   rm -rf conftest*
19992   ol_cv_db_db41=yes
19993 else
19994   echo "configure: failed program was:" >&5
19995   cat conftest.$ac_ext >&5
19996   rm -rf conftest*
19997   ol_cv_db_db41=no
19998 fi
19999 rm -f conftest*
20000
20001         LIBS="$ol_LIBS"
20002
20003 fi
20004
20005 echo "$ac_t""$ol_cv_db_db41" 1>&6
20006
20007         if test $ol_cv_db_db41 = yes ; then
20008                 ol_cv_lib_db=-ldb41
20009         fi
20010 fi
20011
20012 if test $ol_cv_lib_db = no ; then
20013         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
20014 echo "configure:20015: checking for Berkeley DB link (-ldb-41)" >&5
20015 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
20016   echo $ac_n "(cached) $ac_c" 1>&6
20017 else
20018   
20019         ol_DB_LIB=-ldb-41
20020         ol_LIBS=$LIBS
20021         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20022
20023         cat > conftest.$ac_ext <<EOF
20024 #line 20025 "configure"
20025 #include "confdefs.h"
20026
20027 #ifdef HAVE_DB_185_H
20028 # include <db_185.h>
20029 #else
20030 # include <db.h>
20031 #endif
20032
20033 #ifndef DB_VERSION_MAJOR
20034 # define DB_VERSION_MAJOR 1
20035 #endif
20036
20037 #ifndef NULL
20038 #define NULL ((void*)0)
20039 #endif
20040
20041 int main() {
20042
20043 #if DB_VERSION_MAJOR > 1
20044         {
20045                 char *version;
20046                 int major, minor, patch;
20047
20048                 version = db_version( &major, &minor, &patch );
20049
20050                 if( major != DB_VERSION_MAJOR ||
20051                         minor < DB_VERSION_MINOR )
20052                 {
20053                         printf("Berkeley DB version mismatch\n"
20054                                 "\theader: %s\n\tlibrary: %s\n",
20055                                 DB_VERSION_STRING, version);
20056                         return 1;
20057                 }
20058         }
20059 #endif
20060
20061 #if DB_VERSION_MAJOR > 2
20062         db_env_create( NULL, 0 );
20063 #elif DB_VERSION_MAJOR > 1
20064         db_appexit( NULL );
20065 #else
20066         (void) dbopen( NULL, 0, 0, 0, NULL);
20067 #endif
20068
20069 ; return 0; }
20070 EOF
20071 if { (eval echo configure:20072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20072   rm -rf conftest*
20073   ol_cv_db_db_41=yes
20074 else
20075   echo "configure: failed program was:" >&5
20076   cat conftest.$ac_ext >&5
20077   rm -rf conftest*
20078   ol_cv_db_db_41=no
20079 fi
20080 rm -f conftest*
20081
20082         LIBS="$ol_LIBS"
20083
20084 fi
20085
20086 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20087
20088         if test $ol_cv_db_db_41 = yes ; then
20089                 ol_cv_lib_db=-ldb-41
20090         fi
20091 fi
20092
20093 if test $ol_cv_lib_db = no ; then
20094         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20095 echo "configure:20096: checking for Berkeley DB link (-ldb-4.1)" >&5
20096 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20097   echo $ac_n "(cached) $ac_c" 1>&6
20098 else
20099   
20100         ol_DB_LIB=-ldb-4.1
20101         ol_LIBS=$LIBS
20102         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20103
20104         cat > conftest.$ac_ext <<EOF
20105 #line 20106 "configure"
20106 #include "confdefs.h"
20107
20108 #ifdef HAVE_DB_185_H
20109 # include <db_185.h>
20110 #else
20111 # include <db.h>
20112 #endif
20113
20114 #ifndef DB_VERSION_MAJOR
20115 # define DB_VERSION_MAJOR 1
20116 #endif
20117
20118 #ifndef NULL
20119 #define NULL ((void*)0)
20120 #endif
20121
20122 int main() {
20123
20124 #if DB_VERSION_MAJOR > 1
20125         {
20126                 char *version;
20127                 int major, minor, patch;
20128
20129                 version = db_version( &major, &minor, &patch );
20130
20131                 if( major != DB_VERSION_MAJOR ||
20132                         minor < DB_VERSION_MINOR )
20133                 {
20134                         printf("Berkeley DB version mismatch\n"
20135                                 "\theader: %s\n\tlibrary: %s\n",
20136                                 DB_VERSION_STRING, version);
20137                         return 1;
20138                 }
20139         }
20140 #endif
20141
20142 #if DB_VERSION_MAJOR > 2
20143         db_env_create( NULL, 0 );
20144 #elif DB_VERSION_MAJOR > 1
20145         db_appexit( NULL );
20146 #else
20147         (void) dbopen( NULL, 0, 0, 0, NULL);
20148 #endif
20149
20150 ; return 0; }
20151 EOF
20152 if { (eval echo configure:20153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20153   rm -rf conftest*
20154   ol_cv_db_db_4_dot_1=yes
20155 else
20156   echo "configure: failed program was:" >&5
20157   cat conftest.$ac_ext >&5
20158   rm -rf conftest*
20159   ol_cv_db_db_4_dot_1=no
20160 fi
20161 rm -f conftest*
20162
20163         LIBS="$ol_LIBS"
20164
20165 fi
20166
20167 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20168
20169         if test $ol_cv_db_db_4_dot_1 = yes ; then
20170                 ol_cv_lib_db=-ldb-4.1
20171         fi
20172 fi
20173
20174 if test $ol_cv_lib_db = no ; then
20175         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20176 echo "configure:20177: checking for Berkeley DB link (-ldb-4-1)" >&5
20177 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20178   echo $ac_n "(cached) $ac_c" 1>&6
20179 else
20180   
20181         ol_DB_LIB=-ldb-4-1
20182         ol_LIBS=$LIBS
20183         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20184
20185         cat > conftest.$ac_ext <<EOF
20186 #line 20187 "configure"
20187 #include "confdefs.h"
20188
20189 #ifdef HAVE_DB_185_H
20190 # include <db_185.h>
20191 #else
20192 # include <db.h>
20193 #endif
20194
20195 #ifndef DB_VERSION_MAJOR
20196 # define DB_VERSION_MAJOR 1
20197 #endif
20198
20199 #ifndef NULL
20200 #define NULL ((void*)0)
20201 #endif
20202
20203 int main() {
20204
20205 #if DB_VERSION_MAJOR > 1
20206         {
20207                 char *version;
20208                 int major, minor, patch;
20209
20210                 version = db_version( &major, &minor, &patch );
20211
20212                 if( major != DB_VERSION_MAJOR ||
20213                         minor < DB_VERSION_MINOR )
20214                 {
20215                         printf("Berkeley DB version mismatch\n"
20216                                 "\theader: %s\n\tlibrary: %s\n",
20217                                 DB_VERSION_STRING, version);
20218                         return 1;
20219                 }
20220         }
20221 #endif
20222
20223 #if DB_VERSION_MAJOR > 2
20224         db_env_create( NULL, 0 );
20225 #elif DB_VERSION_MAJOR > 1
20226         db_appexit( NULL );
20227 #else
20228         (void) dbopen( NULL, 0, 0, 0, NULL);
20229 #endif
20230
20231 ; return 0; }
20232 EOF
20233 if { (eval echo configure:20234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20234   rm -rf conftest*
20235   ol_cv_db_db_4_1=yes
20236 else
20237   echo "configure: failed program was:" >&5
20238   cat conftest.$ac_ext >&5
20239   rm -rf conftest*
20240   ol_cv_db_db_4_1=no
20241 fi
20242 rm -f conftest*
20243
20244         LIBS="$ol_LIBS"
20245
20246 fi
20247
20248 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20249
20250         if test $ol_cv_db_db_4_1 = yes ; then
20251                 ol_cv_lib_db=-ldb-4-1
20252         fi
20253 fi
20254
20255 if test $ol_cv_lib_db = no ; then
20256         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20257 echo "configure:20258: checking for Berkeley DB link (-ldb3)" >&5
20258 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20259   echo $ac_n "(cached) $ac_c" 1>&6
20260 else
20261   
20262         ol_DB_LIB=-ldb3
20263         ol_LIBS=$LIBS
20264         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20265
20266         cat > conftest.$ac_ext <<EOF
20267 #line 20268 "configure"
20268 #include "confdefs.h"
20269
20270 #ifdef HAVE_DB_185_H
20271 # include <db_185.h>
20272 #else
20273 # include <db.h>
20274 #endif
20275
20276 #ifndef DB_VERSION_MAJOR
20277 # define DB_VERSION_MAJOR 1
20278 #endif
20279
20280 #ifndef NULL
20281 #define NULL ((void*)0)
20282 #endif
20283
20284 int main() {
20285
20286 #if DB_VERSION_MAJOR > 1
20287         {
20288                 char *version;
20289                 int major, minor, patch;
20290
20291                 version = db_version( &major, &minor, &patch );
20292
20293                 if( major != DB_VERSION_MAJOR ||
20294                         minor < DB_VERSION_MINOR )
20295                 {
20296                         printf("Berkeley DB version mismatch\n"
20297                                 "\theader: %s\n\tlibrary: %s\n",
20298                                 DB_VERSION_STRING, version);
20299                         return 1;
20300                 }
20301         }
20302 #endif
20303
20304 #if DB_VERSION_MAJOR > 2
20305         db_env_create( NULL, 0 );
20306 #elif DB_VERSION_MAJOR > 1
20307         db_appexit( NULL );
20308 #else
20309         (void) dbopen( NULL, 0, 0, 0, NULL);
20310 #endif
20311
20312 ; return 0; }
20313 EOF
20314 if { (eval echo configure:20315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20315   rm -rf conftest*
20316   ol_cv_db_db3=yes
20317 else
20318   echo "configure: failed program was:" >&5
20319   cat conftest.$ac_ext >&5
20320   rm -rf conftest*
20321   ol_cv_db_db3=no
20322 fi
20323 rm -f conftest*
20324
20325         LIBS="$ol_LIBS"
20326
20327 fi
20328
20329 echo "$ac_t""$ol_cv_db_db3" 1>&6
20330
20331         if test $ol_cv_db_db3 = yes ; then
20332                 ol_cv_lib_db=-ldb3
20333         fi
20334 fi
20335
20336 if test $ol_cv_lib_db = no ; then
20337         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20338 echo "configure:20339: checking for Berkeley DB link (-ldb-3)" >&5
20339 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20340   echo $ac_n "(cached) $ac_c" 1>&6
20341 else
20342   
20343         ol_DB_LIB=-ldb-3
20344         ol_LIBS=$LIBS
20345         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20346
20347         cat > conftest.$ac_ext <<EOF
20348 #line 20349 "configure"
20349 #include "confdefs.h"
20350
20351 #ifdef HAVE_DB_185_H
20352 # include <db_185.h>
20353 #else
20354 # include <db.h>
20355 #endif
20356
20357 #ifndef DB_VERSION_MAJOR
20358 # define DB_VERSION_MAJOR 1
20359 #endif
20360
20361 #ifndef NULL
20362 #define NULL ((void*)0)
20363 #endif
20364
20365 int main() {
20366
20367 #if DB_VERSION_MAJOR > 1
20368         {
20369                 char *version;
20370                 int major, minor, patch;
20371
20372                 version = db_version( &major, &minor, &patch );
20373
20374                 if( major != DB_VERSION_MAJOR ||
20375                         minor < DB_VERSION_MINOR )
20376                 {
20377                         printf("Berkeley DB version mismatch\n"
20378                                 "\theader: %s\n\tlibrary: %s\n",
20379                                 DB_VERSION_STRING, version);
20380                         return 1;
20381                 }
20382         }
20383 #endif
20384
20385 #if DB_VERSION_MAJOR > 2
20386         db_env_create( NULL, 0 );
20387 #elif DB_VERSION_MAJOR > 1
20388         db_appexit( NULL );
20389 #else
20390         (void) dbopen( NULL, 0, 0, 0, NULL);
20391 #endif
20392
20393 ; return 0; }
20394 EOF
20395 if { (eval echo configure:20396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20396   rm -rf conftest*
20397   ol_cv_db_db_3=yes
20398 else
20399   echo "configure: failed program was:" >&5
20400   cat conftest.$ac_ext >&5
20401   rm -rf conftest*
20402   ol_cv_db_db_3=no
20403 fi
20404 rm -f conftest*
20405
20406         LIBS="$ol_LIBS"
20407
20408 fi
20409
20410 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20411
20412         if test $ol_cv_db_db_3 = yes ; then
20413                 ol_cv_lib_db=-ldb-3
20414         fi
20415 fi
20416
20417 if test $ol_cv_lib_db = no ; then
20418         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20419 echo "configure:20420: checking for Berkeley DB link (-ldb2)" >&5
20420 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20421   echo $ac_n "(cached) $ac_c" 1>&6
20422 else
20423   
20424         ol_DB_LIB=-ldb2
20425         ol_LIBS=$LIBS
20426         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20427
20428         cat > conftest.$ac_ext <<EOF
20429 #line 20430 "configure"
20430 #include "confdefs.h"
20431
20432 #ifdef HAVE_DB_185_H
20433 # include <db_185.h>
20434 #else
20435 # include <db.h>
20436 #endif
20437
20438 #ifndef DB_VERSION_MAJOR
20439 # define DB_VERSION_MAJOR 1
20440 #endif
20441
20442 #ifndef NULL
20443 #define NULL ((void*)0)
20444 #endif
20445
20446 int main() {
20447
20448 #if DB_VERSION_MAJOR > 1
20449         {
20450                 char *version;
20451                 int major, minor, patch;
20452
20453                 version = db_version( &major, &minor, &patch );
20454
20455                 if( major != DB_VERSION_MAJOR ||
20456                         minor < DB_VERSION_MINOR )
20457                 {
20458                         printf("Berkeley DB version mismatch\n"
20459                                 "\theader: %s\n\tlibrary: %s\n",
20460                                 DB_VERSION_STRING, version);
20461                         return 1;
20462                 }
20463         }
20464 #endif
20465
20466 #if DB_VERSION_MAJOR > 2
20467         db_env_create( NULL, 0 );
20468 #elif DB_VERSION_MAJOR > 1
20469         db_appexit( NULL );
20470 #else
20471         (void) dbopen( NULL, 0, 0, 0, NULL);
20472 #endif
20473
20474 ; return 0; }
20475 EOF
20476 if { (eval echo configure:20477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20477   rm -rf conftest*
20478   ol_cv_db_db2=yes
20479 else
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   ol_cv_db_db2=no
20484 fi
20485 rm -f conftest*
20486
20487         LIBS="$ol_LIBS"
20488
20489 fi
20490
20491 echo "$ac_t""$ol_cv_db_db2" 1>&6
20492
20493         if test $ol_cv_db_db2 = yes ; then
20494                 ol_cv_lib_db=-ldb2
20495         fi
20496 fi
20497
20498 if test $ol_cv_lib_db = no ; then
20499         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20500 echo "configure:20501: checking for Berkeley DB link (-ldb-2)" >&5
20501 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20502   echo $ac_n "(cached) $ac_c" 1>&6
20503 else
20504   
20505         ol_DB_LIB=-ldb-2
20506         ol_LIBS=$LIBS
20507         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20508
20509         cat > conftest.$ac_ext <<EOF
20510 #line 20511 "configure"
20511 #include "confdefs.h"
20512
20513 #ifdef HAVE_DB_185_H
20514 # include <db_185.h>
20515 #else
20516 # include <db.h>
20517 #endif
20518
20519 #ifndef DB_VERSION_MAJOR
20520 # define DB_VERSION_MAJOR 1
20521 #endif
20522
20523 #ifndef NULL
20524 #define NULL ((void*)0)
20525 #endif
20526
20527 int main() {
20528
20529 #if DB_VERSION_MAJOR > 1
20530         {
20531                 char *version;
20532                 int major, minor, patch;
20533
20534                 version = db_version( &major, &minor, &patch );
20535
20536                 if( major != DB_VERSION_MAJOR ||
20537                         minor < DB_VERSION_MINOR )
20538                 {
20539                         printf("Berkeley DB version mismatch\n"
20540                                 "\theader: %s\n\tlibrary: %s\n",
20541                                 DB_VERSION_STRING, version);
20542                         return 1;
20543                 }
20544         }
20545 #endif
20546
20547 #if DB_VERSION_MAJOR > 2
20548         db_env_create( NULL, 0 );
20549 #elif DB_VERSION_MAJOR > 1
20550         db_appexit( NULL );
20551 #else
20552         (void) dbopen( NULL, 0, 0, 0, NULL);
20553 #endif
20554
20555 ; return 0; }
20556 EOF
20557 if { (eval echo configure:20558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20558   rm -rf conftest*
20559   ol_cv_db_db_2=yes
20560 else
20561   echo "configure: failed program was:" >&5
20562   cat conftest.$ac_ext >&5
20563   rm -rf conftest*
20564   ol_cv_db_db_2=no
20565 fi
20566 rm -f conftest*
20567
20568         LIBS="$ol_LIBS"
20569
20570 fi
20571
20572 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20573
20574         if test $ol_cv_db_db_2 = yes ; then
20575                 ol_cv_lib_db=-ldb-2
20576         fi
20577 fi
20578
20579 if test $ol_cv_lib_db = no ; then
20580         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20581 echo "configure:20582: checking for Berkeley DB link (-ldb1)" >&5
20582 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20583   echo $ac_n "(cached) $ac_c" 1>&6
20584 else
20585   
20586         ol_DB_LIB=-ldb1
20587         ol_LIBS=$LIBS
20588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20589
20590         cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593
20594 #ifdef HAVE_DB_185_H
20595 # include <db_185.h>
20596 #else
20597 # include <db.h>
20598 #endif
20599
20600 #ifndef DB_VERSION_MAJOR
20601 # define DB_VERSION_MAJOR 1
20602 #endif
20603
20604 #ifndef NULL
20605 #define NULL ((void*)0)
20606 #endif
20607
20608 int main() {
20609
20610 #if DB_VERSION_MAJOR > 1
20611         {
20612                 char *version;
20613                 int major, minor, patch;
20614
20615                 version = db_version( &major, &minor, &patch );
20616
20617                 if( major != DB_VERSION_MAJOR ||
20618                         minor < DB_VERSION_MINOR )
20619                 {
20620                         printf("Berkeley DB version mismatch\n"
20621                                 "\theader: %s\n\tlibrary: %s\n",
20622                                 DB_VERSION_STRING, version);
20623                         return 1;
20624                 }
20625         }
20626 #endif
20627
20628 #if DB_VERSION_MAJOR > 2
20629         db_env_create( NULL, 0 );
20630 #elif DB_VERSION_MAJOR > 1
20631         db_appexit( NULL );
20632 #else
20633         (void) dbopen( NULL, 0, 0, 0, NULL);
20634 #endif
20635
20636 ; return 0; }
20637 EOF
20638 if { (eval echo configure:20639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20639   rm -rf conftest*
20640   ol_cv_db_db1=yes
20641 else
20642   echo "configure: failed program was:" >&5
20643   cat conftest.$ac_ext >&5
20644   rm -rf conftest*
20645   ol_cv_db_db1=no
20646 fi
20647 rm -f conftest*
20648
20649         LIBS="$ol_LIBS"
20650
20651 fi
20652
20653 echo "$ac_t""$ol_cv_db_db1" 1>&6
20654
20655         if test $ol_cv_db_db1 = yes ; then
20656                 ol_cv_lib_db=-ldb1
20657         fi
20658 fi
20659
20660 if test $ol_cv_lib_db = no ; then
20661         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20662 echo "configure:20663: checking for Berkeley DB link (-ldb-1)" >&5
20663 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20664   echo $ac_n "(cached) $ac_c" 1>&6
20665 else
20666   
20667         ol_DB_LIB=-ldb-1
20668         ol_LIBS=$LIBS
20669         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20670
20671         cat > conftest.$ac_ext <<EOF
20672 #line 20673 "configure"
20673 #include "confdefs.h"
20674
20675 #ifdef HAVE_DB_185_H
20676 # include <db_185.h>
20677 #else
20678 # include <db.h>
20679 #endif
20680
20681 #ifndef DB_VERSION_MAJOR
20682 # define DB_VERSION_MAJOR 1
20683 #endif
20684
20685 #ifndef NULL
20686 #define NULL ((void*)0)
20687 #endif
20688
20689 int main() {
20690
20691 #if DB_VERSION_MAJOR > 1
20692         {
20693                 char *version;
20694                 int major, minor, patch;
20695
20696                 version = db_version( &major, &minor, &patch );
20697
20698                 if( major != DB_VERSION_MAJOR ||
20699                         minor < DB_VERSION_MINOR )
20700                 {
20701                         printf("Berkeley DB version mismatch\n"
20702                                 "\theader: %s\n\tlibrary: %s\n",
20703                                 DB_VERSION_STRING, version);
20704                         return 1;
20705                 }
20706         }
20707 #endif
20708
20709 #if DB_VERSION_MAJOR > 2
20710         db_env_create( NULL, 0 );
20711 #elif DB_VERSION_MAJOR > 1
20712         db_appexit( NULL );
20713 #else
20714         (void) dbopen( NULL, 0, 0, 0, NULL);
20715 #endif
20716
20717 ; return 0; }
20718 EOF
20719 if { (eval echo configure:20720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20720   rm -rf conftest*
20721   ol_cv_db_db_1=yes
20722 else
20723   echo "configure: failed program was:" >&5
20724   cat conftest.$ac_ext >&5
20725   rm -rf conftest*
20726   ol_cv_db_db_1=no
20727 fi
20728 rm -f conftest*
20729
20730         LIBS="$ol_LIBS"
20731
20732 fi
20733
20734 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20735
20736         if test $ol_cv_db_db_1 = yes ; then
20737                 ol_cv_lib_db=-ldb-1
20738         fi
20739 fi
20740
20741
20742         if test "$ol_cv_lib_db" != no ; then
20743                 ol_cv_berkeley_db=yes
20744                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20745 echo "configure:20746: checking for Berkeley DB version match" >&5
20746 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20747   echo $ac_n "(cached) $ac_c" 1>&6
20748 else
20749   
20750         ol_LIBS="$LIBS"
20751         LIBS="$LTHREAD_LIBS $LIBS"
20752         if test $ol_cv_lib_db != yes ; then
20753                 LIBS="$ol_cv_lib_db $LIBS"
20754         fi
20755
20756         if test "$cross_compiling" = yes; then
20757   ol_cv_berkeley_db_version=cross
20758 else
20759   cat > conftest.$ac_ext <<EOF
20760 #line 20761 "configure"
20761 #include "confdefs.h"
20762
20763 #ifdef HAVE_DB_185_H
20764         choke me;
20765 #else
20766 #include <db.h>
20767 #endif
20768 #ifndef DB_VERSION_MAJOR
20769 # define DB_VERSION_MAJOR 1
20770 #endif
20771 #ifndef NULL
20772 #define NULL ((void *)0)
20773 #endif
20774 main()
20775 {
20776 #if DB_VERSION_MAJOR > 1
20777         char *version;
20778         int major, minor, patch;
20779
20780         version = db_version( &major, &minor, &patch );
20781
20782         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20783                 printf("Berkeley DB version mismatch\n"
20784                         "\theader: %s\n\tlibrary: %s\n",
20785                         DB_VERSION_STRING, version);
20786                 return 1;
20787         }
20788 #endif
20789
20790         return 0;
20791 }
20792 EOF
20793 if { (eval echo configure:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20794 then
20795   ol_cv_berkeley_db_version=yes
20796 else
20797   echo "configure: failed program was:" >&5
20798   cat conftest.$ac_ext >&5
20799   rm -fr conftest*
20800   ol_cv_berkeley_db_version=no
20801 fi
20802 rm -fr conftest*
20803 fi
20804
20805
20806         LIBS="$ol_LIBS"
20807
20808 fi
20809
20810 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20811
20812         if test $ol_cv_berkeley_db_version = no ; then
20813                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20814         fi
20815
20816                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20817 echo "configure:20818: checking for Berkeley DB thread support" >&5
20818 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20819   echo $ac_n "(cached) $ac_c" 1>&6
20820 else
20821   
20822         ol_LIBS="$LIBS"
20823         LIBS="$LTHREAD_LIBS $LIBS"
20824         if test $ol_cv_lib_db != yes ; then
20825                 LIBS="$ol_cv_lib_db $LIBS"
20826         fi
20827
20828         if test "$cross_compiling" = yes; then
20829   ol_cv_berkeley_db_thread=cross
20830 else
20831   cat > conftest.$ac_ext <<EOF
20832 #line 20833 "configure"
20833 #include "confdefs.h"
20834
20835 #ifdef HAVE_DB_185_H
20836         choke me;
20837 #else
20838 #include <db.h>
20839 #endif
20840 #ifndef NULL
20841 #define NULL ((void *)0)
20842 #endif
20843 main()
20844 {
20845         int rc;
20846         u_int32_t flags = DB_CREATE |
20847 #ifdef DB_PRIVATE
20848                 DB_PRIVATE |
20849 #endif
20850                 DB_THREAD;
20851
20852 #if DB_VERSION_MAJOR > 2
20853         DB_ENV *env = NULL;
20854
20855         rc = db_env_create( &env, 0 );
20856
20857         flags |= DB_INIT_MPOOL;
20858 #ifdef DB_MPOOL_PRIVATE
20859         flags |= DB_MPOOL_PRIVATE;
20860 #endif
20861
20862         if( rc ) {
20863                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20864                 return rc;
20865         }
20866
20867 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20868         rc = env->open( env, NULL, flags, 0 );
20869 #else
20870         rc = env->open( env, NULL, NULL, flags, 0 );
20871 #endif
20872
20873         if ( rc == 0 ) {
20874                 rc = env->close( env, 0 );
20875         }
20876
20877         if( rc ) {
20878                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20879                 return rc;
20880         }
20881
20882 #else
20883         DB_ENV env;
20884         memset( &env, '\0', sizeof(env) );
20885
20886         rc = db_appinit( NULL, NULL, &env, flags );
20887
20888         if( rc == 0 ) {
20889                 db_appexit( &env );
20890         }
20891
20892         unlink("__db_mpool.share");
20893         unlink("__db_lock.share");
20894 #endif
20895
20896         return rc;
20897 }
20898 EOF
20899 if { (eval echo configure:20900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20900 then
20901   ol_cv_berkeley_db_thread=yes
20902 else
20903   echo "configure: failed program was:" >&5
20904   cat conftest.$ac_ext >&5
20905   rm -fr conftest*
20906   ol_cv_berkeley_db_thread=no
20907 fi
20908 rm -fr conftest*
20909 fi
20910
20911
20912         LIBS="$ol_LIBS"
20913
20914 fi
20915
20916 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20917
20918         if test $ol_cv_berkeley_db_thread != no ; then
20919                 cat >> confdefs.h <<\EOF
20920 #define HAVE_BERKELEY_DB_THREAD 1
20921 EOF
20922
20923         fi
20924
20925         fi
20926 fi
20927
20928         fi
20929
20930         if test $ol_cv_berkeley_db != no ; then
20931                 cat >> confdefs.h <<\EOF
20932 #define HAVE_BERKELEY_DB 1
20933 EOF
20934
20935
20936                 ol_link_ldbm=berkeley
20937                 ol_with_ldbm_api=berkeley
20938
20939                 if test $ol_with_ldbm_type = hash ; then
20940                         cat >> confdefs.h <<\EOF
20941 #define LDBM_USE_DBHASH 1
20942 EOF
20943
20944                 else
20945                         cat >> confdefs.h <<\EOF
20946 #define LDBM_USE_DBBTREE 1
20947 EOF
20948
20949                 fi
20950
20951                                                 if test $ol_cv_lib_db != yes ; then
20952                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20953                 fi
20954         fi
20955 fi
20956
20957 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20958         if test $ol_link_ldbm != berkeley ; then
20959                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20960         else
20961                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20962 echo "configure:20963: checking Berkeley DB version for BDB backend" >&5
20963 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20964   echo $ac_n "(cached) $ac_c" 1>&6
20965 else
20966   
20967         cat > conftest.$ac_ext <<EOF
20968 #line 20969 "configure"
20969 #include "confdefs.h"
20970
20971 #include <db.h>
20972
20973  /* this check could be improved */
20974 #ifndef DB_VERSION_MAJOR
20975 #       define DB_VERSION_MAJOR 1
20976 #endif
20977 #ifndef DB_VERSION_MINOR
20978 #       define DB_VERSION_MINOR 0
20979 #endif
20980
20981 /* require 4.2 or later */
20982 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20983         __db_version_compat
20984 #endif
20985         
20986 EOF
20987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20988   egrep "__db_version_compat" >/dev/null 2>&1; then
20989   rm -rf conftest*
20990   ol_cv_bdb_compat=yes
20991 else
20992   rm -rf conftest*
20993   ol_cv_bdb_compat=no
20994 fi
20995 rm -f conftest*
20996
20997 fi
20998
20999 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
21000
21001
21002                 if test $ol_cv_bdb_compat != yes ; then
21003                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
21004                 fi
21005         fi
21006 fi
21007
21008 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
21009         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
21010         ol_with_ldbm_api=none
21011 fi
21012
21013 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
21014         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
21015 echo "configure:21016: checking for MDBM library" >&5
21016 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
21017   echo $ac_n "(cached) $ac_c" 1>&6
21018 else
21019         ol_LIBS="$LIBS"
21020         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
21021 echo "configure:21022: checking for mdbm_set_chain" >&5
21022 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
21023   echo $ac_n "(cached) $ac_c" 1>&6
21024 else
21025   cat > conftest.$ac_ext <<EOF
21026 #line 21027 "configure"
21027 #include "confdefs.h"
21028 /* System header to define __stub macros and hopefully few prototypes,
21029     which can conflict with char mdbm_set_chain(); below.  */
21030 #include <assert.h>
21031 /* Override any gcc2 internal prototype to avoid an error.  */
21032 /* We use char because int might match the return type of a gcc2
21033     builtin and then its argument prototype would still apply.  */
21034 char mdbm_set_chain();
21035 char (*f)();
21036
21037 int main() {
21038
21039 /* The GNU C library defines this for functions which it implements
21040     to always fail with ENOSYS.  Some functions are actually named
21041     something starting with __ and the normal name is an alias.  */
21042 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21043 choke me
21044 #else
21045 f = mdbm_set_chain;
21046 #endif
21047
21048 ; return 0; }
21049 EOF
21050 if { (eval echo configure:21051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21051   rm -rf conftest*
21052   eval "ac_cv_func_mdbm_set_chain=yes"
21053 else
21054   echo "configure: failed program was:" >&5
21055   cat conftest.$ac_ext >&5
21056   rm -rf conftest*
21057   eval "ac_cv_func_mdbm_set_chain=no"
21058 fi
21059 rm -f conftest*
21060 fi
21061
21062 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21063   echo "$ac_t""yes" 1>&6
21064   ol_cv_lib_mdbm=yes
21065 else
21066   echo "$ac_t""no" 1>&6
21067
21068                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21069 echo "configure:21070: checking for mdbm_set_chain in -lmdbm" >&5
21070 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21072   echo $ac_n "(cached) $ac_c" 1>&6
21073 else
21074   ac_save_LIBS="$LIBS"
21075 LIBS="-lmdbm  $LIBS"
21076 cat > conftest.$ac_ext <<EOF
21077 #line 21078 "configure"
21078 #include "confdefs.h"
21079 /* Override any gcc2 internal prototype to avoid an error.  */
21080 /* We use char because int might match the return type of a gcc2
21081     builtin and then its argument prototype would still apply.  */
21082 char mdbm_set_chain();
21083
21084 int main() {
21085 mdbm_set_chain()
21086 ; return 0; }
21087 EOF
21088 if { (eval echo configure:21089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21089   rm -rf conftest*
21090   eval "ac_cv_lib_$ac_lib_var=yes"
21091 else
21092   echo "configure: failed program was:" >&5
21093   cat conftest.$ac_ext >&5
21094   rm -rf conftest*
21095   eval "ac_cv_lib_$ac_lib_var=no"
21096 fi
21097 rm -f conftest*
21098 LIBS="$ac_save_LIBS"
21099
21100 fi
21101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21102   echo "$ac_t""yes" 1>&6
21103   ol_cv_lib_mdbm=-lmdbm
21104 else
21105   echo "$ac_t""no" 1>&6
21106 ol_cv_lib_mdbm=no
21107 fi
21108
21109         
21110 fi
21111
21112         LIBS="$ol_LIBS"
21113
21114 fi
21115
21116 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21117
21118
21119  for ac_hdr in mdbm.h
21120 do
21121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21123 echo "configure:21124: checking for $ac_hdr" >&5
21124 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21125   echo $ac_n "(cached) $ac_c" 1>&6
21126 else
21127   cat > conftest.$ac_ext <<EOF
21128 #line 21129 "configure"
21129 #include "confdefs.h"
21130 #include <$ac_hdr>
21131 EOF
21132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21133 { (eval echo configure:21134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21135 if test -z "$ac_err"; then
21136   rm -rf conftest*
21137   eval "ac_cv_header_$ac_safe=yes"
21138 else
21139   echo "$ac_err" >&5
21140   echo "configure: failed program was:" >&5
21141   cat conftest.$ac_ext >&5
21142   rm -rf conftest*
21143   eval "ac_cv_header_$ac_safe=no"
21144 fi
21145 rm -f conftest*
21146 fi
21147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21148   echo "$ac_t""yes" 1>&6
21149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21150   cat >> confdefs.h <<EOF
21151 #define $ac_tr_hdr 1
21152 EOF
21153  
21154 else
21155   echo "$ac_t""no" 1>&6
21156 fi
21157 done
21158
21159  echo $ac_n "checking for db""... $ac_c" 1>&6
21160 echo "configure:21161: checking for db" >&5
21161 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21162   echo $ac_n "(cached) $ac_c" 1>&6
21163 else
21164   
21165         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21166                 ol_cv_mdbm=no
21167         else
21168                 ol_cv_mdbm=yes
21169         fi
21170
21171 fi
21172
21173 echo "$ac_t""$ol_cv_mdbm" 1>&6
21174  if test $ol_cv_mdbm = yes ; then
21175         cat >> confdefs.h <<\EOF
21176 #define HAVE_MDBM 1
21177 EOF
21178
21179  fi
21180
21181
21182         if test $ol_cv_mdbm = yes ; then
21183                 ol_link_ldbm=mdbm
21184                 ol_with_ldbm_api=mdbm
21185                 if test $ol_cv_lib_mdbm != yes ; then
21186                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21187                 fi
21188         fi
21189 fi
21190
21191 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21192         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21193 echo "configure:21194: checking for GDBM library" >&5
21194 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21195   echo $ac_n "(cached) $ac_c" 1>&6
21196 else
21197         ol_LIBS="$LIBS"
21198         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21199 echo "configure:21200: checking for gdbm_open" >&5
21200 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21201   echo $ac_n "(cached) $ac_c" 1>&6
21202 else
21203   cat > conftest.$ac_ext <<EOF
21204 #line 21205 "configure"
21205 #include "confdefs.h"
21206 /* System header to define __stub macros and hopefully few prototypes,
21207     which can conflict with char gdbm_open(); below.  */
21208 #include <assert.h>
21209 /* Override any gcc2 internal prototype to avoid an error.  */
21210 /* We use char because int might match the return type of a gcc2
21211     builtin and then its argument prototype would still apply.  */
21212 char gdbm_open();
21213 char (*f)();
21214
21215 int main() {
21216
21217 /* The GNU C library defines this for functions which it implements
21218     to always fail with ENOSYS.  Some functions are actually named
21219     something starting with __ and the normal name is an alias.  */
21220 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21221 choke me
21222 #else
21223 f = gdbm_open;
21224 #endif
21225
21226 ; return 0; }
21227 EOF
21228 if { (eval echo configure:21229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21229   rm -rf conftest*
21230   eval "ac_cv_func_gdbm_open=yes"
21231 else
21232   echo "configure: failed program was:" >&5
21233   cat conftest.$ac_ext >&5
21234   rm -rf conftest*
21235   eval "ac_cv_func_gdbm_open=no"
21236 fi
21237 rm -f conftest*
21238 fi
21239
21240 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21241   echo "$ac_t""yes" 1>&6
21242   ol_cv_lib_gdbm=yes
21243 else
21244   echo "$ac_t""no" 1>&6
21245
21246                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21247 echo "configure:21248: checking for gdbm_open in -lgdbm" >&5
21248 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21250   echo $ac_n "(cached) $ac_c" 1>&6
21251 else
21252   ac_save_LIBS="$LIBS"
21253 LIBS="-lgdbm  $LIBS"
21254 cat > conftest.$ac_ext <<EOF
21255 #line 21256 "configure"
21256 #include "confdefs.h"
21257 /* Override any gcc2 internal prototype to avoid an error.  */
21258 /* We use char because int might match the return type of a gcc2
21259     builtin and then its argument prototype would still apply.  */
21260 char gdbm_open();
21261
21262 int main() {
21263 gdbm_open()
21264 ; return 0; }
21265 EOF
21266 if { (eval echo configure:21267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21267   rm -rf conftest*
21268   eval "ac_cv_lib_$ac_lib_var=yes"
21269 else
21270   echo "configure: failed program was:" >&5
21271   cat conftest.$ac_ext >&5
21272   rm -rf conftest*
21273   eval "ac_cv_lib_$ac_lib_var=no"
21274 fi
21275 rm -f conftest*
21276 LIBS="$ac_save_LIBS"
21277
21278 fi
21279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21280   echo "$ac_t""yes" 1>&6
21281   ol_cv_lib_gdbm=-lgdbm
21282 else
21283   echo "$ac_t""no" 1>&6
21284 ol_cv_lib_gdbm=no
21285 fi
21286
21287         
21288 fi
21289
21290         LIBS="$ol_LIBS"
21291
21292 fi
21293
21294 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21295
21296
21297  for ac_hdr in gdbm.h
21298 do
21299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21301 echo "configure:21302: checking for $ac_hdr" >&5
21302 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21303   echo $ac_n "(cached) $ac_c" 1>&6
21304 else
21305   cat > conftest.$ac_ext <<EOF
21306 #line 21307 "configure"
21307 #include "confdefs.h"
21308 #include <$ac_hdr>
21309 EOF
21310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21311 { (eval echo configure:21312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21313 if test -z "$ac_err"; then
21314   rm -rf conftest*
21315   eval "ac_cv_header_$ac_safe=yes"
21316 else
21317   echo "$ac_err" >&5
21318   echo "configure: failed program was:" >&5
21319   cat conftest.$ac_ext >&5
21320   rm -rf conftest*
21321   eval "ac_cv_header_$ac_safe=no"
21322 fi
21323 rm -f conftest*
21324 fi
21325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21326   echo "$ac_t""yes" 1>&6
21327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21328   cat >> confdefs.h <<EOF
21329 #define $ac_tr_hdr 1
21330 EOF
21331  
21332 else
21333   echo "$ac_t""no" 1>&6
21334 fi
21335 done
21336
21337  echo $ac_n "checking for db""... $ac_c" 1>&6
21338 echo "configure:21339: checking for db" >&5
21339 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21340   echo $ac_n "(cached) $ac_c" 1>&6
21341 else
21342   
21343         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21344                 ol_cv_gdbm=no
21345         else
21346                 ol_cv_gdbm=yes
21347         fi
21348
21349 fi
21350
21351 echo "$ac_t""$ol_cv_gdbm" 1>&6
21352  if test $ol_cv_gdbm = yes ; then
21353         cat >> confdefs.h <<\EOF
21354 #define HAVE_GDBM 1
21355 EOF
21356
21357  fi
21358
21359
21360         if test $ol_cv_gdbm = yes ; then
21361                 ol_link_ldbm=gdbm
21362                 ol_with_ldbm_api=gdbm
21363
21364                 if test $ol_cv_lib_gdbm != yes ; then
21365                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21366                 fi
21367         fi
21368 fi
21369
21370 if test $ol_with_ldbm_api = ndbm ; then
21371         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21372 echo "configure:21373: checking for NDBM library" >&5
21373 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21374   echo $ac_n "(cached) $ac_c" 1>&6
21375 else
21376         ol_LIBS="$LIBS"
21377         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21378 echo "configure:21379: checking for dbm_open" >&5
21379 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21380   echo $ac_n "(cached) $ac_c" 1>&6
21381 else
21382   cat > conftest.$ac_ext <<EOF
21383 #line 21384 "configure"
21384 #include "confdefs.h"
21385 /* System header to define __stub macros and hopefully few prototypes,
21386     which can conflict with char dbm_open(); below.  */
21387 #include <assert.h>
21388 /* Override any gcc2 internal prototype to avoid an error.  */
21389 /* We use char because int might match the return type of a gcc2
21390     builtin and then its argument prototype would still apply.  */
21391 char dbm_open();
21392 char (*f)();
21393
21394 int main() {
21395
21396 /* The GNU C library defines this for functions which it implements
21397     to always fail with ENOSYS.  Some functions are actually named
21398     something starting with __ and the normal name is an alias.  */
21399 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21400 choke me
21401 #else
21402 f = dbm_open;
21403 #endif
21404
21405 ; return 0; }
21406 EOF
21407 if { (eval echo configure:21408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21408   rm -rf conftest*
21409   eval "ac_cv_func_dbm_open=yes"
21410 else
21411   echo "configure: failed program was:" >&5
21412   cat conftest.$ac_ext >&5
21413   rm -rf conftest*
21414   eval "ac_cv_func_dbm_open=no"
21415 fi
21416 rm -f conftest*
21417 fi
21418
21419 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21420   echo "$ac_t""yes" 1>&6
21421   ol_cv_lib_ndbm=yes
21422 else
21423   echo "$ac_t""no" 1>&6
21424
21425                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21426 echo "configure:21427: checking for dbm_open in -lndbm" >&5
21427 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21429   echo $ac_n "(cached) $ac_c" 1>&6
21430 else
21431   ac_save_LIBS="$LIBS"
21432 LIBS="-lndbm  $LIBS"
21433 cat > conftest.$ac_ext <<EOF
21434 #line 21435 "configure"
21435 #include "confdefs.h"
21436 /* Override any gcc2 internal prototype to avoid an error.  */
21437 /* We use char because int might match the return type of a gcc2
21438     builtin and then its argument prototype would still apply.  */
21439 char dbm_open();
21440
21441 int main() {
21442 dbm_open()
21443 ; return 0; }
21444 EOF
21445 if { (eval echo configure:21446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21446   rm -rf conftest*
21447   eval "ac_cv_lib_$ac_lib_var=yes"
21448 else
21449   echo "configure: failed program was:" >&5
21450   cat conftest.$ac_ext >&5
21451   rm -rf conftest*
21452   eval "ac_cv_lib_$ac_lib_var=no"
21453 fi
21454 rm -f conftest*
21455 LIBS="$ac_save_LIBS"
21456
21457 fi
21458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21459   echo "$ac_t""yes" 1>&6
21460   ol_cv_lib_ndbm=-lndbm
21461 else
21462   echo "$ac_t""no" 1>&6
21463
21464                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21465 echo "configure:21466: checking for dbm_open in -ldbm" >&5
21466 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21468   echo $ac_n "(cached) $ac_c" 1>&6
21469 else
21470   ac_save_LIBS="$LIBS"
21471 LIBS="-ldbm  $LIBS"
21472 cat > conftest.$ac_ext <<EOF
21473 #line 21474 "configure"
21474 #include "confdefs.h"
21475 /* Override any gcc2 internal prototype to avoid an error.  */
21476 /* We use char because int might match the return type of a gcc2
21477     builtin and then its argument prototype would still apply.  */
21478 char dbm_open();
21479
21480 int main() {
21481 dbm_open()
21482 ; return 0; }
21483 EOF
21484 if { (eval echo configure:21485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21485   rm -rf conftest*
21486   eval "ac_cv_lib_$ac_lib_var=yes"
21487 else
21488   echo "configure: failed program was:" >&5
21489   cat conftest.$ac_ext >&5
21490   rm -rf conftest*
21491   eval "ac_cv_lib_$ac_lib_var=no"
21492 fi
21493 rm -f conftest*
21494 LIBS="$ac_save_LIBS"
21495
21496 fi
21497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21498   echo "$ac_t""yes" 1>&6
21499   ol_cv_lib_ndbm=-ldbm
21500 else
21501   echo "$ac_t""no" 1>&6
21502 ol_cv_lib_ndbm=no
21503 fi
21504                 
21505 fi
21506
21507         
21508 fi
21509
21510         LIBS="$ol_LIBS"
21511
21512 fi
21513
21514 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21515
21516
21517  for ac_hdr in ndbm.h
21518 do
21519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21521 echo "configure:21522: checking for $ac_hdr" >&5
21522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21523   echo $ac_n "(cached) $ac_c" 1>&6
21524 else
21525   cat > conftest.$ac_ext <<EOF
21526 #line 21527 "configure"
21527 #include "confdefs.h"
21528 #include <$ac_hdr>
21529 EOF
21530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21531 { (eval echo configure:21532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21533 if test -z "$ac_err"; then
21534   rm -rf conftest*
21535   eval "ac_cv_header_$ac_safe=yes"
21536 else
21537   echo "$ac_err" >&5
21538   echo "configure: failed program was:" >&5
21539   cat conftest.$ac_ext >&5
21540   rm -rf conftest*
21541   eval "ac_cv_header_$ac_safe=no"
21542 fi
21543 rm -f conftest*
21544 fi
21545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21546   echo "$ac_t""yes" 1>&6
21547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21548   cat >> confdefs.h <<EOF
21549 #define $ac_tr_hdr 1
21550 EOF
21551  
21552 else
21553   echo "$ac_t""no" 1>&6
21554 fi
21555 done
21556
21557  echo $ac_n "checking for db""... $ac_c" 1>&6
21558 echo "configure:21559: checking for db" >&5
21559 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21560   echo $ac_n "(cached) $ac_c" 1>&6
21561 else
21562   
21563         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21564                 ol_cv_ndbm=no
21565         else
21566                 ol_cv_ndbm=yes
21567         fi
21568
21569 fi
21570
21571 echo "$ac_t""$ol_cv_ndbm" 1>&6
21572  if test $ol_cv_ndbm = yes ; then
21573         cat >> confdefs.h <<\EOF
21574 #define HAVE_NDBM 1
21575 EOF
21576
21577  fi
21578
21579
21580         if test $ol_cv_ndbm = yes ; then
21581                 ol_link_ldbm=ndbm
21582                 ol_with_ldbm_api=ndbm
21583
21584                 if test $ol_cv_lib_ndbm != yes ; then
21585                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21586                 fi
21587         fi
21588 fi
21589
21590 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21591         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21592 fi
21593
21594 if test $ol_enable_bdb = yes -o \
21595         $ol_enable_hdb = yes -o \
21596         $ol_enable_ldbm = yes ; then
21597         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21598 fi
21599
21600
21601 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21602         BUILD_LIBS_DYNAMIC=shared
21603         cat >> confdefs.h <<\EOF
21604 #define LDAP_LIBS_DYNAMIC 1
21605 EOF
21606
21607         LTSTATIC=""
21608 else
21609         BUILD_LIBS_DYNAMIC=static
21610         LTSTATIC="-static"
21611 fi
21612
21613 if test $ol_enable_wrappers != no ; then
21614         for ac_hdr in tcpd.h
21615 do
21616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21618 echo "configure:21619: checking for $ac_hdr" >&5
21619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21620   echo $ac_n "(cached) $ac_c" 1>&6
21621 else
21622   cat > conftest.$ac_ext <<EOF
21623 #line 21624 "configure"
21624 #include "confdefs.h"
21625 #include <$ac_hdr>
21626 EOF
21627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21628 { (eval echo configure:21629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21630 if test -z "$ac_err"; then
21631   rm -rf conftest*
21632   eval "ac_cv_header_$ac_safe=yes"
21633 else
21634   echo "$ac_err" >&5
21635   echo "configure: failed program was:" >&5
21636   cat conftest.$ac_ext >&5
21637   rm -rf conftest*
21638   eval "ac_cv_header_$ac_safe=no"
21639 fi
21640 rm -f conftest*
21641 fi
21642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21643   echo "$ac_t""yes" 1>&6
21644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21645   cat >> confdefs.h <<EOF
21646 #define $ac_tr_hdr 1
21647 EOF
21648  
21649                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21650 echo "configure:21651: checking for TCP wrappers library" >&5
21651                 save_LIBS="$LIBS"
21652                 LIBS="$LIBS -lwrap"
21653                 cat > conftest.$ac_ext <<EOF
21654 #line 21655 "configure"
21655 #include "confdefs.h"
21656
21657 #include <tcpd.h>
21658 int allow_severity = 0;
21659 int deny_severity  = 0;
21660
21661 struct request_info *req;
21662                 
21663 int main() {
21664
21665 hosts_access(req)
21666                 
21667 ; return 0; }
21668 EOF
21669 if { (eval echo configure:21670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21670   rm -rf conftest*
21671   echo "$ac_t""-lwrap" 1>&6
21672                 have_wrappers=yes
21673                 LIBS="$save_LIBS"
21674 else
21675   echo "configure: failed program was:" >&5
21676   cat conftest.$ac_ext >&5
21677   rm -rf conftest*
21678   
21679                                 LIBS="$LIBS -lnsl"
21680                 cat > conftest.$ac_ext <<EOF
21681 #line 21682 "configure"
21682 #include "confdefs.h"
21683
21684 #include <tcpd.h>
21685 int allow_severity = 0;
21686 int deny_severity  = 0;
21687
21688 struct request_info *req;
21689                 
21690 int main() {
21691
21692 hosts_access(req)
21693                 
21694 ; return 0; }
21695 EOF
21696 if { (eval echo configure:21697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21697   rm -rf conftest*
21698   echo "$ac_t""-lwrap -lnsl" 1>&6
21699                 have_wrappers=yes
21700                 LIBS="$save_LIBS -lnsl"
21701 else
21702   echo "configure: failed program was:" >&5
21703   cat conftest.$ac_ext >&5
21704   rm -rf conftest*
21705   
21706                 echo "$ac_t""no" 1>&6
21707                 have_wrappers=no
21708                 LIBS=$save_LIBS
21709 fi
21710 rm -f conftest*
21711 fi
21712 rm -f conftest*
21713 else
21714   echo "$ac_t""no" 1>&6
21715 have_wrappers=no
21716 fi
21717 done
21718
21719
21720         if test $have_wrappers = yes ; then
21721                 cat >> confdefs.h <<\EOF
21722 #define HAVE_TCPD 1
21723 EOF
21724
21725                 WRAP_LIBS="-lwrap"
21726         elif test $ol_enable_wrappers = yes ; then
21727                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21728         else
21729                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21730                 WRAP_LIBS=""
21731         fi
21732 fi
21733
21734 if test $ol_enable_syslog != no ; then
21735         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21736 echo "configure:21737: checking for openlog" >&5
21737 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21738   echo $ac_n "(cached) $ac_c" 1>&6
21739 else
21740   cat > conftest.$ac_ext <<EOF
21741 #line 21742 "configure"
21742 #include "confdefs.h"
21743 /* System header to define __stub macros and hopefully few prototypes,
21744     which can conflict with char openlog(); below.  */
21745 #include <assert.h>
21746 /* Override any gcc2 internal prototype to avoid an error.  */
21747 /* We use char because int might match the return type of a gcc2
21748     builtin and then its argument prototype would still apply.  */
21749 char openlog();
21750 char (*f)();
21751
21752 int main() {
21753
21754 /* The GNU C library defines this for functions which it implements
21755     to always fail with ENOSYS.  Some functions are actually named
21756     something starting with __ and the normal name is an alias.  */
21757 #if defined (__stub_openlog) || defined (__stub___openlog)
21758 choke me
21759 #else
21760 f = openlog;
21761 #endif
21762
21763 ; return 0; }
21764 EOF
21765 if { (eval echo configure:21766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21766   rm -rf conftest*
21767   eval "ac_cv_func_openlog=yes"
21768 else
21769   echo "configure: failed program was:" >&5
21770   cat conftest.$ac_ext >&5
21771   rm -rf conftest*
21772   eval "ac_cv_func_openlog=no"
21773 fi
21774 rm -f conftest*
21775 fi
21776
21777 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21778   echo "$ac_t""yes" 1>&6
21779   :
21780 else
21781   echo "$ac_t""no" 1>&6
21782 fi
21783
21784         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21785                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21786         fi
21787         ol_enable_syslog=$ac_cv_func_openlog
21788 fi
21789
21790
21791 ol_link_sql=no
21792 if test $ol_enable_sql != no ; then
21793         for ac_hdr in sql.h sqlext.h
21794 do
21795 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21796 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21797 echo "configure:21798: checking for $ac_hdr" >&5
21798 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21799   echo $ac_n "(cached) $ac_c" 1>&6
21800 else
21801   cat > conftest.$ac_ext <<EOF
21802 #line 21803 "configure"
21803 #include "confdefs.h"
21804 #include <$ac_hdr>
21805 EOF
21806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21807 { (eval echo configure:21808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21808 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21809 if test -z "$ac_err"; then
21810   rm -rf conftest*
21811   eval "ac_cv_header_$ac_safe=yes"
21812 else
21813   echo "$ac_err" >&5
21814   echo "configure: failed program was:" >&5
21815   cat conftest.$ac_ext >&5
21816   rm -rf conftest*
21817   eval "ac_cv_header_$ac_safe=no"
21818 fi
21819 rm -f conftest*
21820 fi
21821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21822   echo "$ac_t""yes" 1>&6
21823     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21824   cat >> confdefs.h <<EOF
21825 #define $ac_tr_hdr 1
21826 EOF
21827  
21828 else
21829   echo "$ac_t""no" 1>&6
21830 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21831         
21832 fi
21833 done
21834
21835
21836         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21837 echo "configure:21838: checking for SQLDriverConnect in -liodbc" >&5
21838 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21839 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21840   echo $ac_n "(cached) $ac_c" 1>&6
21841 else
21842   ac_save_LIBS="$LIBS"
21843 LIBS="-liodbc  $LIBS"
21844 cat > conftest.$ac_ext <<EOF
21845 #line 21846 "configure"
21846 #include "confdefs.h"
21847 /* Override any gcc2 internal prototype to avoid an error.  */
21848 /* We use char because int might match the return type of a gcc2
21849     builtin and then its argument prototype would still apply.  */
21850 char SQLDriverConnect();
21851
21852 int main() {
21853 SQLDriverConnect()
21854 ; return 0; }
21855 EOF
21856 if { (eval echo configure:21857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21857   rm -rf conftest*
21858   eval "ac_cv_lib_$ac_lib_var=yes"
21859 else
21860   echo "configure: failed program was:" >&5
21861   cat conftest.$ac_ext >&5
21862   rm -rf conftest*
21863   eval "ac_cv_lib_$ac_lib_var=no"
21864 fi
21865 rm -f conftest*
21866 LIBS="$ac_save_LIBS"
21867
21868 fi
21869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21870   echo "$ac_t""yes" 1>&6
21871   have_iodbc=yes
21872 else
21873   echo "$ac_t""no" 1>&6
21874 have_iodbc=no
21875 fi
21876
21877         if test $have_iodbc = yes ; then
21878                 ol_link_sql="-liodbc"
21879         else
21880                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21881 echo "configure:21882: checking for SQLDriverConnect in -lodbc" >&5
21882 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21884   echo $ac_n "(cached) $ac_c" 1>&6
21885 else
21886   ac_save_LIBS="$LIBS"
21887 LIBS="-lodbc  $LIBS"
21888 cat > conftest.$ac_ext <<EOF
21889 #line 21890 "configure"
21890 #include "confdefs.h"
21891 /* Override any gcc2 internal prototype to avoid an error.  */
21892 /* We use char because int might match the return type of a gcc2
21893     builtin and then its argument prototype would still apply.  */
21894 char SQLDriverConnect();
21895
21896 int main() {
21897 SQLDriverConnect()
21898 ; return 0; }
21899 EOF
21900 if { (eval echo configure:21901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21901   rm -rf conftest*
21902   eval "ac_cv_lib_$ac_lib_var=yes"
21903 else
21904   echo "configure: failed program was:" >&5
21905   cat conftest.$ac_ext >&5
21906   rm -rf conftest*
21907   eval "ac_cv_lib_$ac_lib_var=no"
21908 fi
21909 rm -f conftest*
21910 LIBS="$ac_save_LIBS"
21911
21912 fi
21913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21914   echo "$ac_t""yes" 1>&6
21915   have_odbc=yes
21916 else
21917   echo "$ac_t""no" 1>&6
21918 have_odbc=no
21919 fi
21920
21921                 if test $have_odbc = yes ; then
21922                         ol_link_sql="-lodbc"
21923                 fi
21924         fi
21925
21926         if test $ol_link_sql != no ; then
21927                 SLAPD_SQL_LIBS="$ol_link_sql"
21928
21929         elif test $ol_enable_sql != auto ; then
21930                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21931         fi
21932 fi
21933
21934 WITH_SASL=no
21935 ol_link_sasl=no
21936 ol_link_spasswd=no
21937 if test $ol_with_cyrus_sasl != no ; then
21938         for ac_hdr in sasl/sasl.h sasl.h
21939 do
21940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21942 echo "configure:21943: checking for $ac_hdr" >&5
21943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21944   echo $ac_n "(cached) $ac_c" 1>&6
21945 else
21946   cat > conftest.$ac_ext <<EOF
21947 #line 21948 "configure"
21948 #include "confdefs.h"
21949 #include <$ac_hdr>
21950 EOF
21951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21952 { (eval echo configure:21953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21954 if test -z "$ac_err"; then
21955   rm -rf conftest*
21956   eval "ac_cv_header_$ac_safe=yes"
21957 else
21958   echo "$ac_err" >&5
21959   echo "configure: failed program was:" >&5
21960   cat conftest.$ac_ext >&5
21961   rm -rf conftest*
21962   eval "ac_cv_header_$ac_safe=no"
21963 fi
21964 rm -f conftest*
21965 fi
21966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21967   echo "$ac_t""yes" 1>&6
21968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21969   cat >> confdefs.h <<EOF
21970 #define $ac_tr_hdr 1
21971 EOF
21972  
21973 else
21974   echo "$ac_t""no" 1>&6
21975 fi
21976 done
21977
21978
21979         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21980                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21981 echo "configure:21982: checking for sasl_client_init in -lsasl2" >&5
21982 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   ac_save_LIBS="$LIBS"
21987 LIBS="-lsasl2  $LIBS"
21988 cat > conftest.$ac_ext <<EOF
21989 #line 21990 "configure"
21990 #include "confdefs.h"
21991 /* Override any gcc2 internal prototype to avoid an error.  */
21992 /* We use char because int might match the return type of a gcc2
21993     builtin and then its argument prototype would still apply.  */
21994 char sasl_client_init();
21995
21996 int main() {
21997 sasl_client_init()
21998 ; return 0; }
21999 EOF
22000 if { (eval echo configure:22001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22001   rm -rf conftest*
22002   eval "ac_cv_lib_$ac_lib_var=yes"
22003 else
22004   echo "configure: failed program was:" >&5
22005   cat conftest.$ac_ext >&5
22006   rm -rf conftest*
22007   eval "ac_cv_lib_$ac_lib_var=no"
22008 fi
22009 rm -f conftest*
22010 LIBS="$ac_save_LIBS"
22011
22012 fi
22013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22014   echo "$ac_t""yes" 1>&6
22015   ol_link_sasl="-lsasl2"
22016 else
22017   echo "$ac_t""no" 1>&6
22018 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
22019 echo "configure:22020: checking for sasl_client_init in -lsasl" >&5
22020 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
22021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22022   echo $ac_n "(cached) $ac_c" 1>&6
22023 else
22024   ac_save_LIBS="$LIBS"
22025 LIBS="-lsasl  $LIBS"
22026 cat > conftest.$ac_ext <<EOF
22027 #line 22028 "configure"
22028 #include "confdefs.h"
22029 /* Override any gcc2 internal prototype to avoid an error.  */
22030 /* We use char because int might match the return type of a gcc2
22031     builtin and then its argument prototype would still apply.  */
22032 char sasl_client_init();
22033
22034 int main() {
22035 sasl_client_init()
22036 ; return 0; }
22037 EOF
22038 if { (eval echo configure:22039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22039   rm -rf conftest*
22040   eval "ac_cv_lib_$ac_lib_var=yes"
22041 else
22042   echo "configure: failed program was:" >&5
22043   cat conftest.$ac_ext >&5
22044   rm -rf conftest*
22045   eval "ac_cv_lib_$ac_lib_var=no"
22046 fi
22047 rm -f conftest*
22048 LIBS="$ac_save_LIBS"
22049
22050 fi
22051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22052   echo "$ac_t""yes" 1>&6
22053   ol_link_sasl="-lsasl"
22054 else
22055   echo "$ac_t""no" 1>&6
22056 fi
22057
22058 fi
22059
22060         fi
22061
22062         if test $ol_link_sasl = no ; then
22063                 if test $ol_with_cyrus_sasl != auto ; then
22064                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22065                 else
22066                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22067                         echo "configure: warning: SASL authentication not supported!" 1>&2
22068                         if test $ol_link_tls = no ; then
22069                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22070                         fi
22071                 fi
22072         else
22073                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22074 echo "configure:22075: checking Cyrus SASL library version" >&5
22075 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22076   echo $ac_n "(cached) $ac_c" 1>&6
22077 else
22078   
22079         cat > conftest.$ac_ext <<EOF
22080 #line 22081 "configure"
22081 #include "confdefs.h"
22082
22083 #ifdef HAVE_SASL_SASL_H
22084 #include <sasl/sasl.h>
22085 #else
22086 #include <sasl.h>
22087 #endif
22088
22089 /* Require 2.1.15+ */
22090 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22091         char *__sasl_compat = "2.2+ or better okay (we guess)";
22092 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22093         && SASL_VERSION_STEP >=15
22094         char *__sasl_compat = "2.1.15+ or better okay";
22095 #endif
22096         
22097 EOF
22098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22099   egrep "__sasl_compat" >/dev/null 2>&1; then
22100   rm -rf conftest*
22101   ol_cv_sasl_compat=yes
22102 else
22103   rm -rf conftest*
22104   ol_cv_sasl_compat=no
22105 fi
22106 rm -f conftest*
22107
22108 fi
22109
22110 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22111
22112                 if test $ol_cv_sasl_compat = no ; then
22113                         ol_link_sasl=no
22114                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22115                 fi
22116
22117                 cat >> confdefs.h <<\EOF
22118 #define HAVE_CYRUS_SASL 1
22119 EOF
22120
22121                 SASL_LIBS="$ol_link_sasl"
22122                 if test $ol_enable_spasswd != no ; then
22123                         ol_link_spasswd=yes
22124                 fi
22125
22126                 ac_save_LIBS="$LIBS"
22127                 LIBS="$LIBS $ol_link_sasl"
22128                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22129 echo "configure:22130: checking for sasl_version" >&5
22130 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22131   echo $ac_n "(cached) $ac_c" 1>&6
22132 else
22133   cat > conftest.$ac_ext <<EOF
22134 #line 22135 "configure"
22135 #include "confdefs.h"
22136 /* System header to define __stub macros and hopefully few prototypes,
22137     which can conflict with char sasl_version(); below.  */
22138 #include <assert.h>
22139 /* Override any gcc2 internal prototype to avoid an error.  */
22140 /* We use char because int might match the return type of a gcc2
22141     builtin and then its argument prototype would still apply.  */
22142 char sasl_version();
22143 char (*f)();
22144
22145 int main() {
22146
22147 /* The GNU C library defines this for functions which it implements
22148     to always fail with ENOSYS.  Some functions are actually named
22149     something starting with __ and the normal name is an alias.  */
22150 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22151 choke me
22152 #else
22153 f = sasl_version;
22154 #endif
22155
22156 ; return 0; }
22157 EOF
22158 if { (eval echo configure:22159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22159   rm -rf conftest*
22160   eval "ac_cv_func_sasl_version=yes"
22161 else
22162   echo "configure: failed program was:" >&5
22163   cat conftest.$ac_ext >&5
22164   rm -rf conftest*
22165   eval "ac_cv_func_sasl_version=no"
22166 fi
22167 rm -f conftest*
22168 fi
22169
22170 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22171   echo "$ac_t""yes" 1>&6
22172   cat >> confdefs.h <<\EOF
22173 #define HAVE_SASL_VERSION 1
22174 EOF
22175
22176 else
22177   echo "$ac_t""no" 1>&6
22178 fi
22179
22180                 LIBS="$ac_save_LIBS"
22181
22182                 WITH_SASL=yes
22183         fi
22184
22185 else
22186         echo "configure: warning: SASL authentication not supported!" 1>&2
22187         if test $ol_link_tls = no ; then
22188                 echo "configure: warning: Strong authentication not supported!" 1>&2
22189         fi
22190 fi
22191
22192 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22193         dev=no
22194         if test -r /dev/urandom ; then
22195                 dev="/dev/urandom";
22196         elif test -r /idev/urandom ; then
22197                 dev="/idev/urandom";
22198         elif test -r /dev/srandom ; then
22199                 dev="/dev/srandom";
22200         elif test -r /dev/random ; then
22201                 dev="/dev/random";
22202         elif test -r /idev/random ; then
22203                 dev="/idev/random";
22204         fi
22205
22206         if test $dev != no ; then
22207                 cat >> confdefs.h <<EOF
22208 #define URANDOM_DEVICE "$dev"
22209 EOF
22210
22211         fi
22212 fi
22213
22214 ol_link_fetch=no
22215 if test $ol_with_fetch != no ; then
22216         ol_LIBS=$LIBS
22217 LIBS="-lfetch -lcom_err $LIBS"
22218 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22219 echo "configure:22220: checking fetch(3) library" >&5
22220 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22221   echo $ac_n "(cached) $ac_c" 1>&6
22222 else
22223   
22224         cat > conftest.$ac_ext <<EOF
22225 #line 22226 "configure"
22226 #include "confdefs.h"
22227
22228 #include <sys/param.h>
22229 #include <stdio.h>
22230 #include <fetch.h>
22231 int main() {
22232 struct url *u = fetchParseURL("file:///"); 
22233 ; return 0; }
22234 EOF
22235 if { (eval echo configure:22236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22236   rm -rf conftest*
22237   ol_cv_lib_fetch=yes
22238 else
22239   echo "configure: failed program was:" >&5
22240   cat conftest.$ac_ext >&5
22241   rm -rf conftest*
22242   ol_cv_lib_fetch=no
22243 fi
22244 rm -f conftest*
22245 fi
22246
22247 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22248 LIBS=$ol_LIBS
22249 if test $ol_cv_lib_fetch != no ; then
22250         ol_link_fetch="-lfetch -lcom_err"
22251         cat >> confdefs.h <<\EOF
22252 #define HAVE_FETCH 1
22253 EOF
22254
22255 fi
22256
22257
22258         if test $ol_cv_lib_fetch != no ; then
22259                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22260                 ol_link_fetch=freebsd
22261
22262         elif test $ol_with_fetch != auto ; then
22263                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22264         fi 
22265 fi
22266
22267 if test $ol_enable_crypt != no ; then
22268         save_LIBS="$LIBS"
22269         LIBS="$TLS_LIBS $LIBS"
22270
22271         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22272 echo "configure:22273: checking for crypt" >&5
22273 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22274   echo $ac_n "(cached) $ac_c" 1>&6
22275 else
22276   cat > conftest.$ac_ext <<EOF
22277 #line 22278 "configure"
22278 #include "confdefs.h"
22279 /* System header to define __stub macros and hopefully few prototypes,
22280     which can conflict with char crypt(); below.  */
22281 #include <assert.h>
22282 /* Override any gcc2 internal prototype to avoid an error.  */
22283 /* We use char because int might match the return type of a gcc2
22284     builtin and then its argument prototype would still apply.  */
22285 char crypt();
22286 char (*f)();
22287
22288 int main() {
22289
22290 /* The GNU C library defines this for functions which it implements
22291     to always fail with ENOSYS.  Some functions are actually named
22292     something starting with __ and the normal name is an alias.  */
22293 #if defined (__stub_crypt) || defined (__stub___crypt)
22294 choke me
22295 #else
22296 f = crypt;
22297 #endif
22298
22299 ; return 0; }
22300 EOF
22301 if { (eval echo configure:22302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22302   rm -rf conftest*
22303   eval "ac_cv_func_crypt=yes"
22304 else
22305   echo "configure: failed program was:" >&5
22306   cat conftest.$ac_ext >&5
22307   rm -rf conftest*
22308   eval "ac_cv_func_crypt=no"
22309 fi
22310 rm -f conftest*
22311 fi
22312
22313 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22314   echo "$ac_t""yes" 1>&6
22315   have_crypt=yes
22316 else
22317   echo "$ac_t""no" 1>&6
22318
22319                 LIBS="$save_LIBS"
22320                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22321 echo "configure:22322: checking for crypt in -lcrypt" >&5
22322 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22324   echo $ac_n "(cached) $ac_c" 1>&6
22325 else
22326   ac_save_LIBS="$LIBS"
22327 LIBS="-lcrypt  $LIBS"
22328 cat > conftest.$ac_ext <<EOF
22329 #line 22330 "configure"
22330 #include "confdefs.h"
22331 /* Override any gcc2 internal prototype to avoid an error.  */
22332 /* We use char because int might match the return type of a gcc2
22333     builtin and then its argument prototype would still apply.  */
22334 char crypt();
22335
22336 int main() {
22337 crypt()
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_lib_$ac_lib_var=yes"
22343 else
22344   echo "configure: failed program was:" >&5
22345   cat conftest.$ac_ext >&5
22346   rm -rf conftest*
22347   eval "ac_cv_lib_$ac_lib_var=no"
22348 fi
22349 rm -f conftest*
22350 LIBS="$ac_save_LIBS"
22351
22352 fi
22353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22354   echo "$ac_t""yes" 1>&6
22355   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22356                         have_crypt=yes
22357 else
22358   echo "$ac_t""no" 1>&6
22359 have_crypt=no
22360 fi
22361
22362 fi
22363
22364
22365         LIBS="$save_LIBS"
22366
22367         if test $have_crypt = yes ; then
22368                 cat >> confdefs.h <<\EOF
22369 #define HAVE_CRYPT 1
22370 EOF
22371
22372         else
22373                 echo "configure: warning: could not find crypt" 1>&2
22374                 if test $ol_enable_crypt = yes ; then
22375                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22376                 fi
22377
22378                 echo "configure: warning: disabling crypt support" 1>&2
22379                 ol_enable_crypt=no
22380         fi
22381 fi
22382
22383 if test $ol_enable_proctitle != no ; then
22384         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22385 echo "configure:22386: checking for setproctitle" >&5
22386 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22387   echo $ac_n "(cached) $ac_c" 1>&6
22388 else
22389   cat > conftest.$ac_ext <<EOF
22390 #line 22391 "configure"
22391 #include "confdefs.h"
22392 /* System header to define __stub macros and hopefully few prototypes,
22393     which can conflict with char setproctitle(); below.  */
22394 #include <assert.h>
22395 /* Override any gcc2 internal prototype to avoid an error.  */
22396 /* We use char because int might match the return type of a gcc2
22397     builtin and then its argument prototype would still apply.  */
22398 char setproctitle();
22399 char (*f)();
22400
22401 int main() {
22402
22403 /* The GNU C library defines this for functions which it implements
22404     to always fail with ENOSYS.  Some functions are actually named
22405     something starting with __ and the normal name is an alias.  */
22406 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22407 choke me
22408 #else
22409 f = setproctitle;
22410 #endif
22411
22412 ; return 0; }
22413 EOF
22414 if { (eval echo configure:22415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22415   rm -rf conftest*
22416   eval "ac_cv_func_setproctitle=yes"
22417 else
22418   echo "configure: failed program was:" >&5
22419   cat conftest.$ac_ext >&5
22420   rm -rf conftest*
22421   eval "ac_cv_func_setproctitle=no"
22422 fi
22423 rm -f conftest*
22424 fi
22425
22426 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22427   echo "$ac_t""yes" 1>&6
22428   have_setproctitle=yes
22429 else
22430   echo "$ac_t""no" 1>&6
22431
22432                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22433 echo "configure:22434: checking for setproctitle in -lutil" >&5
22434 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22436   echo $ac_n "(cached) $ac_c" 1>&6
22437 else
22438   ac_save_LIBS="$LIBS"
22439 LIBS="-lutil  $LIBS"
22440 cat > conftest.$ac_ext <<EOF
22441 #line 22442 "configure"
22442 #include "confdefs.h"
22443 /* Override any gcc2 internal prototype to avoid an error.  */
22444 /* We use char because int might match the return type of a gcc2
22445     builtin and then its argument prototype would still apply.  */
22446 char setproctitle();
22447
22448 int main() {
22449 setproctitle()
22450 ; return 0; }
22451 EOF
22452 if { (eval echo configure:22453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22453   rm -rf conftest*
22454   eval "ac_cv_lib_$ac_lib_var=yes"
22455 else
22456   echo "configure: failed program was:" >&5
22457   cat conftest.$ac_ext >&5
22458   rm -rf conftest*
22459   eval "ac_cv_lib_$ac_lib_var=no"
22460 fi
22461 rm -f conftest*
22462 LIBS="$ac_save_LIBS"
22463
22464 fi
22465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22466   echo "$ac_t""yes" 1>&6
22467   have_setproctitle=yes
22468                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22469 else
22470   echo "$ac_t""no" 1>&6
22471 have_setproctitle=no
22472                         LIBOBJS="$LIBOBJS setproctitle.o"
22473                         LIBSRCS="$LIBSRCS setproctitle.c"
22474 fi
22475
22476 fi
22477
22478
22479         if test $have_setproctitle = yes ; then
22480                 cat >> confdefs.h <<\EOF
22481 #define HAVE_SETPROCTITLE 1
22482 EOF
22483
22484         fi
22485 fi
22486
22487 if test $ol_enable_slp != no ; then
22488         for ac_hdr in slp.h 
22489 do
22490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22492 echo "configure:22493: checking for $ac_hdr" >&5
22493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22494   echo $ac_n "(cached) $ac_c" 1>&6
22495 else
22496   cat > conftest.$ac_ext <<EOF
22497 #line 22498 "configure"
22498 #include "confdefs.h"
22499 #include <$ac_hdr>
22500 EOF
22501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22502 { (eval echo configure:22503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22504 if test -z "$ac_err"; then
22505   rm -rf conftest*
22506   eval "ac_cv_header_$ac_safe=yes"
22507 else
22508   echo "$ac_err" >&5
22509   echo "configure: failed program was:" >&5
22510   cat conftest.$ac_ext >&5
22511   rm -rf conftest*
22512   eval "ac_cv_header_$ac_safe=no"
22513 fi
22514 rm -f conftest*
22515 fi
22516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22517   echo "$ac_t""yes" 1>&6
22518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22519   cat >> confdefs.h <<EOF
22520 #define $ac_tr_hdr 1
22521 EOF
22522  
22523 else
22524   echo "$ac_t""no" 1>&6
22525 fi
22526 done
22527
22528
22529         if test $ac_cv_header_slp_h = yes ; then
22530                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22531 echo "configure:22532: checking for SLPOpen in -lslp" >&5
22532 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22534   echo $ac_n "(cached) $ac_c" 1>&6
22535 else
22536   ac_save_LIBS="$LIBS"
22537 LIBS="-lslp  $LIBS"
22538 cat > conftest.$ac_ext <<EOF
22539 #line 22540 "configure"
22540 #include "confdefs.h"
22541 /* Override any gcc2 internal prototype to avoid an error.  */
22542 /* We use char because int might match the return type of a gcc2
22543     builtin and then its argument prototype would still apply.  */
22544 char SLPOpen();
22545
22546 int main() {
22547 SLPOpen()
22548 ; return 0; }
22549 EOF
22550 if { (eval echo configure:22551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22551   rm -rf conftest*
22552   eval "ac_cv_lib_$ac_lib_var=yes"
22553 else
22554   echo "configure: failed program was:" >&5
22555   cat conftest.$ac_ext >&5
22556   rm -rf conftest*
22557   eval "ac_cv_lib_$ac_lib_var=no"
22558 fi
22559 rm -f conftest*
22560 LIBS="$ac_save_LIBS"
22561
22562 fi
22563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22564   echo "$ac_t""yes" 1>&6
22565   have_slp=yes
22566 else
22567   echo "$ac_t""no" 1>&6
22568 have_slp=no
22569 fi
22570
22571                 if test $have_slp = yes ; then
22572                         cat >> confdefs.h <<\EOF
22573 #define HAVE_SLP 1
22574 EOF
22575
22576                         SLAPD_SLP_LIBS=-lslp
22577                 fi
22578
22579         elif test $ol_enable_slp = yes ; then
22580                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22581         fi
22582 fi
22583
22584 if test "$ol_with_multiple_precision" != "no" ; then
22585         ol_have_bignum=no
22586         ol_have_gmp=no
22587
22588         for ac_hdr in openssl/bn.h bn.h
22589 do
22590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22592 echo "configure:22593: checking for $ac_hdr" >&5
22593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22594   echo $ac_n "(cached) $ac_c" 1>&6
22595 else
22596   cat > conftest.$ac_ext <<EOF
22597 #line 22598 "configure"
22598 #include "confdefs.h"
22599 #include <$ac_hdr>
22600 EOF
22601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22602 { (eval echo configure:22603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22604 if test -z "$ac_err"; then
22605   rm -rf conftest*
22606   eval "ac_cv_header_$ac_safe=yes"
22607 else
22608   echo "$ac_err" >&5
22609   echo "configure: failed program was:" >&5
22610   cat conftest.$ac_ext >&5
22611   rm -rf conftest*
22612   eval "ac_cv_header_$ac_safe=no"
22613 fi
22614 rm -f conftest*
22615 fi
22616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22617   echo "$ac_t""yes" 1>&6
22618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22619   cat >> confdefs.h <<EOF
22620 #define $ac_tr_hdr 1
22621 EOF
22622  
22623 else
22624   echo "$ac_t""no" 1>&6
22625 fi
22626 done
22627
22628         for ac_hdr in openssl/crypto.h crypto.h
22629 do
22630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22632 echo "configure:22633: checking for $ac_hdr" >&5
22633 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22634   echo $ac_n "(cached) $ac_c" 1>&6
22635 else
22636   cat > conftest.$ac_ext <<EOF
22637 #line 22638 "configure"
22638 #include "confdefs.h"
22639 #include <$ac_hdr>
22640 EOF
22641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22642 { (eval echo configure:22643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22644 if test -z "$ac_err"; then
22645   rm -rf conftest*
22646   eval "ac_cv_header_$ac_safe=yes"
22647 else
22648   echo "$ac_err" >&5
22649   echo "configure: failed program was:" >&5
22650   cat conftest.$ac_ext >&5
22651   rm -rf conftest*
22652   eval "ac_cv_header_$ac_safe=no"
22653 fi
22654 rm -f conftest*
22655 fi
22656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22657   echo "$ac_t""yes" 1>&6
22658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22659   cat >> confdefs.h <<EOF
22660 #define $ac_tr_hdr 1
22661 EOF
22662  
22663 else
22664   echo "$ac_t""no" 1>&6
22665 fi
22666 done
22667
22668         for ac_hdr in gmp.h 
22669 do
22670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22672 echo "configure:22673: checking for $ac_hdr" >&5
22673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22674   echo $ac_n "(cached) $ac_c" 1>&6
22675 else
22676   cat > conftest.$ac_ext <<EOF
22677 #line 22678 "configure"
22678 #include "confdefs.h"
22679 #include <$ac_hdr>
22680 EOF
22681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22682 { (eval echo configure:22683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22684 if test -z "$ac_err"; then
22685   rm -rf conftest*
22686   eval "ac_cv_header_$ac_safe=yes"
22687 else
22688   echo "$ac_err" >&5
22689   echo "configure: failed program was:" >&5
22690   cat conftest.$ac_ext >&5
22691   rm -rf conftest*
22692   eval "ac_cv_header_$ac_safe=no"
22693 fi
22694 rm -f conftest*
22695 fi
22696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22697   echo "$ac_t""yes" 1>&6
22698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22699   cat >> confdefs.h <<EOF
22700 #define $ac_tr_hdr 1
22701 EOF
22702  
22703 else
22704   echo "$ac_t""no" 1>&6
22705 fi
22706 done
22707
22708
22709         if test "$ol_with_tls" = "found" ; then
22710                 ol_have_bn_h=no
22711                 ol_have_crypto_h=no
22712
22713                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22714                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22715                         ol_have_bn_h=yes
22716                 fi
22717
22718                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22719                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22720                         ol_have_crypto_h=yes
22721                 fi
22722
22723                 if test "$ol_have_bn_h" = "yes" \
22724                                 -a "$ol_have_crypto_h" = "yes" ; then
22725                         ol_have_bignum=yes
22726                 fi
22727         fi
22728
22729         if test $ac_cv_header_gmp_h = yes ; then
22730                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22731 echo "configure:22732: checking for __gmpz_add_ui in -lgmp" >&5
22732 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22734   echo $ac_n "(cached) $ac_c" 1>&6
22735 else
22736   ac_save_LIBS="$LIBS"
22737 LIBS="-lgmp  $LIBS"
22738 cat > conftest.$ac_ext <<EOF
22739 #line 22740 "configure"
22740 #include "confdefs.h"
22741 /* Override any gcc2 internal prototype to avoid an error.  */
22742 /* We use char because int might match the return type of a gcc2
22743     builtin and then its argument prototype would still apply.  */
22744 char __gmpz_add_ui();
22745
22746 int main() {
22747 __gmpz_add_ui()
22748 ; return 0; }
22749 EOF
22750 if { (eval echo configure:22751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22751   rm -rf conftest*
22752   eval "ac_cv_lib_$ac_lib_var=yes"
22753 else
22754   echo "configure: failed program was:" >&5
22755   cat conftest.$ac_ext >&5
22756   rm -rf conftest*
22757   eval "ac_cv_lib_$ac_lib_var=no"
22758 fi
22759 rm -f conftest*
22760 LIBS="$ac_save_LIBS"
22761
22762 fi
22763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22764   echo "$ac_t""yes" 1>&6
22765   have_gmp=yes
22766 else
22767   echo "$ac_t""no" 1>&6
22768 have_gmp=no
22769 fi
22770
22771                 if test $have_gmp = yes ; then
22772                         ol_have_gmp=yes
22773                 fi
22774         fi
22775
22776         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22777 echo "configure:22778: checking for multiple precision support" >&5
22778
22779         ol_mp_support="none"
22780         case "$ol_with_multiple_precision" in
22781         auto)
22782                                                                                 if test "$ol_have_bignum" = "yes" ; then
22783                         ol_mp_support="bignum"
22784                 else
22785                         if test "$ol_have_gmp" = "yes" ; then
22786                                 ol_mp_support="gmp"
22787                         fi
22788                 fi
22789                 ;;
22790         bignum)
22791                 if test "$ol_have_bignum" != "yes" ; then
22792                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22793                 fi
22794                 ol_mp_support="bignum"
22795                 ;;
22796         gmp)
22797                 if test "$ol_have_gmp" != "yes" ; then
22798                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22799                 fi
22800                 ol_mp_support="gmp"
22801                 ;;
22802         yes)
22803                 if test "$ol_have_bignum" = "yes" ; then
22804                         ol_mp_support="bignum"
22805                 elif test "$ol_have_gmp" = "yes" ; then
22806                         ol_mp_support="gmp"
22807                 else
22808                         { echo "configure: error: not available" 1>&2; exit 1; }
22809                 fi
22810                 ;;
22811         esac
22812
22813         case "$ol_mp_support" in
22814         bignum)
22815                 cat >> confdefs.h <<\EOF
22816 #define HAVE_BIGNUM 1
22817 EOF
22818
22819                 ;;
22820         gmp)
22821                 cat >> confdefs.h <<\EOF
22822 #define HAVE_GMP 1
22823 EOF
22824
22825                 SLAPD_GMP_LIBS=-lgmp
22826                 ;;
22827         none)
22828                 ;;
22829         esac
22830
22831         echo "$ac_t""$ol_mp_support" 1>&6
22832 fi
22833
22834
22835 echo $ac_n "checking long long""... $ac_c" 1>&6
22836 echo "configure:22837: checking long long" >&5
22837 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22838   echo $ac_n "(cached) $ac_c" 1>&6
22839 else
22840   
22841         cat > conftest.$ac_ext <<EOF
22842 #line 22843 "configure"
22843 #include "confdefs.h"
22844
22845 int main() {
22846 long long x;
22847 ; return 0; }
22848 EOF
22849 if { (eval echo configure:22850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22850   rm -rf conftest*
22851   ol_cv_type_long_long=yes
22852 else
22853   echo "configure: failed program was:" >&5
22854   cat conftest.$ac_ext >&5
22855   rm -rf conftest*
22856   ol_cv_type_long_long=no
22857 fi
22858 rm -f conftest*
22859 fi
22860
22861 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22862 if test $ol_cv_type_long_long = yes; then
22863         cat >> confdefs.h <<\EOF
22864 #define HAVE_LONG_LONG 1
22865 EOF
22866
22867 fi
22868
22869 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22870 echo "configure:22871: checking for ANSI C header files" >&5
22871 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22872   echo $ac_n "(cached) $ac_c" 1>&6
22873 else
22874   cat > conftest.$ac_ext <<EOF
22875 #line 22876 "configure"
22876 #include "confdefs.h"
22877 #include <stdlib.h>
22878 #include <stdarg.h>
22879 #include <string.h>
22880 #include <float.h>
22881 EOF
22882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22883 { (eval echo configure:22884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22885 if test -z "$ac_err"; then
22886   rm -rf conftest*
22887   ac_cv_header_stdc=yes
22888 else
22889   echo "$ac_err" >&5
22890   echo "configure: failed program was:" >&5
22891   cat conftest.$ac_ext >&5
22892   rm -rf conftest*
22893   ac_cv_header_stdc=no
22894 fi
22895 rm -f conftest*
22896
22897 if test $ac_cv_header_stdc = yes; then
22898   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22899 cat > conftest.$ac_ext <<EOF
22900 #line 22901 "configure"
22901 #include "confdefs.h"
22902 #include <string.h>
22903 EOF
22904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22905   egrep "memchr" >/dev/null 2>&1; then
22906   :
22907 else
22908   rm -rf conftest*
22909   ac_cv_header_stdc=no
22910 fi
22911 rm -f conftest*
22912
22913 fi
22914
22915 if test $ac_cv_header_stdc = yes; then
22916   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22917 cat > conftest.$ac_ext <<EOF
22918 #line 22919 "configure"
22919 #include "confdefs.h"
22920 #include <stdlib.h>
22921 EOF
22922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22923   egrep "free" >/dev/null 2>&1; then
22924   :
22925 else
22926   rm -rf conftest*
22927   ac_cv_header_stdc=no
22928 fi
22929 rm -f conftest*
22930
22931 fi
22932
22933 if test $ac_cv_header_stdc = yes; then
22934   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22935 if test "$cross_compiling" = yes; then
22936   :
22937 else
22938   cat > conftest.$ac_ext <<EOF
22939 #line 22940 "configure"
22940 #include "confdefs.h"
22941 #include <ctype.h>
22942 #if ((' ' & 0x0FF) == 0x020)
22943 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22944 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22945 #else
22946 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22947  || ('j' <= (c) && (c) <= 'r') \
22948  || ('s' <= (c) && (c) <= 'z'))
22949 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22950 #endif
22951 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22952 int main () { int i; for (i = 0; i < 256; i++)
22953 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22954 exit (0); }
22955
22956 EOF
22957 if { (eval echo configure:22958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22958 then
22959   :
22960 else
22961   echo "configure: failed program was:" >&5
22962   cat conftest.$ac_ext >&5
22963   rm -fr conftest*
22964   ac_cv_header_stdc=no
22965 fi
22966 rm -fr conftest*
22967 fi
22968
22969 fi
22970 fi
22971
22972 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22973 if test $ac_cv_header_stdc = yes; then
22974   cat >> confdefs.h <<\EOF
22975 #define STDC_HEADERS 1
22976 EOF
22977
22978 fi
22979
22980 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22981 echo "configure:22982: checking for mode_t" >&5
22982 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22983   echo $ac_n "(cached) $ac_c" 1>&6
22984 else
22985   cat > conftest.$ac_ext <<EOF
22986 #line 22987 "configure"
22987 #include "confdefs.h"
22988 #include <sys/types.h>
22989 #if STDC_HEADERS
22990 #include <stdlib.h>
22991 #include <stddef.h>
22992 #endif
22993
22994 EOF
22995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22996   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22997   rm -rf conftest*
22998   eval "ac_cv_type_mode_t=yes"
22999 else
23000   rm -rf conftest*
23001   eval "ac_cv_type_mode_t=no"
23002 fi
23003 rm -f conftest*
23004
23005 fi
23006 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
23007   echo "$ac_t""yes" 1>&6
23008 else
23009   echo "$ac_t""no" 1>&6
23010   cat >> confdefs.h <<EOF
23011 #define mode_t int
23012 EOF
23013
23014 fi
23015
23016 echo $ac_n "checking for off_t""... $ac_c" 1>&6
23017 echo "configure:23018: checking for off_t" >&5
23018 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
23019   echo $ac_n "(cached) $ac_c" 1>&6
23020 else
23021   cat > conftest.$ac_ext <<EOF
23022 #line 23023 "configure"
23023 #include "confdefs.h"
23024 #include <sys/types.h>
23025 #if STDC_HEADERS
23026 #include <stdlib.h>
23027 #include <stddef.h>
23028 #endif
23029
23030 EOF
23031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23032   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23033   rm -rf conftest*
23034   eval "ac_cv_type_off_t=yes"
23035 else
23036   rm -rf conftest*
23037   eval "ac_cv_type_off_t=no"
23038 fi
23039 rm -f conftest*
23040
23041 fi
23042 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23043   echo "$ac_t""yes" 1>&6
23044 else
23045   echo "$ac_t""no" 1>&6
23046   cat >> confdefs.h <<EOF
23047 #define off_t long
23048 EOF
23049
23050 fi
23051
23052 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23053 echo "configure:23054: checking for pid_t" >&5
23054 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23055   echo $ac_n "(cached) $ac_c" 1>&6
23056 else
23057   cat > conftest.$ac_ext <<EOF
23058 #line 23059 "configure"
23059 #include "confdefs.h"
23060 #include <sys/types.h>
23061 #if STDC_HEADERS
23062 #include <stdlib.h>
23063 #include <stddef.h>
23064 #endif
23065
23066 EOF
23067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23068   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23069   rm -rf conftest*
23070   eval "ac_cv_type_pid_t=yes"
23071 else
23072   rm -rf conftest*
23073   eval "ac_cv_type_pid_t=no"
23074 fi
23075 rm -f conftest*
23076
23077 fi
23078 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23079   echo "$ac_t""yes" 1>&6
23080 else
23081   echo "$ac_t""no" 1>&6
23082   cat >> confdefs.h <<EOF
23083 #define pid_t int
23084 EOF
23085
23086 fi
23087
23088 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23089 echo "configure:23090: checking for ptrdiff_t" >&5
23090 if eval "test \"\${am_cv_type_ptrdiff_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 <stddef.h>
23097 int main() {
23098 ptrdiff_t p
23099 ; return 0; }
23100 EOF
23101 if { (eval echo configure:23102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23102   rm -rf conftest*
23103   am_cv_type_ptrdiff_t=yes
23104 else
23105   echo "configure: failed program was:" >&5
23106   cat conftest.$ac_ext >&5
23107   rm -rf conftest*
23108   am_cv_type_ptrdiff_t=no
23109 fi
23110 rm -f conftest*
23111 fi
23112
23113 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23114    if test $am_cv_type_ptrdiff_t = yes; then
23115      cat >> confdefs.h <<\EOF
23116 #define HAVE_PTRDIFF_T 1
23117 EOF
23118
23119    fi
23120
23121 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23122 echo "configure:23123: checking return type of signal handlers" >&5
23123 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23124   echo $ac_n "(cached) $ac_c" 1>&6
23125 else
23126   cat > conftest.$ac_ext <<EOF
23127 #line 23128 "configure"
23128 #include "confdefs.h"
23129 #include <sys/types.h>
23130 #include <signal.h>
23131 #ifdef signal
23132 #undef signal
23133 #endif
23134 #ifdef __cplusplus
23135 extern "C" void (*signal (int, void (*)(int)))(int);
23136 #else
23137 void (*signal ()) ();
23138 #endif
23139
23140 int main() {
23141 int i;
23142 ; return 0; }
23143 EOF
23144 if { (eval echo configure:23145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23145   rm -rf conftest*
23146   ac_cv_type_signal=void
23147 else
23148   echo "configure: failed program was:" >&5
23149   cat conftest.$ac_ext >&5
23150   rm -rf conftest*
23151   ac_cv_type_signal=int
23152 fi
23153 rm -f conftest*
23154 fi
23155
23156 echo "$ac_t""$ac_cv_type_signal" 1>&6
23157 cat >> confdefs.h <<EOF
23158 #define RETSIGTYPE $ac_cv_type_signal
23159 EOF
23160
23161
23162 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23163 echo "configure:23164: checking for size_t" >&5
23164 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23165   echo $ac_n "(cached) $ac_c" 1>&6
23166 else
23167   cat > conftest.$ac_ext <<EOF
23168 #line 23169 "configure"
23169 #include "confdefs.h"
23170 #include <sys/types.h>
23171 #if STDC_HEADERS
23172 #include <stdlib.h>
23173 #include <stddef.h>
23174 #endif
23175
23176 EOF
23177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23178   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23179   rm -rf conftest*
23180   eval "ac_cv_type_size_t=yes"
23181 else
23182   rm -rf conftest*
23183   eval "ac_cv_type_size_t=no"
23184 fi
23185 rm -f conftest*
23186
23187 fi
23188 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23189   echo "$ac_t""yes" 1>&6
23190 else
23191   echo "$ac_t""no" 1>&6
23192   cat >> confdefs.h <<EOF
23193 #define size_t unsigned
23194 EOF
23195
23196 fi
23197
23198
23199 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23200 echo "configure:23201: checking for ssize_t" >&5
23201 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23202   echo $ac_n "(cached) $ac_c" 1>&6
23203 else
23204   cat > conftest.$ac_ext <<EOF
23205 #line 23206 "configure"
23206 #include "confdefs.h"
23207 #include <sys/types.h>
23208 #if STDC_HEADERS
23209 #include <stdlib.h>
23210 #include <stddef.h>
23211 #endif
23212
23213 EOF
23214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23215   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23216   rm -rf conftest*
23217   eval "ac_cv_type_ssize_t=yes"
23218 else
23219   rm -rf conftest*
23220   eval "ac_cv_type_ssize_t=no"
23221 fi
23222 rm -f conftest*
23223
23224 fi
23225 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23226   echo "$ac_t""yes" 1>&6
23227 else
23228   echo "$ac_t""no" 1>&6
23229   cat >> confdefs.h <<EOF
23230 #define ssize_t signed int
23231 EOF
23232
23233 fi
23234
23235 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23236 echo "configure:23237: checking for caddr_t" >&5
23237 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23238   echo $ac_n "(cached) $ac_c" 1>&6
23239 else
23240   cat > conftest.$ac_ext <<EOF
23241 #line 23242 "configure"
23242 #include "confdefs.h"
23243 #include <sys/types.h>
23244 #if STDC_HEADERS
23245 #include <stdlib.h>
23246 #include <stddef.h>
23247 #endif
23248
23249 EOF
23250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23251   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23252   rm -rf conftest*
23253   eval "ac_cv_type_caddr_t=yes"
23254 else
23255   rm -rf conftest*
23256   eval "ac_cv_type_caddr_t=no"
23257 fi
23258 rm -f conftest*
23259
23260 fi
23261 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23262   echo "$ac_t""yes" 1>&6
23263 else
23264   echo "$ac_t""no" 1>&6
23265   cat >> confdefs.h <<EOF
23266 #define caddr_t char *
23267 EOF
23268
23269 fi
23270
23271
23272 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23273 echo "configure:23274: checking for socklen_t" >&5
23274 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23275   echo $ac_n "(cached) $ac_c" 1>&6
23276 else
23277   cat > conftest.$ac_ext <<EOF
23278 #line 23279 "configure"
23279 #include "confdefs.h"
23280
23281 #ifdef HAVE_SYS_TYPES_H
23282 #include <sys/types.h>
23283 #endif
23284 #ifdef HAVE_SYS_SOCKET_H
23285 #include <sys/socket.h>
23286 #endif
23287
23288 int main() {
23289 socklen_t len;
23290 ; return 0; }
23291 EOF
23292 if { (eval echo configure:23293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23293   rm -rf conftest*
23294   ol_cv_type_socklen_t=yes
23295 else
23296   echo "configure: failed program was:" >&5
23297   cat conftest.$ac_ext >&5
23298   rm -rf conftest*
23299   ol_cv_type_socklen_t=no
23300 fi
23301 rm -f conftest*
23302 fi
23303
23304 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23305   if test $ol_cv_type_socklen_t = no; then
23306     cat >> confdefs.h <<\EOF
23307 #define socklen_t int
23308 EOF
23309
23310   fi
23311  
23312 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23313 echo "configure:23314: checking for member st_blksize in aggregate type struct stat" >&5
23314 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23315   echo $ac_n "(cached) $ac_c" 1>&6
23316 else
23317   cat > conftest.$ac_ext <<EOF
23318 #line 23319 "configure"
23319 #include "confdefs.h"
23320 #include <sys/types.h>
23321 #include <sys/stat.h>
23322 int main() {
23323 struct stat foo; foo.st_blksize;
23324 ; return 0; }
23325 EOF
23326 if { (eval echo configure:23327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23327   rm -rf conftest*
23328   ac_cv_c_struct_member_st_blksize=yes
23329 else
23330   echo "configure: failed program was:" >&5
23331   cat conftest.$ac_ext >&5
23332   rm -rf conftest*
23333   ac_cv_c_struct_member_st_blksize=no
23334 fi
23335 rm -f conftest*
23336 fi
23337
23338 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23339 st_blksize="$ac_cv_c_struct_member_st_blksize"
23340 if test $ac_cv_c_struct_member_st_blksize = yes; then
23341   cat >> confdefs.h <<\EOF
23342 #define HAVE_ST_BLKSIZE 1
23343 EOF
23344
23345 fi
23346
23347 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23348 echo "configure:23349: checking whether time.h and sys/time.h may both be included" >&5
23349 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23350   echo $ac_n "(cached) $ac_c" 1>&6
23351 else
23352   cat > conftest.$ac_ext <<EOF
23353 #line 23354 "configure"
23354 #include "confdefs.h"
23355 #include <sys/types.h>
23356 #include <sys/time.h>
23357 #include <time.h>
23358 int main() {
23359 struct tm *tp;
23360 ; return 0; }
23361 EOF
23362 if { (eval echo configure:23363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23363   rm -rf conftest*
23364   ac_cv_header_time=yes
23365 else
23366   echo "configure: failed program was:" >&5
23367   cat conftest.$ac_ext >&5
23368   rm -rf conftest*
23369   ac_cv_header_time=no
23370 fi
23371 rm -f conftest*
23372 fi
23373
23374 echo "$ac_t""$ac_cv_header_time" 1>&6
23375 if test $ac_cv_header_time = yes; then
23376   cat >> confdefs.h <<\EOF
23377 #define TIME_WITH_SYS_TIME 1
23378 EOF
23379
23380 fi
23381
23382 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23383 echo "configure:23384: checking whether struct tm is in sys/time.h or time.h" >&5
23384 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23385   echo $ac_n "(cached) $ac_c" 1>&6
23386 else
23387   cat > conftest.$ac_ext <<EOF
23388 #line 23389 "configure"
23389 #include "confdefs.h"
23390 #include <sys/types.h>
23391 #include <time.h>
23392 int main() {
23393 struct tm *tp; tp->tm_sec;
23394 ; return 0; }
23395 EOF
23396 if { (eval echo configure:23397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23397   rm -rf conftest*
23398   ac_cv_struct_tm=time.h
23399 else
23400   echo "configure: failed program was:" >&5
23401   cat conftest.$ac_ext >&5
23402   rm -rf conftest*
23403   ac_cv_struct_tm=sys/time.h
23404 fi
23405 rm -f conftest*
23406 fi
23407
23408 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23409 if test $ac_cv_struct_tm = sys/time.h; then
23410   cat >> confdefs.h <<\EOF
23411 #define TM_IN_SYS_TIME 1
23412 EOF
23413
23414 fi
23415
23416 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23417 echo "configure:23418: checking for uid_t in sys/types.h" >&5
23418 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23419   echo $ac_n "(cached) $ac_c" 1>&6
23420 else
23421   cat > conftest.$ac_ext <<EOF
23422 #line 23423 "configure"
23423 #include "confdefs.h"
23424 #include <sys/types.h>
23425 EOF
23426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23427   egrep "uid_t" >/dev/null 2>&1; then
23428   rm -rf conftest*
23429   ac_cv_type_uid_t=yes
23430 else
23431   rm -rf conftest*
23432   ac_cv_type_uid_t=no
23433 fi
23434 rm -f conftest*
23435
23436 fi
23437
23438 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23439 if test $ac_cv_type_uid_t = no; then
23440   cat >> confdefs.h <<\EOF
23441 #define uid_t int
23442 EOF
23443
23444   cat >> confdefs.h <<\EOF
23445 #define gid_t int
23446 EOF
23447
23448 fi
23449
23450 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23451 echo "configure:23452: checking for sig_atomic_t" >&5
23452 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23453   echo $ac_n "(cached) $ac_c" 1>&6
23454 else
23455   cat > conftest.$ac_ext <<EOF
23456 #line 23457 "configure"
23457 #include "confdefs.h"
23458 #include <signal.h>
23459 int main() {
23460 sig_atomic_t atomic;
23461 ; return 0; }
23462 EOF
23463 if { (eval echo configure:23464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23464   rm -rf conftest*
23465   ol_cv_type_sig_atomic_t=yes
23466 else
23467   echo "configure: failed program was:" >&5
23468   cat conftest.$ac_ext >&5
23469   rm -rf conftest*
23470   ol_cv_type_sig_atomic_t=no
23471 fi
23472 rm -f conftest*
23473 fi
23474
23475 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23476   if test $ol_cv_type_sig_atomic_t = no; then
23477     cat >> confdefs.h <<\EOF
23478 #define sig_atomic_t int
23479 EOF
23480
23481   fi
23482  
23483
23484
23485 # test for pw_gecos in struct passwd
23486 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23487 echo "configure:23488: checking struct passwd for pw_gecos" >&5
23488 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23489   echo $ac_n "(cached) $ac_c" 1>&6
23490 else
23491   
23492         cat > conftest.$ac_ext <<EOF
23493 #line 23494 "configure"
23494 #include "confdefs.h"
23495 #include <pwd.h>
23496 int main() {
23497
23498         struct passwd pwd;
23499         pwd.pw_gecos = pwd.pw_name;
23500
23501 ; return 0; }
23502 EOF
23503 if { (eval echo configure:23504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23504   rm -rf conftest*
23505   ol_cv_struct_passwd_pw_gecos=yes
23506 else
23507   echo "configure: failed program was:" >&5
23508   cat conftest.$ac_ext >&5
23509   rm -rf conftest*
23510   ol_cv_struct_passwd_pw_gecos=no
23511 fi
23512 rm -f conftest*
23513 fi
23514
23515 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23516 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23517         cat >> confdefs.h <<\EOF
23518 #define HAVE_PW_GECOS 1
23519 EOF
23520
23521 fi
23522
23523 # test for pw_passwd in struct passwd
23524 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23525 echo "configure:23526: checking struct passwd for pw_passwd" >&5
23526 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23527   echo $ac_n "(cached) $ac_c" 1>&6
23528 else
23529   
23530         cat > conftest.$ac_ext <<EOF
23531 #line 23532 "configure"
23532 #include "confdefs.h"
23533 #include <pwd.h>
23534 int main() {
23535
23536         struct passwd pwd;
23537         pwd.pw_passwd = pwd.pw_name;
23538
23539 ; return 0; }
23540 EOF
23541 if { (eval echo configure:23542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23542   rm -rf conftest*
23543   ol_cv_struct_passwd_pw_passwd=yes
23544 else
23545   echo "configure: failed program was:" >&5
23546   cat conftest.$ac_ext >&5
23547   rm -rf conftest*
23548   ol_cv_struct_passwd_pw_passwd=no
23549 fi
23550 rm -f conftest*
23551 fi
23552
23553 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23554 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23555         cat >> confdefs.h <<\EOF
23556 #define HAVE_PW_PASSWD 1
23557 EOF
23558
23559 fi
23560
23561
23562 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23563 echo "configure:23564: checking if toupper() requires islower()" >&5
23564 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23565   echo $ac_n "(cached) $ac_c" 1>&6
23566 else
23567   
23568         if test "$cross_compiling" = yes; then
23569   ol_cv_c_upper_lower=safe
23570 else
23571   cat > conftest.$ac_ext <<EOF
23572 #line 23573 "configure"
23573 #include "confdefs.h"
23574
23575 #include <ctype.h>
23576 main()
23577 {
23578         if ('C' == toupper('C'))
23579                 exit(0);
23580         else
23581                 exit(1);
23582 }
23583 EOF
23584 if { (eval echo configure:23585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23585 then
23586   ol_cv_c_upper_lower=no
23587 else
23588   echo "configure: failed program was:" >&5
23589   cat conftest.$ac_ext >&5
23590   rm -fr conftest*
23591   ol_cv_c_upper_lower=yes
23592 fi
23593 rm -fr conftest*
23594 fi
23595
23596 fi
23597
23598 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23599 if test $ol_cv_c_upper_lower != no ; then
23600         cat >> confdefs.h <<\EOF
23601 #define C_UPPER_LOWER 1
23602 EOF
23603
23604 fi
23605
23606 echo $ac_n "checking for working const""... $ac_c" 1>&6
23607 echo "configure:23608: checking for working const" >&5
23608 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23609   echo $ac_n "(cached) $ac_c" 1>&6
23610 else
23611   cat > conftest.$ac_ext <<EOF
23612 #line 23613 "configure"
23613 #include "confdefs.h"
23614
23615 int main() {
23616
23617 /* Ultrix mips cc rejects this.  */
23618 typedef int charset[2]; const charset x;
23619 /* SunOS 4.1.1 cc rejects this.  */
23620 char const *const *ccp;
23621 char **p;
23622 /* NEC SVR4.0.2 mips cc rejects this.  */
23623 struct point {int x, y;};
23624 static struct point const zero = {0,0};
23625 /* AIX XL C 1.02.0.0 rejects this.
23626    It does not let you subtract one const X* pointer from another in an arm
23627    of an if-expression whose if-part is not a constant expression */
23628 const char *g = "string";
23629 ccp = &g + (g ? g-g : 0);
23630 /* HPUX 7.0 cc rejects these. */
23631 ++ccp;
23632 p = (char**) ccp;
23633 ccp = (char const *const *) p;
23634 { /* SCO 3.2v4 cc rejects this.  */
23635   char *t;
23636   char const *s = 0 ? (char *) 0 : (char const *) 0;
23637
23638   *t++ = 0;
23639 }
23640 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23641   int x[] = {25, 17};
23642   const int *foo = &x[0];
23643   ++foo;
23644 }
23645 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23646   typedef const int *iptr;
23647   iptr p = 0;
23648   ++p;
23649 }
23650 { /* AIX XL C 1.02.0.0 rejects this saying
23651      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23652   struct s { int j; const int *ap[3]; };
23653   struct s *b; b->j = 5;
23654 }
23655 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23656   const int foo = 10;
23657 }
23658
23659 ; return 0; }
23660 EOF
23661 if { (eval echo configure:23662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23662   rm -rf conftest*
23663   ac_cv_c_const=yes
23664 else
23665   echo "configure: failed program was:" >&5
23666   cat conftest.$ac_ext >&5
23667   rm -rf conftest*
23668   ac_cv_c_const=no
23669 fi
23670 rm -f conftest*
23671 fi
23672
23673 echo "$ac_t""$ac_cv_c_const" 1>&6
23674 if test $ac_cv_c_const = no; then
23675   cat >> confdefs.h <<\EOF
23676 #define const 
23677 EOF
23678
23679 fi
23680
23681 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23682 echo "configure:23683: checking if compiler understands volatile" >&5
23683 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23684   echo $ac_n "(cached) $ac_c" 1>&6
23685 else
23686   cat > conftest.$ac_ext <<EOF
23687 #line 23688 "configure"
23688 #include "confdefs.h"
23689 int x, y, z;
23690 int main() {
23691 volatile int a; int * volatile b = x ? &y : &z;
23692       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23693       *b = 0;
23694 ; return 0; }
23695 EOF
23696 if { (eval echo configure:23697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23697   rm -rf conftest*
23698   ol_cv_c_volatile=yes
23699 else
23700   echo "configure: failed program was:" >&5
23701   cat conftest.$ac_ext >&5
23702   rm -rf conftest*
23703   ol_cv_c_volatile=no
23704 fi
23705 rm -f conftest*
23706 fi
23707
23708 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23709   if test $ol_cv_c_volatile = yes; then
23710     : 
23711   else
23712     cat >> confdefs.h <<\EOF
23713 #define volatile 
23714 EOF
23715
23716   fi
23717  
23718
23719 if test $cross_compiling = yes ; then
23720         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23721         cat >> confdefs.h <<\EOF
23722 #define CROSS_COMPILING 1
23723 EOF
23724
23725 else
23726         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23727 echo "configure:23728: checking whether byte ordering is bigendian" >&5
23728 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23729   echo $ac_n "(cached) $ac_c" 1>&6
23730 else
23731   ac_cv_c_bigendian=unknown
23732 # See if sys/param.h defines the BYTE_ORDER macro.
23733 cat > conftest.$ac_ext <<EOF
23734 #line 23735 "configure"
23735 #include "confdefs.h"
23736 #include <sys/types.h>
23737 #include <sys/param.h>
23738 int main() {
23739
23740 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23741  bogus endian macros
23742 #endif
23743 ; return 0; }
23744 EOF
23745 if { (eval echo configure:23746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23746   rm -rf conftest*
23747   # It does; now see whether it defined to BIG_ENDIAN or not.
23748 cat > conftest.$ac_ext <<EOF
23749 #line 23750 "configure"
23750 #include "confdefs.h"
23751 #include <sys/types.h>
23752 #include <sys/param.h>
23753 int main() {
23754
23755 #if BYTE_ORDER != BIG_ENDIAN
23756  not big endian
23757 #endif
23758 ; return 0; }
23759 EOF
23760 if { (eval echo configure:23761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23761   rm -rf conftest*
23762   ac_cv_c_bigendian=yes
23763 else
23764   echo "configure: failed program was:" >&5
23765   cat conftest.$ac_ext >&5
23766   rm -rf conftest*
23767   ac_cv_c_bigendian=no
23768 fi
23769 rm -f conftest*
23770 else
23771   echo "configure: failed program was:" >&5
23772   cat conftest.$ac_ext >&5
23773 fi
23774 rm -f conftest*
23775 if test $ac_cv_c_bigendian = unknown; then
23776 if test "$cross_compiling" = yes; then
23777     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23778 else
23779   cat > conftest.$ac_ext <<EOF
23780 #line 23781 "configure"
23781 #include "confdefs.h"
23782 main () {
23783   /* Are we little or big endian?  From Harbison&Steele.  */
23784   union
23785   {
23786     long l;
23787     char c[sizeof (long)];
23788   } u;
23789   u.l = 1;
23790   exit (u.c[sizeof (long) - 1] == 1);
23791 }
23792 EOF
23793 if { (eval echo configure:23794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23794 then
23795   ac_cv_c_bigendian=no
23796 else
23797   echo "configure: failed program was:" >&5
23798   cat conftest.$ac_ext >&5
23799   rm -fr conftest*
23800   ac_cv_c_bigendian=yes
23801 fi
23802 rm -fr conftest*
23803 fi
23804
23805 fi
23806 fi
23807
23808 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23809 if test $ac_cv_c_bigendian = yes; then
23810   cat >> confdefs.h <<\EOF
23811 #define WORDS_BIGENDIAN 1
23812 EOF
23813
23814 fi
23815
23816 fi
23817
23818 echo $ac_n "checking size of short""... $ac_c" 1>&6
23819 echo "configure:23820: checking size of short" >&5 
23820 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23821   echo $ac_n "(cached) $ac_c" 1>&6
23822 else
23823   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23824   cat > conftest.$ac_ext <<EOF
23825 #line 23826 "configure"
23826 #include "confdefs.h"
23827 #include "confdefs.h" 
23828 #include <stdlib.h>
23829 #include <sys/types.h> 
23830  
23831
23832 int main() {
23833 switch (0) case 0: case (sizeof (short) == $ac_size):;
23834 ; return 0; }
23835 EOF
23836 if { (eval echo configure:23837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23837   rm -rf conftest*
23838   ac_cv_sizeof_short=$ac_size
23839 else
23840   echo "configure: failed program was:" >&5
23841   cat conftest.$ac_ext >&5
23842 fi
23843 rm -f conftest* 
23844   if test x$ac_cv_sizeof_short != x ; then break; fi 
23845 done 
23846
23847 fi
23848  
23849 if test x$ac_cv_sizeof_short = x ; then 
23850   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23851 fi 
23852 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23853 cat >> confdefs.h <<EOF
23854 #define SIZEOF_SHORT $ac_cv_sizeof_short
23855 EOF
23856  
23857  
23858 echo $ac_n "checking size of int""... $ac_c" 1>&6
23859 echo "configure:23860: checking size of int" >&5 
23860 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23861   echo $ac_n "(cached) $ac_c" 1>&6
23862 else
23863   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23864   cat > conftest.$ac_ext <<EOF
23865 #line 23866 "configure"
23866 #include "confdefs.h"
23867 #include "confdefs.h" 
23868 #include <stdlib.h>
23869 #include <sys/types.h> 
23870  
23871
23872 int main() {
23873 switch (0) case 0: case (sizeof (int) == $ac_size):;
23874 ; return 0; }
23875 EOF
23876 if { (eval echo configure:23877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23877   rm -rf conftest*
23878   ac_cv_sizeof_int=$ac_size
23879 else
23880   echo "configure: failed program was:" >&5
23881   cat conftest.$ac_ext >&5
23882 fi
23883 rm -f conftest* 
23884   if test x$ac_cv_sizeof_int != x ; then break; fi 
23885 done 
23886
23887 fi
23888  
23889 if test x$ac_cv_sizeof_int = x ; then 
23890   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23891 fi 
23892 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23893 cat >> confdefs.h <<EOF
23894 #define SIZEOF_INT $ac_cv_sizeof_int
23895 EOF
23896  
23897  
23898 echo $ac_n "checking size of long""... $ac_c" 1>&6
23899 echo "configure:23900: checking size of long" >&5 
23900 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23901   echo $ac_n "(cached) $ac_c" 1>&6
23902 else
23903   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23904   cat > conftest.$ac_ext <<EOF
23905 #line 23906 "configure"
23906 #include "confdefs.h"
23907 #include "confdefs.h" 
23908 #include <stdlib.h>
23909 #include <sys/types.h> 
23910  
23911
23912 int main() {
23913 switch (0) case 0: case (sizeof (long) == $ac_size):;
23914 ; return 0; }
23915 EOF
23916 if { (eval echo configure:23917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23917   rm -rf conftest*
23918   ac_cv_sizeof_long=$ac_size
23919 else
23920   echo "configure: failed program was:" >&5
23921   cat conftest.$ac_ext >&5
23922 fi
23923 rm -f conftest* 
23924   if test x$ac_cv_sizeof_long != x ; then break; fi 
23925 done 
23926
23927 fi
23928  
23929 if test x$ac_cv_sizeof_long = x ; then 
23930   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23931 fi 
23932 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23933 cat >> confdefs.h <<EOF
23934 #define SIZEOF_LONG $ac_cv_sizeof_long
23935 EOF
23936  
23937
23938 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23939 echo "configure:23940: checking size of wchar_t" >&5 
23940 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23941   echo $ac_n "(cached) $ac_c" 1>&6
23942 else
23943   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23944   cat > conftest.$ac_ext <<EOF
23945 #line 23946 "configure"
23946 #include "confdefs.h"
23947 #include "confdefs.h" 
23948 #include <stdlib.h>
23949 #include <sys/types.h> 
23950  
23951
23952 int main() {
23953 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23954 ; return 0; }
23955 EOF
23956 if { (eval echo configure:23957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23957   rm -rf conftest*
23958   ac_cv_sizeof_wchar_t=$ac_size
23959 else
23960   echo "configure: failed program was:" >&5
23961   cat conftest.$ac_ext >&5
23962 fi
23963 rm -f conftest* 
23964   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23965 done 
23966
23967 fi
23968  
23969 if test x$ac_cv_sizeof_wchar_t = x ; then 
23970   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23971 fi 
23972 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23973 cat >> confdefs.h <<EOF
23974 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23975 EOF
23976  
23977
23978
23979 if test "$ac_cv_sizeof_int" -lt 4 ; then
23980         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23981
23982         cat >> confdefs.h <<\EOF
23983 #define LBER_INT_T long
23984 EOF
23985
23986 else
23987         cat >> confdefs.h <<\EOF
23988 #define LBER_INT_T int
23989 EOF
23990
23991 fi
23992
23993 cat >> confdefs.h <<\EOF
23994 #define LBER_LEN_T long
23995 EOF
23996
23997 cat >> confdefs.h <<\EOF
23998 #define LBER_SOCKET_T int
23999 EOF
24000
24001 cat >> confdefs.h <<\EOF
24002 #define LBER_TAG_T long
24003 EOF
24004
24005
24006 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
24007 echo "configure:24008: checking for 8-bit clean memcmp" >&5
24008 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
24009   echo $ac_n "(cached) $ac_c" 1>&6
24010 else
24011   if test "$cross_compiling" = yes; then
24012   ac_cv_func_memcmp_clean=no
24013 else
24014   cat > conftest.$ac_ext <<EOF
24015 #line 24016 "configure"
24016 #include "confdefs.h"
24017
24018 main()
24019 {
24020   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
24021   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
24022 }
24023
24024 EOF
24025 if { (eval echo configure:24026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
24026 then
24027   ac_cv_func_memcmp_clean=yes
24028 else
24029   echo "configure: failed program was:" >&5
24030   cat conftest.$ac_ext >&5
24031   rm -fr conftest*
24032   ac_cv_func_memcmp_clean=no
24033 fi
24034 rm -fr conftest*
24035 fi
24036
24037 fi
24038
24039 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24040 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24041
24042 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24043 echo "configure:24044: checking for strftime" >&5
24044 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24045   echo $ac_n "(cached) $ac_c" 1>&6
24046 else
24047   cat > conftest.$ac_ext <<EOF
24048 #line 24049 "configure"
24049 #include "confdefs.h"
24050 /* System header to define __stub macros and hopefully few prototypes,
24051     which can conflict with char strftime(); below.  */
24052 #include <assert.h>
24053 /* Override any gcc2 internal prototype to avoid an error.  */
24054 /* We use char because int might match the return type of a gcc2
24055     builtin and then its argument prototype would still apply.  */
24056 char strftime();
24057 char (*f)();
24058
24059 int main() {
24060
24061 /* The GNU C library defines this for functions which it implements
24062     to always fail with ENOSYS.  Some functions are actually named
24063     something starting with __ and the normal name is an alias.  */
24064 #if defined (__stub_strftime) || defined (__stub___strftime)
24065 choke me
24066 #else
24067 f = strftime;
24068 #endif
24069
24070 ; return 0; }
24071 EOF
24072 if { (eval echo configure:24073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24073   rm -rf conftest*
24074   eval "ac_cv_func_strftime=yes"
24075 else
24076   echo "configure: failed program was:" >&5
24077   cat conftest.$ac_ext >&5
24078   rm -rf conftest*
24079   eval "ac_cv_func_strftime=no"
24080 fi
24081 rm -f conftest*
24082 fi
24083
24084 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24085   echo "$ac_t""yes" 1>&6
24086   cat >> confdefs.h <<\EOF
24087 #define HAVE_STRFTIME 1
24088 EOF
24089
24090 else
24091   echo "$ac_t""no" 1>&6
24092 # strftime is in -lintl on SCO UNIX.
24093 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24094 echo "configure:24095: checking for strftime in -lintl" >&5
24095 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24097   echo $ac_n "(cached) $ac_c" 1>&6
24098 else
24099   ac_save_LIBS="$LIBS"
24100 LIBS="-lintl  $LIBS"
24101 cat > conftest.$ac_ext <<EOF
24102 #line 24103 "configure"
24103 #include "confdefs.h"
24104 /* Override any gcc2 internal prototype to avoid an error.  */
24105 /* We use char because int might match the return type of a gcc2
24106     builtin and then its argument prototype would still apply.  */
24107 char strftime();
24108
24109 int main() {
24110 strftime()
24111 ; return 0; }
24112 EOF
24113 if { (eval echo configure:24114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24114   rm -rf conftest*
24115   eval "ac_cv_lib_$ac_lib_var=yes"
24116 else
24117   echo "configure: failed program was:" >&5
24118   cat conftest.$ac_ext >&5
24119   rm -rf conftest*
24120   eval "ac_cv_lib_$ac_lib_var=no"
24121 fi
24122 rm -f conftest*
24123 LIBS="$ac_save_LIBS"
24124
24125 fi
24126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24127   echo "$ac_t""yes" 1>&6
24128   cat >> confdefs.h <<\EOF
24129 #define HAVE_STRFTIME 1
24130 EOF
24131
24132 LIBS="-lintl $LIBS"
24133 else
24134   echo "$ac_t""no" 1>&6
24135 fi
24136
24137 fi
24138
24139
24140 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24141 echo "configure:24142: checking for inet_aton()" >&5
24142 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24143   echo $ac_n "(cached) $ac_c" 1>&6
24144 else
24145   cat > conftest.$ac_ext <<EOF
24146 #line 24147 "configure"
24147 #include "confdefs.h"
24148
24149 #ifdef HAVE_SYS_TYPES_H
24150 #       include <sys/types.h>
24151 #endif
24152 #ifdef HAVE_SYS_SOCKET_H
24153 #       include <sys/socket.h>
24154 #       ifdef HAVE_SYS_SELECT_H
24155 #               include <sys/select.h>
24156 #       endif
24157 #       include <netinet/in.h>
24158 #       ifdef HAVE_ARPA_INET_H
24159 #               include <arpa/inet.h>
24160 #       endif
24161 #endif
24162
24163 int main() {
24164 struct in_addr in;
24165 int rc = inet_aton( "255.255.255.255", &in );
24166 ; return 0; }
24167 EOF
24168 if { (eval echo configure:24169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24169   rm -rf conftest*
24170   ol_cv_func_inet_aton=yes
24171 else
24172   echo "configure: failed program was:" >&5
24173   cat conftest.$ac_ext >&5
24174   rm -rf conftest*
24175   ol_cv_func_inet_aton=no
24176 fi
24177 rm -f conftest*
24178 fi
24179
24180 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24181   if test $ol_cv_func_inet_aton != no; then
24182     cat >> confdefs.h <<\EOF
24183 #define HAVE_INET_ATON 1
24184 EOF
24185
24186   fi
24187  
24188
24189 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24190 echo "configure:24191: checking for _spawnlp" >&5
24191 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24192   echo $ac_n "(cached) $ac_c" 1>&6
24193 else
24194   cat > conftest.$ac_ext <<EOF
24195 #line 24196 "configure"
24196 #include "confdefs.h"
24197 /* System header to define __stub macros and hopefully few prototypes,
24198     which can conflict with char _spawnlp(); below.  */
24199 #include <assert.h>
24200 /* Override any gcc2 internal prototype to avoid an error.  */
24201 /* We use char because int might match the return type of a gcc2
24202     builtin and then its argument prototype would still apply.  */
24203 char _spawnlp();
24204 char (*f)();
24205
24206 int main() {
24207
24208 /* The GNU C library defines this for functions which it implements
24209     to always fail with ENOSYS.  Some functions are actually named
24210     something starting with __ and the normal name is an alias.  */
24211 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24212 choke me
24213 #else
24214 f = _spawnlp;
24215 #endif
24216
24217 ; return 0; }
24218 EOF
24219 if { (eval echo configure:24220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24220   rm -rf conftest*
24221   eval "ac_cv_func__spawnlp=yes"
24222 else
24223   echo "configure: failed program was:" >&5
24224   cat conftest.$ac_ext >&5
24225   rm -rf conftest*
24226   eval "ac_cv_func__spawnlp=no"
24227 fi
24228 rm -f conftest*
24229 fi
24230
24231 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24232   echo "$ac_t""yes" 1>&6
24233   cat >> confdefs.h <<\EOF
24234 #define HAVE_SPAWNLP 1
24235 EOF
24236
24237 else
24238   echo "$ac_t""no" 1>&6
24239 fi
24240
24241
24242 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24243 echo "configure:24244: checking for _snprintf" >&5
24244 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24245   echo $ac_n "(cached) $ac_c" 1>&6
24246 else
24247   cat > conftest.$ac_ext <<EOF
24248 #line 24249 "configure"
24249 #include "confdefs.h"
24250 /* System header to define __stub macros and hopefully few prototypes,
24251     which can conflict with char _snprintf(); below.  */
24252 #include <assert.h>
24253 /* Override any gcc2 internal prototype to avoid an error.  */
24254 /* We use char because int might match the return type of a gcc2
24255     builtin and then its argument prototype would still apply.  */
24256 char _snprintf();
24257 char (*f)();
24258
24259 int main() {
24260
24261 /* The GNU C library defines this for functions which it implements
24262     to always fail with ENOSYS.  Some functions are actually named
24263     something starting with __ and the normal name is an alias.  */
24264 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24265 choke me
24266 #else
24267 f = _snprintf;
24268 #endif
24269
24270 ; return 0; }
24271 EOF
24272 if { (eval echo configure:24273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24273   rm -rf conftest*
24274   eval "ac_cv_func__snprintf=yes"
24275 else
24276   echo "configure: failed program was:" >&5
24277   cat conftest.$ac_ext >&5
24278   rm -rf conftest*
24279   eval "ac_cv_func__snprintf=no"
24280 fi
24281 rm -f conftest*
24282 fi
24283
24284 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24285   echo "$ac_t""yes" 1>&6
24286   ac_cv_func_snprintf=yes
24287         cat >> confdefs.h <<\EOF
24288 #define snprintf _snprintf
24289 EOF
24290
24291
24292 else
24293   echo "$ac_t""no" 1>&6
24294 fi
24295
24296
24297 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24298 echo "configure:24299: checking for _vsnprintf" >&5
24299 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24300   echo $ac_n "(cached) $ac_c" 1>&6
24301 else
24302   cat > conftest.$ac_ext <<EOF
24303 #line 24304 "configure"
24304 #include "confdefs.h"
24305 /* System header to define __stub macros and hopefully few prototypes,
24306     which can conflict with char _vsnprintf(); below.  */
24307 #include <assert.h>
24308 /* Override any gcc2 internal prototype to avoid an error.  */
24309 /* We use char because int might match the return type of a gcc2
24310     builtin and then its argument prototype would still apply.  */
24311 char _vsnprintf();
24312 char (*f)();
24313
24314 int main() {
24315
24316 /* The GNU C library defines this for functions which it implements
24317     to always fail with ENOSYS.  Some functions are actually named
24318     something starting with __ and the normal name is an alias.  */
24319 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24320 choke me
24321 #else
24322 f = _vsnprintf;
24323 #endif
24324
24325 ; return 0; }
24326 EOF
24327 if { (eval echo configure:24328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24328   rm -rf conftest*
24329   eval "ac_cv_func__vsnprintf=yes"
24330 else
24331   echo "configure: failed program was:" >&5
24332   cat conftest.$ac_ext >&5
24333   rm -rf conftest*
24334   eval "ac_cv_func__vsnprintf=no"
24335 fi
24336 rm -f conftest*
24337 fi
24338
24339 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24340   echo "$ac_t""yes" 1>&6
24341   ac_cv_func_vsnprintf=yes
24342         cat >> confdefs.h <<\EOF
24343 #define vsnprintf _vsnprintf
24344 EOF
24345
24346
24347 else
24348   echo "$ac_t""no" 1>&6
24349 fi
24350
24351
24352 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24353 echo "configure:24354: checking for vprintf" >&5
24354 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24355   echo $ac_n "(cached) $ac_c" 1>&6
24356 else
24357   cat > conftest.$ac_ext <<EOF
24358 #line 24359 "configure"
24359 #include "confdefs.h"
24360 /* System header to define __stub macros and hopefully few prototypes,
24361     which can conflict with char vprintf(); below.  */
24362 #include <assert.h>
24363 /* Override any gcc2 internal prototype to avoid an error.  */
24364 /* We use char because int might match the return type of a gcc2
24365     builtin and then its argument prototype would still apply.  */
24366 char vprintf();
24367 char (*f)();
24368
24369 int main() {
24370
24371 /* The GNU C library defines this for functions which it implements
24372     to always fail with ENOSYS.  Some functions are actually named
24373     something starting with __ and the normal name is an alias.  */
24374 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24375 choke me
24376 #else
24377 f = vprintf;
24378 #endif
24379
24380 ; return 0; }
24381 EOF
24382 if { (eval echo configure:24383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24383   rm -rf conftest*
24384   eval "ac_cv_func_vprintf=yes"
24385 else
24386   echo "configure: failed program was:" >&5
24387   cat conftest.$ac_ext >&5
24388   rm -rf conftest*
24389   eval "ac_cv_func_vprintf=no"
24390 fi
24391 rm -f conftest*
24392 fi
24393
24394 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24395   echo "$ac_t""yes" 1>&6
24396   cat >> confdefs.h <<\EOF
24397 #define HAVE_VPRINTF 1
24398 EOF
24399
24400 else
24401   echo "$ac_t""no" 1>&6
24402 fi
24403
24404 if test "$ac_cv_func_vprintf" != yes; then
24405 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24406 echo "configure:24407: checking for _doprnt" >&5
24407 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24408   echo $ac_n "(cached) $ac_c" 1>&6
24409 else
24410   cat > conftest.$ac_ext <<EOF
24411 #line 24412 "configure"
24412 #include "confdefs.h"
24413 /* System header to define __stub macros and hopefully few prototypes,
24414     which can conflict with char _doprnt(); below.  */
24415 #include <assert.h>
24416 /* Override any gcc2 internal prototype to avoid an error.  */
24417 /* We use char because int might match the return type of a gcc2
24418     builtin and then its argument prototype would still apply.  */
24419 char _doprnt();
24420 char (*f)();
24421
24422 int main() {
24423
24424 /* The GNU C library defines this for functions which it implements
24425     to always fail with ENOSYS.  Some functions are actually named
24426     something starting with __ and the normal name is an alias.  */
24427 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24428 choke me
24429 #else
24430 f = _doprnt;
24431 #endif
24432
24433 ; return 0; }
24434 EOF
24435 if { (eval echo configure:24436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24436   rm -rf conftest*
24437   eval "ac_cv_func__doprnt=yes"
24438 else
24439   echo "configure: failed program was:" >&5
24440   cat conftest.$ac_ext >&5
24441   rm -rf conftest*
24442   eval "ac_cv_func__doprnt=no"
24443 fi
24444 rm -f conftest*
24445 fi
24446
24447 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24448   echo "$ac_t""yes" 1>&6
24449   cat >> confdefs.h <<\EOF
24450 #define HAVE_DOPRNT 1
24451 EOF
24452
24453 else
24454   echo "$ac_t""no" 1>&6
24455 fi
24456
24457 fi
24458
24459
24460 if test $ac_cv_func_vprintf = yes ; then
24461                 for ac_func in snprintf vsnprintf
24462 do
24463 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24464 echo "configure:24465: checking for $ac_func" >&5
24465 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24466   echo $ac_n "(cached) $ac_c" 1>&6
24467 else
24468   cat > conftest.$ac_ext <<EOF
24469 #line 24470 "configure"
24470 #include "confdefs.h"
24471 /* System header to define __stub macros and hopefully few prototypes,
24472     which can conflict with char $ac_func(); below.  */
24473 #include <assert.h>
24474 /* Override any gcc2 internal prototype to avoid an error.  */
24475 /* We use char because int might match the return type of a gcc2
24476     builtin and then its argument prototype would still apply.  */
24477 char $ac_func();
24478 char (*f)();
24479
24480 int main() {
24481
24482 /* The GNU C library defines this for functions which it implements
24483     to always fail with ENOSYS.  Some functions are actually named
24484     something starting with __ and the normal name is an alias.  */
24485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24486 choke me
24487 #else
24488 f = $ac_func;
24489 #endif
24490
24491 ; return 0; }
24492 EOF
24493 if { (eval echo configure:24494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24494   rm -rf conftest*
24495   eval "ac_cv_func_$ac_func=yes"
24496 else
24497   echo "configure: failed program was:" >&5
24498   cat conftest.$ac_ext >&5
24499   rm -rf conftest*
24500   eval "ac_cv_func_$ac_func=no"
24501 fi
24502 rm -f conftest*
24503 fi
24504
24505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24506   echo "$ac_t""yes" 1>&6
24507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24508   cat >> confdefs.h <<EOF
24509 #define $ac_tr_func 1
24510 EOF
24511  
24512 else
24513   echo "$ac_t""no" 1>&6
24514 fi
24515 done
24516
24517 fi
24518
24519 for ac_func in \
24520         bcopy                   \
24521         closesocket             \
24522         chroot                  \
24523         endgrent                \
24524         endpwent                \
24525         fcntl                   \
24526         flock                   \
24527         fstat                   \
24528         getdtablesize   \
24529         getgrgid                \
24530         gethostname             \
24531         getpass                 \
24532         getpassphrase   \
24533         getpwuid                \
24534         getpwnam                \
24535         getspnam                \
24536         gettimeofday    \
24537         initgroups              \
24538         lockf                   \
24539         memcpy                  \
24540         memmove                 \
24541         mkstemp                 \
24542         mktemp                  \
24543         pipe                    \
24544         read                    \
24545         recv                    \
24546         recvfrom                \
24547         setpwfile               \
24548         setgid                  \
24549         setegid                 \
24550         setsid                  \
24551         setuid                  \
24552         seteuid                 \
24553         signal                  \
24554         strdup                  \
24555         strpbrk                 \
24556         strrchr                 \
24557         strsep                  \
24558         strstr                  \
24559         strtol                  \
24560         strtoul                 \
24561         strtoq                  \
24562         strtouq                 \
24563         strtoll                 \
24564         strspn                  \
24565         sysconf                 \
24566         usleep                  \
24567         waitpid                 \
24568         wait4                   \
24569         write                   \
24570         send                    \
24571         sendmsg                 \
24572         sendto                  \
24573
24574 do
24575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24576 echo "configure:24577: checking for $ac_func" >&5
24577 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24578   echo $ac_n "(cached) $ac_c" 1>&6
24579 else
24580   cat > conftest.$ac_ext <<EOF
24581 #line 24582 "configure"
24582 #include "confdefs.h"
24583 /* System header to define __stub macros and hopefully few prototypes,
24584     which can conflict with char $ac_func(); below.  */
24585 #include <assert.h>
24586 /* Override any gcc2 internal prototype to avoid an error.  */
24587 /* We use char because int might match the return type of a gcc2
24588     builtin and then its argument prototype would still apply.  */
24589 char $ac_func();
24590 char (*f)();
24591
24592 int main() {
24593
24594 /* The GNU C library defines this for functions which it implements
24595     to always fail with ENOSYS.  Some functions are actually named
24596     something starting with __ and the normal name is an alias.  */
24597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24598 choke me
24599 #else
24600 f = $ac_func;
24601 #endif
24602
24603 ; return 0; }
24604 EOF
24605 if { (eval echo configure:24606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24606   rm -rf conftest*
24607   eval "ac_cv_func_$ac_func=yes"
24608 else
24609   echo "configure: failed program was:" >&5
24610   cat conftest.$ac_ext >&5
24611   rm -rf conftest*
24612   eval "ac_cv_func_$ac_func=no"
24613 fi
24614 rm -f conftest*
24615 fi
24616
24617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24618   echo "$ac_t""yes" 1>&6
24619     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24620   cat >> confdefs.h <<EOF
24621 #define $ac_tr_func 1
24622 EOF
24623  
24624 else
24625   echo "$ac_t""no" 1>&6
24626 fi
24627 done
24628
24629
24630 for ac_func in getopt getpeereid
24631 do
24632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24633 echo "configure:24634: checking for $ac_func" >&5
24634 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24635   echo $ac_n "(cached) $ac_c" 1>&6
24636 else
24637   cat > conftest.$ac_ext <<EOF
24638 #line 24639 "configure"
24639 #include "confdefs.h"
24640 /* System header to define __stub macros and hopefully few prototypes,
24641     which can conflict with char $ac_func(); below.  */
24642 #include <assert.h>
24643 /* Override any gcc2 internal prototype to avoid an error.  */
24644 /* We use char because int might match the return type of a gcc2
24645     builtin and then its argument prototype would still apply.  */
24646 char $ac_func();
24647 char (*f)();
24648
24649 int main() {
24650
24651 /* The GNU C library defines this for functions which it implements
24652     to always fail with ENOSYS.  Some functions are actually named
24653     something starting with __ and the normal name is an alias.  */
24654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24655 choke me
24656 #else
24657 f = $ac_func;
24658 #endif
24659
24660 ; return 0; }
24661 EOF
24662 if { (eval echo configure:24663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24663   rm -rf conftest*
24664   eval "ac_cv_func_$ac_func=yes"
24665 else
24666   echo "configure: failed program was:" >&5
24667   cat conftest.$ac_ext >&5
24668   rm -rf conftest*
24669   eval "ac_cv_func_$ac_func=no"
24670 fi
24671 rm -f conftest*
24672 fi
24673
24674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24675   echo "$ac_t""yes" 1>&6
24676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24677   cat >> confdefs.h <<EOF
24678 #define $ac_tr_func 1
24679 EOF
24680  
24681 else
24682   echo "$ac_t""no" 1>&6
24683 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24684 fi
24685 done
24686
24687
24688
24689 if test "$ac_cv_func_getopt" != yes; then
24690         LIBSRCS="$LIBSRCS getopt.c"
24691 fi
24692 if test "$ac_cv_func_getpeereid" != yes; then
24693         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24694 echo "configure:24695: checking for msg_accrights in msghdr" >&5
24695 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24696   echo $ac_n "(cached) $ac_c" 1>&6
24697 else
24698   cat > conftest.$ac_ext <<EOF
24699 #line 24700 "configure"
24700 #include "confdefs.h"
24701 #include <sys/socket.h>
24702 int main() {
24703 struct msghdr m; m.msg_accrightslen=0
24704 ; return 0; }
24705 EOF
24706 if { (eval echo configure:24707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24707   rm -rf conftest*
24708   ol_cv_msghdr_msg_accrights=yes
24709 else
24710   echo "configure: failed program was:" >&5
24711   cat conftest.$ac_ext >&5
24712   rm -rf conftest*
24713   ol_cv_msghdr_msg_accrights=no
24714 fi
24715 rm -f conftest*
24716         
24717 fi
24718
24719 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24720   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24721         cat >> confdefs.h <<\EOF
24722 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24723 EOF
24724
24725   fi
24726
24727         LIBSRCS="$LIBSRCS getpeereid.c"
24728 fi
24729 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24730         if test "$ac_cv_func_snprintf" != yes; then
24731                 cat >> confdefs.h <<\EOF
24732 #define snprintf ber_pvt_snprintf
24733 EOF
24734
24735         fi
24736         if test "$ac_cv_func_vsnprintf" != yes; then
24737                 cat >> confdefs.h <<\EOF
24738 #define vsnprintf ber_pvt_vsnprintf
24739 EOF
24740
24741         fi
24742 fi
24743
24744
24745 if test "$ol_enable_slapi" != no ; then
24746                         for ac_hdr in ltdl.h
24747 do
24748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24750 echo "configure:24751: checking for $ac_hdr" >&5
24751 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24752   echo $ac_n "(cached) $ac_c" 1>&6
24753 else
24754   cat > conftest.$ac_ext <<EOF
24755 #line 24756 "configure"
24756 #include "confdefs.h"
24757 #include <$ac_hdr>
24758 EOF
24759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24760 { (eval echo configure:24761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24762 if test -z "$ac_err"; then
24763   rm -rf conftest*
24764   eval "ac_cv_header_$ac_safe=yes"
24765 else
24766   echo "$ac_err" >&5
24767   echo "configure: failed program was:" >&5
24768   cat conftest.$ac_ext >&5
24769   rm -rf conftest*
24770   eval "ac_cv_header_$ac_safe=no"
24771 fi
24772 rm -f conftest*
24773 fi
24774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24775   echo "$ac_t""yes" 1>&6
24776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24777   cat >> confdefs.h <<EOF
24778 #define $ac_tr_hdr 1
24779 EOF
24780  
24781 else
24782   echo "$ac_t""no" 1>&6
24783 fi
24784 done
24785
24786
24787         if test $ac_cv_header_ltdl_h != yes ; then
24788                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24789         fi
24790         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24791 echo "configure:24792: checking for lt_dlinit in -lltdl" >&5
24792 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24793 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24794   echo $ac_n "(cached) $ac_c" 1>&6
24795 else
24796   ac_save_LIBS="$LIBS"
24797 LIBS="-lltdl  $LIBS"
24798 cat > conftest.$ac_ext <<EOF
24799 #line 24800 "configure"
24800 #include "confdefs.h"
24801 /* Override any gcc2 internal prototype to avoid an error.  */
24802 /* We use char because int might match the return type of a gcc2
24803     builtin and then its argument prototype would still apply.  */
24804 char lt_dlinit();
24805
24806 int main() {
24807 lt_dlinit()
24808 ; return 0; }
24809 EOF
24810 if { (eval echo configure:24811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24811   rm -rf conftest*
24812   eval "ac_cv_lib_$ac_lib_var=yes"
24813 else
24814   echo "configure: failed program was:" >&5
24815   cat conftest.$ac_ext >&5
24816   rm -rf conftest*
24817   eval "ac_cv_lib_$ac_lib_var=no"
24818 fi
24819 rm -f conftest*
24820 LIBS="$ac_save_LIBS"
24821
24822 fi
24823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24824   echo "$ac_t""yes" 1>&6
24825   
24826                 SLAPI_LIBS=-lltdl
24827                 LIBSLAPI=libslapi.a
24828                 LIBSLAPITOOLS=../libslapi.a
24829                 cat >> confdefs.h <<\EOF
24830 #define HAVE_LIBLTDL 1
24831 EOF
24832
24833         
24834 else
24835   echo "$ac_t""no" 1>&6
24836 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24837 fi
24838
24839
24840         cat >> confdefs.h <<\EOF
24841 #define LDAP_SLAPI 1
24842 EOF
24843
24844 fi
24845
24846 if test "$ol_enable_debug" != no ; then
24847         cat >> confdefs.h <<\EOF
24848 #define LDAP_DEBUG 1
24849 EOF
24850
24851 fi
24852 if test "$ol_enable_syslog" = yes ; then
24853         cat >> confdefs.h <<\EOF
24854 #define LDAP_SYSLOG 1
24855 EOF
24856
24857 fi
24858 if test "$ol_link_kbind" != no ; then
24859         cat >> confdefs.h <<\EOF
24860 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24861 EOF
24862
24863 fi
24864 if test "$ol_enable_proctitle" != no ; then
24865         cat >> confdefs.h <<\EOF
24866 #define LDAP_PROCTITLE 1
24867 EOF
24868
24869 fi
24870 if test "$ol_enable_referrals" != no ; then
24871         cat >> confdefs.h <<\EOF
24872 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24873 EOF
24874
24875 fi
24876 if test "$ol_enable_local" != no; then
24877         cat >> confdefs.h <<\EOF
24878 #define LDAP_PF_LOCAL 1
24879 EOF
24880
24881 fi
24882 if test "$ol_link_ipv6" != no; then
24883         cat >> confdefs.h <<\EOF
24884 #define LDAP_PF_INET6 1
24885 EOF
24886
24887 fi
24888 if test "$ol_enable_cleartext" != no ; then
24889         cat >> confdefs.h <<\EOF
24890 #define SLAPD_CLEARTEXT 1
24891 EOF
24892
24893 fi
24894 if test "$ol_enable_crypt" != no ; then
24895         cat >> confdefs.h <<\EOF
24896 #define SLAPD_CRYPT 1
24897 EOF
24898
24899 fi
24900 if test "$ol_link_spasswd" != no ; then
24901         cat >> confdefs.h <<\EOF
24902 #define SLAPD_SPASSWD 1
24903 EOF
24904
24905 fi
24906 if test "$ol_enable_multimaster" != no ; then
24907         cat >> confdefs.h <<\EOF
24908 #define SLAPD_MULTIMASTER 1
24909 EOF
24910
24911 fi
24912 if test "$ol_enable_rlookups" != no ; then
24913         cat >> confdefs.h <<\EOF
24914 #define SLAPD_RLOOKUPS 1
24915 EOF
24916
24917 fi
24918 if test "$ol_enable_aci" != no ; then
24919         cat >> confdefs.h <<\EOF
24920 #define SLAPD_ACI_ENABLED 1
24921 EOF
24922
24923 fi
24924
24925 if test "$ol_link_modules" != no ; then
24926         cat >> confdefs.h <<\EOF
24927 #define SLAPD_MODULES 1
24928 EOF
24929
24930         BUILD_SLAPD=yes
24931         SLAPD_MODULES_LDFLAGS="-dlopen self"
24932 fi
24933
24934 cat >> confdefs.h <<\EOF
24935 #define SLAPD_MOD_STATIC 1
24936 EOF
24937
24938 cat >> confdefs.h <<\EOF
24939 #define SLAPD_MOD_DYNAMIC 2
24940 EOF
24941
24942
24943 if test "$ol_enable_bdb" != no ; then
24944         BUILD_SLAPD=yes
24945         BUILD_BDB=$ol_enable_bdb
24946         if test "$ol_enable_bdb" = mod ; then
24947                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24948                 MFLAG=SLAPD_MOD_DYNAMIC
24949         else
24950                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24951                 MFLAG=SLAPD_MOD_STATIC
24952         fi
24953         cat >> confdefs.h <<EOF
24954 #define SLAPD_BDB $MFLAG
24955 EOF
24956
24957 fi
24958
24959 if test "$ol_enable_dnssrv" != no ; then
24960         BUILD_SLAPD=yes
24961         BUILD_DNSSRV=$ol_enable_dnssrv
24962         if test "$ol_enable_dnssrv" = mod ; then
24963                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24964                 MFLAG=SLAPD_MOD_DYNAMIC
24965         else
24966                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24967                 MFLAG=SLAPD_MOD_STATIC
24968         fi
24969         cat >> confdefs.h <<EOF
24970 #define SLAPD_DNSSRV $MFLAG
24971 EOF
24972
24973 fi
24974
24975 if test "$ol_enable_hdb" != no ; then
24976         BUILD_SLAPD=yes
24977         BUILD_HDB=$ol_enable_hdb
24978         if test "$ol_enable_hdb" = mod ; then
24979                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24980                 MFLAG=SLAPD_MOD_DYNAMIC
24981         else
24982                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24983                 MFLAG=SLAPD_MOD_STATIC
24984         fi
24985         cat >> confdefs.h <<EOF
24986 #define SLAPD_HDB $MFLAG
24987 EOF
24988
24989 fi
24990
24991 if test "$ol_enable_ldap" != no ; then
24992         BUILD_SLAPD=yes
24993         BUILD_LDAP=$ol_enable_ldap
24994         if test "$ol_enable_ldap" = mod ; then
24995                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24996                 MFLAG=SLAPD_MOD_DYNAMIC
24997         else
24998                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24999                 MFLAG=SLAPD_MOD_STATIC
25000         fi
25001         cat >> confdefs.h <<EOF
25002 #define SLAPD_LDAP $MFLAG
25003 EOF
25004
25005 fi
25006
25007 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25008         BUILD_SLAPD=yes
25009         BUILD_LDBM=$ol_enable_ldbm
25010         if test "$ol_enable_ldbm" = mod ; then
25011                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25012                 MFLAG=SLAPD_MOD_DYNAMIC
25013         else
25014                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25015                 MFLAG=SLAPD_MOD_STATIC
25016         fi
25017         cat >> confdefs.h <<EOF
25018 #define SLAPD_LDBM $MFLAG
25019 EOF
25020
25021 fi
25022
25023 if test "$ol_enable_meta" != no ; then
25024         BUILD_SLAPD=yes
25025         BUILD_META=$ol_enable_meta
25026         BUILD_REWRITE=yes
25027         if test "$ol_enable_meta" = mod ; then
25028                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25029                 MFLAG=SLAPD_MOD_DYNAMIC
25030         else
25031                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25032                 MFLAG=SLAPD_MOD_STATIC
25033         fi
25034         cat >> confdefs.h <<EOF
25035 #define SLAPD_META $MFLAG
25036 EOF
25037
25038 fi
25039
25040 if test "$ol_enable_monitor" != no ; then
25041         BUILD_SLAPD=yes
25042         BUILD_MONITOR=$ol_enable_monitor
25043         if test "$ol_enable_monitor" = mod ; then
25044                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25045                 MFLAG=SLAPD_MOD_DYNAMIC
25046         else
25047                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25048                 MFLAG=SLAPD_MOD_STATIC
25049         fi
25050         cat >> confdefs.h <<EOF
25051 #define SLAPD_MONITOR $MFLAG
25052 EOF
25053
25054 fi
25055
25056 if test "$ol_enable_null" != no ; then
25057         BUILD_SLAPD=yes
25058         BUILD_NULL=$ol_enable_null
25059         if test "$ol_enable_null" = mod ; then
25060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25061                 MFLAG=SLAPD_MOD_DYNAMIC
25062         else
25063                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25064                 MFLAG=SLAPD_MOD_STATIC
25065         fi
25066         cat >> confdefs.h <<EOF
25067 #define SLAPD_NULL $MFLAG
25068 EOF
25069
25070 fi
25071
25072 if test "$ol_enable_passwd" != no ; then
25073         BUILD_SLAPD=yes
25074         BUILD_PASSWD=$ol_enable_passwd
25075         if test "$ol_enable_passwd" = mod ; then
25076                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25077                 MFLAG=SLAPD_MOD_DYNAMIC
25078         else
25079                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25080                 MFLAG=SLAPD_MOD_STATIC
25081         fi
25082         cat >> confdefs.h <<EOF
25083 #define SLAPD_PASSWD $MFLAG
25084 EOF
25085
25086 fi
25087
25088 if test "$ol_link_perl" != no ; then
25089         BUILD_SLAPD=yes
25090         BUILD_PERL=$ol_enable_perl
25091         if test "$ol_enable_perl" = mod ; then
25092                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25093                 MFLAG=SLAPD_MOD_DYNAMIC
25094         else
25095                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25096                 MFLAG=SLAPD_MOD_STATIC
25097         fi
25098         cat >> confdefs.h <<EOF
25099 #define SLAPD_PERL $MFLAG
25100 EOF
25101
25102 fi
25103
25104 if test "$ol_enable_relay" != no ; then
25105         BUILD_SLAPD=yes
25106         BUILD_RELAY=$ol_enable_relay
25107         if test "$ol_enable_relay" = mod ; then
25108                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25109                 MFLAG=SLAPD_MOD_DYNAMIC
25110         else
25111                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25112                 MFLAG=SLAPD_MOD_STATIC
25113         fi
25114         cat >> confdefs.h <<EOF
25115 #define SLAPD_RELAY $MFLAG
25116 EOF
25117
25118 fi
25119
25120 if test "$ol_enable_shell" != no ; then
25121         if test "$ol_link_thread" != no ; then
25122                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25123         fi
25124         BUILD_SLAPD=yes
25125         BUILD_SHELL=$ol_enable_shell
25126         if test "$ol_enable_shell" = mod ; then
25127                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25128                 MFLAG=SLAPD_MOD_DYNAMIC
25129         else
25130                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25131                 MFLAG=SLAPD_MOD_STATIC
25132         fi
25133         cat >> confdefs.h <<EOF
25134 #define SLAPD_SHELL $MFLAG
25135 EOF
25136
25137 fi
25138
25139 if test "$ol_link_sql" != no ; then
25140         BUILD_SLAPD=yes
25141         BUILD_SQL=$ol_enable_sql
25142         if test "$ol_enable_sql" = mod; then
25143                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25144                 MFLAG=SLAPD_MOD_DYNAMIC
25145         else
25146                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25147                 MFLAG=SLAPD_MOD_STATIC
25148         fi
25149         cat >> confdefs.h <<EOF
25150 #define SLAPD_SQL $MFLAG
25151 EOF
25152
25153 fi
25154
25155 if test "$ol_enable_chain" != no ; then
25156         BUILD_CHAIN=$ol_enable_chain
25157         if test "$ol_enable_chain" = mod ; then
25158                 MFLAG=SLAPD_MOD_DYNAMIC
25159                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
25160         else
25161                 MFLAG=SLAPD_MOD_STATIC
25162         fi
25163         cat >> confdefs.h <<EOF
25164 #define SLAPD_OVER_CHAIN $MFLAG
25165 EOF
25166
25167 fi
25168
25169 if test "$ol_enable_denyop" != no ; then
25170         BUILD_DENYOP=$ol_enable_denyop
25171         if test "$ol_enable_denyop" = mod ; then
25172                 MFLAG=SLAPD_MOD_DYNAMIC
25173                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25174         else
25175                 MFLAG=SLAPD_MOD_STATIC
25176         fi
25177         cat >> confdefs.h <<EOF
25178 #define SLAPD_OVER_DENYOP $MFLAG
25179 EOF
25180
25181 fi
25182
25183 if test "$ol_enable_dyngroup" != no ; then
25184         BUILD_DYNGROUP=$ol_enable_dyngroup
25185         if test "$ol_enable_dyngroup" = mod ; then
25186                 MFLAG=SLAPD_MOD_DYNAMIC
25187                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25188         else
25189                 MFLAG=SLAPD_MOD_STATIC
25190         fi
25191         cat >> confdefs.h <<EOF
25192 #define SLAPD_OVER_DYNGROUP $MFLAG
25193 EOF
25194
25195 fi
25196
25197 if test "$ol_enable_glue" != no ; then
25198         BUILD_GLUE=$ol_enable_glue
25199         if test "$ol_enable_glue" = mod ; then
25200                 MFLAG=SLAPD_MOD_DYNAMIC
25201                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25202         else
25203                 MFLAG=SLAPD_MOD_STATIC
25204         fi
25205         cat >> confdefs.h <<EOF
25206 #define SLAPD_OVER_GLUE $MFLAG
25207 EOF
25208
25209 fi
25210
25211 if test "$ol_enable_lastmod" != no ; then
25212         BUILD_LASTMOD=$ol_enable_lastmod
25213         if test "$ol_enable_lastmod" = mod ; then
25214                 MFLAG=SLAPD_MOD_DYNAMIC
25215                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25216         else
25217                 MFLAG=SLAPD_MOD_STATIC
25218         fi
25219         cat >> confdefs.h <<EOF
25220 #define SLAPD_OVER_LASTMOD $MFLAG
25221 EOF
25222
25223 fi
25224
25225 if test "$ol_enable_ppolicy" != no ; then
25226         BUILD_PPOLICY=$ol_enable_ppolicy
25227         if test "$ol_enable_ppolicy" = mod ; then
25228                 MFLAG=SLAPD_MOD_DYNAMIC
25229                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25230         else
25231                 MFLAG=SLAPD_MOD_STATIC
25232         fi
25233         cat >> confdefs.h <<EOF
25234 #define SLAPD_OVER_PPOLICY $MFLAG
25235 EOF
25236
25237 fi
25238
25239 if test "$ol_enable_proxycache" != no ; then
25240         BUILD_PROXYCACHE=$ol_enable_proxycache
25241         if test "$ol_enable_proxycache" = mod ; then
25242                 MFLAG=SLAPD_MOD_DYNAMIC
25243                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25244         else
25245                 MFLAG=SLAPD_MOD_STATIC
25246         fi
25247         cat >> confdefs.h <<EOF
25248 #define SLAPD_OVER_PROXYCACHE $MFLAG
25249 EOF
25250
25251 fi
25252
25253 if test "$ol_enable_refint" != no ; then
25254         BUILD_REFINT=$ol_enable_refint
25255         if test "$ol_enable_refint" = mod ; then
25256                 MFLAG=SLAPD_MOD_DYNAMIC
25257                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25258         else
25259                 MFLAG=SLAPD_MOD_STATIC
25260         fi
25261         cat >> confdefs.h <<EOF
25262 #define SLAPD_OVER_REFINT $MFLAG
25263 EOF
25264
25265 fi
25266
25267 if test "$ol_enable_rwm" != no ; then
25268         BUILD_REWRITE=yes
25269         BUILD_RWM=$ol_enable_rwm
25270         if test "$ol_enable_rwm" = mod ; then
25271                 MFLAG=SLAPD_MOD_DYNAMIC
25272                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25273         else
25274                 MFLAG=SLAPD_MOD_STATIC
25275         fi
25276         cat >> confdefs.h <<EOF
25277 #define SLAPD_OVER_RWM $MFLAG
25278 EOF
25279
25280 fi
25281
25282 if test "$ol_enable_syncprov" != no ; then
25283         BUILD_SYNCPROV=$ol_enable_syncprov
25284         if test "$ol_enable_syncprov" = mod ; then
25285                 MFLAG=SLAPD_MOD_DYNAMIC
25286                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25287         else
25288                 MFLAG=SLAPD_MOD_STATIC
25289         fi
25290         cat >> confdefs.h <<EOF
25291 #define SLAPD_OVER_SYNCPROV $MFLAG
25292 EOF
25293
25294 fi
25295
25296 if test "$ol_enable_unique" != no ; then
25297         BUILD_UNIQUE=$ol_enable_unique
25298         if test "$ol_enable_unique" = mod ; then
25299                 MFLAG=SLAPD_MOD_DYNAMIC
25300                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25301         else
25302                 MFLAG=SLAPD_MOD_STATIC
25303         fi
25304         cat >> confdefs.h <<EOF
25305 #define SLAPD_OVER_UNIQUE $MFLAG
25306 EOF
25307
25308 fi
25309
25310 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25311         $BUILD_SLAPD = yes ; then
25312         BUILD_SLURPD=yes
25313 fi
25314
25315 if test "$ol_enable_rewrite" != no ; then
25316         cat >> confdefs.h <<\EOF
25317 #define ENABLE_REWRITE 1
25318 EOF
25319
25320         BUILD_REWRITE=yes
25321 fi
25322
25323 if test "$ol_enable_slapi" != no ; then
25324         cat >> confdefs.h <<\EOF
25325 #define ENABLE_SLAPI 1
25326 EOF
25327
25328         BUILD_SLAPI=yes
25329         SLAPD_SLAPI_DEPEND=libslapi.a
25330 fi
25331
25332
25333
25334 if test "$ac_cv_mingw32" = yes ; then
25335         PLAT=NT
25336         SLAPD_MODULES_LDFLAGS=
25337 else
25338         PLAT=UNIX
25339 fi
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
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414 # Check whether --with-xxinstall or --without-xxinstall was given.
25415 if test "${with_xxinstall+set}" = set; then
25416   withval="$with_xxinstall"
25417   :
25418 fi
25419
25420
25421
25422 trap '' 1 2 15
25423
25424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25425
25426 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25427 # Let make expand exec_prefix.
25428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25429
25430 # Any assignment to VPATH causes Sun make to only execute
25431 # the first set of double-colon rules, so remove it if not needed.
25432 # If there is a colon in the path, we need to keep it.
25433 if test "x$srcdir" = x.; then
25434   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25435 fi
25436
25437 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25438
25439 DEFS=-DHAVE_CONFIG_H
25440
25441 # Without the "./", some shells look in PATH for config.status.
25442 : ${CONFIG_STATUS=./config.status}
25443
25444 echo creating $CONFIG_STATUS
25445 rm -f $CONFIG_STATUS
25446 cat > $CONFIG_STATUS <<EOF
25447 #! /bin/sh
25448 # Generated automatically by configure.
25449 # Run this file to recreate the current configuration.
25450 # This directory was configured as follows,
25451 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25452 #
25453 # $0 $ac_configure_args
25454 #
25455 # Compiler output produced by configure, useful for debugging
25456 # configure, is in ./config.log if it exists.
25457
25458 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25459 for ac_option
25460 do
25461   case "\$ac_option" in
25462   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25463     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25464     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25465   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25466     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25467     exit 0 ;;
25468   -help | --help | --hel | --he | --h)
25469     echo "\$ac_cs_usage"; exit 0 ;;
25470   *) echo "\$ac_cs_usage"; exit 1 ;;
25471   esac
25472 done
25473
25474 ac_given_srcdir=$srcdir
25475 ac_given_INSTALL="$INSTALL"
25476
25477 trap 'rm -fr `echo "\
25478 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25479 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25480 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25481 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25482 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25483 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25484 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25485 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25486 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25487 include/Makefile:build/top.mk:include/Makefile.in \
25488 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25489 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25490 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25491 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25492 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25493 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25494 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25495 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25496 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25497 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25498 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25499 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25500 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25501 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25502 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25503 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25504 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25505 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25506 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25507 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25508 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25509 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25510 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25511 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25512 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25513 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25514 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25515 tests/run \
25516 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25517  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25518 EOF
25519 cat >> $CONFIG_STATUS <<EOF
25520
25521 # Protect against being on the right side of a sed subst in config.status.
25522 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25523  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25524 $ac_vpsub
25525 $extrasub
25526 s%@SHELL@%$SHELL%g
25527 s%@CFLAGS@%$CFLAGS%g
25528 s%@CPPFLAGS@%$CPPFLAGS%g
25529 s%@CXXFLAGS@%$CXXFLAGS%g
25530 s%@FFLAGS@%$FFLAGS%g
25531 s%@DEFS@%$DEFS%g
25532 s%@LDFLAGS@%$LDFLAGS%g
25533 s%@LIBS@%$LIBS%g
25534 s%@exec_prefix@%$exec_prefix%g
25535 s%@prefix@%$prefix%g
25536 s%@program_transform_name@%$program_transform_name%g
25537 s%@bindir@%$bindir%g
25538 s%@sbindir@%$sbindir%g
25539 s%@libexecdir@%$libexecdir%g
25540 s%@datadir@%$datadir%g
25541 s%@sysconfdir@%$sysconfdir%g
25542 s%@sharedstatedir@%$sharedstatedir%g
25543 s%@localstatedir@%$localstatedir%g
25544 s%@libdir@%$libdir%g
25545 s%@includedir@%$includedir%g
25546 s%@oldincludedir@%$oldincludedir%g
25547 s%@infodir@%$infodir%g
25548 s%@mandir@%$mandir%g
25549 s%@host@%$host%g
25550 s%@host_alias@%$host_alias%g
25551 s%@host_cpu@%$host_cpu%g
25552 s%@host_vendor@%$host_vendor%g
25553 s%@host_os@%$host_os%g
25554 s%@target@%$target%g
25555 s%@target_alias@%$target_alias%g
25556 s%@target_cpu@%$target_cpu%g
25557 s%@target_vendor@%$target_vendor%g
25558 s%@target_os@%$target_os%g
25559 s%@build@%$build%g
25560 s%@build_alias@%$build_alias%g
25561 s%@build_cpu@%$build_cpu%g
25562 s%@build_vendor@%$build_vendor%g
25563 s%@build_os@%$build_os%g
25564 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25565 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25566 s%@INSTALL_DATA@%$INSTALL_DATA%g
25567 s%@PACKAGE@%$PACKAGE%g
25568 s%@VERSION@%$VERSION%g
25569 s%@ACLOCAL@%$ACLOCAL%g
25570 s%@AUTOCONF@%$AUTOCONF%g
25571 s%@AUTOMAKE@%$AUTOMAKE%g
25572 s%@AUTOHEADER@%$AUTOHEADER%g
25573 s%@MAKEINFO@%$MAKEINFO%g
25574 s%@install_sh@%$install_sh%g
25575 s%@AMTAR@%$AMTAR%g
25576 s%@AWK@%$AWK%g
25577 s%@AMTARFLAGS@%$AMTARFLAGS%g
25578 s%@SET_MAKE@%$SET_MAKE%g
25579 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25580 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25581 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25582 s%@top_builddir@%$top_builddir%g
25583 s%@ldap_subdir@%$ldap_subdir%g
25584 s%@CC@%$CC%g
25585 s%@AR@%$AR%g
25586 s%@LN_S@%$LN_S%g
25587 s%@OBJEXT@%$OBJEXT%g
25588 s%@EXEEXT@%$EXEEXT%g
25589 s%@ECHO@%$ECHO%g
25590 s%@RANLIB@%$RANLIB%g
25591 s%@STRIP@%$STRIP%g
25592 s%@DLLTOOL@%$DLLTOOL%g
25593 s%@AS@%$AS%g
25594 s%@OBJDUMP@%$OBJDUMP%g
25595 s%@CPP@%$CPP%g
25596 s%@LIBTOOL@%$LIBTOOL%g
25597 s%@PERLBIN@%$PERLBIN%g
25598 s%@OL_MKDEP@%$OL_MKDEP%g
25599 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25600 s%@LTSTATIC@%$LTSTATIC%g
25601 s%@LIBOBJS@%$LIBOBJS%g
25602 s%@LIBSRCS@%$LIBSRCS%g
25603 s%@PLAT@%$PLAT%g
25604 s%@WITH_SASL@%$WITH_SASL%g
25605 s%@WITH_TLS@%$WITH_TLS%g
25606 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25607 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25608 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25609 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25610 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25611 s%@BUILD_BDB@%$BUILD_BDB%g
25612 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25613 s%@BUILD_HDB@%$BUILD_HDB%g
25614 s%@BUILD_LDAP@%$BUILD_LDAP%g
25615 s%@BUILD_LDBM@%$BUILD_LDBM%g
25616 s%@BUILD_META@%$BUILD_META%g
25617 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25618 s%@BUILD_NULL@%$BUILD_NULL%g
25619 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25620 s%@BUILD_RELAY@%$BUILD_RELAY%g
25621 s%@BUILD_PERL@%$BUILD_PERL%g
25622 s%@BUILD_SHELL@%$BUILD_SHELL%g
25623 s%@BUILD_SQL@%$BUILD_SQL%g
25624 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25625 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25626 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25627 s%@BUILD_GLUE@%$BUILD_GLUE%g
25628 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25629 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25630 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25631 s%@BUILD_REFINT@%$BUILD_REFINT%g
25632 s%@BUILD_RWM@%$BUILD_RWM%g
25633 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25634 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25635 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25636 s%@LDAP_LIBS@%$LDAP_LIBS%g
25637 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25638 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25639 s%@LDBM_LIBS@%$LDBM_LIBS%g
25640 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25641 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25642 s%@WRAP_LIBS@%$WRAP_LIBS%g
25643 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25644 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25645 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25646 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25647 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25648 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25649 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25650 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25651 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25652 s%@KRB4_LIBS@%$KRB4_LIBS%g
25653 s%@KRB5_LIBS@%$KRB5_LIBS%g
25654 s%@SASL_LIBS@%$SASL_LIBS%g
25655 s%@TLS_LIBS@%$TLS_LIBS%g
25656 s%@MODULES_LIBS@%$MODULES_LIBS%g
25657 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25658 s%@LIBSLAPI@%$LIBSLAPI%g
25659 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25660 s%@AUTH_LIBS@%$AUTH_LIBS%g
25661 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25662 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25663 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25664 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25665 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25666
25667 CEOF
25668 EOF
25669
25670 cat >> $CONFIG_STATUS <<\EOF
25671
25672 # Split the substitutions into bite-sized pieces for seds with
25673 # small command number limits, like on Digital OSF/1 and HP-UX.
25674 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25675 ac_file=1 # Number of current file.
25676 ac_beg=1 # First line for current file.
25677 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25678 ac_more_lines=:
25679 ac_sed_cmds=""
25680 while $ac_more_lines; do
25681   if test $ac_beg -gt 1; then
25682     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25683   else
25684     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25685   fi
25686   if test ! -s conftest.s$ac_file; then
25687     ac_more_lines=false
25688     rm -f conftest.s$ac_file
25689   else
25690     if test -z "$ac_sed_cmds"; then
25691       ac_sed_cmds="sed -f conftest.s$ac_file"
25692     else
25693       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25694     fi
25695     ac_file=`expr $ac_file + 1`
25696     ac_beg=$ac_end
25697     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25698   fi
25699 done
25700 if test -z "$ac_sed_cmds"; then
25701   ac_sed_cmds=cat
25702 fi
25703 EOF
25704
25705 cat >> $CONFIG_STATUS <<EOF
25706
25707 CONFIG_FILES=\${CONFIG_FILES-"\
25708 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25709 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25710 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25711 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25712 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25713 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25714 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25715 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25716 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25717 include/Makefile:build/top.mk:include/Makefile.in \
25718 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25719 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25720 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25721 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25722 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25723 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25724 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25725 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25726 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25727 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25728 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25729 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25730 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25731 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25732 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25733 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25734 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25735 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25736 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25737 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25738 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25739 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25740 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25741 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25742 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25743 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25744 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25745 tests/run \
25746 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25747 "}
25748 EOF
25749 cat >> $CONFIG_STATUS <<\EOF
25750 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25751   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25752   case "$ac_file" in
25753   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25754        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25755   *) ac_file_in="${ac_file}.in" ;;
25756   esac
25757
25758   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25759
25760   # Remove last slash and all that follows it.  Not all systems have dirname.
25761   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25762   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25763     # The file is in a subdirectory.
25764     test ! -d "$ac_dir" && mkdir "$ac_dir"
25765     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25766     # A "../" for each directory in $ac_dir_suffix.
25767     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25768   else
25769     ac_dir_suffix= ac_dots=
25770   fi
25771
25772   case "$ac_given_srcdir" in
25773   .)  srcdir=.
25774       if test -z "$ac_dots"; then top_srcdir=.
25775       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25776   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25777   *) # Relative path.
25778     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25779     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25780   esac
25781
25782   case "$ac_given_INSTALL" in
25783   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25784   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25785   esac
25786
25787   echo creating "$ac_file"
25788   rm -f "$ac_file"
25789   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25790   case "$ac_file" in
25791   *[Mm]akefile*) ac_comsub="1i\\
25792 # $configure_input" ;;
25793   *) ac_comsub= ;;
25794   esac
25795
25796   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25797   sed -e "$ac_comsub
25798 s%@configure_input@%$configure_input%g
25799 s%@srcdir@%$srcdir%g
25800 s%@top_srcdir@%$top_srcdir%g
25801 s%@INSTALL@%$INSTALL%g
25802 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25803 fi; done
25804 rm -f conftest.s*
25805
25806 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25807 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25808 #
25809 # ac_d sets the value in "#define NAME VALUE" lines.
25810 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25811 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25812 ac_dC='\3'
25813 ac_dD='%g'
25814 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25815 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25816 ac_uB='\([      ]\)%\1#\2define\3'
25817 ac_uC=' '
25818 ac_uD='\4%g'
25819 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25820 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25821 ac_eB='$%\1#\2define\3'
25822 ac_eC=' '
25823 ac_eD='%g'
25824
25825 if test "${CONFIG_HEADERS+set}" != set; then
25826 EOF
25827 cat >> $CONFIG_STATUS <<EOF
25828   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25829 EOF
25830 cat >> $CONFIG_STATUS <<\EOF
25831 fi
25832 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25833   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25834   case "$ac_file" in
25835   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25836        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25837   *) ac_file_in="${ac_file}.in" ;;
25838   esac
25839
25840   echo creating $ac_file
25841
25842   rm -f conftest.frag conftest.in conftest.out
25843   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25844   cat $ac_file_inputs > conftest.in
25845
25846 EOF
25847
25848 # Transform confdefs.h into a sed script conftest.vals that substitutes
25849 # the proper values into config.h.in to produce config.h.  And first:
25850 # Protect against being on the right side of a sed subst in config.status.
25851 # Protect against being in an unquoted here document in config.status.
25852 rm -f conftest.vals
25853 cat > conftest.hdr <<\EOF
25854 s/[\\&%]/\\&/g
25855 s%[\\$`]%\\&%g
25856 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25857 s%ac_d%ac_u%gp
25858 s%ac_u%ac_e%gp
25859 EOF
25860 sed -n -f conftest.hdr confdefs.h > conftest.vals
25861 rm -f conftest.hdr
25862
25863 # This sed command replaces #undef with comments.  This is necessary, for
25864 # example, in the case of _POSIX_SOURCE, which is predefined and required
25865 # on some systems where configure will not decide to define it.
25866 cat >> conftest.vals <<\EOF
25867 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25868 EOF
25869
25870 # Break up conftest.vals because some shells have a limit on
25871 # the size of here documents, and old seds have small limits too.
25872
25873 rm -f conftest.tail
25874 while :
25875 do
25876   ac_lines=`grep -c . conftest.vals`
25877   # grep -c gives empty output for an empty file on some AIX systems.
25878   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25879   # Write a limited-size here document to conftest.frag.
25880   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25881   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25882   echo 'CEOF
25883   sed -f conftest.frag conftest.in > conftest.out
25884   rm -f conftest.in
25885   mv conftest.out conftest.in
25886 ' >> $CONFIG_STATUS
25887   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25888   rm -f conftest.vals
25889   mv conftest.tail conftest.vals
25890 done
25891 rm -f conftest.vals
25892
25893 cat >> $CONFIG_STATUS <<\EOF
25894   rm -f conftest.frag conftest.h
25895   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25896   cat conftest.in >> conftest.h
25897   rm -f conftest.in
25898   if cmp -s $ac_file conftest.h 2>/dev/null; then
25899     echo "$ac_file is unchanged"
25900     rm -f conftest.h
25901   else
25902     # Remove last slash and all that follows it.  Not all systems have dirname.
25903       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25904       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25905       # The file is in a subdirectory.
25906       test ! -d "$ac_dir" && mkdir "$ac_dir"
25907     fi
25908     rm -f $ac_file
25909     mv conftest.h $ac_file
25910   fi
25911 fi; done
25912
25913 EOF
25914 cat >> $CONFIG_STATUS <<EOF
25915 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25916 EOF
25917 cat >> $CONFIG_STATUS <<\EOF
25918
25919 chmod +x tests/run
25920 date > stamp-h
25921 BACKENDSC="servers/slapd/backends.c"
25922 echo "Making $BACKENDSC"
25923 rm -f $BACKENDSC
25924 cat > $BACKENDSC << ENDX
25925 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25926  *
25927  * Copyright 1998-2005 The OpenLDAP Foundation.
25928  * All rights reserved.
25929  *
25930  * Redistribution and use in source and binary forms, with or without
25931  * modification, are permitted only as authorized by the OpenLDAP
25932  * Public License.
25933  *
25934  * A copy of this license is available in the file LICENSE in the
25935  * top-level directory of the distribution or, alternatively, at
25936  * <http://www.OpenLDAP.org/license.html>.
25937  */
25938 /* This file is automatically generated by configure; please do not edit. */
25939
25940 #include "portable.h"
25941 #include "slap.h"
25942
25943 ENDX
25944 if test "${STATIC_BACKENDS}"; then
25945         for b in ${STATIC_BACKENDS}; do
25946                 bb=`echo "${b}" | sed -e 's/back-//'`
25947                 cat >> $BACKENDSC << ENDX
25948 extern BI_init ${bb}_back_initialize;
25949 ENDX
25950         done
25951
25952         cat >> $BACKENDSC << ENDX
25953
25954 BackendInfo slap_binfo[] = {
25955 ENDX
25956
25957         for b in ${STATIC_BACKENDS}; do
25958                 bb=`echo "${b}" | sed -e 's/back-//'`
25959                 echo "    Add ${bb} ..."
25960                 cat >> $BACKENDSC << ENDX
25961         { "${bb}", ${bb}_back_initialize },
25962 ENDX
25963         done
25964
25965         cat >> $BACKENDSC << ENDX
25966         { NULL, NULL },
25967 };
25968
25969 /* end of generated file */
25970 ENDX
25971 fi
25972
25973 echo Please run \"make depend\" to build dependencies
25974
25975 exit 0
25976 EOF
25977 chmod +x $CONFIG_STATUS
25978 rm -fr confdefs* $ac_clean_files
25979 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25980