]> git.sur5r.net Git - openldap/blob - configure
back-ldif is always enabled / static
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.568 2005/03/10 03:35:59 hyc 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-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
134 ac_help="$ac_help
135     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]"
146 ac_help="$ac_help
147     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]"
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="denyop dyngroup glue lastmod ppolicy proxycache rwm \
2243         refint syncprov translucent 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-denyop
2273         # Check whether --enable-denyop or --disable-denyop was given.
2274 if test "${enable_denyop+set}" = set; then
2275   enableval="$enable_denyop"
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-denyop" 1>&2; exit 1; }
2285         fi
2286         ol_enable_denyop="$ol_arg"
2287
2288 else
2289         ol_enable_denyop="no"
2290 fi
2291 # end --enable-denyop
2292
2293 # OpenLDAP --enable-dyngroup
2294         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2295 if test "${enable_dyngroup+set}" = set; then
2296   enableval="$enable_dyngroup"
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-dyngroup" 1>&2; exit 1; }
2306         fi
2307         ol_enable_dyngroup="$ol_arg"
2308
2309 else
2310         ol_enable_dyngroup="no"
2311 fi
2312 # end --enable-dyngroup
2313
2314 # OpenLDAP --enable-glue
2315         # Check whether --enable-glue or --disable-glue was given.
2316 if test "${enable_glue+set}" = set; then
2317   enableval="$enable_glue"
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-glue" 1>&2; exit 1; }
2327         fi
2328         ol_enable_glue="$ol_arg"
2329
2330 else
2331         ol_enable_glue="yes"
2332 fi
2333 # end --enable-glue
2334
2335 # OpenLDAP --enable-lastmod
2336         # Check whether --enable-lastmod or --disable-lastmod was given.
2337 if test "${enable_lastmod+set}" = set; then
2338   enableval="$enable_lastmod"
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-lastmod" 1>&2; exit 1; }
2348         fi
2349         ol_enable_lastmod="$ol_arg"
2350
2351 else
2352         ol_enable_lastmod="no"
2353 fi
2354 # end --enable-lastmod
2355
2356 # OpenLDAP --enable-ppolicy
2357         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2358 if test "${enable_ppolicy+set}" = set; then
2359   enableval="$enable_ppolicy"
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-ppolicy" 1>&2; exit 1; }
2369         fi
2370         ol_enable_ppolicy="$ol_arg"
2371
2372 else
2373         ol_enable_ppolicy="no"
2374 fi
2375 # end --enable-ppolicy
2376
2377 # OpenLDAP --enable-proxycache
2378         # Check whether --enable-proxycache or --disable-proxycache was given.
2379 if test "${enable_proxycache+set}" = set; then
2380   enableval="$enable_proxycache"
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-proxycache" 1>&2; exit 1; }
2390         fi
2391         ol_enable_proxycache="$ol_arg"
2392
2393 else
2394         ol_enable_proxycache="no"
2395 fi
2396 # end --enable-proxycache
2397
2398 # OpenLDAP --enable-refint
2399         # Check whether --enable-refint or --disable-refint was given.
2400 if test "${enable_refint+set}" = set; then
2401   enableval="$enable_refint"
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-refint" 1>&2; exit 1; }
2411         fi
2412         ol_enable_refint="$ol_arg"
2413
2414 else
2415         ol_enable_refint="no"
2416 fi
2417 # end --enable-refint
2418
2419 # OpenLDAP --enable-rwm
2420         # Check whether --enable-rwm or --disable-rwm was given.
2421 if test "${enable_rwm+set}" = set; then
2422   enableval="$enable_rwm"
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-rwm" 1>&2; exit 1; }
2432         fi
2433         ol_enable_rwm="$ol_arg"
2434
2435 else
2436         ol_enable_rwm="no"
2437 fi
2438 # end --enable-rwm
2439
2440 # OpenLDAP --enable-syncprov
2441         # Check whether --enable-syncprov or --disable-syncprov was given.
2442 if test "${enable_syncprov+set}" = set; then
2443   enableval="$enable_syncprov"
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-syncprov" 1>&2; exit 1; }
2453         fi
2454         ol_enable_syncprov="$ol_arg"
2455
2456 else
2457         ol_enable_syncprov="yes"
2458 fi
2459 # end --enable-syncprov
2460
2461 # OpenLDAP --enable-translucent
2462         # Check whether --enable-translucent or --disable-translucent was given.
2463 if test "${enable_translucent+set}" = set; then
2464   enableval="$enable_translucent"
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-translucent" 1>&2; exit 1; }
2474         fi
2475         ol_enable_translucent="$ol_arg"
2476
2477 else
2478         ol_enable_translucent="no"
2479 fi
2480 # end --enable-translucent
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_meta = yes -a $ol_enable_ldap = no ; then
2740         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2741 fi
2742
2743 if test $ol_enable_slurpd = yes ; then
2744                 if test $ol_with_threads = no ; then
2745                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2746         fi
2747 fi
2748
2749 if test $ol_enable_lmpasswd = yes ; then
2750         if test $ol_with_tls = no ; then
2751                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2752         fi
2753 fi
2754
2755 if test $ol_enable_kbind = yes ; then
2756         if test $ol_with_kerberos = no ; then
2757                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2758         elif test $ol_with_kerberos = auto ; then
2759                 ol_with_kerberos=yes
2760         fi
2761
2762 elif test $ol_enable_kbind = no ; then
2763         if test $ol_with_kerberos = auto ; then
2764                 ol_with_kerberos=no
2765         elif test $ol_with_kerberos != no ; then
2766                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2767                 ol_with_kerberos=no
2768         fi
2769 fi
2770
2771 if test $ol_enable_spasswd = yes ; then
2772         if test $ol_with_cyrus_sasl = no ; then
2773                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2774         fi
2775         ol_with_cyrus_sasl=yes
2776 fi
2777
2778 echo "$ac_t""done" 1>&6
2779
2780 LDAP_LIBS=
2781 LDBM_LIBS=
2782 LTHREAD_LIBS=
2783 LUTIL_LIBS=
2784
2785 SLAPD_LIBS=
2786 SLURPD_LIBS=
2787
2788 BUILD_SLAPD=no
2789 BUILD_SLURPD=no
2790
2791 BUILD_THREAD=no
2792
2793 BUILD_SLAPI=no
2794 SLAPD_SLAPI_DEPEND=
2795
2796 BUILD_BDB=no
2797 BUILD_DNSSRV=no
2798 BUILD_HDB=no
2799 BUILD_LDAP=no
2800 BUILD_LDBM=no
2801 BUILD_META=no
2802 BUILD_MONITOR=no
2803 BUILD_NULL=no
2804 BUILD_PASSWD=no
2805 BUILD_PERL=no
2806 BUILD_RELAY=no
2807 BUILD_SHELL=no
2808 BUILD_SQL=no
2809
2810 BUILD_CHAIN=no
2811 BUILD_DENYOP=no
2812 BUILD_DYNGROUP=no
2813 BUILD_GLUE=no
2814 BUILD_LASTMOD=no
2815 BUILD_PPOLICY=no
2816 BUILD_PROXYCACHE=no
2817 BUILD_REFINT=no
2818 BUILD_RWM=no
2819 BUILD_SYNCPROV=no
2820 BUILD_TRANSLUCENT=no
2821 BUILD_UNIQUE=no
2822
2823 SLAPD_DYNAMIC_OVERLAYS=
2824
2825 SLAPD_MODULES_LDFLAGS=
2826 SLAPD_MODULES_CPPFLAGS=
2827
2828 SLAPD_STATIC_BACKENDS=back-ldif
2829 SLAPD_DYNAMIC_BACKENDS=
2830
2831 SLAPD_PERL_LDFLAGS=
2832 MOD_PERL_LDFLAGS=
2833 PERL_CPPFLAGS=
2834
2835 SLAPD_SQL_LDFLAGS=
2836 SLAPD_SQL_LIBS=
2837 SLAPD_SQL_INCLUDES=
2838
2839 KRB4_LIBS=
2840 KRB5_LIBS=
2841 SASL_LIBS=
2842 TLS_LIBS=
2843 MODULES_LIBS=
2844 SLAPI_LIBS=
2845 LIBSLAPI=
2846 LIBSLAPITOOLS=
2847 AUTH_LIBS=
2848
2849 SLAPD_SLP_LIBS=
2850 SLAPD_GMP_LIBS=
2851
2852
2853 cat >> confdefs.h <<\EOF
2854 #define HAVE_MKVERSION 1
2855 EOF
2856
2857
2858
2859
2860 ol_aix_threads=no
2861 case "$target" in
2862 *-*-aix*)       if test -z "$CC" ; then
2863                 case "$ol_with_threads" in
2864                 auto | yes |  posix) ol_aix_threads=yes ;;
2865                 esac
2866         fi
2867 ;;
2868 esac
2869
2870 if test $ol_aix_threads = yes ; then
2871         if test -z "${CC}" ; then
2872                 for ac_prog in cc_r xlc_r cc
2873 do
2874 # Extract the first word of "$ac_prog", so it can be a program name with args.
2875 set dummy $ac_prog; ac_word=$2
2876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2877 echo "configure:2878: checking for $ac_word" >&5
2878 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2879   echo $ac_n "(cached) $ac_c" 1>&6
2880 else
2881   if test -n "$CC"; then
2882   ac_cv_prog_CC="$CC" # Let the user override the test.
2883 else
2884   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2885   ac_dummy="$PATH"
2886   for ac_dir in $ac_dummy; do
2887     test -z "$ac_dir" && ac_dir=.
2888     if test -f $ac_dir/$ac_word; then
2889       ac_cv_prog_CC="$ac_prog"
2890       break
2891     fi
2892   done
2893   IFS="$ac_save_ifs"
2894 fi
2895 fi
2896 CC="$ac_cv_prog_CC"
2897 if test -n "$CC"; then
2898   echo "$ac_t""$CC" 1>&6
2899 else
2900   echo "$ac_t""no" 1>&6
2901 fi
2902
2903 test -n "$CC" && break
2904 done
2905
2906
2907                 if test "$CC" = cc ; then
2908                                                 if test $ol_with_threads != auto ; then
2909                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2910                         else
2911                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2912                         fi
2913                         ol_with_threads=no
2914                 fi
2915         fi
2916
2917         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2918                 ol_with_threads=posix
2919                 ol_cv_pthread_create=yes
2920         fi
2921 fi
2922
2923 if test -z "${CC}"; then
2924         for ac_prog in cc gcc
2925 do
2926 # Extract the first word of "$ac_prog", so it can be a program name with args.
2927 set dummy $ac_prog; ac_word=$2
2928 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2929 echo "configure:2930: checking for $ac_word" >&5
2930 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2931   echo $ac_n "(cached) $ac_c" 1>&6
2932 else
2933   if test -n "$CC"; then
2934   ac_cv_prog_CC="$CC" # Let the user override the test.
2935 else
2936   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2937   ac_dummy="$PATH"
2938   for ac_dir in $ac_dummy; do
2939     test -z "$ac_dir" && ac_dir=.
2940     if test -f $ac_dir/$ac_word; then
2941       ac_cv_prog_CC="$ac_prog"
2942       break
2943     fi
2944   done
2945   IFS="$ac_save_ifs"
2946 fi
2947 fi
2948 CC="$ac_cv_prog_CC"
2949 if test -n "$CC"; then
2950   echo "$ac_t""$CC" 1>&6
2951 else
2952   echo "$ac_t""no" 1>&6
2953 fi
2954
2955 test -n "$CC" && break
2956 done
2957 test -n "$CC" || CC="missing"
2958
2959
2960         if test "${CC}" = "missing" ; then
2961                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2962         fi
2963 fi
2964
2965 if test -z "${AR}"; then
2966         for ac_prog in ar gar
2967 do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969 set dummy $ac_prog; ac_word=$2
2970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2971 echo "configure:2972: checking for $ac_word" >&5
2972 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   if test -n "$AR"; then
2976   ac_cv_prog_AR="$AR" # Let the user override the test.
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2979   ac_dummy="$PATH"
2980   for ac_dir in $ac_dummy; do
2981     test -z "$ac_dir" && ac_dir=.
2982     if test -f $ac_dir/$ac_word; then
2983       ac_cv_prog_AR="$ac_prog"
2984       break
2985     fi
2986   done
2987   IFS="$ac_save_ifs"
2988 fi
2989 fi
2990 AR="$ac_cv_prog_AR"
2991 if test -n "$AR"; then
2992   echo "$ac_t""$AR" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 test -n "$AR" && break
2998 done
2999 test -n "$AR" || AR="missing"
3000
3001
3002         if test "${AR}" = "missing" ; then
3003                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3004         fi
3005 fi
3006
3007
3008
3009 # Find the correct PATH separator.  Usually this is `:', but
3010 # DJGPP uses `;' like DOS.
3011 if test "X${PATH_SEPARATOR+set}" != Xset; then
3012   UNAME=${UNAME-`uname 2>/dev/null`}
3013   case X$UNAME in
3014     *-DOS) lt_cv_sys_path_separator=';' ;;
3015     *)     lt_cv_sys_path_separator=':' ;;
3016   esac
3017   PATH_SEPARATOR=$lt_cv_sys_path_separator
3018 fi
3019
3020 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3021 echo "configure:3022: checking for Cygwin environment" >&5
3022 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028
3029 int main() {
3030
3031 #ifndef __CYGWIN__
3032 #define __CYGWIN__ __CYGWIN32__
3033 #endif
3034 return __CYGWIN__;
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3038   rm -rf conftest*
3039   ac_cv_cygwin=yes
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   ac_cv_cygwin=no
3045 fi
3046 rm -f conftest*
3047 fi
3048
3049 echo "$ac_t""$ac_cv_cygwin" 1>&6
3050 CYGWIN=
3051 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3052 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3053 echo "configure:3054: checking for mingw32 environment" >&5
3054 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060
3061 int main() {
3062 return __MINGW32__;
3063 ; return 0; }
3064 EOF
3065 if { (eval echo configure:3066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3066   rm -rf conftest*
3067   ac_cv_mingw32=yes
3068 else
3069   echo "configure: failed program was:" >&5
3070   cat conftest.$ac_ext >&5
3071   rm -rf conftest*
3072   ac_cv_mingw32=no
3073 fi
3074 rm -f conftest*
3075 fi
3076
3077 echo "$ac_t""$ac_cv_mingw32" 1>&6
3078 MINGW32=
3079 test "$ac_cv_mingw32" = yes && MINGW32=yes
3080 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3081 echo "configure:3082: checking for EMX OS/2 environment" >&5
3082 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3083   echo $ac_n "(cached) $ac_c" 1>&6
3084 else
3085   cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088
3089 int main() {
3090 return __EMX__;
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3094   rm -rf conftest*
3095   ac_cv_emxos2=yes
3096 else
3097   echo "configure: failed program was:" >&5
3098   cat conftest.$ac_ext >&5
3099   rm -rf conftest*
3100   ac_cv_emxos2=no
3101 fi
3102 rm -f conftest*
3103 fi
3104
3105 echo "$ac_t""$ac_cv_emxos2" 1>&6
3106 EMXOS2=
3107 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3108 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3109 echo "configure:3110: checking how to run the C preprocessor" >&5
3110 # On Suns, sometimes $CPP names a directory.
3111 if test -n "$CPP" && test -d "$CPP"; then
3112   CPP=
3113 fi
3114 if test -z "$CPP"; then
3115 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118     # This must be in double quotes, not single quotes, because CPP may get
3119   # substituted into the Makefile and "${CC-cc}" will confuse make.
3120   CPP="${CC-cc} -E"
3121   # On the NeXT, cc -E runs the code through the compiler's parser,
3122   # not just through cpp.
3123   cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <assert.h>
3127 Syntax Error
3128 EOF
3129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3130 { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3132 if test -z "$ac_err"; then
3133   :
3134 else
3135   echo "$ac_err" >&5
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   rm -rf conftest*
3139   CPP="${CC-cc} -E -traditional-cpp"
3140   cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <assert.h>
3144 Syntax Error
3145 EOF
3146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3147 { (eval echo configure:3148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3149 if test -z "$ac_err"; then
3150   :
3151 else
3152   echo "$ac_err" >&5
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155   rm -rf conftest*
3156   CPP="${CC-cc} -nologo -E"
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <assert.h>
3161 Syntax Error
3162 EOF
3163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3164 { (eval echo configure:3165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3166 if test -z "$ac_err"; then
3167   :
3168 else
3169   echo "$ac_err" >&5
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172   rm -rf conftest*
3173   CPP=/lib/cpp
3174 fi
3175 rm -f conftest*
3176 fi
3177 rm -f conftest*
3178 fi
3179 rm -f conftest*
3180   ac_cv_prog_CPP="$CPP"
3181 fi
3182   CPP="$ac_cv_prog_CPP"
3183 else
3184   ac_cv_prog_CPP="$CPP"
3185 fi
3186 echo "$ac_t""$CPP" 1>&6
3187
3188 # Check whether --enable-fast-install or --disable-fast-install was given.
3189 if test "${enable_fast_install+set}" = set; then
3190   enableval="$enable_fast_install"
3191   p=${PACKAGE-default}
3192 case $enableval in
3193 yes) enable_fast_install=yes ;;
3194 no) enable_fast_install=no ;;
3195 *)
3196   enable_fast_install=no
3197   # Look at the argument we got.  We use all the common list separators.
3198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3199   for pkg in $enableval; do
3200     if test "X$pkg" = "X$p"; then
3201       enable_fast_install=yes
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205   ;;
3206 esac
3207 else
3208   enable_fast_install=yes
3209 fi
3210
3211 # Extract the first word of "gcc", so it can be a program name with args.
3212 set dummy gcc; ac_word=$2
3213 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3214 echo "configure:3215: checking for $ac_word" >&5
3215 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   if test -n "$CC"; then
3219   ac_cv_prog_CC="$CC" # Let the user override the test.
3220 else
3221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3222   ac_dummy="$PATH"
3223   for ac_dir in $ac_dummy; do
3224     test -z "$ac_dir" && ac_dir=.
3225     if test -f $ac_dir/$ac_word; then
3226       ac_cv_prog_CC="gcc"
3227       break
3228     fi
3229   done
3230   IFS="$ac_save_ifs"
3231 fi
3232 fi
3233 CC="$ac_cv_prog_CC"
3234 if test -n "$CC"; then
3235   echo "$ac_t""$CC" 1>&6
3236 else
3237   echo "$ac_t""no" 1>&6
3238 fi
3239
3240 if test -z "$CC"; then
3241   # Extract the first word of "cc", so it can be a program name with args.
3242 set dummy cc; ac_word=$2
3243 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3244 echo "configure:3245: checking for $ac_word" >&5
3245 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3246   echo $ac_n "(cached) $ac_c" 1>&6
3247 else
3248   if test -n "$CC"; then
3249   ac_cv_prog_CC="$CC" # Let the user override the test.
3250 else
3251   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3252   ac_prog_rejected=no
3253   ac_dummy="$PATH"
3254   for ac_dir in $ac_dummy; do
3255     test -z "$ac_dir" && ac_dir=.
3256     if test -f $ac_dir/$ac_word; then
3257       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3258         ac_prog_rejected=yes
3259         continue
3260       fi
3261       ac_cv_prog_CC="cc"
3262       break
3263     fi
3264   done
3265   IFS="$ac_save_ifs"
3266 if test $ac_prog_rejected = yes; then
3267   # We found a bogon in the path, so make sure we never use it.
3268   set dummy $ac_cv_prog_CC
3269   shift
3270   if test $# -gt 0; then
3271     # We chose a different compiler from the bogus one.
3272     # However, it has the same basename, so the bogon will be chosen
3273     # first if we set CC to just the basename; use the full file name.
3274     shift
3275     set dummy "$ac_dir/$ac_word" "$@"
3276     shift
3277     ac_cv_prog_CC="$@"
3278   fi
3279 fi
3280 fi
3281 fi
3282 CC="$ac_cv_prog_CC"
3283 if test -n "$CC"; then
3284   echo "$ac_t""$CC" 1>&6
3285 else
3286   echo "$ac_t""no" 1>&6
3287 fi
3288
3289   if test -z "$CC"; then
3290     case "`uname -s`" in
3291     *win32* | *WIN32* | *CYGWIN*)
3292       # Extract the first word of "cl", so it can be a program name with args.
3293 set dummy cl; ac_word=$2
3294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3295 echo "configure:3296: checking for $ac_word" >&5
3296 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   if test -n "$CC"; then
3300   ac_cv_prog_CC="$CC" # Let the user override the test.
3301 else
3302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3303   ac_dummy="$PATH"
3304   for ac_dir in $ac_dummy; do
3305     test -z "$ac_dir" && ac_dir=.
3306     if test -f $ac_dir/$ac_word; then
3307       ac_cv_prog_CC="cl"
3308       break
3309     fi
3310   done
3311   IFS="$ac_save_ifs"
3312 fi
3313 fi
3314 CC="$ac_cv_prog_CC"
3315 if test -n "$CC"; then
3316   echo "$ac_t""$CC" 1>&6
3317 else
3318   echo "$ac_t""no" 1>&6
3319 fi
3320  ;;
3321     esac
3322   fi
3323   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3324 fi
3325
3326 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3327 echo "configure:3328: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3328
3329 ac_ext=c
3330 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3331 ac_cpp='$CPP $CPPFLAGS'
3332 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3333 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3334 cross_compiling=$ac_cv_prog_cc_cross
3335
3336 cat > conftest.$ac_ext << EOF
3337
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340
3341 main(){return(0);}
3342 EOF
3343 if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3344   ac_cv_prog_cc_works=yes
3345   # If we can't run a trivial program, we are probably using a cross compiler.
3346   if (./conftest; exit) 2>/dev/null; then
3347     ac_cv_prog_cc_cross=no
3348   else
3349     ac_cv_prog_cc_cross=yes
3350   fi
3351 else
3352   echo "configure: failed program was:" >&5
3353   cat conftest.$ac_ext >&5
3354   ac_cv_prog_cc_works=no
3355 fi
3356 rm -fr conftest*
3357 ac_ext=c
3358 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3359 ac_cpp='$CPP $CPPFLAGS'
3360 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3361 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3362 cross_compiling=$ac_cv_prog_cc_cross
3363
3364 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3365 if test $ac_cv_prog_cc_works = no; then
3366   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3367 fi
3368 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3369 echo "configure:3370: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3370 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3371 cross_compiling=$ac_cv_prog_cc_cross
3372
3373 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3374 echo "configure:3375: checking whether we are using GNU C" >&5
3375 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3376   echo $ac_n "(cached) $ac_c" 1>&6
3377 else
3378   cat > conftest.c <<EOF
3379 #ifdef __GNUC__
3380   yes;
3381 #endif
3382 EOF
3383 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3384   ac_cv_prog_gcc=yes
3385 else
3386   ac_cv_prog_gcc=no
3387 fi
3388 fi
3389
3390 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3391
3392 if test $ac_cv_prog_gcc = yes; then
3393   GCC=yes
3394 else
3395   GCC=
3396 fi
3397
3398 ac_test_CFLAGS="${CFLAGS+set}"
3399 ac_save_CFLAGS="$CFLAGS"
3400 CFLAGS=
3401 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3402 echo "configure:3403: checking whether ${CC-cc} accepts -g" >&5
3403 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   echo 'void f(){}' > conftest.c
3407 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3408   ac_cv_prog_cc_g=yes
3409 else
3410   ac_cv_prog_cc_g=no
3411 fi
3412 rm -f conftest*
3413
3414 fi
3415
3416 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3417 if test "$ac_test_CFLAGS" = set; then
3418   CFLAGS="$ac_save_CFLAGS"
3419 elif test $ac_cv_prog_cc_g = yes; then
3420   if test "$GCC" = yes; then
3421     CFLAGS="-g -O2"
3422   else
3423     CFLAGS="-g"
3424   fi
3425 else
3426   if test "$GCC" = yes; then
3427     CFLAGS="-O2"
3428   else
3429     CFLAGS=
3430   fi
3431 fi
3432
3433 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3434 if test "${with_gnu_ld+set}" = set; then
3435   withval="$with_gnu_ld"
3436   test "$withval" = no || with_gnu_ld=yes
3437 else
3438   with_gnu_ld=no
3439 fi
3440
3441 ac_prog=ld
3442 if test "$GCC" = yes; then
3443   # Check if gcc -print-prog-name=ld gives a path.
3444   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3445 echo "configure:3446: checking for ld used by GCC" >&5
3446   case $host in
3447   *-*-mingw*)
3448     # gcc leaves a trailing carriage return which upsets mingw
3449     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3450   *)
3451     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3452   esac
3453   case $ac_prog in
3454     # Accept absolute paths.
3455     [\\/]* | [A-Za-z]:[\\/]*)
3456       re_direlt='/[^/][^/]*/\.\./'
3457       # Canonicalize the path of ld
3458       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3459       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3460         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3461       done
3462       test -z "$LD" && LD="$ac_prog"
3463       ;;
3464   "")
3465     # If it fails, then pretend we aren't using GCC.
3466     ac_prog=ld
3467     ;;
3468   *)
3469     # If it is relative, then search for the first ld in PATH.
3470     with_gnu_ld=unknown
3471     ;;
3472   esac
3473 elif test "$with_gnu_ld" = yes; then
3474   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3475 echo "configure:3476: checking for GNU ld" >&5
3476 else
3477   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3478 echo "configure:3479: checking for non-GNU ld" >&5
3479 fi
3480 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3481   echo $ac_n "(cached) $ac_c" 1>&6
3482 else
3483   if test -z "$LD"; then
3484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3485   for ac_dir in $PATH; do
3486     test -z "$ac_dir" && ac_dir=.
3487     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3488       lt_cv_path_LD="$ac_dir/$ac_prog"
3489       # Check to see if the program is GNU ld.  I'd rather use --version,
3490       # but apparently some GNU ld's only accept -v.
3491       # Break only if it was the GNU/non-GNU ld that we prefer.
3492       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3493         test "$with_gnu_ld" != no && break
3494       else
3495         test "$with_gnu_ld" != yes && break
3496       fi
3497     fi
3498   done
3499   IFS="$ac_save_ifs"
3500 else
3501   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3502 fi
3503 fi
3504
3505 LD="$lt_cv_path_LD"
3506 if test -n "$LD"; then
3507   echo "$ac_t""$LD" 1>&6
3508 else
3509   echo "$ac_t""no" 1>&6
3510 fi
3511 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3512 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3513 echo "configure:3514: checking if the linker ($LD) is GNU ld" >&5
3514 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3518 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3519   lt_cv_prog_gnu_ld=yes
3520 else
3521   lt_cv_prog_gnu_ld=no
3522 fi
3523 fi
3524
3525 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3526 with_gnu_ld=$lt_cv_prog_gnu_ld
3527
3528
3529 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3530 echo "configure:3531: checking for $LD option to reload object files" >&5
3531 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   lt_cv_ld_reload_flag='-r'
3535 fi
3536
3537 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3538 reload_flag=$lt_cv_ld_reload_flag
3539 test -n "$reload_flag" && reload_flag=" $reload_flag"
3540
3541 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3542 echo "configure:3543: checking for BSD-compatible nm" >&5
3543 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   if test -n "$NM"; then
3547   # Let the user override the test.
3548   lt_cv_path_NM="$NM"
3549 else
3550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3551   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3552     test -z "$ac_dir" && ac_dir=.
3553     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3554     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3555       # Check to see if the nm accepts a BSD-compat flag.
3556       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3557       #   nm: unknown option "B" ignored
3558       # Tru64's nm complains that /dev/null is an invalid object file
3559       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3560         lt_cv_path_NM="$tmp_nm -B"
3561         break
3562       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3563         lt_cv_path_NM="$tmp_nm -p"
3564         break
3565       else
3566         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3567         continue # so that we can try to find one that supports BSD flags
3568       fi
3569     fi
3570   done
3571   IFS="$ac_save_ifs"
3572   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3573 fi
3574 fi
3575
3576 NM="$lt_cv_path_NM"
3577 echo "$ac_t""$NM" 1>&6
3578
3579 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3580 echo "configure:3581: checking for a sed that does not truncate output" >&5
3581 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   # Loop through the user's path and test for sed and gsed.
3585 # Then use that list of sed's as ones to test for truncation.
3586 as_executable_p="test -f"
3587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588 for as_dir in $PATH
3589 do
3590   IFS=$as_save_IFS
3591   test -z "$as_dir" && as_dir=.
3592   for ac_prog in sed gsed; do
3593     for ac_exec_ext in '' $ac_executable_extensions; do
3594       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3595         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3596       fi
3597     done
3598   done
3599 done
3600
3601   # Create a temporary directory, and hook for its removal unless debugging.
3602 $debug ||
3603 {
3604   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3605   trap '{ (exit 1); exit 1; }' 1 2 13 15
3606 }
3607
3608 # Create a (secure) tmp directory for tmp files.
3609 : ${TMPDIR=/tmp}
3610 {
3611   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3612   test -n "$tmp" && test -d "$tmp"
3613 }  ||
3614 {
3615   tmp=$TMPDIR/sed$$-$RANDOM
3616   (umask 077 && mkdir $tmp)
3617 } ||
3618 {
3619    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3620    { (exit 1); exit 1; }
3621 }
3622   _max=0
3623   _count=0
3624   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3625   # along with /bin/sed that truncates output.
3626   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3627     test ! -f ${_sed} && break
3628     cat /dev/null > "$tmp/sed.in"
3629     _count=0
3630     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3631     # Check for GNU sed and select it if it is found.
3632     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3633       lt_cv_path_SED=${_sed}
3634       break
3635     fi
3636     while true; do
3637       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3638       mv "$tmp/sed.tmp" "$tmp/sed.in"
3639       cp "$tmp/sed.in" "$tmp/sed.nl"
3640       echo >>"$tmp/sed.nl"
3641       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3642       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3643       # 40000 chars as input seems more than enough
3644       test $_count -gt 10 && break
3645       _count=`expr $_count + 1`
3646       if test $_count -gt $_max; then
3647         _max=$_count
3648         lt_cv_path_SED=$_sed
3649       fi
3650     done
3651   done
3652   rm -rf "$tmp"
3653
3654 fi
3655
3656 if test "X$SED" != "X"; then
3657   lt_cv_path_SED=$SED
3658 else
3659   SED=$lt_cv_path_SED
3660 fi
3661 echo "$ac_t""$SED" 1>&6
3662
3663 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3664 echo "configure:3665: checking whether ln -s works" >&5
3665 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   rm -f conftestdata
3669 if ln -s X conftestdata 2>/dev/null
3670 then
3671   rm -f conftestdata
3672   ac_cv_prog_LN_S="ln -s"
3673 else
3674   ac_cv_prog_LN_S=ln
3675 fi
3676 fi
3677 LN_S="$ac_cv_prog_LN_S"
3678 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3679   echo "$ac_t""yes" 1>&6
3680 else
3681   echo "$ac_t""no" 1>&6
3682 fi
3683
3684 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3685 echo "configure:3686: checking how to recognise dependent libraries" >&5
3686 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   lt_cv_file_magic_cmd='$MAGIC_CMD'
3690 lt_cv_file_magic_test_file=
3691 lt_cv_deplibs_check_method='unknown'
3692 # Need to set the preceding variable on all platforms that support
3693 # interlibrary dependencies.
3694 # 'none' -- dependencies not supported.
3695 # `unknown' -- same as none, but documents that we really don't know.
3696 # 'pass_all' -- all dependencies passed with no checks.
3697 # 'test_compile' -- check by making test program.
3698 # 'file_magic [[regex]]' -- check by looking for files in library path
3699 # which responds to the $file_magic_cmd with a given egrep regex.
3700 # If you have `file' or equivalent on your system and you're not sure
3701 # whether `pass_all' will *always* work, you probably want this one.
3702
3703 case $host_os in
3704 aix4* | aix5*)
3705   lt_cv_deplibs_check_method=pass_all
3706   ;;
3707
3708 beos*)
3709   lt_cv_deplibs_check_method=pass_all
3710   ;;
3711
3712 bsdi4*)
3713   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3714   lt_cv_file_magic_cmd='/usr/bin/file -L'
3715   lt_cv_file_magic_test_file=/shlib/libc.so
3716   ;;
3717
3718 cygwin* | mingw* | pw32*)
3719   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3720   lt_cv_file_magic_cmd='$OBJDUMP -f'
3721   ;;
3722
3723 darwin* | rhapsody*)
3724   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3725   lt_cv_file_magic_cmd='/usr/bin/file -L'
3726   case "$host_os" in
3727   rhapsody* | darwin1.[012])
3728     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3729     ;;
3730   *) # Darwin 1.3 on
3731     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3732     ;;
3733   esac
3734   ;;
3735
3736 freebsd*)
3737   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3738     case $host_cpu in
3739     i*86 )
3740       # Not sure whether the presence of OpenBSD here was a mistake.
3741       # Let's accept both of them until this is cleared up.
3742       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3743       lt_cv_file_magic_cmd=/usr/bin/file
3744       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3745       ;;
3746     esac
3747   else
3748     lt_cv_deplibs_check_method=pass_all
3749   fi
3750   ;;
3751
3752 gnu*)
3753   lt_cv_deplibs_check_method=pass_all
3754   ;;
3755
3756 hpux10.20*|hpux11*)
3757   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3758   lt_cv_file_magic_cmd=/usr/bin/file
3759   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3760   ;;
3761
3762 irix5* | irix6* | nonstopux*)
3763   case $host_os in
3764   irix5* | nonstopux*)
3765     # this will be overridden with pass_all, but let us keep it just in case
3766     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3767     ;;
3768   *)
3769     case $LD in
3770     *-32|*"-32 ") libmagic=32-bit;;
3771     *-n32|*"-n32 ") libmagic=N32;;
3772     *-64|*"-64 ") libmagic=64-bit;;
3773     *) libmagic=never-match;;
3774     esac
3775     # this will be overridden with pass_all, but let us keep it just in case
3776     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3777     ;;
3778   esac
3779   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3780   lt_cv_deplibs_check_method=pass_all
3781   ;;
3782
3783 # This must be Linux ELF.
3784 linux-gnu*)
3785   case $host_cpu in
3786   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3787     lt_cv_deplibs_check_method=pass_all ;;
3788   *)
3789     # glibc up to 2.1.1 does not perform some relocations on ARM
3790     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3791   esac
3792   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3793   ;;
3794
3795 netbsd*)
3796   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3797     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3798   else
3799     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3800   fi
3801   ;;
3802
3803 newos6*)
3804   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3805   lt_cv_file_magic_cmd=/usr/bin/file
3806   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3807   ;;
3808
3809 openbsd*)
3810   lt_cv_file_magic_cmd=/usr/bin/file
3811   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3812   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3813     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3814   else
3815     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3816   fi
3817   ;;
3818
3819 openedition*)
3820   lt_cv_deplibs_check_method=pass_all
3821   ;;
3822
3823 osf3* | osf4* | osf5*)
3824   # this will be overridden with pass_all, but let us keep it just in case
3825   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3826   lt_cv_file_magic_test_file=/shlib/libc.so
3827   lt_cv_deplibs_check_method=pass_all
3828   ;;
3829
3830 sco3.2v5*)
3831   lt_cv_deplibs_check_method=pass_all
3832   ;;
3833
3834 solaris*)
3835   lt_cv_deplibs_check_method=pass_all
3836   lt_cv_file_magic_test_file=/lib/libc.so
3837   ;;
3838
3839 sysv5uw[78]* | sysv4*uw2*)
3840   lt_cv_deplibs_check_method=pass_all
3841   ;;
3842
3843 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3844   case $host_vendor in
3845   motorola)
3846     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]'
3847     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3848     ;;
3849   ncr)
3850     lt_cv_deplibs_check_method=pass_all
3851     ;;
3852   sequent)
3853     lt_cv_file_magic_cmd='/bin/file'
3854     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3855     ;;
3856   sni)
3857     lt_cv_file_magic_cmd='/bin/file'
3858     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3859     lt_cv_file_magic_test_file=/lib/libc.so
3860     ;;
3861   siemens)
3862     lt_cv_deplibs_check_method=pass_all
3863     ;;
3864   esac
3865   ;;
3866 esac
3867
3868 fi
3869
3870 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3871 file_magic_cmd=$lt_cv_file_magic_cmd
3872 deplibs_check_method=$lt_cv_deplibs_check_method
3873
3874 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3875 echo "configure:3876: checking for object suffix" >&5
3876 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   rm -f conftest*
3880 echo 'int i = 1;' > conftest.$ac_ext
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   for ac_file in conftest.*; do
3883     case $ac_file in
3884     *.c) ;;
3885     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3886     esac
3887   done
3888 else
3889   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3890 fi
3891 rm -f conftest*
3892 fi
3893
3894 echo "$ac_t""$ac_cv_objext" 1>&6
3895 OBJEXT=$ac_cv_objext
3896 ac_objext=$ac_cv_objext
3897
3898
3899
3900
3901 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3902 echo "configure:3903: checking for executable suffix" >&5
3903 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3907   ac_cv_exeext=.exe
3908 else
3909   rm -f conftest*
3910   echo 'int main () { return 0; }' > conftest.$ac_ext
3911   ac_cv_exeext=
3912   if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3913     for file in conftest.*; do
3914       case $file in
3915       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3916       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3917       esac
3918     done
3919   else
3920     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3921   fi
3922   rm -f conftest*
3923   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3924 fi
3925 fi
3926
3927 EXEEXT=""
3928 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3929 echo "$ac_t""${ac_cv_exeext}" 1>&6
3930 ac_exeext=$EXEEXT
3931
3932 if test $host != $build; then
3933   ac_tool_prefix=${host_alias}-
3934 else
3935   ac_tool_prefix=
3936 fi
3937
3938
3939
3940
3941 # Check for command to grab the raw symbol name followed by C symbol from nm.
3942 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3943 echo "configure:3944: checking command to parse $NM output" >&5
3944 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   
3948 # These are sane defaults that work on at least a few old systems.
3949 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3950
3951 # Character class describing NM global symbol codes.
3952 symcode='[BCDEGRST]'
3953
3954 # Regexp to match symbols that can be accessed directly from C.
3955 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3956
3957 # Transform the above into a raw symbol and a C symbol.
3958 symxfrm='\1 \2\3 \3'
3959
3960 # Transform an extracted symbol line into a proper C declaration
3961 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3962
3963 # Transform an extracted symbol line into symbol name and symbol address
3964 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'"
3965
3966 # Define system-specific variables.
3967 case $host_os in
3968 aix*)
3969   symcode='[BCDT]'
3970   ;;
3971 cygwin* | mingw* | pw32*)
3972   symcode='[ABCDGISTW]'
3973   ;;
3974 hpux*) # Its linker distinguishes data from code symbols
3975   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3976   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'"
3977   ;;
3978 irix* | nonstopux*)
3979   symcode='[BCDEGRST]'
3980   ;;
3981 osf*)
3982   symcode='[BCDEGQRST]'
3983   ;;
3984 solaris* | sysv5*)
3985   symcode='[BDT]'
3986   ;;
3987 sysv4)
3988   symcode='[DFNSTU]'
3989   ;;
3990 esac
3991
3992 # Handle CRLF in mingw tool chain
3993 opt_cr=
3994 case $host_os in
3995 mingw*)
3996   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3997   ;;
3998 esac
3999
4000 # If we're using GNU nm, then use its standard symbol codes.
4001 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4002   symcode='[ABCDGISTW]'
4003 fi
4004
4005 # Try without a prefix undercore, then with it.
4006 for ac_symprfx in "" "_"; do
4007
4008   # Write the raw and C identifiers.
4009 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4010
4011   # Check to see that the pipe works correctly.
4012   pipe_works=no
4013   rm -f conftest*
4014   cat > conftest.$ac_ext <<EOF
4015 #ifdef __cplusplus
4016 extern "C" {
4017 #endif
4018 char nm_test_var;
4019 void nm_test_func(){}
4020 #ifdef __cplusplus
4021 }
4022 #endif
4023 int main(){nm_test_var='a';nm_test_func();return(0);}
4024 EOF
4025
4026   if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4027     # Now try to grab the symbols.
4028     nlist=conftest.nm
4029     if { (eval echo configure:4030: \"$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
4030       # Try sorting and uniquifying the output.
4031       if sort "$nlist" | uniq > "$nlist"T; then
4032         mv -f "$nlist"T "$nlist"
4033       else
4034         rm -f "$nlist"T
4035       fi
4036
4037       # Make sure that we snagged all the symbols we need.
4038       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4039         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4040           cat <<EOF > conftest.$ac_ext
4041 #ifdef __cplusplus
4042 extern "C" {
4043 #endif
4044
4045 EOF
4046           # Now generate the symbol file.
4047           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4048
4049           cat <<EOF >> conftest.$ac_ext
4050 #if defined (__STDC__) && __STDC__
4051 # define lt_ptr void *
4052 #else
4053 # define lt_ptr char *
4054 # define const
4055 #endif
4056
4057 /* The mapping between symbol names and symbols. */
4058 const struct {
4059   const char *name;
4060   lt_ptr address;
4061 }
4062 lt_preloaded_symbols[] =
4063 {
4064 EOF
4065           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4066           cat <<\EOF >> conftest.$ac_ext
4067   {0, (lt_ptr) 0}
4068 };
4069
4070 #ifdef __cplusplus
4071 }
4072 #endif
4073 EOF
4074           # Now try linking the two files.
4075           mv conftest.$ac_objext conftstm.$ac_objext
4076           save_LIBS="$LIBS"
4077           save_CFLAGS="$CFLAGS"
4078           LIBS="conftstm.$ac_objext"
4079           CFLAGS="$CFLAGS$no_builtin_flag"
4080           if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4081             pipe_works=yes
4082           fi
4083           LIBS="$save_LIBS"
4084           CFLAGS="$save_CFLAGS"
4085         else
4086           echo "cannot find nm_test_func in $nlist" >&5
4087         fi
4088       else
4089         echo "cannot find nm_test_var in $nlist" >&5
4090       fi
4091     else
4092       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4093     fi
4094   else
4095     echo "$progname: failed program was:" >&5
4096     cat conftest.$ac_ext >&5
4097   fi
4098   rm -f conftest* conftst*
4099
4100   # Do not use the global_symbol_pipe unless it works.
4101   if test "$pipe_works" = yes; then
4102     break
4103   else
4104     lt_cv_sys_global_symbol_pipe=
4105   fi
4106 done
4107
4108 fi
4109
4110 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4111 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4112   global_symbol_to_cdecl=
4113   global_symbol_to_c_name_address=
4114 else
4115   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4116   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4117 fi
4118 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4119 then
4120   echo "$ac_t""failed" 1>&6
4121 else
4122   echo "$ac_t""ok" 1>&6
4123 fi
4124
4125 for ac_hdr in dlfcn.h
4126 do
4127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4129 echo "configure:4130: checking for $ac_hdr" >&5
4130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <$ac_hdr>
4137 EOF
4138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4139 { (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4141 if test -z "$ac_err"; then
4142   rm -rf conftest*
4143   eval "ac_cv_header_$ac_safe=yes"
4144 else
4145   echo "$ac_err" >&5
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   eval "ac_cv_header_$ac_safe=no"
4150 fi
4151 rm -f conftest*
4152 fi
4153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4154   echo "$ac_t""yes" 1>&6
4155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4156   cat >> confdefs.h <<EOF
4157 #define $ac_tr_hdr 1
4158 EOF
4159  
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163 done
4164
4165
4166
4167
4168
4169
4170 # Only perform the check for file, if the check method requires it
4171 case $deplibs_check_method in
4172 file_magic*)
4173   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4174     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4175 echo "configure:4176: checking for ${ac_tool_prefix}file" >&5
4176 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4177   echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179   case $MAGIC_CMD in
4180   /*)
4181   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4182   ;;
4183   ?:/*)
4184   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4185   ;;
4186   *)
4187   ac_save_MAGIC_CMD="$MAGIC_CMD"
4188   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4189   ac_dummy="/usr/bin:$PATH"
4190   for ac_dir in $ac_dummy; do
4191     test -z "$ac_dir" && ac_dir=.
4192     if test -f $ac_dir/${ac_tool_prefix}file; then
4193       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4194       if test -n "$file_magic_test_file"; then
4195         case $deplibs_check_method in
4196         "file_magic "*)
4197           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4198           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4199           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4200             egrep "$file_magic_regex" > /dev/null; then
4201             :
4202           else
4203             cat <<EOF 1>&2
4204
4205 *** Warning: the command libtool uses to detect shared libraries,
4206 *** $file_magic_cmd, produces output that libtool cannot recognize.
4207 *** The result is that libtool may fail to recognize shared libraries
4208 *** as such.  This will affect the creation of libtool libraries that
4209 *** depend on shared libraries, but programs linked with such libtool
4210 *** libraries will work regardless of this problem.  Nevertheless, you
4211 *** may want to report the problem to your system manager and/or to
4212 *** bug-libtool@gnu.org
4213
4214 EOF
4215           fi ;;
4216         esac
4217       fi
4218       break
4219     fi
4220   done
4221   IFS="$ac_save_ifs"
4222   MAGIC_CMD="$ac_save_MAGIC_CMD"
4223   ;;
4224 esac
4225 fi
4226
4227 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4228 if test -n "$MAGIC_CMD"; then
4229   echo "$ac_t""$MAGIC_CMD" 1>&6
4230 else
4231   echo "$ac_t""no" 1>&6
4232 fi
4233
4234 if test -z "$lt_cv_path_MAGIC_CMD"; then
4235   if test -n "$ac_tool_prefix"; then
4236     echo $ac_n "checking for file""... $ac_c" 1>&6
4237 echo "configure:4238: checking for file" >&5
4238 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   case $MAGIC_CMD in
4242   /*)
4243   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4244   ;;
4245   ?:/*)
4246   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4247   ;;
4248   *)
4249   ac_save_MAGIC_CMD="$MAGIC_CMD"
4250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4251   ac_dummy="/usr/bin:$PATH"
4252   for ac_dir in $ac_dummy; do
4253     test -z "$ac_dir" && ac_dir=.
4254     if test -f $ac_dir/file; then
4255       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4256       if test -n "$file_magic_test_file"; then
4257         case $deplibs_check_method in
4258         "file_magic "*)
4259           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4260           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4261           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4262             egrep "$file_magic_regex" > /dev/null; then
4263             :
4264           else
4265             cat <<EOF 1>&2
4266
4267 *** Warning: the command libtool uses to detect shared libraries,
4268 *** $file_magic_cmd, produces output that libtool cannot recognize.
4269 *** The result is that libtool may fail to recognize shared libraries
4270 *** as such.  This will affect the creation of libtool libraries that
4271 *** depend on shared libraries, but programs linked with such libtool
4272 *** libraries will work regardless of this problem.  Nevertheless, you
4273 *** may want to report the problem to your system manager and/or to
4274 *** bug-libtool@gnu.org
4275
4276 EOF
4277           fi ;;
4278         esac
4279       fi
4280       break
4281     fi
4282   done
4283   IFS="$ac_save_ifs"
4284   MAGIC_CMD="$ac_save_MAGIC_CMD"
4285   ;;
4286 esac
4287 fi
4288
4289 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4290 if test -n "$MAGIC_CMD"; then
4291   echo "$ac_t""$MAGIC_CMD" 1>&6
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296   else
4297     MAGIC_CMD=:
4298   fi
4299 fi
4300
4301   fi
4302   ;;
4303 esac
4304
4305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4306 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4308 echo "configure:4309: checking for $ac_word" >&5
4309 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4310   echo $ac_n "(cached) $ac_c" 1>&6
4311 else
4312   if test -n "$RANLIB"; then
4313   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4314 else
4315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4316   ac_dummy="$PATH"
4317   for ac_dir in $ac_dummy; do
4318     test -z "$ac_dir" && ac_dir=.
4319     if test -f $ac_dir/$ac_word; then
4320       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4321       break
4322     fi
4323   done
4324   IFS="$ac_save_ifs"
4325 fi
4326 fi
4327 RANLIB="$ac_cv_prog_RANLIB"
4328 if test -n "$RANLIB"; then
4329   echo "$ac_t""$RANLIB" 1>&6
4330 else
4331   echo "$ac_t""no" 1>&6
4332 fi
4333
4334
4335 if test -z "$ac_cv_prog_RANLIB"; then
4336 if test -n "$ac_tool_prefix"; then
4337   # Extract the first word of "ranlib", so it can be a program name with args.
4338 set dummy ranlib; ac_word=$2
4339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4340 echo "configure:4341: checking for $ac_word" >&5
4341 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   if test -n "$RANLIB"; then
4345   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4346 else
4347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4348   ac_dummy="$PATH"
4349   for ac_dir in $ac_dummy; do
4350     test -z "$ac_dir" && ac_dir=.
4351     if test -f $ac_dir/$ac_word; then
4352       ac_cv_prog_RANLIB="ranlib"
4353       break
4354     fi
4355   done
4356   IFS="$ac_save_ifs"
4357   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4358 fi
4359 fi
4360 RANLIB="$ac_cv_prog_RANLIB"
4361 if test -n "$RANLIB"; then
4362   echo "$ac_t""$RANLIB" 1>&6
4363 else
4364   echo "$ac_t""no" 1>&6
4365 fi
4366
4367 else
4368   RANLIB=":"
4369 fi
4370 fi
4371
4372 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}strip; ac_word=$2
4374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4375 echo "configure:4376: checking for $ac_word" >&5
4376 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   if test -n "$STRIP"; then
4380   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4381 else
4382   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4383   ac_dummy="$PATH"
4384   for ac_dir in $ac_dummy; do
4385     test -z "$ac_dir" && ac_dir=.
4386     if test -f $ac_dir/$ac_word; then
4387       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4388       break
4389     fi
4390   done
4391   IFS="$ac_save_ifs"
4392 fi
4393 fi
4394 STRIP="$ac_cv_prog_STRIP"
4395 if test -n "$STRIP"; then
4396   echo "$ac_t""$STRIP" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401
4402 if test -z "$ac_cv_prog_STRIP"; then
4403 if test -n "$ac_tool_prefix"; then
4404   # Extract the first word of "strip", so it can be a program name with args.
4405 set dummy strip; ac_word=$2
4406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4407 echo "configure:4408: checking for $ac_word" >&5
4408 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   if test -n "$STRIP"; then
4412   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4413 else
4414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4415   ac_dummy="$PATH"
4416   for ac_dir in $ac_dummy; do
4417     test -z "$ac_dir" && ac_dir=.
4418     if test -f $ac_dir/$ac_word; then
4419       ac_cv_prog_STRIP="strip"
4420       break
4421     fi
4422   done
4423   IFS="$ac_save_ifs"
4424   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4425 fi
4426 fi
4427 STRIP="$ac_cv_prog_STRIP"
4428 if test -n "$STRIP"; then
4429   echo "$ac_t""$STRIP" 1>&6
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433
4434 else
4435   STRIP=":"
4436 fi
4437 fi
4438
4439
4440 enable_dlopen=yes
4441 enable_win32_dll=yes
4442
4443 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4444 if test "${enable_libtool_lock+set}" = set; then
4445   enableval="$enable_libtool_lock"
4446   :
4447 fi
4448
4449 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4450
4451 # Some flags need to be propagated to the compiler or linker for good
4452 # libtool support.
4453 case $host in
4454 *-*-irix6*)
4455   # Find out which ABI we are using.
4456   echo '#line 4457 "configure"' > conftest.$ac_ext
4457   if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458     case `/usr/bin/file conftest.$ac_objext` in
4459     *32-bit*)
4460       LD="${LD-ld} -32"
4461       ;;
4462     *N32*)
4463       LD="${LD-ld} -n32"
4464       ;;
4465     *64-bit*)
4466       LD="${LD-ld} -64"
4467       ;;
4468     esac
4469   fi
4470   rm -rf conftest*
4471   ;;
4472
4473 *-*-sco3.2v5*)
4474   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4475   SAVE_CFLAGS="$CFLAGS"
4476   CFLAGS="$CFLAGS -belf"
4477   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4478 echo "configure:4479: checking whether the C compiler needs -belf" >&5
4479 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4480   echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482   
4483      ac_ext=c
4484 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4485 ac_cpp='$CPP $CPPFLAGS'
4486 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4487 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4488 cross_compiling=$ac_cv_prog_cc_cross
4489
4490      cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493
4494 int main() {
4495
4496 ; return 0; }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4499   rm -rf conftest*
4500   lt_cv_cc_needs_belf=yes
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   lt_cv_cc_needs_belf=no
4506 fi
4507 rm -f conftest*
4508      ac_ext=c
4509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4510 ac_cpp='$CPP $CPPFLAGS'
4511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4513 cross_compiling=$ac_cv_prog_cc_cross
4514
4515 fi
4516
4517 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4518   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4519     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4520     CFLAGS="$SAVE_CFLAGS"
4521   fi
4522   ;;
4523
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4525   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4526 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4528 echo "configure:4529: checking for $ac_word" >&5
4529 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   if test -n "$DLLTOOL"; then
4533   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4534 else
4535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4536   ac_dummy="$PATH"
4537   for ac_dir in $ac_dummy; do
4538     test -z "$ac_dir" && ac_dir=.
4539     if test -f $ac_dir/$ac_word; then
4540       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4541       break
4542     fi
4543   done
4544   IFS="$ac_save_ifs"
4545 fi
4546 fi
4547 DLLTOOL="$ac_cv_prog_DLLTOOL"
4548 if test -n "$DLLTOOL"; then
4549   echo "$ac_t""$DLLTOOL" 1>&6
4550 else
4551   echo "$ac_t""no" 1>&6
4552 fi
4553
4554
4555 if test -z "$ac_cv_prog_DLLTOOL"; then
4556 if test -n "$ac_tool_prefix"; then
4557   # Extract the first word of "dlltool", so it can be a program name with args.
4558 set dummy dlltool; ac_word=$2
4559 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4560 echo "configure:4561: checking for $ac_word" >&5
4561 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   if test -n "$DLLTOOL"; then
4565   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4566 else
4567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4568   ac_dummy="$PATH"
4569   for ac_dir in $ac_dummy; do
4570     test -z "$ac_dir" && ac_dir=.
4571     if test -f $ac_dir/$ac_word; then
4572       ac_cv_prog_DLLTOOL="dlltool"
4573       break
4574     fi
4575   done
4576   IFS="$ac_save_ifs"
4577   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4578 fi
4579 fi
4580 DLLTOOL="$ac_cv_prog_DLLTOOL"
4581 if test -n "$DLLTOOL"; then
4582   echo "$ac_t""$DLLTOOL" 1>&6
4583 else
4584   echo "$ac_t""no" 1>&6
4585 fi
4586
4587 else
4588   DLLTOOL="false"
4589 fi
4590 fi
4591
4592   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4593 set dummy ${ac_tool_prefix}as; ac_word=$2
4594 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4595 echo "configure:4596: checking for $ac_word" >&5
4596 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   if test -n "$AS"; then
4600   ac_cv_prog_AS="$AS" # Let the user override the test.
4601 else
4602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4603   ac_dummy="$PATH"
4604   for ac_dir in $ac_dummy; do
4605     test -z "$ac_dir" && ac_dir=.
4606     if test -f $ac_dir/$ac_word; then
4607       ac_cv_prog_AS="${ac_tool_prefix}as"
4608       break
4609     fi
4610   done
4611   IFS="$ac_save_ifs"
4612 fi
4613 fi
4614 AS="$ac_cv_prog_AS"
4615 if test -n "$AS"; then
4616   echo "$ac_t""$AS" 1>&6
4617 else
4618   echo "$ac_t""no" 1>&6
4619 fi
4620
4621
4622 if test -z "$ac_cv_prog_AS"; then
4623 if test -n "$ac_tool_prefix"; then
4624   # Extract the first word of "as", so it can be a program name with args.
4625 set dummy as; ac_word=$2
4626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4627 echo "configure:4628: checking for $ac_word" >&5
4628 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   if test -n "$AS"; then
4632   ac_cv_prog_AS="$AS" # Let the user override the test.
4633 else
4634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4635   ac_dummy="$PATH"
4636   for ac_dir in $ac_dummy; do
4637     test -z "$ac_dir" && ac_dir=.
4638     if test -f $ac_dir/$ac_word; then
4639       ac_cv_prog_AS="as"
4640       break
4641     fi
4642   done
4643   IFS="$ac_save_ifs"
4644   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4645 fi
4646 fi
4647 AS="$ac_cv_prog_AS"
4648 if test -n "$AS"; then
4649   echo "$ac_t""$AS" 1>&6
4650 else
4651   echo "$ac_t""no" 1>&6
4652 fi
4653
4654 else
4655   AS="false"
4656 fi
4657 fi
4658
4659   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4660 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4662 echo "configure:4663: checking for $ac_word" >&5
4663 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   if test -n "$OBJDUMP"; then
4667   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4668 else
4669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4670   ac_dummy="$PATH"
4671   for ac_dir in $ac_dummy; do
4672     test -z "$ac_dir" && ac_dir=.
4673     if test -f $ac_dir/$ac_word; then
4674       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4675       break
4676     fi
4677   done
4678   IFS="$ac_save_ifs"
4679 fi
4680 fi
4681 OBJDUMP="$ac_cv_prog_OBJDUMP"
4682 if test -n "$OBJDUMP"; then
4683   echo "$ac_t""$OBJDUMP" 1>&6
4684 else
4685   echo "$ac_t""no" 1>&6
4686 fi
4687
4688
4689 if test -z "$ac_cv_prog_OBJDUMP"; then
4690 if test -n "$ac_tool_prefix"; then
4691   # Extract the first word of "objdump", so it can be a program name with args.
4692 set dummy objdump; ac_word=$2
4693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_word" >&5
4695 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   if test -n "$OBJDUMP"; then
4699   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4700 else
4701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4702   ac_dummy="$PATH"
4703   for ac_dir in $ac_dummy; do
4704     test -z "$ac_dir" && ac_dir=.
4705     if test -f $ac_dir/$ac_word; then
4706       ac_cv_prog_OBJDUMP="objdump"
4707       break
4708     fi
4709   done
4710   IFS="$ac_save_ifs"
4711   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4712 fi
4713 fi
4714 OBJDUMP="$ac_cv_prog_OBJDUMP"
4715 if test -n "$OBJDUMP"; then
4716   echo "$ac_t""$OBJDUMP" 1>&6
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720
4721 else
4722   OBJDUMP="false"
4723 fi
4724 fi
4725
4726
4727   # recent cygwin and mingw systems supply a stub DllMain which the user
4728   # can override, but on older systems we have to supply one
4729   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4730 echo "configure:4731: checking if libtool should supply DllMain function" >&5
4731 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4732   echo $ac_n "(cached) $ac_c" 1>&6
4733 else
4734   cat > conftest.$ac_ext <<EOF
4735 #line 4736 "configure"
4736 #include "confdefs.h"
4737
4738 int main() {
4739 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4740       DllMain (0, 0, 0);
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744   rm -rf conftest*
4745   lt_cv_need_dllmain=no
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749   rm -rf conftest*
4750   lt_cv_need_dllmain=yes
4751 fi
4752 rm -f conftest*
4753 fi
4754
4755 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4756
4757   case $host/$CC in
4758   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4759     # old mingw systems require "-dll" to link a DLL, while more recent ones
4760     # require "-mdll"
4761     SAVE_CFLAGS="$CFLAGS"
4762     CFLAGS="$CFLAGS -mdll"
4763     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4764 echo "configure:4765: checking how to link DLLs" >&5
4765 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771
4772 int main() {
4773
4774 ; return 0; }
4775 EOF
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777   rm -rf conftest*
4778   lt_cv_cc_dll_switch=-mdll
4779 else
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   lt_cv_cc_dll_switch=-dll
4784 fi
4785 rm -f conftest*
4786 fi
4787
4788 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4789     CFLAGS="$SAVE_CFLAGS" ;;
4790   *-*-cygwin* | *-*-pw32*)
4791     # cygwin systems need to pass --dll to the linker, and not link
4792     # crt.o which will require a WinMain@16 definition.
4793     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4794   esac
4795   ;;
4796   
4797 esac
4798
4799 # Sed substitution that helps us do robust quoting.  It backslashifies
4800 # metacharacters that are still active within double-quoted strings.
4801 Xsed='sed -e s/^X//'
4802 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4803
4804 # Same as above, but do not quote variable references.
4805 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4806
4807 # Sed substitution to delay expansion of an escaped shell variable in a
4808 # double_quote_subst'ed string.
4809 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4810
4811 # Constants:
4812 rm="rm -f"
4813
4814 # Global variables:
4815 default_ofile=libtool
4816 can_build_shared=yes
4817
4818 # All known linkers require a `.a' archive for static linking (except M$VC,
4819 # which needs '.lib').
4820 libext=a
4821 ltmain="$ac_aux_dir/ltmain.sh"
4822 ofile="$default_ofile"
4823 with_gnu_ld="$lt_cv_prog_gnu_ld"
4824 need_locks="$enable_libtool_lock"
4825
4826 old_CC="$CC"
4827 old_CFLAGS="$CFLAGS"
4828
4829 # Set sane defaults for various variables
4830 test -z "$AR" && AR=ar
4831 test -z "$AR_FLAGS" && AR_FLAGS=cru
4832 test -z "$AS" && AS=as
4833 test -z "$CC" && CC=cc
4834 test -z "$DLLTOOL" && DLLTOOL=dlltool
4835 test -z "$LD" && LD=ld
4836 test -z "$LN_S" && LN_S="ln -s"
4837 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4838 test -z "$NM" && NM=nm
4839 test -z "$OBJDUMP" && OBJDUMP=objdump
4840 test -z "$RANLIB" && RANLIB=:
4841 test -z "$STRIP" && STRIP=:
4842 test -z "$ac_objext" && ac_objext=o
4843
4844 if test x"$host" != x"$build"; then
4845   ac_tool_prefix=${host_alias}-
4846 else
4847   ac_tool_prefix=
4848 fi
4849
4850 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4851 case $host_os in
4852 linux-gnu*) ;;
4853 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4854 esac
4855
4856 case $host_os in
4857 aix3*)
4858   # AIX sometimes has problems with the GCC collect2 program.  For some
4859   # reason, if we set the COLLECT_NAMES environment variable, the problems
4860   # vanish in a puff of smoke.
4861   if test "X${COLLECT_NAMES+set}" != Xset; then
4862     COLLECT_NAMES=
4863     export COLLECT_NAMES
4864   fi
4865   ;;
4866 esac
4867
4868 # Determine commands to create old-style static archives.
4869 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4870 old_postinstall_cmds='chmod 644 $oldlib'
4871 old_postuninstall_cmds=
4872
4873 if test -n "$RANLIB"; then
4874   case $host_os in
4875   openbsd*)
4876     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4877     ;;
4878   *)
4879     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4880     ;;
4881   esac
4882   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4883 fi
4884
4885 # Allow CC to be a program name with arguments.
4886 set dummy $CC
4887 compiler="$2"
4888
4889 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4890 echo "configure:4891: checking for objdir" >&5
4891 rm -f .libs 2>/dev/null
4892 mkdir .libs 2>/dev/null
4893 if test -d .libs; then
4894   objdir=.libs
4895 else
4896   # MS-DOS does not allow filenames that begin with a dot.
4897   objdir=_libs
4898 fi
4899 rmdir .libs 2>/dev/null
4900 echo "$ac_t""$objdir" 1>&6
4901
4902
4903 # Check whether --with-pic or --without-pic was given.
4904 if test "${with_pic+set}" = set; then
4905   withval="$with_pic"
4906   pic_mode="$withval"
4907 else
4908   pic_mode=default
4909 fi
4910
4911 test -z "$pic_mode" && pic_mode=default
4912
4913 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4914 # in isolation, and that seeing it set (from the cache) indicates that
4915 # the associated values are set (in the cache) correctly too.
4916 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4917 echo "configure:4918: checking for $compiler option to produce PIC" >&5
4918 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4919   echo $ac_n "(cached) $ac_c" 1>&6
4920 else
4921    lt_cv_prog_cc_pic=
4922   lt_cv_prog_cc_shlib=
4923   lt_cv_prog_cc_wl=
4924   lt_cv_prog_cc_static=
4925   lt_cv_prog_cc_no_builtin=
4926   lt_cv_prog_cc_can_build_shared=$can_build_shared
4927
4928   if test "$GCC" = yes; then
4929     lt_cv_prog_cc_wl='-Wl,'
4930     lt_cv_prog_cc_static='-static'
4931
4932     case $host_os in
4933     aix*)
4934       # Below there is a dirty hack to force normal static linking with -ldl
4935       # The problem is because libdl dynamically linked with both libc and
4936       # libC (AIX C++ library), which obviously doesn't included in libraries
4937       # list by gcc. This cause undefined symbols with -static flags.
4938       # This hack allows C programs to be linked with "-static -ldl", but
4939       # not sure about C++ programs.
4940       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4941       ;;
4942     amigaos*)
4943       # FIXME: we need at least 68020 code to build shared libraries, but
4944       # adding the `-m68020' flag to GCC prevents building anything better,
4945       # like `-m68040'.
4946       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4947       ;;
4948     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4949       # PIC is the default for these OSes.
4950       ;;
4951     darwin* | rhapsody*)
4952       # PIC is the default on this platform
4953       # Common symbols not allowed in MH_DYLIB files
4954       lt_cv_prog_cc_pic='-fno-common'
4955       ;;
4956     cygwin* | mingw* | pw32* | os2*)
4957       # This hack is so that the source file can tell whether it is being
4958       # built for inclusion in a dll (and should export symbols for example).
4959       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4960       ;;
4961     sysv4*MP*)
4962       if test -d /usr/nec; then
4963          lt_cv_prog_cc_pic=-Kconform_pic
4964       fi
4965       ;;
4966     *)
4967       lt_cv_prog_cc_pic='-fPIC'
4968       ;;
4969     esac
4970   else
4971     # PORTME Check for PIC flags for the system compiler.
4972     case $host_os in
4973     aix3* | aix4* | aix5*)
4974       lt_cv_prog_cc_wl='-Wl,'
4975       # All AIX code is PIC.
4976       if test "$host_cpu" = ia64; then
4977         # AIX 5 now supports IA64 processor
4978         lt_cv_prog_cc_static='-Bstatic'
4979       else
4980         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4981       fi
4982       ;;
4983
4984     hpux9* | hpux10* | hpux11*)
4985       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4986       lt_cv_prog_cc_wl='-Wl,'
4987       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4988       lt_cv_prog_cc_pic='+Z'
4989       ;;
4990
4991     irix5* | irix6* | nonstopux*)
4992       lt_cv_prog_cc_wl='-Wl,'
4993       lt_cv_prog_cc_static='-non_shared'
4994       # PIC (with -KPIC) is the default.
4995       ;;
4996
4997     cygwin* | mingw* | pw32* | os2*)
4998       # This hack is so that the source file can tell whether it is being
4999       # built for inclusion in a dll (and should export symbols for example).
5000       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5001       ;;
5002
5003     newsos6)
5004       lt_cv_prog_cc_pic='-KPIC'
5005       lt_cv_prog_cc_static='-Bstatic'
5006       ;;
5007     
5008     openedition)
5009       # XPLINK code is PIC by default
5010       ;;
5011
5012     osf3* | osf4* | osf5*)
5013       # All OSF/1 code is PIC.
5014       lt_cv_prog_cc_wl='-Wl,'
5015       lt_cv_prog_cc_static='-non_shared'
5016       ;;
5017
5018     sco3.2v5*)
5019       lt_cv_prog_cc_pic='-Kpic'
5020       lt_cv_prog_cc_static='-dn'
5021       lt_cv_prog_cc_shlib='-belf'
5022       ;;
5023
5024     solaris*)
5025       lt_cv_prog_cc_pic='-KPIC'
5026       lt_cv_prog_cc_static='-Bstatic'
5027       lt_cv_prog_cc_wl='-Wl,'
5028       ;;
5029
5030     sunos4*)
5031       lt_cv_prog_cc_pic='-PIC'
5032       lt_cv_prog_cc_static='-Bstatic'
5033       lt_cv_prog_cc_wl='-Qoption ld '
5034       ;;
5035
5036     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5037       lt_cv_prog_cc_pic='-KPIC'
5038       lt_cv_prog_cc_static='-Bstatic'
5039       lt_cv_prog_cc_wl='-Wl,'
5040       ;;
5041
5042     uts4*)
5043       lt_cv_prog_cc_pic='-pic'
5044       lt_cv_prog_cc_static='-Bstatic'
5045       ;;
5046
5047     sysv4*MP*)
5048       if test -d /usr/nec ;then
5049         lt_cv_prog_cc_pic='-Kconform_pic'
5050         lt_cv_prog_cc_static='-Bstatic'
5051       fi
5052       ;;
5053
5054     *)
5055       lt_cv_prog_cc_can_build_shared=no
5056       ;;
5057     esac
5058   fi
5059
5060 fi
5061
5062 if test -z "$lt_cv_prog_cc_pic"; then
5063   echo "$ac_t""none" 1>&6
5064 else
5065   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5066
5067   # Check to make sure the pic_flag actually works.
5068   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5069 echo "configure:5070: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5070   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5071   echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073       save_CFLAGS="$CFLAGS"
5074     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5075     cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078
5079 int main() {
5080
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5084   rm -rf conftest*
5085         case $host_os in
5086       hpux9* | hpux10* | hpux11*)
5087         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5088         # they create non-PIC objects.  So, if there were any warnings, we
5089         # assume that PIC is not supported.
5090         if test -s conftest.err; then
5091           lt_cv_prog_cc_pic_works=no
5092         else
5093           lt_cv_prog_cc_pic_works=yes
5094         fi
5095         ;;
5096       *)
5097         lt_cv_prog_cc_pic_works=yes
5098         ;;
5099       esac
5100     
5101 else
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105         lt_cv_prog_cc_pic_works=no
5106     
5107 fi
5108 rm -f conftest*
5109     CFLAGS="$save_CFLAGS"
5110   
5111 fi
5112
5113
5114   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5115     lt_cv_prog_cc_pic=
5116     lt_cv_prog_cc_can_build_shared=no
5117   else
5118     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5119   fi
5120
5121   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5122 fi
5123
5124 # Check for any special shared library compilation flags.
5125 if test -n "$lt_cv_prog_cc_shlib"; then
5126   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5127   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5128   else
5129    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5130     lt_cv_prog_cc_can_build_shared=no
5131   fi
5132 fi
5133
5134 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5135 echo "configure:5136: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5136 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139     lt_cv_prog_cc_static_works=no
5140   save_LDFLAGS="$LDFLAGS"
5141   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5142   cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145
5146 int main() {
5147
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   lt_cv_prog_cc_static_works=yes
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156 fi
5157 rm -f conftest*
5158   LDFLAGS="$save_LDFLAGS"
5159
5160 fi
5161
5162
5163 # Belt *and* braces to stop my trousers falling down:
5164 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5165 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5166
5167 pic_flag="$lt_cv_prog_cc_pic"
5168 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5169 wl="$lt_cv_prog_cc_wl"
5170 link_static_flag="$lt_cv_prog_cc_static"
5171 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5172 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5173
5174
5175 # Check to see if options -o and -c are simultaneously supported by compiler
5176 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5177 echo "configure:5178: checking if $compiler supports -c -o file.$ac_objext" >&5
5178 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181   
5182 $rm -r conftest 2>/dev/null
5183 mkdir conftest
5184 cd conftest
5185 echo "int some_variable = 0;" > conftest.$ac_ext
5186 mkdir out
5187 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5188 # that will create temporary files in the current directory regardless of
5189 # the output directory.  Thus, making CWD read-only will cause this test
5190 # to fail, enabling locking or at least warning the user not to do parallel
5191 # builds.
5192 chmod -w .
5193 save_CFLAGS="$CFLAGS"
5194 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5195 compiler_c_o=no
5196 if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5197   # The compiler can only warn and ignore the option if not recognized
5198   # So say no if there are warnings
5199   if test -s out/conftest.err; then
5200     lt_cv_compiler_c_o=no
5201   else
5202     lt_cv_compiler_c_o=yes
5203   fi
5204 else
5205   # Append any errors to the config.log.
5206   cat out/conftest.err 1>&5
5207   lt_cv_compiler_c_o=no
5208 fi
5209 CFLAGS="$save_CFLAGS"
5210 chmod u+w .
5211 $rm conftest* out/*
5212 rmdir out
5213 cd ..
5214 rmdir conftest
5215 $rm -r conftest 2>/dev/null
5216
5217 fi
5218
5219 compiler_c_o=$lt_cv_compiler_c_o
5220 echo "$ac_t""$compiler_c_o" 1>&6
5221
5222 if test x"$compiler_c_o" = x"yes"; then
5223   # Check to see if we can write to a .lo
5224   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5225 echo "configure:5226: checking if $compiler supports -c -o file.lo" >&5
5226   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   
5230   lt_cv_compiler_o_lo=no
5231   save_CFLAGS="$CFLAGS"
5232   CFLAGS="$CFLAGS -c -o conftest.lo"
5233   save_objext="$ac_objext"
5234   ac_objext=lo
5235   cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238
5239 int main() {
5240 int some_variable = 0;
5241 ; return 0; }
5242 EOF
5243 if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5244   rm -rf conftest*
5245       # The compiler can only warn and ignore the option if not recognized
5246     # So say no if there are warnings
5247     if test -s conftest.err; then
5248       lt_cv_compiler_o_lo=no
5249     else
5250       lt_cv_compiler_o_lo=yes
5251     fi
5252   
5253 else
5254   echo "configure: failed program was:" >&5
5255   cat conftest.$ac_ext >&5
5256 fi
5257 rm -f conftest*
5258   ac_objext="$save_objext"
5259   CFLAGS="$save_CFLAGS"
5260   
5261 fi
5262
5263   compiler_o_lo=$lt_cv_compiler_o_lo
5264   echo "$ac_t""$compiler_o_lo" 1>&6
5265 else
5266   compiler_o_lo=no
5267 fi
5268
5269 # Check to see if we can do hard links to lock some files if needed
5270 hard_links="nottested"
5271 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5272   # do not overwrite the value of need_locks provided by the user
5273   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5274 echo "configure:5275: checking if we can lock with hard links" >&5
5275   hard_links=yes
5276   $rm conftest*
5277   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5278   touch conftest.a
5279   ln conftest.a conftest.b 2>&5 || hard_links=no
5280   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5281   echo "$ac_t""$hard_links" 1>&6
5282   if test "$hard_links" = no; then
5283     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5284     need_locks=warn
5285   fi
5286 else
5287   need_locks=no
5288 fi
5289
5290 if test "$GCC" = yes; then
5291   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5292   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5293 echo "configure:5294: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5294   echo "int some_variable = 0;" > conftest.$ac_ext
5295   save_CFLAGS="$CFLAGS"
5296   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5297   compiler_rtti_exceptions=no
5298   cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301
5302 int main() {
5303 int some_variable = 0;
5304 ; return 0; }
5305 EOF
5306 if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5307   rm -rf conftest*
5308       # The compiler can only warn and ignore the option if not recognized
5309     # So say no if there are warnings
5310     if test -s conftest.err; then
5311       compiler_rtti_exceptions=no
5312     else
5313       compiler_rtti_exceptions=yes
5314     fi
5315   
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319 fi
5320 rm -f conftest*
5321   CFLAGS="$save_CFLAGS"
5322   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5323
5324   if test "$compiler_rtti_exceptions" = "yes"; then
5325     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5326   else
5327     no_builtin_flag=' -fno-builtin'
5328   fi
5329 fi
5330
5331 # See if the linker supports building shared libraries.
5332 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5333 echo "configure:5334: checking whether the linker ($LD) supports shared libraries" >&5
5334
5335 allow_undefined_flag=
5336 no_undefined_flag=
5337 need_lib_prefix=unknown
5338 need_version=unknown
5339 # when you set need_version to no, make sure it does not cause -set_version
5340 # flags to be left without arguments
5341 archive_cmds=
5342 archive_expsym_cmds=
5343 old_archive_from_new_cmds=
5344 old_archive_from_expsyms_cmds=
5345 export_dynamic_flag_spec=
5346 whole_archive_flag_spec=
5347 thread_safe_flag_spec=
5348 hardcode_into_libs=no
5349 hardcode_libdir_flag_spec=
5350 hardcode_libdir_separator=
5351 hardcode_direct=no
5352 hardcode_minus_L=no
5353 hardcode_shlibpath_var=unsupported
5354 runpath_var=
5355 link_all_deplibs=unknown
5356 always_export_symbols=no
5357 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5358 # include_expsyms should be a list of space-separated symbols to be *always*
5359 # included in the symbol list
5360 include_expsyms=
5361 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5362 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5363 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5364 # as well as any symbol that contains `d'.
5365 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5366 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5367 # platforms (ab)use it in PIC code, but their linkers get confused if
5368 # the symbol is explicitly referenced.  Since portable code cannot
5369 # rely on this symbol name, it's probably fine to never include it in
5370 # preloaded symbol tables.
5371 extract_expsyms_cmds=
5372
5373 case $host_os in
5374 cygwin* | mingw* | pw32*)
5375   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5376   # When not using gcc, we currently assume that we are using
5377   # Microsoft Visual C++.
5378   if test "$GCC" != yes; then
5379     with_gnu_ld=no
5380   fi
5381   ;;
5382 openbsd*)
5383   with_gnu_ld=no
5384   ;;
5385 esac
5386
5387 ld_shlibs=yes
5388 if test "$with_gnu_ld" = yes; then
5389   # If archive_cmds runs LD, not CC, wlarc should be empty
5390   wlarc='${wl}'
5391
5392   # See if GNU ld supports shared libraries.
5393   case $host_os in
5394   aix3* | aix4* | aix5*)
5395     # On AIX, the GNU linker is very broken
5396     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5397     ld_shlibs=no
5398     cat <<EOF 1>&2
5399
5400 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5401 *** to be unable to reliably create shared libraries on AIX.
5402 *** Therefore, libtool is disabling shared libraries support.  If you
5403 *** really care for shared libraries, you may want to modify your PATH
5404 *** so that a non-GNU linker is found, and then restart.
5405
5406 EOF
5407     ;;
5408
5409   amigaos*)
5410     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)'
5411     hardcode_libdir_flag_spec='-L$libdir'
5412     hardcode_minus_L=yes
5413
5414     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5415     # that the semantics of dynamic libraries on AmigaOS, at least up
5416     # to version 4, is to share data among multiple programs linked
5417     # with the same dynamic library.  Since this doesn't match the
5418     # behavior of shared libraries on other platforms, we can use
5419     # them.
5420     ld_shlibs=no
5421     ;;
5422
5423   beos*)
5424     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5425       allow_undefined_flag=unsupported
5426       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5427       # support --undefined.  This deserves some investigation.  FIXME
5428       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5429     else
5430       ld_shlibs=no
5431     fi
5432     ;;
5433
5434   cygwin* | mingw* | pw32*)
5435     # hardcode_libdir_flag_spec is actually meaningless, as there is
5436     # no search path for DLLs.
5437     hardcode_libdir_flag_spec='-L$libdir'
5438     allow_undefined_flag=unsupported
5439     always_export_symbols=yes
5440
5441     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5442       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5443       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5444       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5445       else $CC -o impgen impgen.c ; fi)~
5446       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5447
5448     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5449
5450     # cygwin and mingw dlls have different entry points and sets of symbols
5451     # to exclude.
5452     # FIXME: what about values for MSVC?
5453     dll_entry=__cygwin_dll_entry@12
5454     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5455     case $host_os in
5456     mingw*)
5457       # mingw values
5458       dll_entry=_DllMainCRTStartup@12
5459       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5460       ;;
5461     esac
5462
5463     # mingw and cygwin differ, and it's simplest to just exclude the union
5464     # of the two symbol sets.
5465     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5466
5467     # recent cygwin and mingw systems supply a stub DllMain which the user
5468     # can override, but on older systems we have to supply one (in ltdll.c)
5469     if test "x$lt_cv_need_dllmain" = "xyes"; then
5470       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5471       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~
5472         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5473     else
5474       ltdll_obj=
5475       ltdll_cmds=
5476     fi
5477
5478     # Extract the symbol export list from an `--export-all' def file,
5479     # then regenerate the def file from the symbol export list, so that
5480     # the compiled dll only exports the symbol export list.
5481     # Be careful not to strip the DATA tag left be newer dlltools.
5482     export_symbols_cmds="$ltdll_cmds"'
5483       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5484       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5485
5486     # If the export-symbols file already is a .def file (1st line
5487     # is EXPORTS), use it as is.
5488     # If DATA tags from a recent dlltool are present, honour them!
5489     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5490         cp $export_symbols $output_objdir/$soname-def;
5491       else
5492         echo EXPORTS > $output_objdir/$soname-def;
5493         _lt_hint=1;
5494         cat $export_symbols | while read symbol; do
5495          set dummy \$symbol;
5496          case \$# in
5497            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5498            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5499            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5500          esac;
5501          _lt_hint=`expr 1 + \$_lt_hint`;
5502         done;
5503       fi~
5504       '"$ltdll_cmds"'
5505       $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~
5506       $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~
5507       $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~
5508       $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~
5509       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5510     ;;
5511
5512   netbsd*)
5513     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5514       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5515       wlarc=
5516     else
5517       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5518       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5519     fi
5520     ;;
5521
5522   solaris* | sysv5*)
5523     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5524       ld_shlibs=no
5525       cat <<EOF 1>&2
5526
5527 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5528 *** create shared libraries on Solaris systems.  Therefore, libtool
5529 *** is disabling shared libraries support.  We urge you to upgrade GNU
5530 *** binutils to release 2.9.1 or newer.  Another option is to modify
5531 *** your PATH or compiler configuration so that the native linker is
5532 *** used, and then restart.
5533
5534 EOF
5535     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5536       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5537       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5538     else
5539       ld_shlibs=no
5540     fi
5541     ;;
5542
5543   sunos4*)
5544     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5545     wlarc=
5546     hardcode_direct=yes
5547     hardcode_shlibpath_var=no
5548     ;;
5549
5550   *)
5551     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5552       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5553       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5554     else
5555       ld_shlibs=no
5556     fi
5557     ;;
5558   esac
5559
5560   if test "$ld_shlibs" = yes; then
5561     runpath_var=LD_RUN_PATH
5562     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5563     export_dynamic_flag_spec='${wl}--export-dynamic'
5564     case $host_os in
5565     cygwin* | mingw* | pw32*)
5566       # dlltool doesn't understand --whole-archive et. al.
5567       whole_archive_flag_spec=
5568       ;;
5569     *)
5570       # ancient GNU ld didn't support --whole-archive et. al.
5571       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5572         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5573       else
5574         whole_archive_flag_spec=
5575       fi
5576       ;;
5577     esac
5578   fi
5579 else
5580   # PORTME fill in a description of your system's linker (not GNU ld)
5581   case $host_os in
5582   aix3*)
5583     allow_undefined_flag=unsupported
5584     always_export_symbols=yes
5585     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'
5586     # Note: this linker hardcodes the directories in LIBPATH if there
5587     # are no directories specified by -L.
5588     hardcode_minus_L=yes
5589     if test "$GCC" = yes && test -z "$link_static_flag"; then
5590       # Neither direct hardcoding nor static linking is supported with a
5591       # broken collect2.
5592       hardcode_direct=unsupported
5593     fi
5594     ;;
5595
5596   aix4* | aix5*)
5597     if test "$host_cpu" = ia64; then
5598       # On IA64, the linker does run time linking by default, so we don't
5599       # have to do anything special.
5600       aix_use_runtimelinking=no
5601       exp_sym_flag='-Bexport'
5602       no_entry_flag=""
5603     else
5604       aix_use_runtimelinking=no
5605
5606       # Test if we are trying to use run time linking or normal
5607       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5608       # need to do runtime linking.
5609       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5610         for ld_flag in $LDFLAGS; do
5611           case $ld_flag in
5612           *-brtl*)
5613             aix_use_runtimelinking=yes
5614             break
5615           ;;
5616           esac
5617         done
5618       esac
5619
5620       exp_sym_flag='-bexport'
5621       no_entry_flag='-bnoentry'
5622     fi
5623
5624     # When large executables or shared objects are built, AIX ld can
5625     # have problems creating the table of contents.  If linking a library
5626     # or program results in "error TOC overflow" add -mminimal-toc to
5627     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5628     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5629
5630     hardcode_direct=yes
5631     archive_cmds=''
5632     hardcode_libdir_separator=':'
5633     if test "$GCC" = yes; then
5634       case $host_os in aix4.[012]|aix4.[012].*)
5635         collect2name=`${CC} -print-prog-name=collect2`
5636         if test -f "$collect2name" && \
5637           strings "$collect2name" | grep resolve_lib_name >/dev/null
5638         then
5639           # We have reworked collect2
5640           hardcode_direct=yes
5641         else
5642           # We have old collect2
5643           hardcode_direct=unsupported
5644           # It fails to find uninstalled libraries when the uninstalled
5645           # path is not listed in the libpath.  Setting hardcode_minus_L
5646           # to unsupported forces relinking
5647           hardcode_minus_L=yes
5648           hardcode_libdir_flag_spec='-L$libdir'
5649           hardcode_libdir_separator=
5650         fi
5651       esac
5652
5653       shared_flag='-shared'
5654     else
5655       # not using gcc
5656       if test "$host_cpu" = ia64; then
5657         shared_flag='${wl}-G'
5658       else
5659         if test "$aix_use_runtimelinking" = yes; then
5660           shared_flag='${wl}-G'
5661         else
5662           shared_flag='${wl}-bM:SRE'
5663         fi
5664       fi
5665     fi
5666
5667     # It seems that -bexpall can do strange things, so it is better to
5668     # generate a list of symbols to export.
5669     always_export_symbols=yes
5670     if test "$aix_use_runtimelinking" = yes; then
5671       # Warning - without using the other runtime loading flags (-brtl),
5672       # -berok will link without error, but may produce a broken library.
5673       allow_undefined_flag='-berok'
5674       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5675       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"
5676     else
5677       if test "$host_cpu" = ia64; then
5678         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5679         allow_undefined_flag="-z nodefs"
5680         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"
5681       else
5682         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5683         # Warning - without using the other run time loading flags,
5684         # -berok will link without error, but may produce a broken library.
5685         allow_undefined_flag='${wl}-berok'
5686         # This is a bit strange, but is similar to how AIX traditionally builds
5687         # it's shared libraries.
5688         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'
5689       fi
5690     fi
5691     ;;
5692
5693   amigaos*)
5694     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)'
5695     hardcode_libdir_flag_spec='-L$libdir'
5696     hardcode_minus_L=yes
5697     # see comment about different semantics on the GNU ld section
5698     ld_shlibs=no
5699     ;;
5700
5701   cygwin* | mingw* | pw32*)
5702     # When not using gcc, we currently assume that we are using
5703     # Microsoft Visual C++.
5704     # hardcode_libdir_flag_spec is actually meaningless, as there is
5705     # no search path for DLLs.
5706     hardcode_libdir_flag_spec=' '
5707     allow_undefined_flag=unsupported
5708     # Tell ltmain to make .lib files, not .a files.
5709     libext=lib
5710     # FIXME: Setting linknames here is a bad hack.
5711     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5712     # The linker will automatically build a .lib file if we build a DLL.
5713     old_archive_from_new_cmds='true'
5714     # FIXME: Should let the user specify the lib program.
5715     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5716     fix_srcfile_path='`cygpath -w "$srcfile"`'
5717     ;;
5718
5719   darwin* | rhapsody*)
5720     case "$host_os" in
5721     rhapsody* | darwin1.[012])
5722       allow_undefined_flag='-undefined suppress'
5723       ;;
5724     *) # Darwin 1.3 on
5725       allow_undefined_flag='-flat_namespace -undefined suppress'
5726       ;;
5727     esac
5728     # FIXME: Relying on posixy $() will cause problems for
5729     #        cross-compilation, but unfortunately the echo tests do not
5730     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5731     #        `"' quotes if we put them in here... so don't!
5732     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)'
5733     # We need to add '_' to the symbols in $export_symbols first
5734     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5735     hardcode_direct=yes
5736     hardcode_shlibpath_var=no
5737     whole_archive_flag_spec='-all_load $convenience'
5738     ;;
5739
5740   freebsd1*)
5741     ld_shlibs=no
5742     ;;
5743
5744   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5745   # support.  Future versions do this automatically, but an explicit c++rt0.o
5746   # does not break anything, and helps significantly (at the cost of a little
5747   # extra space).
5748   freebsd2.2*)
5749     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5750     hardcode_libdir_flag_spec='-R$libdir'
5751     hardcode_direct=yes
5752     hardcode_shlibpath_var=no
5753     ;;
5754
5755   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5756   freebsd2*)
5757     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5758     hardcode_direct=yes
5759     hardcode_minus_L=yes
5760     hardcode_shlibpath_var=no
5761     ;;
5762
5763   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5764   freebsd*)
5765     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5766     hardcode_libdir_flag_spec='-R$libdir'
5767     hardcode_direct=yes
5768     hardcode_shlibpath_var=no
5769     ;;
5770
5771   hpux9* | hpux10* | hpux11*)
5772     case $host_os in
5773     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' ;;
5774     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5775     esac
5776     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5777     hardcode_libdir_separator=:
5778     hardcode_direct=yes
5779     hardcode_minus_L=yes # Not in the search PATH, but as the default
5780                          # location of the library.
5781     export_dynamic_flag_spec='${wl}-E'
5782     ;;
5783
5784   irix5* | irix6* | nonstopux*)
5785     if test "$GCC" = yes; then
5786       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'
5787       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5788     else
5789       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'
5790       hardcode_libdir_flag_spec='-rpath $libdir'
5791     fi
5792     hardcode_libdir_separator=:
5793     link_all_deplibs=yes
5794     ;;
5795
5796   netbsd*)
5797     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5798       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5799     else
5800       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5801     fi
5802     hardcode_libdir_flag_spec='-R$libdir'
5803     hardcode_direct=yes
5804     hardcode_shlibpath_var=no
5805     ;;
5806
5807   newsos6)
5808     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5809     hardcode_direct=yes
5810     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5811     hardcode_libdir_separator=:
5812     hardcode_shlibpath_var=no
5813     ;;
5814
5815   openbsd*)
5816     hardcode_direct=yes
5817     hardcode_shlibpath_var=no
5818     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5819       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5820       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5821       export_dynamic_flag_spec='${wl}-E'
5822     else
5823       case "$host_os" in
5824       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5825         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5826         hardcode_libdir_flag_spec='-R$libdir'
5827         ;;
5828       *)
5829         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5830         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5831         ;;
5832       esac
5833     fi
5834     ;;
5835
5836   openedition*)
5837     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5838         cp \$linknames \$output_objdir && linknames=''"
5839     export_dynamic_flag_spec="-Wl,DLL"
5840     ;;
5841
5842   os2*)
5843     hardcode_libdir_flag_spec='-L$libdir'
5844     hardcode_minus_L=yes
5845     allow_undefined_flag=unsupported
5846     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'
5847     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5848     ;;
5849
5850   osf3*)
5851     if test "$GCC" = yes; then
5852       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5853       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'
5854     else
5855       allow_undefined_flag=' -expect_unresolved \*'
5856       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'
5857     fi
5858     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5859     hardcode_libdir_separator=:
5860     ;;
5861
5862   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5863     if test "$GCC" = yes; then
5864       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5865       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'
5866       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5867     else
5868       allow_undefined_flag=' -expect_unresolved \*'
5869       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'
5870       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5871       $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'
5872
5873       #Both c and cxx compiler support -rpath directly
5874       hardcode_libdir_flag_spec='-rpath $libdir'
5875     fi
5876     hardcode_libdir_separator=:
5877     ;;
5878
5879   sco3.2v5*)
5880     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5881     hardcode_shlibpath_var=no
5882     runpath_var=LD_RUN_PATH
5883     hardcode_runpath_var=yes
5884     export_dynamic_flag_spec='${wl}-Bexport'
5885     ;;
5886
5887   solaris*)
5888     # gcc --version < 3.0 without binutils cannot create self contained
5889     # shared libraries reliably, requiring libgcc.a to resolve some of
5890     # the object symbols generated in some cases.  Libraries that use
5891     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5892     # a copy of libgcc.a into every shared library to guarantee resolving
5893     # such symbols causes other problems:  According to Tim Van Holder
5894     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5895     # (to the application) exception stack for one thing.
5896     no_undefined_flag=' -z defs'
5897     if test "$GCC" = yes; then
5898       case `$CC --version 2>/dev/null` in
5899       [12].*)
5900         cat <<EOF 1>&2
5901
5902 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5903 *** create self contained shared libraries on Solaris systems, without
5904 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5905 *** -no-undefined support, which will at least allow you to build shared
5906 *** libraries.  However, you may find that when you link such libraries
5907 *** into an application without using GCC, you have to manually add
5908 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5909 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5910 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5911
5912 EOF
5913         no_undefined_flag=
5914         ;;
5915       esac
5916     fi
5917     # $CC -shared without GNU ld will not create a library from C++
5918     # object files and a static libstdc++, better avoid it by now
5919     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5920     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5921                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5922     hardcode_libdir_flag_spec='-R$libdir'
5923     hardcode_shlibpath_var=no
5924     case $host_os in
5925     solaris2.[0-5] | solaris2.[0-5].*) ;;
5926     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5927       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5928     esac
5929     link_all_deplibs=yes
5930     ;;
5931
5932   sunos4*)
5933     if test "x$host_vendor" = xsequent; then
5934       # Use $CC to link under sequent, because it throws in some extra .o
5935       # files that make .init and .fini sections work.
5936       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5937     else
5938       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5939     fi
5940     hardcode_libdir_flag_spec='-L$libdir'
5941     hardcode_direct=yes
5942     hardcode_minus_L=yes
5943     hardcode_shlibpath_var=no
5944     ;;
5945
5946   sysv4)
5947     case $host_vendor in
5948       sni)
5949         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5950         hardcode_direct=yes # is this really true???
5951         ;;
5952       siemens)
5953         ## LD is ld it makes a PLAMLIB
5954         ## CC just makes a GrossModule.
5955         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5956         reload_cmds='$CC -r -o $output$reload_objs'
5957         hardcode_direct=no
5958         ;;
5959       motorola)
5960         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5961         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5962         ;;
5963     esac
5964     runpath_var='LD_RUN_PATH'
5965     hardcode_shlibpath_var=no
5966     ;;
5967
5968   sysv4.3*)
5969     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970     hardcode_shlibpath_var=no
5971     export_dynamic_flag_spec='-Bexport'
5972     ;;
5973
5974   sysv5*)
5975     no_undefined_flag=' -z text'
5976     # $CC -shared without GNU ld will not create a library from C++
5977     # object files and a static libstdc++, better avoid it by now
5978     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5980                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5981     hardcode_libdir_flag_spec=
5982     hardcode_shlibpath_var=no
5983     runpath_var='LD_RUN_PATH'
5984     ;;
5985
5986   uts4*)
5987     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5988     hardcode_libdir_flag_spec='-L$libdir'
5989     hardcode_shlibpath_var=no
5990     ;;
5991
5992   dgux*)
5993     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994     hardcode_libdir_flag_spec='-L$libdir'
5995     hardcode_shlibpath_var=no
5996     ;;
5997
5998   sysv4*MP*)
5999     if test -d /usr/nec; then
6000       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001       hardcode_shlibpath_var=no
6002       runpath_var=LD_RUN_PATH
6003       hardcode_runpath_var=yes
6004       ld_shlibs=yes
6005     fi
6006     ;;
6007
6008   sysv4.2uw2*)
6009     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6010     hardcode_direct=yes
6011     hardcode_minus_L=no
6012     hardcode_shlibpath_var=no
6013     hardcode_runpath_var=yes
6014     runpath_var=LD_RUN_PATH
6015     ;;
6016
6017   sysv5uw7* | unixware7*)
6018     no_undefined_flag='${wl}-z ${wl}text'
6019     if test "$GCC" = yes; then
6020       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6021     else
6022       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6023     fi
6024     runpath_var='LD_RUN_PATH'
6025     hardcode_shlibpath_var=no
6026     ;;
6027
6028   *)
6029     ld_shlibs=no
6030     ;;
6031   esac
6032 fi
6033 echo "$ac_t""$ld_shlibs" 1>&6
6034 test "$ld_shlibs" = no && can_build_shared=no
6035
6036 # Check hardcoding attributes.
6037 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6038 echo "configure:6039: checking how to hardcode library paths into programs" >&5
6039 hardcode_action=
6040 if test -n "$hardcode_libdir_flag_spec" || \
6041    test -n "$runpath_var"; then
6042
6043   # We can hardcode non-existant directories.
6044   if test "$hardcode_direct" != no &&
6045      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6046      # have to relink, otherwise we might link with an installed library
6047      # when we should be linking with a yet-to-be-installed one
6048      ## test "$hardcode_shlibpath_var" != no &&
6049      test "$hardcode_minus_L" != no; then
6050     # Linking always hardcodes the temporary library directory.
6051     hardcode_action=relink
6052   else
6053     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6054     hardcode_action=immediate
6055   fi
6056 else
6057   # We cannot hardcode anything, or else we can only hardcode existing
6058   # directories.
6059   hardcode_action=unsupported
6060 fi
6061 echo "$ac_t""$hardcode_action" 1>&6
6062
6063 striplib=
6064 old_striplib=
6065 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6066 echo "configure:6067: checking whether stripping libraries is possible" >&5
6067 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6068   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6069   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6070   echo "$ac_t""yes" 1>&6
6071 else
6072   echo "$ac_t""no" 1>&6
6073 fi
6074
6075 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6076 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6077
6078 # PORTME Fill in your ld.so characteristics
6079 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6080 echo "configure:6081: checking dynamic linker characteristics" >&5
6081 library_names_spec=
6082 libname_spec='lib$name'
6083 soname_spec=
6084 postinstall_cmds=
6085 postuninstall_cmds=
6086 finish_cmds=
6087 finish_eval=
6088 shlibpath_var=
6089 shlibpath_overrides_runpath=unknown
6090 version_type=none
6091 dynamic_linker="$host_os ld.so"
6092 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6093 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6094
6095 case $host_os in
6096 aix3*)
6097   version_type=linux
6098   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6099   shlibpath_var=LIBPATH
6100
6101   # AIX has no versioning support, so we append a major version to the name.
6102   soname_spec='${libname}${release}.so$major'
6103   ;;
6104
6105 aix4* | aix5*)
6106   version_type=linux
6107   need_lib_prefix=no
6108   need_version=no
6109   hardcode_into_libs=yes
6110   if test "$host_cpu" = ia64; then
6111     # AIX 5 supports IA64
6112     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6113     shlibpath_var=LD_LIBRARY_PATH
6114   else
6115     # With GCC up to 2.95.x, collect2 would create an import file
6116     # for dependence libraries.  The import file would start with
6117     # the line `#! .'.  This would cause the generated library to
6118     # depend on `.', always an invalid library.  This was fixed in
6119     # development snapshots of GCC prior to 3.0.
6120     case $host_os in
6121       aix4 | aix4.[01] | aix4.[01].*)
6122         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6123              echo ' yes '
6124              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6125           :
6126         else
6127           can_build_shared=no
6128         fi
6129         ;;
6130     esac
6131     # AIX (on Power*) has no versioning support, so currently we can
6132     # not hardcode correct soname into executable. Probably we can
6133     # add versioning support to collect2, so additional links can
6134     # be useful in future.
6135     if test "$aix_use_runtimelinking" = yes; then
6136       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6137       # instead of lib<name>.a to let people know that these are not
6138       # typical AIX shared libraries.
6139       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6140     else
6141       # We preserve .a as extension for shared libraries through AIX4.2
6142       # and later when we are not doing run time linking.
6143       library_names_spec='${libname}${release}.a $libname.a'
6144       soname_spec='${libname}${release}.so$major'
6145     fi
6146     shlibpath_var=LIBPATH
6147   fi
6148   hardcode_into_libs=yes
6149   ;;
6150
6151 amigaos*)
6152   library_names_spec='$libname.ixlibrary $libname.a'
6153   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6154   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'
6155   ;;
6156
6157 beos*)
6158   library_names_spec='${libname}.so'
6159   dynamic_linker="$host_os ld.so"
6160   shlibpath_var=LIBRARY_PATH
6161   ;;
6162
6163 bsdi4*)
6164   version_type=linux
6165   need_version=no
6166   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6167   soname_spec='${libname}${release}.so$major'
6168   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6169   shlibpath_var=LD_LIBRARY_PATH
6170   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6171   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6172   export_dynamic_flag_spec=-rdynamic
6173   # the default ld.so.conf also contains /usr/contrib/lib and
6174   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6175   # libtool to hard-code these into programs
6176   ;;
6177
6178 cygwin* | mingw* | pw32*)
6179   version_type=windows
6180   need_version=no
6181   need_lib_prefix=no
6182   case $GCC,$host_os in
6183   yes,cygwin*)
6184     library_names_spec='$libname.dll.a'
6185     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6186     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6187       dldir=$destdir/`dirname \$dlpath`~
6188       test -d \$dldir || mkdir -p \$dldir~
6189       $install_prog .libs/$dlname \$dldir/$dlname'
6190     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6191       dlpath=$dir/\$dldll~
6192        $rm \$dlpath'
6193     ;;
6194   yes,mingw*)
6195     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6196     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6197     ;;
6198   yes,pw32*)
6199     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6200     ;;
6201   *)
6202     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6203     ;;
6204   esac
6205   dynamic_linker='Win32 ld.exe'
6206   # FIXME: first we should search . and the directory the executable is in
6207   shlibpath_var=PATH
6208   ;;
6209
6210 darwin* | rhapsody*)
6211   dynamic_linker="$host_os dyld"
6212   version_type=darwin
6213   need_lib_prefix=no
6214   need_version=no
6215   # FIXME: Relying on posixy $() will cause problems for
6216   #        cross-compilation, but unfortunately the echo tests do not
6217   #        yet detect zsh echo's removal of \ escapes.
6218   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)'
6219   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6220   shlibpath_overrides_runpath=yes
6221   shlibpath_var=DYLD_LIBRARY_PATH
6222   ;;
6223
6224 freebsd1*)
6225   dynamic_linker=no
6226   ;;
6227
6228 freebsd*)
6229   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6230   version_type=freebsd-$objformat
6231   case $version_type in
6232     freebsd-elf*)
6233       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6234       need_version=no
6235       need_lib_prefix=no
6236       ;;
6237     freebsd-*)
6238       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6239       need_version=yes
6240       ;;
6241   esac
6242   shlibpath_var=LD_LIBRARY_PATH
6243   case $host_os in
6244   freebsd2*)
6245     shlibpath_overrides_runpath=yes
6246     ;;
6247   *)
6248     shlibpath_overrides_runpath=no
6249     hardcode_into_libs=yes
6250     ;;
6251   esac
6252   ;;
6253
6254 gnu*)
6255   version_type=linux
6256   need_lib_prefix=no
6257   need_version=no
6258   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6259   soname_spec='${libname}${release}.so$major'
6260   shlibpath_var=LD_LIBRARY_PATH
6261   hardcode_into_libs=yes
6262   ;;
6263
6264 hpux9* | hpux10* | hpux11*)
6265   # Give a soname corresponding to the major version so that dld.sl refuses to
6266   # link against other versions.
6267   dynamic_linker="$host_os dld.sl"
6268   version_type=sunos
6269   need_lib_prefix=no
6270   need_version=no
6271   shlibpath_var=SHLIB_PATH
6272   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6273   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6274   soname_spec='${libname}${release}.sl$major'
6275   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6276   postinstall_cmds='chmod 555 $lib'
6277   ;;
6278
6279 irix5* | irix6* | nonstopux*)
6280   case $host_os in
6281     nonstopux*) version_type=nonstopux ;;
6282     *)          version_type=irix ;;
6283   esac
6284   need_lib_prefix=no
6285   need_version=no
6286   soname_spec='${libname}${release}.so$major'
6287   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6288   case $host_os in
6289   irix5* | nonstopux*)
6290     libsuff= shlibsuff=
6291     ;;
6292   *)
6293     case $LD in # libtool.m4 will add one of these switches to LD
6294     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6295     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6296     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6297     *) libsuff= shlibsuff= libmagic=never-match;;
6298     esac
6299     ;;
6300   esac
6301   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6302   shlibpath_overrides_runpath=no
6303   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6304   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6305   ;;
6306
6307 # No shared lib support for Linux oldld, aout, or coff.
6308 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6309   dynamic_linker=no
6310   ;;
6311
6312 # This must be Linux ELF.
6313 linux-gnu*)
6314   version_type=linux
6315   need_lib_prefix=no
6316   need_version=no
6317   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6318   soname_spec='${libname}${release}.so$major'
6319   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6320   shlibpath_var=LD_LIBRARY_PATH
6321   shlibpath_overrides_runpath=no
6322   # This implies no fast_install, which is unacceptable.
6323   # Some rework will be needed to allow for fast_install
6324   # before this can be enabled.
6325   hardcode_into_libs=yes
6326
6327   # We used to test for /lib/ld.so.1 and disable shared libraries on
6328   # powerpc, because MkLinux only supported shared libraries with the
6329   # GNU dynamic linker.  Since this was broken with cross compilers,
6330   # most powerpc-linux boxes support dynamic linking these days and
6331   # people can always --disable-shared, the test was removed, and we
6332   # assume the GNU/Linux dynamic linker is in use.
6333   dynamic_linker='GNU/Linux ld.so'
6334   ;;
6335
6336 netbsd*)
6337   version_type=sunos
6338   need_lib_prefix=no
6339   need_version=no
6340   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6341     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6342     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6343     dynamic_linker='NetBSD (a.out) ld.so'
6344   else
6345     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6346     soname_spec='${libname}${release}.so$major'
6347     dynamic_linker='NetBSD ld.elf_so'
6348   fi
6349   shlibpath_var=LD_LIBRARY_PATH
6350   shlibpath_overrides_runpath=yes
6351   hardcode_into_libs=yes
6352   ;;
6353
6354 newsos6)
6355   version_type=linux
6356   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6357   shlibpath_var=LD_LIBRARY_PATH
6358   shlibpath_overrides_runpath=yes
6359   ;;
6360
6361 openbsd*)
6362   version_type=sunos
6363   need_lib_prefix=no
6364   need_version=no
6365   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6366     case "$host_os" in
6367     openbsd2.[89] | openbsd2.[89].*)
6368       shlibpath_overrides_runpath=no
6369       ;;
6370     *)
6371       shlibpath_overrides_runpath=yes
6372       ;;
6373     esac
6374   else
6375     shlibpath_overrides_runpath=yes
6376   fi
6377   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6378   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6379   shlibpath_var=LD_LIBRARY_PATH
6380   ;;
6381
6382 openedition*)
6383   need_lib_prefix=no
6384   need_version=no
6385   shlibpath_overrides_runpath=yes
6386   shlibpath_var=LIBPATH
6387   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6388   # the library's exports are in libname.x; this is the file that must
6389   # actually be linked with to use a DLL.
6390   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6391   ;;
6392
6393 os2*)
6394   libname_spec='$name'
6395   need_lib_prefix=no
6396   library_names_spec='$libname.dll $libname.a'
6397   dynamic_linker='OS/2 ld.exe'
6398   shlibpath_var=LIBPATH
6399   ;;
6400
6401 osf3* | osf4* | osf5*)
6402   version_type=osf
6403   need_version=no
6404   soname_spec='${libname}${release}.so$major'
6405   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6406   shlibpath_var=LD_LIBRARY_PATH
6407   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6408   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6409   hardcode_into_libs=yes
6410   ;;
6411
6412 sco3.2v5*)
6413   version_type=osf
6414   soname_spec='${libname}${release}.so$major'
6415   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6416   shlibpath_var=LD_LIBRARY_PATH
6417   ;;
6418
6419 solaris*)
6420   version_type=linux
6421   need_lib_prefix=no
6422   need_version=no
6423   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6424   soname_spec='${libname}${release}.so$major'
6425   shlibpath_var=LD_LIBRARY_PATH
6426   shlibpath_overrides_runpath=yes
6427   hardcode_into_libs=yes
6428   # ldd complains unless libraries are executable
6429   postinstall_cmds='chmod +x $lib'
6430   ;;
6431
6432 sunos4*)
6433   version_type=sunos
6434   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6435   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   shlibpath_overrides_runpath=yes
6438   if test "$with_gnu_ld" = yes; then
6439     need_lib_prefix=no
6440   fi
6441   need_version=yes
6442   ;;
6443
6444 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6445   version_type=linux
6446   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6447   soname_spec='${libname}${release}.so$major'
6448   shlibpath_var=LD_LIBRARY_PATH
6449   case $host_vendor in
6450     sni)
6451       shlibpath_overrides_runpath=no
6452       need_lib_prefix=no
6453       export_dynamic_flag_spec='${wl}-Blargedynsym'
6454       runpath_var=LD_RUN_PATH
6455       ;;
6456     siemens)
6457       need_lib_prefix=no
6458       ;;
6459     motorola)
6460       need_lib_prefix=no
6461       need_version=no
6462       shlibpath_overrides_runpath=no
6463       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6464       ;;
6465   esac
6466   ;;
6467
6468 uts4*)
6469   version_type=linux
6470   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6471   soname_spec='${libname}${release}.so$major'
6472   shlibpath_var=LD_LIBRARY_PATH
6473   ;;
6474
6475 dgux*)
6476   version_type=linux
6477   need_lib_prefix=no
6478   need_version=no
6479   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6480   soname_spec='${libname}${release}.so$major'
6481   shlibpath_var=LD_LIBRARY_PATH
6482   ;;
6483
6484 sysv4*MP*)
6485   if test -d /usr/nec ;then
6486     version_type=linux
6487     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6488     soname_spec='$libname.so.$major'
6489     shlibpath_var=LD_LIBRARY_PATH
6490   fi
6491   ;;
6492
6493 *)
6494   dynamic_linker=no
6495   ;;
6496 esac
6497 echo "$ac_t""$dynamic_linker" 1>&6
6498 test "$dynamic_linker" = no && can_build_shared=no
6499
6500 # Report the final consequences.
6501 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6502 echo "configure:6503: checking if libtool supports shared libraries" >&5
6503 echo "$ac_t""$can_build_shared" 1>&6
6504
6505 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6506 echo "configure:6507: checking whether to build shared libraries" >&5
6507 test "$can_build_shared" = "no" && enable_shared=no
6508
6509 # On AIX, shared libraries and static libraries use the same namespace, and
6510 # are all built from PIC.
6511 case "$host_os" in
6512 aix3*)
6513   test "$enable_shared" = yes && enable_static=no
6514   if test -n "$RANLIB"; then
6515     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6516     postinstall_cmds='$RANLIB $lib'
6517   fi
6518   ;;
6519
6520 aix4*)
6521   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6522     test "$enable_shared" = yes && enable_static=no
6523   fi
6524   ;;
6525 esac
6526 echo "$ac_t""$enable_shared" 1>&6
6527
6528 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6529 echo "configure:6530: checking whether to build static libraries" >&5
6530 # Make sure either enable_shared or enable_static is yes.
6531 test "$enable_shared" = yes || enable_static=yes
6532 echo "$ac_t""$enable_static" 1>&6
6533
6534 if test "$hardcode_action" = relink; then
6535   # Fast installation is not supported
6536   enable_fast_install=no
6537 elif test "$shlibpath_overrides_runpath" = yes ||
6538      test "$enable_shared" = no; then
6539   # Fast installation is not necessary
6540   enable_fast_install=needless
6541 fi
6542
6543 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6544 if test "$GCC" = yes; then
6545   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6546 fi
6547
6548 if test "x$enable_dlopen" != xyes; then
6549   enable_dlopen=unknown
6550   enable_dlopen_self=unknown
6551   enable_dlopen_self_static=unknown
6552 else
6553   lt_cv_dlopen=no
6554   lt_cv_dlopen_libs=
6555
6556   case $host_os in
6557   beos*)
6558     lt_cv_dlopen="load_add_on"
6559     lt_cv_dlopen_libs=
6560     lt_cv_dlopen_self=yes
6561     ;;
6562
6563   cygwin* | mingw* | pw32*)
6564     lt_cv_dlopen="LoadLibrary"
6565     lt_cv_dlopen_libs=
6566    ;;
6567
6568   *)
6569     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6570 echo "configure:6571: checking for dllload" >&5
6571 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6572   echo $ac_n "(cached) $ac_c" 1>&6
6573 else
6574   cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 /* System header to define __stub macros and hopefully few prototypes,
6578     which can conflict with char dllload(); below.  */
6579 #include <assert.h>
6580 /* Override any gcc2 internal prototype to avoid an error.  */
6581 /* We use char because int might match the return type of a gcc2
6582     builtin and then its argument prototype would still apply.  */
6583 char dllload();
6584 char (*f)();
6585
6586 int main() {
6587
6588 /* The GNU C library defines this for functions which it implements
6589     to always fail with ENOSYS.  Some functions are actually named
6590     something starting with __ and the normal name is an alias.  */
6591 #if defined (__stub_dllload) || defined (__stub___dllload)
6592 choke me
6593 #else
6594 f = dllload;
6595 #endif
6596
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6600   rm -rf conftest*
6601   eval "ac_cv_func_dllload=yes"
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   eval "ac_cv_func_dllload=no"
6607 fi
6608 rm -f conftest*
6609 fi
6610
6611 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6612   echo "$ac_t""yes" 1>&6
6613   lt_cv_dlopen="dllload"
6614 else
6615   echo "$ac_t""no" 1>&6
6616 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6617 echo "configure:6618: checking for shl_load" >&5
6618 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6619   echo $ac_n "(cached) $ac_c" 1>&6
6620 else
6621   cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6624 /* System header to define __stub macros and hopefully few prototypes,
6625     which can conflict with char shl_load(); below.  */
6626 #include <assert.h>
6627 /* Override any gcc2 internal prototype to avoid an error.  */
6628 /* We use char because int might match the return type of a gcc2
6629     builtin and then its argument prototype would still apply.  */
6630 char shl_load();
6631 char (*f)();
6632
6633 int main() {
6634
6635 /* The GNU C library defines this for functions which it implements
6636     to always fail with ENOSYS.  Some functions are actually named
6637     something starting with __ and the normal name is an alias.  */
6638 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6639 choke me
6640 #else
6641 f = shl_load;
6642 #endif
6643
6644 ; return 0; }
6645 EOF
6646 if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6647   rm -rf conftest*
6648   eval "ac_cv_func_shl_load=yes"
6649 else
6650   echo "configure: failed program was:" >&5
6651   cat conftest.$ac_ext >&5
6652   rm -rf conftest*
6653   eval "ac_cv_func_shl_load=no"
6654 fi
6655 rm -f conftest*
6656 fi
6657
6658 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6659   echo "$ac_t""yes" 1>&6
6660   lt_cv_dlopen="shl_load"
6661 else
6662   echo "$ac_t""no" 1>&6
6663 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6664 echo "configure:6665: checking for shl_load in -ldld" >&5
6665 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6667   echo $ac_n "(cached) $ac_c" 1>&6
6668 else
6669   ac_save_LIBS="$LIBS"
6670 LIBS="-ldld  $LIBS"
6671 cat > conftest.$ac_ext <<EOF
6672 #line 6673 "configure"
6673 #include "confdefs.h"
6674 /* Override any gcc2 internal prototype to avoid an error.  */
6675 /* We use char because int might match the return type of a gcc2
6676     builtin and then its argument prototype would still apply.  */
6677 char shl_load();
6678
6679 int main() {
6680 shl_load()
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   eval "ac_cv_lib_$ac_lib_var=yes"
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   eval "ac_cv_lib_$ac_lib_var=no"
6691 fi
6692 rm -f conftest*
6693 LIBS="$ac_save_LIBS"
6694
6695 fi
6696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6697   echo "$ac_t""yes" 1>&6
6698   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6699 else
6700   echo "$ac_t""no" 1>&6
6701 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6702 echo "configure:6703: checking for dlopen" >&5
6703 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* System header to define __stub macros and hopefully few prototypes,
6710     which can conflict with char dlopen(); below.  */
6711 #include <assert.h>
6712 /* Override any gcc2 internal prototype to avoid an error.  */
6713 /* We use char because int might match the return type of a gcc2
6714     builtin and then its argument prototype would still apply.  */
6715 char dlopen();
6716 char (*f)();
6717
6718 int main() {
6719
6720 /* The GNU C library defines this for functions which it implements
6721     to always fail with ENOSYS.  Some functions are actually named
6722     something starting with __ and the normal name is an alias.  */
6723 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6724 choke me
6725 #else
6726 f = dlopen;
6727 #endif
6728
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_func_dlopen=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_func_dlopen=no"
6739 fi
6740 rm -f conftest*
6741 fi
6742
6743 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745   lt_cv_dlopen="dlopen"
6746 else
6747   echo "$ac_t""no" 1>&6
6748 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6749 echo "configure:6750: checking for dlopen in -ldl" >&5
6750 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6751 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6752   echo $ac_n "(cached) $ac_c" 1>&6
6753 else
6754   ac_save_LIBS="$LIBS"
6755 LIBS="-ldl  $LIBS"
6756 cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 /* Override any gcc2 internal prototype to avoid an error.  */
6760 /* We use char because int might match the return type of a gcc2
6761     builtin and then its argument prototype would still apply.  */
6762 char dlopen();
6763
6764 int main() {
6765 dlopen()
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_lib_$ac_lib_var=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=no"
6776 fi
6777 rm -f conftest*
6778 LIBS="$ac_save_LIBS"
6779
6780 fi
6781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6784 else
6785   echo "$ac_t""no" 1>&6
6786 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6787 echo "configure:6788: checking for dlopen in -lsvld" >&5
6788 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6790   echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792   ac_save_LIBS="$LIBS"
6793 LIBS="-lsvld  $LIBS"
6794 cat > conftest.$ac_ext <<EOF
6795 #line 6796 "configure"
6796 #include "confdefs.h"
6797 /* Override any gcc2 internal prototype to avoid an error.  */
6798 /* We use char because int might match the return type of a gcc2
6799     builtin and then its argument prototype would still apply.  */
6800 char dlopen();
6801
6802 int main() {
6803 dlopen()
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   eval "ac_cv_lib_$ac_lib_var=yes"
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=no"
6814 fi
6815 rm -f conftest*
6816 LIBS="$ac_save_LIBS"
6817
6818 fi
6819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6822 else
6823   echo "$ac_t""no" 1>&6
6824 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6825 echo "configure:6826: checking for dld_link in -ldld" >&5
6826 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6828   echo $ac_n "(cached) $ac_c" 1>&6
6829 else
6830   ac_save_LIBS="$LIBS"
6831 LIBS="-ldld  $LIBS"
6832 cat > conftest.$ac_ext <<EOF
6833 #line 6834 "configure"
6834 #include "confdefs.h"
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 /* We use char because int might match the return type of a gcc2
6837     builtin and then its argument prototype would still apply.  */
6838 char dld_link();
6839
6840 int main() {
6841 dld_link()
6842 ; return 0; }
6843 EOF
6844 if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6845   rm -rf conftest*
6846   eval "ac_cv_lib_$ac_lib_var=yes"
6847 else
6848   echo "configure: failed program was:" >&5
6849   cat conftest.$ac_ext >&5
6850   rm -rf conftest*
6851   eval "ac_cv_lib_$ac_lib_var=no"
6852 fi
6853 rm -f conftest*
6854 LIBS="$ac_save_LIBS"
6855
6856 fi
6857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6858   echo "$ac_t""yes" 1>&6
6859   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6860 else
6861   echo "$ac_t""no" 1>&6
6862 fi
6863
6864               
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   esac
6884
6885   if test "x$lt_cv_dlopen" != xno; then
6886     enable_dlopen=yes
6887   else
6888     enable_dlopen=no
6889   fi
6890
6891   case $lt_cv_dlopen in
6892   dlopen)
6893     save_CPPFLAGS="$CPPFLAGS"
6894         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6895
6896     save_LDFLAGS="$LDFLAGS"
6897     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6898
6899     save_LIBS="$LIBS"
6900     LIBS="$lt_cv_dlopen_libs $LIBS"
6901
6902     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6903 echo "configure:6904: checking whether a program can dlopen itself" >&5
6904 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6905   echo $ac_n "(cached) $ac_c" 1>&6
6906 else
6907           if test "$cross_compiling" = yes; then :
6908   lt_cv_dlopen_self=cross
6909 else
6910     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6911   lt_status=$lt_dlunknown
6912   cat > conftest.$ac_ext <<EOF
6913 #line 6914 "configure"
6914 #include "confdefs.h"
6915
6916 #if HAVE_DLFCN_H
6917 #include <dlfcn.h>
6918 #endif
6919
6920 #include <stdio.h>
6921
6922 #ifdef RTLD_GLOBAL
6923 #  define LT_DLGLOBAL           RTLD_GLOBAL
6924 #else
6925 #  ifdef DL_GLOBAL
6926 #    define LT_DLGLOBAL         DL_GLOBAL
6927 #  else
6928 #    define LT_DLGLOBAL         0
6929 #  endif
6930 #endif
6931
6932 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6933    find out it does not work in some platform. */
6934 #ifndef LT_DLLAZY_OR_NOW
6935 #  ifdef RTLD_LAZY
6936 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6937 #  else
6938 #    ifdef DL_LAZY
6939 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6940 #    else
6941 #      ifdef RTLD_NOW
6942 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6943 #      else
6944 #        ifdef DL_NOW
6945 #          define LT_DLLAZY_OR_NOW      DL_NOW
6946 #        else
6947 #          define LT_DLLAZY_OR_NOW      0
6948 #        endif
6949 #      endif
6950 #    endif
6951 #  endif
6952 #endif
6953
6954 #ifdef __cplusplus
6955 extern "C" void exit (int);
6956 #endif
6957
6958 void fnord() { int i=42;}
6959 int main ()
6960 {
6961   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6962   int status = $lt_dlunknown;
6963
6964   if (self)
6965     {
6966       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6967       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6968       /* dlclose (self); */
6969     }
6970
6971     exit (status);
6972 }
6973 EOF
6974   if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6975     (./conftest; exit; ) 2>/dev/null
6976     lt_status=$?
6977     case x$lt_status in
6978       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6979       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6980       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6981     esac
6982   else :
6983     # compilation failed
6984     lt_cv_dlopen_self=no
6985   fi
6986 fi
6987 rm -fr conftest*
6988
6989     
6990 fi
6991
6992 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6993
6994     if test "x$lt_cv_dlopen_self" = xyes; then
6995       LDFLAGS="$LDFLAGS $link_static_flag"
6996       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6997 echo "configure:6998: checking whether a statically linked program can dlopen itself" >&5
6998 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6999   echo $ac_n "(cached) $ac_c" 1>&6
7000 else
7001           if test "$cross_compiling" = yes; then :
7002   lt_cv_dlopen_self_static=cross
7003 else
7004     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7005   lt_status=$lt_dlunknown
7006   cat > conftest.$ac_ext <<EOF
7007 #line 7008 "configure"
7008 #include "confdefs.h"
7009
7010 #if HAVE_DLFCN_H
7011 #include <dlfcn.h>
7012 #endif
7013
7014 #include <stdio.h>
7015
7016 #ifdef RTLD_GLOBAL
7017 #  define LT_DLGLOBAL           RTLD_GLOBAL
7018 #else
7019 #  ifdef DL_GLOBAL
7020 #    define LT_DLGLOBAL         DL_GLOBAL
7021 #  else
7022 #    define LT_DLGLOBAL         0
7023 #  endif
7024 #endif
7025
7026 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7027    find out it does not work in some platform. */
7028 #ifndef LT_DLLAZY_OR_NOW
7029 #  ifdef RTLD_LAZY
7030 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7031 #  else
7032 #    ifdef DL_LAZY
7033 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7034 #    else
7035 #      ifdef RTLD_NOW
7036 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7037 #      else
7038 #        ifdef DL_NOW
7039 #          define LT_DLLAZY_OR_NOW      DL_NOW
7040 #        else
7041 #          define LT_DLLAZY_OR_NOW      0
7042 #        endif
7043 #      endif
7044 #    endif
7045 #  endif
7046 #endif
7047
7048 #ifdef __cplusplus
7049 extern "C" void exit (int);
7050 #endif
7051
7052 void fnord() { int i=42;}
7053 int main ()
7054 {
7055   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7056   int status = $lt_dlunknown;
7057
7058   if (self)
7059     {
7060       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7061       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7062       /* dlclose (self); */
7063     }
7064
7065     exit (status);
7066 }
7067 EOF
7068   if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7069     (./conftest; exit; ) 2>/dev/null
7070     lt_status=$?
7071     case x$lt_status in
7072       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7073       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7074       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7075     esac
7076   else :
7077     # compilation failed
7078     lt_cv_dlopen_self_static=no
7079   fi
7080 fi
7081 rm -fr conftest*
7082
7083       
7084 fi
7085
7086 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7087     fi
7088
7089     CPPFLAGS="$save_CPPFLAGS"
7090     LDFLAGS="$save_LDFLAGS"
7091     LIBS="$save_LIBS"
7092     ;;
7093   esac
7094
7095   case $lt_cv_dlopen_self in
7096   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7097   *) enable_dlopen_self=unknown ;;
7098   esac
7099
7100   case $lt_cv_dlopen_self_static in
7101   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7102   *) enable_dlopen_self_static=unknown ;;
7103   esac
7104 fi
7105
7106
7107 if test "$enable_shared" = yes && test "$GCC" = yes; then
7108   case $archive_cmds in
7109   *'~'*)
7110     # FIXME: we may have to deal with multi-command sequences.
7111     ;;
7112   '$CC '*)
7113     # Test whether the compiler implicitly links with -lc since on some
7114     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7115     # to ld, don't add -lc before -lgcc.
7116     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7117 echo "configure:7118: checking whether -lc should be explicitly linked in" >&5
7118     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7119   echo $ac_n "(cached) $ac_c" 1>&6
7120 else
7121   $rm conftest*
7122     echo 'static int dummy;' > conftest.$ac_ext
7123
7124     if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7125       soname=conftest
7126       lib=conftest
7127       libobjs=conftest.$ac_objext
7128       deplibs=
7129       wl=$lt_cv_prog_cc_wl
7130       compiler_flags=-v
7131       linker_flags=-v
7132       verstring=
7133       output_objdir=.
7134       libname=conftest
7135       save_allow_undefined_flag=$allow_undefined_flag
7136       allow_undefined_flag=
7137       if { (eval echo configure:7138: \"$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; }
7138       then
7139         lt_cv_archive_cmds_need_lc=no
7140       else
7141         lt_cv_archive_cmds_need_lc=yes
7142       fi
7143       allow_undefined_flag=$save_allow_undefined_flag
7144     else
7145       cat conftest.err 1>&5
7146     fi
7147 fi
7148
7149     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7150     ;;
7151   esac
7152 fi
7153 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7154
7155 # The second clause should only fire when bootstrapping the
7156 # libtool distribution, otherwise you forgot to ship ltmain.sh
7157 # with your package, and you will get complaints that there are
7158 # no rules to generate ltmain.sh.
7159 if test -f "$ltmain"; then
7160   :
7161 else
7162   # If there is no Makefile yet, we rely on a make rule to execute
7163   # `config.status --recheck' to rerun these tests and create the
7164   # libtool script then.
7165   test -f Makefile && make "$ltmain"
7166 fi
7167
7168 if test -f "$ltmain"; then
7169   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7170   $rm -f "${ofile}T"
7171
7172   echo creating $ofile
7173
7174   # Now quote all the things that may contain metacharacters while being
7175   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7176   # variables and quote the copies for generation of the libtool script.
7177   for var in echo old_CC old_CFLAGS SED \
7178     AR AR_FLAGS CC LD LN_S NM SHELL \
7179     reload_flag reload_cmds wl \
7180     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7181     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7182     library_names_spec soname_spec \
7183     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7184     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7185     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7186     old_striplib striplib file_magic_cmd export_symbols_cmds \
7187     deplibs_check_method allow_undefined_flag no_undefined_flag \
7188     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7189     global_symbol_to_c_name_address \
7190     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7191     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7192     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7193
7194     case $var in
7195     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7196     old_postinstall_cmds | old_postuninstall_cmds | \
7197     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7198     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7199     postinstall_cmds | postuninstall_cmds | \
7200     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7201       # Double-quote double-evaled strings.
7202       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7203       ;;
7204     *)
7205       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7206       ;;
7207     esac
7208   done
7209
7210   cat <<__EOF__ > "${ofile}T"
7211 #! $SHELL
7212
7213 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7214 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7215 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7216 #
7217 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7218 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7219 #
7220 # This program is free software; you can redistribute it and/or modify
7221 # it under the terms of the GNU General Public License as published by
7222 # the Free Software Foundation; either version 2 of the License, or
7223 # (at your option) any later version.
7224 #
7225 # This program is distributed in the hope that it will be useful, but
7226 # WITHOUT ANY WARRANTY; without even the implied warranty of
7227 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7228 # General Public License for more details.
7229 #
7230 # You should have received a copy of the GNU General Public License
7231 # along with this program; if not, write to the Free Software
7232 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7233 #
7234 # As a special exception to the GNU General Public License, if you
7235 # distribute this file as part of a program that contains a
7236 # configuration script generated by Autoconf, you may include it under
7237 # the same distribution terms that you use for the rest of that program.
7238
7239 # A sed that does not truncate output.
7240 SED=$lt_SED
7241
7242 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7243 Xsed="${SED} -e s/^X//"
7244
7245 # The HP-UX ksh and POSIX shell print the target directory to stdout
7246 # if CDPATH is set.
7247 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7248
7249 # ### BEGIN LIBTOOL CONFIG
7250
7251 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7252
7253 # Shell to use when invoking shell scripts.
7254 SHELL=$lt_SHELL
7255
7256 # Whether or not to build shared libraries.
7257 build_libtool_libs=$enable_shared
7258
7259 # Whether or not to build static libraries.
7260 build_old_libs=$enable_static
7261
7262 # Whether or not to add -lc for building shared libraries.
7263 build_libtool_need_lc=$need_lc
7264
7265 # Whether or not to optimize for fast installation.
7266 fast_install=$enable_fast_install
7267
7268 # The host system.
7269 host_alias=$host_alias
7270 host=$host
7271
7272 # An echo program that does not interpret backslashes.
7273 echo=$lt_echo
7274
7275 # The archiver.
7276 AR=$lt_AR
7277 AR_FLAGS=$lt_AR_FLAGS
7278
7279 # The default C compiler.
7280 CC=$lt_CC
7281
7282 # Is the compiler the GNU C compiler?
7283 with_gcc=$GCC
7284
7285 # The linker used to build libraries.
7286 LD=$lt_LD
7287
7288 # Whether we need hard or soft links.
7289 LN_S=$lt_LN_S
7290
7291 # A BSD-compatible nm program.
7292 NM=$lt_NM
7293
7294 # A symbol stripping program
7295 STRIP=$STRIP
7296
7297 # Used to examine libraries when file_magic_cmd begins "file"
7298 MAGIC_CMD=$MAGIC_CMD
7299
7300 # Used on cygwin: DLL creation program.
7301 DLLTOOL="$DLLTOOL"
7302
7303 # Used on cygwin: object dumper.
7304 OBJDUMP="$OBJDUMP"
7305
7306 # Used on cygwin: assembler.
7307 AS="$AS"
7308
7309 # The name of the directory that contains temporary libtool files.
7310 objdir=$objdir
7311
7312 # How to create reloadable object files.
7313 reload_flag=$lt_reload_flag
7314 reload_cmds=$lt_reload_cmds
7315
7316 # How to pass a linker flag through the compiler.
7317 wl=$lt_wl
7318
7319 # Object file suffix (normally "o").
7320 objext="$ac_objext"
7321
7322 # Old archive suffix (normally "a").
7323 libext="$libext"
7324
7325 # Executable file suffix (normally "").
7326 exeext="$exeext"
7327
7328 # Additional compiler flags for building library objects.
7329 pic_flag=$lt_pic_flag
7330 pic_mode=$pic_mode
7331
7332 # Does compiler simultaneously support -c and -o options?
7333 compiler_c_o=$lt_compiler_c_o
7334
7335 # Can we write directly to a .lo ?
7336 compiler_o_lo=$lt_compiler_o_lo
7337
7338 # Must we lock files when doing compilation ?
7339 need_locks=$lt_need_locks
7340
7341 # Do we need the lib prefix for modules?
7342 need_lib_prefix=$need_lib_prefix
7343
7344 # Do we need a version for libraries?
7345 need_version=$need_version
7346
7347 # Whether dlopen is supported.
7348 dlopen_support=$enable_dlopen
7349
7350 # Whether dlopen of programs is supported.
7351 dlopen_self=$enable_dlopen_self
7352
7353 # Whether dlopen of statically linked programs is supported.
7354 dlopen_self_static=$enable_dlopen_self_static
7355
7356 # Compiler flag to prevent dynamic linking.
7357 link_static_flag=$lt_link_static_flag
7358
7359 # Compiler flag to turn off builtin functions.
7360 no_builtin_flag=$lt_no_builtin_flag
7361
7362 # Compiler flag to allow reflexive dlopens.
7363 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7364
7365 # Compiler flag to generate shared objects directly from archives.
7366 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7367
7368 # Compiler flag to generate thread-safe objects.
7369 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7370
7371 # Library versioning type.
7372 version_type=$version_type
7373
7374 # Format of library name prefix.
7375 libname_spec=$lt_libname_spec
7376
7377 # List of archive names.  First name is the real one, the rest are links.
7378 # The last name is the one that the linker finds with -lNAME.
7379 library_names_spec=$lt_library_names_spec
7380
7381 # The coded name of the library, if different from the real name.
7382 soname_spec=$lt_soname_spec
7383
7384 # Commands used to build and install an old-style archive.
7385 RANLIB=$lt_RANLIB
7386 old_archive_cmds=$lt_old_archive_cmds
7387 old_postinstall_cmds=$lt_old_postinstall_cmds
7388 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7389
7390 # Create an old-style archive from a shared archive.
7391 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7392
7393 # Create a temporary old-style archive to link instead of a shared archive.
7394 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7395
7396 # Commands used to build and install a shared archive.
7397 archive_cmds=$lt_archive_cmds
7398 archive_expsym_cmds=$lt_archive_expsym_cmds
7399 postinstall_cmds=$lt_postinstall_cmds
7400 postuninstall_cmds=$lt_postuninstall_cmds
7401
7402 # Commands to strip libraries.
7403 old_striplib=$lt_old_striplib
7404 striplib=$lt_striplib
7405
7406 # Method to check whether dependent libraries are shared objects.
7407 deplibs_check_method=$lt_deplibs_check_method
7408
7409 # Command to use when deplibs_check_method == file_magic.
7410 file_magic_cmd=$lt_file_magic_cmd
7411
7412 # Flag that allows shared libraries with undefined symbols to be built.
7413 allow_undefined_flag=$lt_allow_undefined_flag
7414
7415 # Flag that forces no undefined symbols.
7416 no_undefined_flag=$lt_no_undefined_flag
7417
7418 # Commands used to finish a libtool library installation in a directory.
7419 finish_cmds=$lt_finish_cmds
7420
7421 # Same as above, but a single script fragment to be evaled but not shown.
7422 finish_eval=$lt_finish_eval
7423
7424 # Take the output of nm and produce a listing of raw symbols and C names.
7425 global_symbol_pipe=$lt_global_symbol_pipe
7426
7427 # Transform the output of nm in a proper C declaration
7428 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7429
7430 # Transform the output of nm in a C name address pair
7431 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7432
7433 # This is the shared library runtime path variable.
7434 runpath_var=$runpath_var
7435
7436 # This is the shared library path variable.
7437 shlibpath_var=$shlibpath_var
7438
7439 # Is shlibpath searched before the hard-coded library search path?
7440 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7441
7442 # How to hardcode a shared library path into an executable.
7443 hardcode_action=$hardcode_action
7444
7445 # Whether we should hardcode library paths into libraries.
7446 hardcode_into_libs=$hardcode_into_libs
7447
7448 # Flag to hardcode \$libdir into a binary during linking.
7449 # This must work even if \$libdir does not exist.
7450 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7451
7452 # Whether we need a single -rpath flag with a separated argument.
7453 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7454
7455 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7456 # resulting binary.
7457 hardcode_direct=$hardcode_direct
7458
7459 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7460 # resulting binary.
7461 hardcode_minus_L=$hardcode_minus_L
7462
7463 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7464 # the resulting binary.
7465 hardcode_shlibpath_var=$hardcode_shlibpath_var
7466
7467 # Variables whose values should be saved in libtool wrapper scripts and
7468 # restored at relink time.
7469 variables_saved_for_relink="$variables_saved_for_relink"
7470
7471 # Whether libtool must link a program against all its dependency libraries.
7472 link_all_deplibs=$link_all_deplibs
7473
7474 # Compile-time system search path for libraries
7475 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7476
7477 # Run-time system search path for libraries
7478 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7479
7480 # Fix the shell variable \$srcfile for the compiler.
7481 fix_srcfile_path="$fix_srcfile_path"
7482
7483 # Set to yes if exported symbols are required.
7484 always_export_symbols=$always_export_symbols
7485
7486 # The commands to list exported symbols.
7487 export_symbols_cmds=$lt_export_symbols_cmds
7488
7489 # The commands to extract the exported symbol list from a shared archive.
7490 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7491
7492 # Symbols that should not be listed in the preloaded symbols.
7493 exclude_expsyms=$lt_exclude_expsyms
7494
7495 # Symbols that must always be exported.
7496 include_expsyms=$lt_include_expsyms
7497
7498 # ### END LIBTOOL CONFIG
7499
7500 __EOF__
7501
7502   case $host_os in
7503   aix3*)
7504     cat <<\EOF >> "${ofile}T"
7505
7506 # AIX sometimes has problems with the GCC collect2 program.  For some
7507 # reason, if we set the COLLECT_NAMES environment variable, the problems
7508 # vanish in a puff of smoke.
7509 if test "X${COLLECT_NAMES+set}" != Xset; then
7510   COLLECT_NAMES=
7511   export COLLECT_NAMES
7512 fi
7513 EOF
7514     ;;
7515   esac
7516
7517   case $host_os in
7518   cygwin* | mingw* | pw32* | os2*)
7519     cat <<'EOF' >> "${ofile}T"
7520       # This is a source program that is used to create dlls on Windows
7521       # Don't remove nor modify the starting and closing comments
7522 # /* ltdll.c starts here */
7523 # #define WIN32_LEAN_AND_MEAN
7524 # #include <windows.h>
7525 # #undef WIN32_LEAN_AND_MEAN
7526 # #include <stdio.h>
7527 #
7528 # #ifndef __CYGWIN__
7529 # #  ifdef __CYGWIN32__
7530 # #    define __CYGWIN__ __CYGWIN32__
7531 # #  endif
7532 # #endif
7533 #
7534 # #ifdef __cplusplus
7535 # extern "C" {
7536 # #endif
7537 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7538 # #ifdef __cplusplus
7539 # }
7540 # #endif
7541 #
7542 # #ifdef __CYGWIN__
7543 # #include <cygwin/cygwin_dll.h>
7544 # DECLARE_CYGWIN_DLL( DllMain );
7545 # #endif
7546 # HINSTANCE __hDllInstance_base;
7547 #
7548 # BOOL APIENTRY
7549 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7550 # {
7551 #   __hDllInstance_base = hInst;
7552 #   return TRUE;
7553 # }
7554 # /* ltdll.c ends here */
7555         # This is a source program that is used to create import libraries
7556         # on Windows for dlls which lack them. Don't remove nor modify the
7557         # starting and closing comments
7558 # /* impgen.c starts here */
7559 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7560 #
7561 #  This file is part of GNU libtool.
7562 #
7563 #  This program is free software; you can redistribute it and/or modify
7564 #  it under the terms of the GNU General Public License as published by
7565 #  the Free Software Foundation; either version 2 of the License, or
7566 #  (at your option) any later version.
7567 #
7568 #  This program is distributed in the hope that it will be useful,
7569 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7570 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7571 #  GNU General Public License for more details.
7572 #
7573 #  You should have received a copy of the GNU General Public License
7574 #  along with this program; if not, write to the Free Software
7575 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7576 #  */
7577 #
7578 # #include <stdio.h>            /* for printf() */
7579 # #include <unistd.h>           /* for open(), lseek(), read() */
7580 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7581 # #include <string.h>           /* for strdup() */
7582 #
7583 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7584 # #ifndef O_BINARY
7585 # #define O_BINARY 0
7586 # #endif
7587 #
7588 # static unsigned int
7589 # pe_get16 (fd, offset)
7590 #      int fd;
7591 #      int offset;
7592 # {
7593 #   unsigned char b[2];
7594 #   lseek (fd, offset, SEEK_SET);
7595 #   read (fd, b, 2);
7596 #   return b[0] + (b[1]<<8);
7597 # }
7598 #
7599 # static unsigned int
7600 # pe_get32 (fd, offset)
7601 #     int fd;
7602 #     int offset;
7603 # {
7604 #   unsigned char b[4];
7605 #   lseek (fd, offset, SEEK_SET);
7606 #   read (fd, b, 4);
7607 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7608 # }
7609 #
7610 # static unsigned int
7611 # pe_as32 (ptr)
7612 #      void *ptr;
7613 # {
7614 #   unsigned char *b = ptr;
7615 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7616 # }
7617 #
7618 # int
7619 # main (argc, argv)
7620 #     int argc;
7621 #     char *argv[];
7622 # {
7623 #     int dll;
7624 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7625 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7626 #     unsigned long name_rvas, nexp;
7627 #     unsigned char *expdata, *erva;
7628 #     char *filename, *dll_name;
7629 #
7630 #     filename = argv[1];
7631 #
7632 #     dll = open(filename, O_RDONLY|O_BINARY);
7633 #     if (dll < 1)
7634 #       return 1;
7635 #
7636 #     dll_name = filename;
7637 #
7638 #     for (i=0; filename[i]; i++)
7639 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7640 #           dll_name = filename + i +1;
7641 #
7642 #     pe_header_offset = pe_get32 (dll, 0x3c);
7643 #     opthdr_ofs = pe_header_offset + 4 + 20;
7644 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7645 #
7646 #     if (num_entries < 1) /* no exports */
7647 #       return 1;
7648 #
7649 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7650 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7651 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7652 #     secptr = (pe_header_offset + 4 + 20 +
7653 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7654 #
7655 #     expptr = 0;
7656 #     for (i = 0; i < nsections; i++)
7657 #     {
7658 #       char sname[8];
7659 #       unsigned long secptr1 = secptr + 40 * i;
7660 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7661 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7662 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7663 #       lseek(dll, secptr1, SEEK_SET);
7664 #       read(dll, sname, 8);
7665 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7666 #       {
7667 #           expptr = fptr + (export_rva - vaddr);
7668 #           if (export_rva + export_size > vaddr + vsize)
7669 #               export_size = vsize - (export_rva - vaddr);
7670 #           break;
7671 #       }
7672 #     }
7673 #
7674 #     expdata = (unsigned char*)malloc(export_size);
7675 #     lseek (dll, expptr, SEEK_SET);
7676 #     read (dll, expdata, export_size);
7677 #     erva = expdata - export_rva;
7678 #
7679 #     nexp = pe_as32 (expdata+24);
7680 #     name_rvas = pe_as32 (expdata+32);
7681 #
7682 #     printf ("EXPORTS\n");
7683 #     for (i = 0; i<nexp; i++)
7684 #     {
7685 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7686 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7687 #     }
7688 #
7689 #     return 0;
7690 # }
7691 # /* impgen.c ends here */
7692
7693 EOF
7694     ;;
7695   esac
7696
7697   # We use sed instead of cat because bash on DJGPP gets confused if
7698   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7699   # text mode, it properly converts lines to CR/LF.  This bash problem
7700   # is reportedly fixed, but why not run on old versions too?
7701   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7702
7703   mv -f "${ofile}T" "$ofile" || \
7704     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7705   chmod +x "$ofile"
7706 fi
7707
7708
7709
7710
7711
7712 # This can be used to rebuild libtool when needed
7713 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7714
7715 # Always use our own libtool.
7716 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7717
7718 # Prevent multiple expansion
7719
7720
7721
7722 ol_link_perl=no
7723 if test $ol_enable_perl != no ; then
7724         # Extract the first word of "perl", so it can be a program name with args.
7725 set dummy perl; ac_word=$2
7726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7727 echo "configure:7728: checking for $ac_word" >&5
7728 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7729   echo $ac_n "(cached) $ac_c" 1>&6
7730 else
7731   case "$PERLBIN" in
7732   /*)
7733   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7734   ;;
7735   ?:/*)
7736   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7737   ;;
7738   *)
7739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7740   ac_dummy="$PATH"
7741   for ac_dir in $ac_dummy; do 
7742     test -z "$ac_dir" && ac_dir=.
7743     if test -f $ac_dir/$ac_word; then
7744       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7745       break
7746     fi
7747   done
7748   IFS="$ac_save_ifs"
7749   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7750   ;;
7751 esac
7752 fi
7753 PERLBIN="$ac_cv_path_PERLBIN"
7754 if test -n "$PERLBIN"; then
7755   echo "$ac_t""$PERLBIN" 1>&6
7756 else
7757   echo "$ac_t""no" 1>&6
7758 fi
7759
7760
7761         if test "no$PERLBIN" = "no" ; then
7762                 if test $ol_enable_perl = yes ; then
7763                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7764                 fi
7765
7766         else
7767                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7768                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7769
7770                 if test x"$ol_enable_perl" = "xyes" ; then
7771                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7772                 else
7773                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7774                 fi
7775                                 ol_link_perl=yes
7776         fi
7777 fi
7778
7779 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7780 echo "configure:7781: checking how to run the C preprocessor" >&5
7781 # On Suns, sometimes $CPP names a directory.
7782 if test -n "$CPP" && test -d "$CPP"; then
7783   CPP=
7784 fi
7785 if test -z "$CPP"; then
7786 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789     # This must be in double quotes, not single quotes, because CPP may get
7790   # substituted into the Makefile and "${CC-cc}" will confuse make.
7791   CPP="${CC-cc} -E"
7792   # On the NeXT, cc -E runs the code through the compiler's parser,
7793   # not just through cpp.
7794   cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 #include <assert.h>
7798 Syntax Error
7799 EOF
7800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7801 { (eval echo configure:7802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7803 if test -z "$ac_err"; then
7804   :
7805 else
7806   echo "$ac_err" >&5
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   CPP="${CC-cc} -E -traditional-cpp"
7811   cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814 #include <assert.h>
7815 Syntax Error
7816 EOF
7817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7818 { (eval echo configure:7819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7820 if test -z "$ac_err"; then
7821   :
7822 else
7823   echo "$ac_err" >&5
7824   echo "configure: failed program was:" >&5
7825   cat conftest.$ac_ext >&5
7826   rm -rf conftest*
7827   CPP="${CC-cc} -nologo -E"
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 #include <assert.h>
7832 Syntax Error
7833 EOF
7834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7835 { (eval echo configure:7836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7837 if test -z "$ac_err"; then
7838   :
7839 else
7840   echo "$ac_err" >&5
7841   echo "configure: failed program was:" >&5
7842   cat conftest.$ac_ext >&5
7843   rm -rf conftest*
7844   CPP=/lib/cpp
7845 fi
7846 rm -f conftest*
7847 fi
7848 rm -f conftest*
7849 fi
7850 rm -f conftest*
7851   ac_cv_prog_CPP="$CPP"
7852 fi
7853   CPP="$ac_cv_prog_CPP"
7854 else
7855   ac_cv_prog_CPP="$CPP"
7856 fi
7857 echo "$ac_t""$CPP" 1>&6
7858
7859
7860
7861 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7862 echo "configure:7863: checking for Cygwin environment" >&5
7863 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7864   echo $ac_n "(cached) $ac_c" 1>&6
7865 else
7866   cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869
7870 int main() {
7871
7872 #ifndef __CYGWIN__
7873 #define __CYGWIN__ __CYGWIN32__
7874 #endif
7875 return __CYGWIN__;
7876 ; return 0; }
7877 EOF
7878 if { (eval echo configure:7879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7879   rm -rf conftest*
7880   ac_cv_cygwin=yes
7881 else
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   ac_cv_cygwin=no
7886 fi
7887 rm -f conftest*
7888 fi
7889
7890 echo "$ac_t""$ac_cv_cygwin" 1>&6
7891 CYGWIN=
7892 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7893 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7894 echo "configure:7895: checking for mingw32 environment" >&5
7895 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901
7902 int main() {
7903 return __MINGW32__;
7904 ; return 0; }
7905 EOF
7906 if { (eval echo configure:7907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7907   rm -rf conftest*
7908   ac_cv_mingw32=yes
7909 else
7910   echo "configure: failed program was:" >&5
7911   cat conftest.$ac_ext >&5
7912   rm -rf conftest*
7913   ac_cv_mingw32=no
7914 fi
7915 rm -f conftest*
7916 fi
7917
7918 echo "$ac_t""$ac_cv_mingw32" 1>&6
7919 MINGW32=
7920 test "$ac_cv_mingw32" = yes && MINGW32=yes
7921
7922
7923
7924 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7925 echo "configure:7926: checking for executable suffix" >&5
7926 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7927   echo $ac_n "(cached) $ac_c" 1>&6
7928 else
7929   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7930   ac_cv_exeext=.exe
7931 else
7932   rm -f conftest*
7933   echo 'int main () { return 0; }' > conftest.$ac_ext
7934   ac_cv_exeext=
7935   if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7936     for file in conftest.*; do
7937       case $file in
7938       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7939       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7940       esac
7941     done
7942   else
7943     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7944   fi
7945   rm -f conftest*
7946   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7947 fi
7948 fi
7949
7950 EXEEXT=""
7951 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7952 echo "$ac_t""${ac_cv_exeext}" 1>&6
7953 ac_exeext=$EXEEXT
7954
7955 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7956 echo "configure:7957: checking for object suffix" >&5
7957 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   rm -f conftest*
7961 echo 'int i = 1;' > conftest.$ac_ext
7962 if { (eval echo configure:7963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7963   for ac_file in conftest.*; do
7964     case $ac_file in
7965     *.c) ;;
7966     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7967     esac
7968   done
7969 else
7970   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7971 fi
7972 rm -f conftest*
7973 fi
7974
7975 echo "$ac_t""$ac_cv_objext" 1>&6
7976 OBJEXT=$ac_cv_objext
7977 ac_objext=$ac_cv_objext
7978
7979
7980 cat >> confdefs.h <<EOF
7981 #define EXEEXT "${EXEEXT}"
7982 EOF
7983
7984
7985 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7986 echo "configure:7987: checking for be_app in -lbe" >&5
7987 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   ac_save_LIBS="$LIBS"
7992 LIBS="-lbe -lroot -lnet $LIBS"
7993 cat > conftest.$ac_ext <<EOF
7994 #line 7995 "configure"
7995 #include "confdefs.h"
7996 /* Override any gcc2 internal prototype to avoid an error.  */
7997 /* We use char because int might match the return type of a gcc2
7998     builtin and then its argument prototype would still apply.  */
7999 char be_app();
8000
8001 int main() {
8002 be_app()
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   eval "ac_cv_lib_$ac_lib_var=yes"
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_lib_$ac_lib_var=no"
8013 fi
8014 rm -f conftest*
8015 LIBS="$ac_save_LIBS"
8016
8017 fi
8018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8019   echo "$ac_t""yes" 1>&6
8020   LIBS="$LIBS -lbe -lroot -lnet"
8021 else
8022   echo "$ac_t""no" 1>&6
8023 :
8024 fi
8025
8026
8027
8028
8029
8030 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8031 echo "configure:8032: checking for ${CC-cc} option to accept ANSI C" >&5
8032 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   am_cv_prog_cc_stdc=no
8036 ac_save_CC="$CC"
8037 # Don't try gcc -ansi; that turns off useful extensions and
8038 # breaks some systems' header files.
8039 # AIX                   -qlanglvl=ansi
8040 # Ultrix and OSF/1      -std1
8041 # HP-UX 10.20 and later -Ae
8042 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8043 # SVR4                  -Xc -D__EXTENSIONS__
8044 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8045 do
8046   CC="$ac_save_CC $ac_arg"
8047   cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050 #include <stdarg.h>
8051 #include <stdio.h>
8052 #include <sys/types.h>
8053 #include <sys/stat.h>
8054 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8055 struct buf { int x; };
8056 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8057 static char *e (p, i)
8058      char **p;
8059      int i;
8060 {
8061   return p[i];
8062 }
8063 static char *f (char * (*g) (char **, int), char **p, ...)
8064 {
8065   char *s;
8066   va_list v;
8067   va_start (v,p);
8068   s = g (p, va_arg (v,int));
8069   va_end (v);
8070   return s;
8071 }
8072 int test (int i, double x);
8073 struct s1 {int (*f) (int a);};
8074 struct s2 {int (*f) (double a);};
8075 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8076 int argc;
8077 char **argv;
8078
8079 int main() {
8080
8081 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8082
8083 ; return 0; }
8084 EOF
8085 if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8086   rm -rf conftest*
8087   am_cv_prog_cc_stdc="$ac_arg"; break
8088 else
8089   echo "configure: failed program was:" >&5
8090   cat conftest.$ac_ext >&5
8091 fi
8092 rm -f conftest*
8093 done
8094 CC="$ac_save_CC"
8095
8096 fi
8097
8098 if test -z "$am_cv_prog_cc_stdc"; then
8099   echo "$ac_t""none needed" 1>&6
8100 else
8101   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8102 fi
8103 case "x$am_cv_prog_cc_stdc" in
8104   x|xno) ;;
8105   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8106 esac
8107
8108 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8109         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8110 fi
8111
8112 # test for make depend flag
8113 OL_MKDEP=
8114 OL_MKDEP_FLAGS=
8115 if test -z "${MKDEP}"; then
8116         OL_MKDEP="${CC-cc}"
8117         if test -z "${MKDEP_FLAGS}"; then
8118                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8119 echo "configure:8120: checking for ${OL_MKDEP} depend flag" >&5
8120 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8121   echo $ac_n "(cached) $ac_c" 1>&6
8122 else
8123   
8124                         ol_cv_mkdep=no
8125                         for flag in "-M" "-xM"; do
8126                                 cat > conftest.c <<EOF
8127  noCode;
8128 EOF
8129                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8130                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8131                                 then
8132                                         if test ! -f conftest."${ac_object}" ; then
8133                                                 ol_cv_mkdep=$flag
8134                                                 OL_MKDEP_FLAGS="$flag"
8135                                                 break
8136                                         fi
8137                                 fi
8138                         done
8139                         rm -f conftest*
8140                 
8141 fi
8142
8143 echo "$ac_t""$ol_cv_mkdep" 1>&6
8144         else
8145                 cc_cv_mkdep=yes
8146                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8147         fi
8148 else
8149         cc_cv_mkdep=yes
8150         OL_MKDEP="${MKDEP}"
8151         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8152 fi
8153
8154
8155
8156 if test "${ol_cv_mkdep}" = no ; then
8157         # this will soon become an error
8158         echo "configure: warning: do not know how to generate dependencies" 1>&2
8159 fi
8160
8161 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8162 echo "configure:8163: checking for afopen in -ls" >&5
8163 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   ac_save_LIBS="$LIBS"
8168 LIBS="-ls  $LIBS"
8169 cat > conftest.$ac_ext <<EOF
8170 #line 8171 "configure"
8171 #include "confdefs.h"
8172 /* Override any gcc2 internal prototype to avoid an error.  */
8173 /* We use char because int might match the return type of a gcc2
8174     builtin and then its argument prototype would still apply.  */
8175 char afopen();
8176
8177 int main() {
8178 afopen()
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8182   rm -rf conftest*
8183   eval "ac_cv_lib_$ac_lib_var=yes"
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187   rm -rf conftest*
8188   eval "ac_cv_lib_$ac_lib_var=no"
8189 fi
8190 rm -f conftest*
8191 LIBS="$ac_save_LIBS"
8192
8193 fi
8194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8195   echo "$ac_t""yes" 1>&6
8196   
8197         AUTH_LIBS=-ls
8198         cat >> confdefs.h <<\EOF
8199 #define HAVE_AIX_SECURITY 1
8200 EOF
8201
8202
8203 else
8204   echo "$ac_t""no" 1>&6
8205 fi
8206
8207
8208 case "$target" in
8209 *-ibm-openedition)
8210         ac_cv_func_getopt=no
8211         cat >> confdefs.h <<\EOF
8212 #define BOTH_STRINGS_H 1
8213 EOF
8214
8215         ;;
8216 esac
8217
8218 ol_link_modules=no
8219 WITH_MODULES_ENABLED=no
8220 if test $ol_enable_modules != no ; then
8221         for ac_hdr in ltdl.h
8222 do
8223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8225 echo "configure:8226: checking for $ac_hdr" >&5
8226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8227   echo $ac_n "(cached) $ac_c" 1>&6
8228 else
8229   cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 #include <$ac_hdr>
8233 EOF
8234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8235 { (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8237 if test -z "$ac_err"; then
8238   rm -rf conftest*
8239   eval "ac_cv_header_$ac_safe=yes"
8240 else
8241   echo "$ac_err" >&5
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_header_$ac_safe=no"
8246 fi
8247 rm -f conftest*
8248 fi
8249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8250   echo "$ac_t""yes" 1>&6
8251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8252   cat >> confdefs.h <<EOF
8253 #define $ac_tr_hdr 1
8254 EOF
8255  
8256 else
8257   echo "$ac_t""no" 1>&6
8258 fi
8259 done
8260
8261
8262         if test $ac_cv_header_ltdl_h = no ; then
8263                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8264         fi
8265
8266         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8267 echo "configure:8268: checking for lt_dlinit in -lltdl" >&5
8268 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   ac_save_LIBS="$LIBS"
8273 LIBS="-lltdl  $LIBS"
8274 cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 /* We use char because int might match the return type of a gcc2
8279     builtin and then its argument prototype would still apply.  */
8280 char lt_dlinit();
8281
8282 int main() {
8283 lt_dlinit()
8284 ; return 0; }
8285 EOF
8286 if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8287   rm -rf conftest*
8288   eval "ac_cv_lib_$ac_lib_var=yes"
8289 else
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_lib_$ac_lib_var=no"
8294 fi
8295 rm -f conftest*
8296 LIBS="$ac_save_LIBS"
8297
8298 fi
8299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8300   echo "$ac_t""yes" 1>&6
8301   
8302                 MODULES_LIBS=-lltdl
8303                 cat >> confdefs.h <<\EOF
8304 #define HAVE_LIBLTDL 1
8305 EOF
8306
8307         
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311
8312
8313         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8314                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8315         fi
8316         ol_link_modules=yes
8317         WITH_MODULES_ENABLED=yes
8318
8319 else
8320         for i in $Backends; do
8321                 eval "ol_tmp=\$ol_enable_$i"
8322                 if test $ol_tmp = mod ; then
8323                         echo "configure: warning: building static $i backend" 1>&2
8324                         eval "ol_enable_$i=yes"
8325                 fi
8326         done
8327         for i in $Overlays; do
8328                 eval "ol_tmp=\$ol_enable_$i"
8329                 if test $ol_tmp = mod ; then
8330                         echo "configure: warning: building static $i overlay" 1>&2
8331                         eval "ol_enable_$i=yes"
8332                 fi
8333         done
8334 fi
8335
8336 # test for EBCDIC
8337 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8338 echo "configure:8339: checking for EBCDIC" >&5
8339 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8340   echo $ac_n "(cached) $ac_c" 1>&6
8341 else
8342   
8343         cat > conftest.$ac_ext <<EOF
8344 #line 8345 "configure"
8345 #include "confdefs.h"
8346
8347 #if !('M' == 0xd4)
8348 #include <__ASCII__/generate_error.h>
8349 #endif
8350
8351 EOF
8352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8353 { (eval echo configure:8354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8355 if test -z "$ac_err"; then
8356   rm -rf conftest*
8357   ol_cv_cpp_ebcdic=yes
8358 else
8359   echo "$ac_err" >&5
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   ol_cv_cpp_ebcdic=no
8364 fi
8365 rm -f conftest*
8366 fi
8367
8368 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8369 if test $ol_cv_cpp_ebcdic = yes ; then
8370         cat >> confdefs.h <<\EOF
8371 #define HAVE_EBCDIC 1
8372 EOF
8373
8374 fi
8375
8376 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8377 echo "configure:8378: checking for ANSI C header files" >&5
8378 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8379   echo $ac_n "(cached) $ac_c" 1>&6
8380 else
8381   cat > conftest.$ac_ext <<EOF
8382 #line 8383 "configure"
8383 #include "confdefs.h"
8384 #include <stdlib.h>
8385 #include <stdarg.h>
8386 #include <string.h>
8387 #include <float.h>
8388 EOF
8389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8390 { (eval echo configure:8391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8392 if test -z "$ac_err"; then
8393   rm -rf conftest*
8394   ol_cv_header_stdc=yes
8395 else
8396   echo "$ac_err" >&5
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   ol_cv_header_stdc=no
8401 fi
8402 rm -f conftest*
8403
8404 if test $ol_cv_header_stdc = yes; then
8405   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8406 cat > conftest.$ac_ext <<EOF
8407 #line 8408 "configure"
8408 #include "confdefs.h"
8409 #include <string.h>
8410 EOF
8411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8412   egrep "memchr" >/dev/null 2>&1; then
8413   :
8414 else
8415   rm -rf conftest*
8416   ol_cv_header_stdc=no
8417 fi
8418 rm -f conftest*
8419
8420 fi
8421
8422 if test $ol_cv_header_stdc = yes; then
8423   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8424 cat > conftest.$ac_ext <<EOF
8425 #line 8426 "configure"
8426 #include "confdefs.h"
8427 #include <stdlib.h>
8428 EOF
8429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8430   egrep "free" >/dev/null 2>&1; then
8431   :
8432 else
8433   rm -rf conftest*
8434   ol_cv_header_stdc=no
8435 fi
8436 rm -f conftest*
8437
8438 fi
8439
8440 if test $ol_cv_header_stdc = yes; then
8441   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8442 if test "$cross_compiling" = yes; then
8443   :
8444 else
8445   cat > conftest.$ac_ext <<EOF
8446 #line 8447 "configure"
8447 #include "confdefs.h"
8448 #include <ctype.h>
8449 #ifndef HAVE_EBCDIC
8450 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8451 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8452 #else
8453 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8454                 || ('j' <= (c) && (c) <= 'r') \
8455                 || ('s' <= (c) && (c) <= 'z'))
8456 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8457 #endif
8458 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8459 int main () { int i; for (i = 0; i < 256; i++)
8460 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8461 exit (0); }
8462
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8465 then
8466   :
8467 else
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -fr conftest*
8471   ol_cv_header_stdc=no
8472 fi
8473 rm -fr conftest*
8474 fi
8475
8476 fi
8477 fi
8478
8479 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8480 if test $ol_cv_header_stdc = yes; then
8481   cat >> confdefs.h <<\EOF
8482 #define STDC_HEADERS 1
8483 EOF
8484
8485 fi
8486 ac_cv_header_stdc=disable
8487
8488
8489 if test $ol_cv_header_stdc != yes; then
8490         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8491 fi
8492
8493 ac_header_dirent=no
8494 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8495 do
8496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8497 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8498 echo "configure:8499: checking for $ac_hdr that defines DIR" >&5
8499 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8500   echo $ac_n "(cached) $ac_c" 1>&6
8501 else
8502   cat > conftest.$ac_ext <<EOF
8503 #line 8504 "configure"
8504 #include "confdefs.h"
8505 #include <sys/types.h>
8506 #include <$ac_hdr>
8507 int main() {
8508 DIR *dirp = 0;
8509 ; return 0; }
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8512   rm -rf conftest*
8513   eval "ac_cv_header_dirent_$ac_safe=yes"
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -rf conftest*
8518   eval "ac_cv_header_dirent_$ac_safe=no"
8519 fi
8520 rm -f conftest*
8521 fi
8522 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8523   echo "$ac_t""yes" 1>&6
8524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8525   cat >> confdefs.h <<EOF
8526 #define $ac_tr_hdr 1
8527 EOF
8528  ac_header_dirent=$ac_hdr; break
8529 else
8530   echo "$ac_t""no" 1>&6
8531 fi
8532 done
8533 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8534 if test $ac_header_dirent = dirent.h; then
8535 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8536 echo "configure:8537: checking for opendir in -ldir" >&5
8537 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8539   echo $ac_n "(cached) $ac_c" 1>&6
8540 else
8541   ac_save_LIBS="$LIBS"
8542 LIBS="-ldir  $LIBS"
8543 cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char opendir();
8550
8551 int main() {
8552 opendir()
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=no"
8563 fi
8564 rm -f conftest*
8565 LIBS="$ac_save_LIBS"
8566
8567 fi
8568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570   LIBS="$LIBS -ldir"
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574
8575 else
8576 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8577 echo "configure:8578: checking for opendir in -lx" >&5
8578 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8580   echo $ac_n "(cached) $ac_c" 1>&6
8581 else
8582   ac_save_LIBS="$LIBS"
8583 LIBS="-lx  $LIBS"
8584 cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8587 /* Override any gcc2 internal prototype to avoid an error.  */
8588 /* We use char because int might match the return type of a gcc2
8589     builtin and then its argument prototype would still apply.  */
8590 char opendir();
8591
8592 int main() {
8593 opendir()
8594 ; return 0; }
8595 EOF
8596 if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8597   rm -rf conftest*
8598   eval "ac_cv_lib_$ac_lib_var=yes"
8599 else
8600   echo "configure: failed program was:" >&5
8601   cat conftest.$ac_ext >&5
8602   rm -rf conftest*
8603   eval "ac_cv_lib_$ac_lib_var=no"
8604 fi
8605 rm -f conftest*
8606 LIBS="$ac_save_LIBS"
8607
8608 fi
8609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8610   echo "$ac_t""yes" 1>&6
8611   LIBS="$LIBS -lx"
8612 else
8613   echo "$ac_t""no" 1>&6
8614 fi
8615
8616 fi
8617
8618 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8619 echo "configure:8620: checking for sys/wait.h that is POSIX.1 compatible" >&5
8620 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 #include <sys/types.h>
8627 #include <sys/wait.h>
8628 #ifndef WEXITSTATUS
8629 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8630 #endif
8631 #ifndef WIFEXITED
8632 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8633 #endif
8634 int main() {
8635 int s;
8636 wait (&s);
8637 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8638 ; return 0; }
8639 EOF
8640 if { (eval echo configure:8641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8641   rm -rf conftest*
8642   ac_cv_header_sys_wait_h=yes
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -rf conftest*
8647   ac_cv_header_sys_wait_h=no
8648 fi
8649 rm -f conftest*
8650 fi
8651
8652 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8653 if test $ac_cv_header_sys_wait_h = yes; then
8654   cat >> confdefs.h <<\EOF
8655 #define HAVE_SYS_WAIT_H 1
8656 EOF
8657
8658 fi
8659
8660 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8661 echo "configure:8662: checking POSIX termios" >&5
8662 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669 #include <unistd.h>
8670 #include <termios.h>
8671 int main() {
8672 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8673    tcgetattr(0, 0);
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8677   rm -rf conftest*
8678   am_cv_sys_posix_termios=yes
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   am_cv_sys_posix_termios=no
8684 fi
8685 rm -f conftest*
8686 fi
8687
8688 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8689
8690
8691  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8692 echo "configure:8693: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8693 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8694   echo $ac_n "(cached) $ac_c" 1>&6
8695 else
8696   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8697
8698   gwinsz_in_termios_h=no
8699   if test $am_cv_sys_posix_termios = yes; then
8700     cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 #include <sys/types.h>
8704 #     include <termios.h>
8705 #     ifdef TIOCGWINSZ
8706         yes
8707 #     endif
8708     
8709 EOF
8710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8711   egrep "yes" >/dev/null 2>&1; then
8712   rm -rf conftest*
8713   gwinsz_in_termios_h=yes
8714 fi
8715 rm -f conftest*
8716
8717   fi
8718
8719   if test $gwinsz_in_termios_h = no; then
8720     cat > conftest.$ac_ext <<EOF
8721 #line 8722 "configure"
8722 #include "confdefs.h"
8723 #include <sys/types.h>
8724 #     include <sys/ioctl.h>
8725 #     ifdef TIOCGWINSZ
8726         yes
8727 #     endif
8728     
8729 EOF
8730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8731   egrep "yes" >/dev/null 2>&1; then
8732   rm -rf conftest*
8733   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8734 fi
8735 rm -f conftest*
8736
8737   fi
8738   
8739 fi
8740
8741 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8742   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8743     cat >> confdefs.h <<\EOF
8744 #define GWINSZ_IN_SYS_IOCTL 1
8745 EOF
8746
8747   fi
8748
8749 if test $am_cv_sys_posix_termios = yes ; then
8750         cat >> confdefs.h <<\EOF
8751 #define HAVE_POSIX_TERMIOS 1
8752 EOF
8753
8754 fi
8755
8756 for ac_hdr in \
8757         arpa/inet.h             \
8758         arpa/nameser.h  \
8759         assert.h                \
8760         bits/types.h    \
8761         conio.h                 \
8762         crypt.h                 \
8763         direct.h                \
8764         errno.h                 \
8765         fcntl.h                 \
8766         filio.h                 \
8767         getopt.h                \
8768         grp.h                   \
8769         io.h                    \
8770         libutil.h               \
8771         limits.h                \
8772         locale.h                \
8773         netinet/tcp.h   \
8774         malloc.h                \
8775         memory.h                \
8776         psap.h                  \
8777         pwd.h                   \
8778         process.h               \
8779         resolv.h                \
8780         sgtty.h                 \
8781         shadow.h                \
8782         stddef.h                \
8783         string.h                \
8784         strings.h               \
8785         sysexits.h              \
8786         sys/file.h              \
8787         sys/filio.h             \
8788         sys/errno.h             \
8789         sys/ioctl.h             \
8790         sys/param.h             \
8791         sys/resource.h  \
8792         sys/select.h    \
8793         sys/socket.h    \
8794         sys/stat.h              \
8795         sys/syslog.h    \
8796         sys/time.h              \
8797         sys/types.h             \
8798         sys/ucred.h             \
8799         sys/uio.h               \
8800         syslog.h                \
8801         termios.h               \
8802         unistd.h                \
8803         winsock.h               \
8804         winsock2.h              \
8805
8806 do
8807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8809 echo "configure:8810: checking for $ac_hdr" >&5
8810 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8811   echo $ac_n "(cached) $ac_c" 1>&6
8812 else
8813   cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 #include <$ac_hdr>
8817 EOF
8818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8819 { (eval echo configure:8820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8821 if test -z "$ac_err"; then
8822   rm -rf conftest*
8823   eval "ac_cv_header_$ac_safe=yes"
8824 else
8825   echo "$ac_err" >&5
8826   echo "configure: failed program was:" >&5
8827   cat conftest.$ac_ext >&5
8828   rm -rf conftest*
8829   eval "ac_cv_header_$ac_safe=no"
8830 fi
8831 rm -f conftest*
8832 fi
8833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8834   echo "$ac_t""yes" 1>&6
8835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8836   cat >> confdefs.h <<EOF
8837 #define $ac_tr_hdr 1
8838 EOF
8839  
8840 else
8841   echo "$ac_t""no" 1>&6
8842 fi
8843 done
8844
8845
8846
8847 for ac_func in sigaction sigset 
8848 do
8849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8850 echo "configure:8851: checking for $ac_func" >&5
8851 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8852   echo $ac_n "(cached) $ac_c" 1>&6
8853 else
8854   cat > conftest.$ac_ext <<EOF
8855 #line 8856 "configure"
8856 #include "confdefs.h"
8857 /* System header to define __stub macros and hopefully few prototypes,
8858     which can conflict with char $ac_func(); below.  */
8859 #include <assert.h>
8860 /* Override any gcc2 internal prototype to avoid an error.  */
8861 /* We use char because int might match the return type of a gcc2
8862     builtin and then its argument prototype would still apply.  */
8863 char $ac_func();
8864 char (*f)();
8865
8866 int main() {
8867
8868 /* The GNU C library defines this for functions which it implements
8869     to always fail with ENOSYS.  Some functions are actually named
8870     something starting with __ and the normal name is an alias.  */
8871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8872 choke me
8873 #else
8874 f = $ac_func;
8875 #endif
8876
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   eval "ac_cv_func_$ac_func=yes"
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   eval "ac_cv_func_$ac_func=no"
8887 fi
8888 rm -f conftest*
8889 fi
8890
8891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8892   echo "$ac_t""yes" 1>&6
8893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8894   cat >> confdefs.h <<EOF
8895 #define $ac_tr_func 1
8896 EOF
8897  
8898 else
8899   echo "$ac_t""no" 1>&6
8900 fi
8901 done
8902
8903
8904 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8905         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8906 echo "configure:8907: checking for sigset in -lV3" >&5
8907 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8908 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   ac_save_LIBS="$LIBS"
8912 LIBS="-lV3  $LIBS"
8913 cat > conftest.$ac_ext <<EOF
8914 #line 8915 "configure"
8915 #include "confdefs.h"
8916 /* Override any gcc2 internal prototype to avoid an error.  */
8917 /* We use char because int might match the return type of a gcc2
8918     builtin and then its argument prototype would still apply.  */
8919 char sigset();
8920
8921 int main() {
8922 sigset()
8923 ; return 0; }
8924 EOF
8925 if { (eval echo configure:8926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8926   rm -rf conftest*
8927   eval "ac_cv_lib_$ac_lib_var=yes"
8928 else
8929   echo "configure: failed program was:" >&5
8930   cat conftest.$ac_ext >&5
8931   rm -rf conftest*
8932   eval "ac_cv_lib_$ac_lib_var=no"
8933 fi
8934 rm -f conftest*
8935 LIBS="$ac_save_LIBS"
8936
8937 fi
8938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8939   echo "$ac_t""yes" 1>&6
8940     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8941     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8942   cat >> confdefs.h <<EOF
8943 #define $ac_tr_lib 1
8944 EOF
8945
8946   LIBS="-lV3 $LIBS"
8947
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951
8952 fi
8953
8954 if test "$ac_cv_header_winsock_h" = yes; then
8955 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8956 echo "configure:8957: checking for winsock" >&5
8957 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   save_LIBS="$LIBS"
8961 for curlib in ws2_32 wsock32; do
8962         LIBS="$LIBS -l$curlib"
8963         cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 #include <winsock.h>
8967                         
8968 int main() {
8969
8970                         socket(0,0,0);
8971                         select(0,NULL,NULL,NULL,NULL);
8972                         closesocket(0);
8973                         gethostname(NULL,0);
8974                         
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8978   rm -rf conftest*
8979   ol_cv_winsock=yes
8980 else
8981   echo "configure: failed program was:" >&5
8982   cat conftest.$ac_ext >&5
8983   rm -rf conftest*
8984   ol_cv_winsock=no
8985 fi
8986 rm -f conftest*
8987
8988         if test $ol_cv_winsock = yes; then
8989                 cat >> confdefs.h <<\EOF
8990 #define HAVE_WINSOCK 1
8991 EOF
8992
8993                 ac_cv_func_socket=yes
8994                 ac_cv_func_select=yes
8995                 ac_cv_func_closesocket=yes
8996                 ac_cv_func_gethostname=yes
8997                 if test $curlib = ws2_32; then
8998                         ol_cv_winsock=winsock2
8999                         cat >> confdefs.h <<\EOF
9000 #define HAVE_WINSOCK2 1
9001 EOF
9002
9003                 fi
9004                 break
9005         fi
9006         LIBS="$save_LIBS"
9007 done
9008 fi
9009
9010 echo "$ac_t""$ol_cv_winsock" 1>&6
9011 fi
9012
9013
9014 echo $ac_n "checking for socket""... $ac_c" 1>&6
9015 echo "configure:9016: checking for socket" >&5
9016 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9017   echo $ac_n "(cached) $ac_c" 1>&6
9018 else
9019   cat > conftest.$ac_ext <<EOF
9020 #line 9021 "configure"
9021 #include "confdefs.h"
9022 /* System header to define __stub macros and hopefully few prototypes,
9023     which can conflict with char socket(); below.  */
9024 #include <assert.h>
9025 /* Override any gcc2 internal prototype to avoid an error.  */
9026 /* We use char because int might match the return type of a gcc2
9027     builtin and then its argument prototype would still apply.  */
9028 char socket();
9029 char (*f)();
9030
9031 int main() {
9032
9033 /* The GNU C library defines this for functions which it implements
9034     to always fail with ENOSYS.  Some functions are actually named
9035     something starting with __ and the normal name is an alias.  */
9036 #if defined (__stub_socket) || defined (__stub___socket)
9037 choke me
9038 #else
9039 f = socket;
9040 #endif
9041
9042 ; return 0; }
9043 EOF
9044 if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9045   rm -rf conftest*
9046   eval "ac_cv_func_socket=yes"
9047 else
9048   echo "configure: failed program was:" >&5
9049   cat conftest.$ac_ext >&5
9050   rm -rf conftest*
9051   eval "ac_cv_func_socket=no"
9052 fi
9053 rm -f conftest*
9054 fi
9055
9056 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9057   echo "$ac_t""yes" 1>&6
9058   :
9059 else
9060   echo "$ac_t""no" 1>&6
9061         
9062         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9063 echo "configure:9064: checking for main in -lsocket" >&5
9064 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9066   echo $ac_n "(cached) $ac_c" 1>&6
9067 else
9068   ac_save_LIBS="$LIBS"
9069 LIBS="-lsocket  $LIBS"
9070 cat > conftest.$ac_ext <<EOF
9071 #line 9072 "configure"
9072 #include "confdefs.h"
9073
9074 int main() {
9075 main()
9076 ; return 0; }
9077 EOF
9078 if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9079   rm -rf conftest*
9080   eval "ac_cv_lib_$ac_lib_var=yes"
9081 else
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   eval "ac_cv_lib_$ac_lib_var=no"
9086 fi
9087 rm -f conftest*
9088 LIBS="$ac_save_LIBS"
9089
9090 fi
9091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9092   echo "$ac_t""yes" 1>&6
9093     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9094     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9095   cat >> confdefs.h <<EOF
9096 #define $ac_tr_lib 1
9097 EOF
9098
9099   LIBS="-lsocket $LIBS"
9100
9101 else
9102   echo "$ac_t""no" 1>&6
9103 fi
9104
9105         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9106 echo "configure:9107: checking for main in -lnet" >&5
9107 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9109   echo $ac_n "(cached) $ac_c" 1>&6
9110 else
9111   ac_save_LIBS="$LIBS"
9112 LIBS="-lnet  $LIBS"
9113 cat > conftest.$ac_ext <<EOF
9114 #line 9115 "configure"
9115 #include "confdefs.h"
9116
9117 int main() {
9118 main()
9119 ; return 0; }
9120 EOF
9121 if { (eval echo configure:9122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9122   rm -rf conftest*
9123   eval "ac_cv_lib_$ac_lib_var=yes"
9124 else
9125   echo "configure: failed program was:" >&5
9126   cat conftest.$ac_ext >&5
9127   rm -rf conftest*
9128   eval "ac_cv_lib_$ac_lib_var=no"
9129 fi
9130 rm -f conftest*
9131 LIBS="$ac_save_LIBS"
9132
9133 fi
9134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9135   echo "$ac_t""yes" 1>&6
9136     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9138   cat >> confdefs.h <<EOF
9139 #define $ac_tr_lib 1
9140 EOF
9141
9142   LIBS="-lnet $LIBS"
9143
9144 else
9145   echo "$ac_t""no" 1>&6
9146 fi
9147
9148         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9149 echo "configure:9150: checking for main in -lnsl_s" >&5
9150 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9152   echo $ac_n "(cached) $ac_c" 1>&6
9153 else
9154   ac_save_LIBS="$LIBS"
9155 LIBS="-lnsl_s  $LIBS"
9156 cat > conftest.$ac_ext <<EOF
9157 #line 9158 "configure"
9158 #include "confdefs.h"
9159
9160 int main() {
9161 main()
9162 ; return 0; }
9163 EOF
9164 if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9165   rm -rf conftest*
9166   eval "ac_cv_lib_$ac_lib_var=yes"
9167 else
9168   echo "configure: failed program was:" >&5
9169   cat conftest.$ac_ext >&5
9170   rm -rf conftest*
9171   eval "ac_cv_lib_$ac_lib_var=no"
9172 fi
9173 rm -f conftest*
9174 LIBS="$ac_save_LIBS"
9175
9176 fi
9177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9178   echo "$ac_t""yes" 1>&6
9179     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9181   cat >> confdefs.h <<EOF
9182 #define $ac_tr_lib 1
9183 EOF
9184
9185   LIBS="-lnsl_s $LIBS"
9186
9187 else
9188   echo "$ac_t""no" 1>&6
9189 fi
9190
9191         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9192 echo "configure:9193: checking for main in -lnsl" >&5
9193 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9195   echo $ac_n "(cached) $ac_c" 1>&6
9196 else
9197   ac_save_LIBS="$LIBS"
9198 LIBS="-lnsl  $LIBS"
9199 cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202
9203 int main() {
9204 main()
9205 ; return 0; }
9206 EOF
9207 if { (eval echo configure:9208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9208   rm -rf conftest*
9209   eval "ac_cv_lib_$ac_lib_var=yes"
9210 else
9211   echo "configure: failed program was:" >&5
9212   cat conftest.$ac_ext >&5
9213   rm -rf conftest*
9214   eval "ac_cv_lib_$ac_lib_var=no"
9215 fi
9216 rm -f conftest*
9217 LIBS="$ac_save_LIBS"
9218
9219 fi
9220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9221   echo "$ac_t""yes" 1>&6
9222     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9223     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9224   cat >> confdefs.h <<EOF
9225 #define $ac_tr_lib 1
9226 EOF
9227
9228   LIBS="-lnsl $LIBS"
9229
9230 else
9231   echo "$ac_t""no" 1>&6
9232 fi
9233
9234         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9235 echo "configure:9236: checking for socket in -linet" >&5
9236 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9238   echo $ac_n "(cached) $ac_c" 1>&6
9239 else
9240   ac_save_LIBS="$LIBS"
9241 LIBS="-linet  $LIBS"
9242 cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 /* Override any gcc2 internal prototype to avoid an error.  */
9246 /* We use char because int might match the return type of a gcc2
9247     builtin and then its argument prototype would still apply.  */
9248 char socket();
9249
9250 int main() {
9251 socket()
9252 ; return 0; }
9253 EOF
9254 if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9255   rm -rf conftest*
9256   eval "ac_cv_lib_$ac_lib_var=yes"
9257 else
9258   echo "configure: failed program was:" >&5
9259   cat conftest.$ac_ext >&5
9260   rm -rf conftest*
9261   eval "ac_cv_lib_$ac_lib_var=no"
9262 fi
9263 rm -f conftest*
9264 LIBS="$ac_save_LIBS"
9265
9266 fi
9267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9268   echo "$ac_t""yes" 1>&6
9269     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9270     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9271   cat >> confdefs.h <<EOF
9272 #define $ac_tr_lib 1
9273 EOF
9274
9275   LIBS="-linet $LIBS"
9276
9277 else
9278   echo "$ac_t""no" 1>&6
9279 fi
9280
9281         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9282 echo "configure:9283: checking for main in -lgen" >&5
9283 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   ac_save_LIBS="$LIBS"
9288 LIBS="-lgen  $LIBS"
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292
9293 int main() {
9294 main()
9295 ; return 0; }
9296 EOF
9297 if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=yes"
9300 else
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=no"
9305 fi
9306 rm -f conftest*
9307 LIBS="$ac_save_LIBS"
9308
9309 fi
9310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9314   cat >> confdefs.h <<EOF
9315 #define $ac_tr_lib 1
9316 EOF
9317
9318   LIBS="-lgen $LIBS"
9319
9320 else
9321   echo "$ac_t""no" 1>&6
9322 fi
9323
9324
9325 fi
9326
9327
9328 echo $ac_n "checking for select""... $ac_c" 1>&6
9329 echo "configure:9330: checking for select" >&5
9330 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336 /* System header to define __stub macros and hopefully few prototypes,
9337     which can conflict with char select(); below.  */
9338 #include <assert.h>
9339 /* Override any gcc2 internal prototype to avoid an error.  */
9340 /* We use char because int might match the return type of a gcc2
9341     builtin and then its argument prototype would still apply.  */
9342 char select();
9343 char (*f)();
9344
9345 int main() {
9346
9347 /* The GNU C library defines this for functions which it implements
9348     to always fail with ENOSYS.  Some functions are actually named
9349     something starting with __ and the normal name is an alias.  */
9350 #if defined (__stub_select) || defined (__stub___select)
9351 choke me
9352 #else
9353 f = select;
9354 #endif
9355
9356 ; return 0; }
9357 EOF
9358 if { (eval echo configure:9359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9359   rm -rf conftest*
9360   eval "ac_cv_func_select=yes"
9361 else
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   eval "ac_cv_func_select=no"
9366 fi
9367 rm -f conftest*
9368 fi
9369
9370 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9371   echo "$ac_t""yes" 1>&6
9372   :
9373 else
9374   echo "$ac_t""no" 1>&6
9375 { echo "configure: error: select() required." 1>&2; exit 1; }
9376 fi
9377
9378
9379 if test "${ac_cv_header_winsock_h}" != yes; then
9380                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9381 echo "configure:9382: checking types of arguments for select()" >&5
9382  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9383   echo $ac_n "(cached) $ac_c" 1>&6
9384 else
9385    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9389   echo $ac_n "(cached) $ac_c" 1>&6
9390 else
9391      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9392      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9393       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9394        cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397 #ifdef HAVE_SYS_TYPES_H
9398 #include <sys/types.h>
9399 #endif
9400 #ifdef HAVE_SYS_TIME_H
9401 #include <sys/time.h>
9402 #endif
9403 #ifdef HAVE_SYS_SELECT_H
9404 #include <sys/select.h>
9405 #endif
9406 #ifdef HAVE_SYS_SOCKET_H
9407 #include <sys/socket.h>
9408 #endif
9409 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);
9410 int main() {
9411
9412 ; return 0; }
9413 EOF
9414 if { (eval echo configure:9415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9415   rm -rf conftest*
9416           ac_not_found=no ; break 3
9417 else
9418   echo "configure: failed program was:" >&5
9419   cat conftest.$ac_ext >&5
9420   rm -rf conftest*
9421   ac_not_found=yes
9422 fi
9423 rm -f conftest*
9424       done
9425      done
9426     done
9427    
9428 fi
9429   
9430 fi
9431  
9432 fi
9433  if test "$ac_not_found" = yes; then
9434   ac_cv_func_select_arg1=int 
9435   ac_cv_func_select_arg234='int *' 
9436   ac_cv_func_select_arg5='struct timeval *'
9437  fi
9438  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9439  cat >> confdefs.h <<EOF
9440 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9441 EOF
9442
9443  cat >> confdefs.h <<EOF
9444 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9445 EOF
9446
9447  cat >> confdefs.h <<EOF
9448 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9449 EOF
9450
9451
9452 fi
9453
9454
9455 for ac_func in poll 
9456 do
9457 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9458 echo "configure:9459: checking for $ac_func" >&5
9459 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9460   echo $ac_n "(cached) $ac_c" 1>&6
9461 else
9462   cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465 /* System header to define __stub macros and hopefully few prototypes,
9466     which can conflict with char $ac_func(); below.  */
9467 #include <assert.h>
9468 /* Override any gcc2 internal prototype to avoid an error.  */
9469 /* We use char because int might match the return type of a gcc2
9470     builtin and then its argument prototype would still apply.  */
9471 char $ac_func();
9472 char (*f)();
9473
9474 int main() {
9475
9476 /* The GNU C library defines this for functions which it implements
9477     to always fail with ENOSYS.  Some functions are actually named
9478     something starting with __ and the normal name is an alias.  */
9479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9480 choke me
9481 #else
9482 f = $ac_func;
9483 #endif
9484
9485 ; return 0; }
9486 EOF
9487 if { (eval echo configure:9488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9488   rm -rf conftest*
9489   eval "ac_cv_func_$ac_func=yes"
9490 else
9491   echo "configure: failed program was:" >&5
9492   cat conftest.$ac_ext >&5
9493   rm -rf conftest*
9494   eval "ac_cv_func_$ac_func=no"
9495 fi
9496 rm -f conftest*
9497 fi
9498
9499 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9500   echo "$ac_t""yes" 1>&6
9501     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9502   cat >> confdefs.h <<EOF
9503 #define $ac_tr_func 1
9504 EOF
9505  
9506 else
9507   echo "$ac_t""no" 1>&6
9508 fi
9509 done
9510
9511 for ac_hdr in poll.h 
9512 do
9513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9515 echo "configure:9516: checking for $ac_hdr" >&5
9516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9517   echo $ac_n "(cached) $ac_c" 1>&6
9518 else
9519   cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #include <$ac_hdr>
9523 EOF
9524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9525 { (eval echo configure:9526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9527 if test -z "$ac_err"; then
9528   rm -rf conftest*
9529   eval "ac_cv_header_$ac_safe=yes"
9530 else
9531   echo "$ac_err" >&5
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   eval "ac_cv_header_$ac_safe=no"
9536 fi
9537 rm -f conftest*
9538 fi
9539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9540   echo "$ac_t""yes" 1>&6
9541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9542   cat >> confdefs.h <<EOF
9543 #define $ac_tr_hdr 1
9544 EOF
9545  
9546 else
9547   echo "$ac_t""no" 1>&6
9548 fi
9549 done
9550
9551
9552 for ac_hdr in sys/epoll.h 
9553 do
9554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9556 echo "configure:9557: checking for $ac_hdr" >&5
9557 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9558   echo $ac_n "(cached) $ac_c" 1>&6
9559 else
9560   cat > conftest.$ac_ext <<EOF
9561 #line 9562 "configure"
9562 #include "confdefs.h"
9563 #include <$ac_hdr>
9564 EOF
9565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9566 { (eval echo configure:9567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9568 if test -z "$ac_err"; then
9569   rm -rf conftest*
9570   eval "ac_cv_header_$ac_safe=yes"
9571 else
9572   echo "$ac_err" >&5
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_header_$ac_safe=no"
9577 fi
9578 rm -f conftest*
9579 fi
9580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9581   echo "$ac_t""yes" 1>&6
9582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9583   cat >> confdefs.h <<EOF
9584 #define $ac_tr_hdr 1
9585 EOF
9586  
9587 else
9588   echo "$ac_t""no" 1>&6
9589 fi
9590 done
9591
9592 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9593 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9594 echo "configure:9595: checking for epoll system call" >&5
9595 if test "$cross_compiling" = yes; then
9596   echo "$ac_t""no" 1>&6
9597 else
9598   cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 int main(int argc, char *argv)
9602 {
9603         int epfd = epoll_create(256);
9604         exit (epfd == -1 ? 1 : 0);
9605 }
9606 EOF
9607 if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9608 then
9609   echo "$ac_t""yes" 1>&6
9610 cat >> confdefs.h <<\EOF
9611 #define HAVE_EPOLL 1
9612 EOF
9613
9614 else
9615   echo "configure: failed program was:" >&5
9616   cat conftest.$ac_ext >&5
9617   rm -fr conftest*
9618   echo "$ac_t""no" 1>&6
9619 fi
9620 rm -fr conftest*
9621 fi
9622
9623 fi
9624
9625 # strerror checks
9626 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9627 echo "configure:9628: checking declaration of sys_errlist" >&5
9628 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9629   echo $ac_n "(cached) $ac_c" 1>&6
9630 else
9631   
9632         cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635
9636 #include <stdio.h>
9637 #include <sys/types.h>
9638 #include <errno.h>
9639 #ifdef WINNT
9640 #include <stdlib.h>
9641 #endif 
9642 int main() {
9643 char *c = (char *) *sys_errlist
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9647   rm -rf conftest*
9648   ol_cv_dcl_sys_errlist=yes
9649         ol_cv_have_sys_errlist=yes
9650 else
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653   rm -rf conftest*
9654   ol_cv_dcl_sys_errlist=no
9655 fi
9656 rm -f conftest*
9657 fi
9658
9659 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9660 #
9661 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9662 if test $ol_cv_dcl_sys_errlist = no ; then
9663         cat >> confdefs.h <<\EOF
9664 #define DECL_SYS_ERRLIST 1
9665 EOF
9666
9667
9668         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9669 echo "configure:9670: checking existence of sys_errlist" >&5
9670 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   
9674                 cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 #include <errno.h>
9678 int main() {
9679 char *c = (char *) *sys_errlist
9680 ; return 0; }
9681 EOF
9682 if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9683   rm -rf conftest*
9684   ol_cv_have_sys_errlist=yes
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -rf conftest*
9689   ol_cv_have_sys_errlist=no
9690 fi
9691 rm -f conftest*
9692 fi
9693
9694 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9695 fi
9696 if test $ol_cv_have_sys_errlist = yes ; then
9697         cat >> confdefs.h <<\EOF
9698 #define HAVE_SYS_ERRLIST 1
9699 EOF
9700
9701 fi
9702  for ac_func in strerror strerror_r
9703 do
9704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9705 echo "configure:9706: checking for $ac_func" >&5
9706 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* System header to define __stub macros and hopefully few prototypes,
9713     which can conflict with char $ac_func(); below.  */
9714 #include <assert.h>
9715 /* Override any gcc2 internal prototype to avoid an error.  */
9716 /* We use char because int might match the return type of a gcc2
9717     builtin and then its argument prototype would still apply.  */
9718 char $ac_func();
9719 char (*f)();
9720
9721 int main() {
9722
9723 /* The GNU C library defines this for functions which it implements
9724     to always fail with ENOSYS.  Some functions are actually named
9725     something starting with __ and the normal name is an alias.  */
9726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9727 choke me
9728 #else
9729 f = $ac_func;
9730 #endif
9731
9732 ; return 0; }
9733 EOF
9734 if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9735   rm -rf conftest*
9736   eval "ac_cv_func_$ac_func=yes"
9737 else
9738   echo "configure: failed program was:" >&5
9739   cat conftest.$ac_ext >&5
9740   rm -rf conftest*
9741   eval "ac_cv_func_$ac_func=no"
9742 fi
9743 rm -f conftest*
9744 fi
9745
9746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9747   echo "$ac_t""yes" 1>&6
9748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9749   cat >> confdefs.h <<EOF
9750 #define $ac_tr_func 1
9751 EOF
9752  
9753 else
9754   echo "$ac_t""no" 1>&6
9755 fi
9756 done
9757
9758 ol_cv_func_strerror_r=no
9759 if test "${ac_cv_func_strerror_r}" = yes ; then
9760         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9761 echo "configure:9762: checking non-posix strerror_r" >&5
9762 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9763   echo $ac_n "(cached) $ac_c" 1>&6
9764 else
9765   
9766         cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 #include <string.h>
9770 EOF
9771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9772   egrep "strerror_r" >/dev/null 2>&1; then
9773   rm -rf conftest*
9774   ol_decl_strerror_r=yes
9775 else
9776   rm -rf conftest*
9777   ol_decl_strerror_r=no
9778 fi
9779 rm -f conftest*
9780
9781         if test $ol_decl_strerror_r = yes ; then
9782                 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 #include <string.h>
9786 int main() {
9787    /* from autoconf 2.59 */
9788                                 char buf[100];
9789                                 char x = *strerror_r (0, buf, sizeof buf);
9790                                 char *p = strerror_r (0, buf, sizeof buf);
9791                         
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9795   rm -rf conftest*
9796   ol_cv_nonposix_strerror_r=yes
9797 else
9798   echo "configure: failed program was:" >&5
9799   cat conftest.$ac_ext >&5
9800   rm -rf conftest*
9801   ol_cv_nonposix_strerror_r=no
9802 fi
9803 rm -f conftest*
9804         else
9805                 if test "$cross_compiling" = yes; then
9806   ol_cv_nonposix_strerror=no
9807 else
9808   cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811
9812                         main() {
9813                                 char buf[100];
9814                                 buf[0] = 0;
9815                                 strerror_r( 1, buf, sizeof buf );
9816                                 exit( buf[0] == 0 );
9817                         }
9818                         
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9821 then
9822   ol_cv_nonposix_strerror_r=yes
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -fr conftest*
9827   ol_cv_nonposix_strerror=no
9828 fi
9829 rm -fr conftest*
9830 fi
9831
9832         fi
9833         
9834 fi
9835
9836 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9837 if test $ol_cv_nonposix_strerror_r = yes ; then
9838         cat >> confdefs.h <<\EOF
9839 #define HAVE_NONPOSIX_STRERROR_R 1
9840 EOF
9841
9842 fi
9843
9844 elif test "${ac_cv_func_strerror}" = no ; then
9845         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9846 echo "configure:9847: checking declaration of sys_errlist" >&5
9847 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9848   echo $ac_n "(cached) $ac_c" 1>&6
9849 else
9850   
9851         cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854
9855 #include <stdio.h>
9856 #include <sys/types.h>
9857 #include <errno.h>
9858 #ifdef WINNT
9859 #include <stdlib.h>
9860 #endif 
9861 int main() {
9862 char *c = (char *) *sys_errlist
9863 ; return 0; }
9864 EOF
9865 if { (eval echo configure:9866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9866   rm -rf conftest*
9867   ol_cv_dcl_sys_errlist=yes
9868         ol_cv_have_sys_errlist=yes
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   ol_cv_dcl_sys_errlist=no
9874 fi
9875 rm -f conftest*
9876 fi
9877
9878 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9879 #
9880 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9881 if test $ol_cv_dcl_sys_errlist = no ; then
9882         cat >> confdefs.h <<\EOF
9883 #define DECL_SYS_ERRLIST 1
9884 EOF
9885
9886
9887         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9888 echo "configure:9889: checking existence of sys_errlist" >&5
9889 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9890   echo $ac_n "(cached) $ac_c" 1>&6
9891 else
9892   
9893                 cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896 #include <errno.h>
9897 int main() {
9898 char *c = (char *) *sys_errlist
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9902   rm -rf conftest*
9903   ol_cv_have_sys_errlist=yes
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907   rm -rf conftest*
9908   ol_cv_have_sys_errlist=no
9909 fi
9910 rm -f conftest*
9911 fi
9912
9913 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9914 fi
9915 if test $ol_cv_have_sys_errlist = yes ; then
9916         cat >> confdefs.h <<\EOF
9917 #define HAVE_SYS_ERRLIST 1
9918 EOF
9919
9920 fi
9921
9922 fi
9923
9924
9925 for ac_hdr in regex.h 
9926 do
9927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9929 echo "configure:9930: checking for $ac_hdr" >&5
9930 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   cat > conftest.$ac_ext <<EOF
9934 #line 9935 "configure"
9935 #include "confdefs.h"
9936 #include <$ac_hdr>
9937 EOF
9938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9939 { (eval echo configure:9940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9941 if test -z "$ac_err"; then
9942   rm -rf conftest*
9943   eval "ac_cv_header_$ac_safe=yes"
9944 else
9945   echo "$ac_err" >&5
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_header_$ac_safe=no"
9950 fi
9951 rm -f conftest*
9952 fi
9953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9954   echo "$ac_t""yes" 1>&6
9955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9956   cat >> confdefs.h <<EOF
9957 #define $ac_tr_hdr 1
9958 EOF
9959  
9960 else
9961   echo "$ac_t""no" 1>&6
9962 fi
9963 done
9964
9965 if test "$ac_cv_header_regex_h" != yes ; then
9966         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9967 fi
9968
9969 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9970 echo "configure:9971: checking for library containing regfree" >&5
9971 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   ac_func_search_save_LIBS="$LIBS"
9975 ac_cv_search_regfree="no"
9976 cat > conftest.$ac_ext <<EOF
9977 #line 9978 "configure"
9978 #include "confdefs.h"
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 /* We use char because int might match the return type of a gcc2
9981     builtin and then its argument prototype would still apply.  */
9982 char regfree();
9983
9984 int main() {
9985 regfree()
9986 ; return 0; }
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9989   rm -rf conftest*
9990   ac_cv_search_regfree="none required"
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994 fi
9995 rm -f conftest*
9996 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9997 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9998 cat > conftest.$ac_ext <<EOF
9999 #line 10000 "configure"
10000 #include "confdefs.h"
10001 /* Override any gcc2 internal prototype to avoid an error.  */
10002 /* We use char because int might match the return type of a gcc2
10003     builtin and then its argument prototype would still apply.  */
10004 char regfree();
10005
10006 int main() {
10007 regfree()
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10011   rm -rf conftest*
10012   ac_cv_search_regfree="-l$ac_lib"
10013 break
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017 fi
10018 rm -f conftest*
10019 done
10020 LIBS="$ac_func_search_save_LIBS"
10021 fi
10022
10023 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10024 if test "$ac_cv_search_regfree" != "no"; then
10025   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10026   :
10027 else :
10028   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10029 fi
10030
10031
10032 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10033 echo "configure:10034: checking for compatible POSIX regex" >&5
10034 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10035   echo $ac_n "(cached) $ac_c" 1>&6
10036 else
10037   
10038         if test "$cross_compiling" = yes; then
10039   ol_cv_c_posix_regex=cross
10040 else
10041   cat > conftest.$ac_ext <<EOF
10042 #line 10043 "configure"
10043 #include "confdefs.h"
10044
10045 #include <sys/types.h>
10046 #include <regex.h>
10047 static char *pattern, *string;
10048 main()
10049 {
10050         int rc;
10051         regex_t re;
10052
10053         pattern = "^A";
10054
10055         if(regcomp(&re, pattern, 0)) {
10056                 return -1;
10057         }
10058         
10059         string = "ALL MATCH";
10060         
10061         rc = regexec(&re, string, 0, (void*)0, 0);
10062
10063         regfree(&re);
10064
10065         return rc;
10066 }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10069 then
10070   ol_cv_c_posix_regex=yes
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -fr conftest*
10075   ol_cv_c_posix_regex=no
10076 fi
10077 rm -fr conftest*
10078 fi
10079
10080 fi
10081
10082 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10083
10084 if test "$ol_cv_c_posix_regex" = no ; then
10085         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10086 fi
10087
10088
10089 have_uuid=no
10090 for ac_hdr in sys/uuid.h
10091 do
10092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10094 echo "configure:10095: checking for $ac_hdr" >&5
10095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10096   echo $ac_n "(cached) $ac_c" 1>&6
10097 else
10098   cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101 #include <$ac_hdr>
10102 EOF
10103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10104 { (eval echo configure:10105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10106 if test -z "$ac_err"; then
10107   rm -rf conftest*
10108   eval "ac_cv_header_$ac_safe=yes"
10109 else
10110   echo "$ac_err" >&5
10111   echo "configure: failed program was:" >&5
10112   cat conftest.$ac_ext >&5
10113   rm -rf conftest*
10114   eval "ac_cv_header_$ac_safe=no"
10115 fi
10116 rm -f conftest*
10117 fi
10118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10119   echo "$ac_t""yes" 1>&6
10120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10121   cat >> confdefs.h <<EOF
10122 #define $ac_tr_hdr 1
10123 EOF
10124  
10125 else
10126   echo "$ac_t""no" 1>&6
10127 fi
10128 done
10129
10130 if test $ac_cv_header_sys_uuid_h = yes ; then
10131         save_LIBS="$LIBS"
10132         
10133 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10134 echo "configure:10135: checking for library containing uuid_to_str" >&5
10135 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10136   echo $ac_n "(cached) $ac_c" 1>&6
10137 else
10138   ac_func_search_save_LIBS="$LIBS"
10139 ac_cv_search_uuid_to_str="no"
10140 cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143 /* Override any gcc2 internal prototype to avoid an error.  */
10144 /* We use char because int might match the return type of a gcc2
10145     builtin and then its argument prototype would still apply.  */
10146 char uuid_to_str();
10147
10148 int main() {
10149 uuid_to_str()
10150 ; return 0; }
10151 EOF
10152 if { (eval echo configure:10153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10153   rm -rf conftest*
10154   ac_cv_search_uuid_to_str="none required"
10155 else
10156   echo "configure: failed program was:" >&5
10157   cat conftest.$ac_ext >&5
10158 fi
10159 rm -f conftest*
10160 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10161 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10162 cat > conftest.$ac_ext <<EOF
10163 #line 10164 "configure"
10164 #include "confdefs.h"
10165 /* Override any gcc2 internal prototype to avoid an error.  */
10166 /* We use char because int might match the return type of a gcc2
10167     builtin and then its argument prototype would still apply.  */
10168 char uuid_to_str();
10169
10170 int main() {
10171 uuid_to_str()
10172 ; return 0; }
10173 EOF
10174 if { (eval echo configure:10175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10175   rm -rf conftest*
10176   ac_cv_search_uuid_to_str="-l$ac_lib"
10177 break
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181 fi
10182 rm -f conftest*
10183 done
10184 LIBS="$ac_func_search_save_LIBS"
10185 fi
10186
10187 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10188 if test "$ac_cv_search_uuid_to_str" != "no"; then
10189   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10190   have_uuid=yes
10191 else :
10192   :
10193 fi
10194         LIBS="$save_LIBS"
10195
10196         if test have_uuid = yes ; then
10197                 cat >> confdefs.h <<\EOF
10198 #define HAVE_UUID_TO_STR 1
10199 EOF
10200
10201
10202                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10203                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10204         fi
10205 fi
10206
10207 if test $have_uuid = no ; then
10208         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10209 echo "configure:10210: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10210         save_LIBS="$LIBS"
10211         LIBS="$LIBS -lrpcrt4"
10212         cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215
10216                 int __stdcall UuidCreate(void *);
10217                 int __stdcall UuidToStringA(void *,void **);
10218                 
10219 int main() {
10220
10221                 UuidCreate(0);
10222                 UuidToStringA(0,0);
10223                 
10224 ; return 0; }
10225 EOF
10226 if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10227   rm -rf conftest*
10228   need_rpcrt=yes
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232   rm -rf conftest*
10233   need_rpcrt=no
10234 fi
10235 rm -f conftest*
10236         if test $need_rpcrt = yes; then
10237                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10238         fi
10239         LIBS="$save_LIBS"
10240         echo "$ac_t""$need_rpcrt" 1>&6
10241 fi
10242
10243 ol_link_dnssrv=no
10244 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10245 echo "configure:10246: checking for res_query" >&5
10246 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10247   echo $ac_n "(cached) $ac_c" 1>&6
10248 else
10249   cat > conftest.$ac_ext <<EOF
10250 #line 10251 "configure"
10251 #include "confdefs.h"
10252 /* System header to define __stub macros and hopefully few prototypes,
10253     which can conflict with char res_query(); below.  */
10254 #include <assert.h>
10255 /* Override any gcc2 internal prototype to avoid an error.  */
10256 /* We use char because int might match the return type of a gcc2
10257     builtin and then its argument prototype would still apply.  */
10258 char res_query();
10259 char (*f)();
10260
10261 int main() {
10262
10263 /* The GNU C library defines this for functions which it implements
10264     to always fail with ENOSYS.  Some functions are actually named
10265     something starting with __ and the normal name is an alias.  */
10266 #if defined (__stub_res_query) || defined (__stub___res_query)
10267 choke me
10268 #else
10269 f = res_query;
10270 #endif
10271
10272 ; return 0; }
10273 EOF
10274 if { (eval echo configure:10275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10275   rm -rf conftest*
10276   eval "ac_cv_func_res_query=yes"
10277 else
10278   echo "configure: failed program was:" >&5
10279   cat conftest.$ac_ext >&5
10280   rm -rf conftest*
10281   eval "ac_cv_func_res_query=no"
10282 fi
10283 rm -f conftest*
10284 fi
10285
10286 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10287   echo "$ac_t""yes" 1>&6
10288   :
10289 else
10290   echo "$ac_t""no" 1>&6
10291 fi
10292
10293 if test $ac_cv_func_res_query = no ; then 
10294         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10295 echo "configure:10296: checking for __res_query" >&5
10296 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 /* System header to define __stub macros and hopefully few prototypes,
10303     which can conflict with char __res_query(); below.  */
10304 #include <assert.h>
10305 /* Override any gcc2 internal prototype to avoid an error.  */
10306 /* We use char because int might match the return type of a gcc2
10307     builtin and then its argument prototype would still apply.  */
10308 char __res_query();
10309 char (*f)();
10310
10311 int main() {
10312
10313 /* The GNU C library defines this for functions which it implements
10314     to always fail with ENOSYS.  Some functions are actually named
10315     something starting with __ and the normal name is an alias.  */
10316 #if defined (__stub___res_query) || defined (__stub_____res_query)
10317 choke me
10318 #else
10319 f = __res_query;
10320 #endif
10321
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   eval "ac_cv_func___res_query=yes"
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_func___res_query=no"
10332 fi
10333 rm -f conftest*
10334 fi
10335
10336 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10337   echo "$ac_t""yes" 1>&6
10338   :
10339 else
10340   echo "$ac_t""no" 1>&6
10341 fi
10342
10343         ac_cv_func_res_query=$ac_cv_func___res_query
10344 fi
10345
10346 if test $ac_cv_func_res_query = no ; then 
10347         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10348 echo "configure:10349: checking for res_query in -lbind" >&5
10349 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   ac_save_LIBS="$LIBS"
10354 LIBS="-lbind  $LIBS"
10355 cat > conftest.$ac_ext <<EOF
10356 #line 10357 "configure"
10357 #include "confdefs.h"
10358 /* Override any gcc2 internal prototype to avoid an error.  */
10359 /* We use char because int might match the return type of a gcc2
10360     builtin and then its argument prototype would still apply.  */
10361 char res_query();
10362
10363 int main() {
10364 res_query()
10365 ; return 0; }
10366 EOF
10367 if { (eval echo configure:10368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10368   rm -rf conftest*
10369   eval "ac_cv_lib_$ac_lib_var=yes"
10370 else
10371   echo "configure: failed program was:" >&5
10372   cat conftest.$ac_ext >&5
10373   rm -rf conftest*
10374   eval "ac_cv_lib_$ac_lib_var=no"
10375 fi
10376 rm -f conftest*
10377 LIBS="$ac_save_LIBS"
10378
10379 fi
10380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10381   echo "$ac_t""yes" 1>&6
10382     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10383     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10384   cat >> confdefs.h <<EOF
10385 #define $ac_tr_lib 1
10386 EOF
10387
10388   LIBS="-lbind $LIBS"
10389
10390 else
10391   echo "$ac_t""no" 1>&6
10392 fi
10393
10394         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10395 fi
10396
10397 if test $ac_cv_func_res_query = no ; then 
10398         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10399 echo "configure:10400: checking for __res_query in -lbind" >&5
10400 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   ac_save_LIBS="$LIBS"
10405 LIBS="-lbind  $LIBS"
10406 cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 /* Override any gcc2 internal prototype to avoid an error.  */
10410 /* We use char because int might match the return type of a gcc2
10411     builtin and then its argument prototype would still apply.  */
10412 char __res_query();
10413
10414 int main() {
10415 __res_query()
10416 ; return 0; }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10419   rm -rf conftest*
10420   eval "ac_cv_lib_$ac_lib_var=yes"
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   eval "ac_cv_lib_$ac_lib_var=no"
10426 fi
10427 rm -f conftest*
10428 LIBS="$ac_save_LIBS"
10429
10430 fi
10431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10432   echo "$ac_t""yes" 1>&6
10433     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10435   cat >> confdefs.h <<EOF
10436 #define $ac_tr_lib 1
10437 EOF
10438
10439   LIBS="-lbind $LIBS"
10440
10441 else
10442   echo "$ac_t""no" 1>&6
10443 fi
10444
10445         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10446 fi
10447
10448 if test $ac_cv_func_res_query = no ; then 
10449         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10450 echo "configure:10451: checking for res_query in -lresolv" >&5
10451 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10452 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10453   echo $ac_n "(cached) $ac_c" 1>&6
10454 else
10455   ac_save_LIBS="$LIBS"
10456 LIBS="-lresolv  $LIBS"
10457 cat > conftest.$ac_ext <<EOF
10458 #line 10459 "configure"
10459 #include "confdefs.h"
10460 /* Override any gcc2 internal prototype to avoid an error.  */
10461 /* We use char because int might match the return type of a gcc2
10462     builtin and then its argument prototype would still apply.  */
10463 char res_query();
10464
10465 int main() {
10466 res_query()
10467 ; return 0; }
10468 EOF
10469 if { (eval echo configure:10470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10470   rm -rf conftest*
10471   eval "ac_cv_lib_$ac_lib_var=yes"
10472 else
10473   echo "configure: failed program was:" >&5
10474   cat conftest.$ac_ext >&5
10475   rm -rf conftest*
10476   eval "ac_cv_lib_$ac_lib_var=no"
10477 fi
10478 rm -f conftest*
10479 LIBS="$ac_save_LIBS"
10480
10481 fi
10482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10485     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10486   cat >> confdefs.h <<EOF
10487 #define $ac_tr_lib 1
10488 EOF
10489
10490   LIBS="-lresolv $LIBS"
10491
10492 else
10493   echo "$ac_t""no" 1>&6
10494 fi
10495
10496         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10497 fi
10498
10499 if test $ac_cv_func_res_query = no ; then 
10500         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10501 echo "configure:10502: checking for __res_query in -lresolv" >&5
10502 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10504   echo $ac_n "(cached) $ac_c" 1>&6
10505 else
10506   ac_save_LIBS="$LIBS"
10507 LIBS="-lresolv  $LIBS"
10508 cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511 /* Override any gcc2 internal prototype to avoid an error.  */
10512 /* We use char because int might match the return type of a gcc2
10513     builtin and then its argument prototype would still apply.  */
10514 char __res_query();
10515
10516 int main() {
10517 __res_query()
10518 ; return 0; }
10519 EOF
10520 if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10521   rm -rf conftest*
10522   eval "ac_cv_lib_$ac_lib_var=yes"
10523 else
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=no"
10528 fi
10529 rm -f conftest*
10530 LIBS="$ac_save_LIBS"
10531
10532 fi
10533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10537   cat >> confdefs.h <<EOF
10538 #define $ac_tr_lib 1
10539 EOF
10540
10541   LIBS="-lresolv $LIBS"
10542
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546
10547         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10548 fi
10549
10550 if test $ac_cv_func_res_query = no ; then 
10551         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10552 echo "configure:10553: checking for _res_9_query in -lresolv" >&5
10553 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10555   echo $ac_n "(cached) $ac_c" 1>&6
10556 else
10557   ac_save_LIBS="$LIBS"
10558 LIBS="-lresolv  $LIBS"
10559 cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 /* Override any gcc2 internal prototype to avoid an error.  */
10563 /* We use char because int might match the return type of a gcc2
10564     builtin and then its argument prototype would still apply.  */
10565 char _res_9_query();
10566
10567 int main() {
10568 _res_9_query()
10569 ; return 0; }
10570 EOF
10571 if { (eval echo configure:10572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10572   rm -rf conftest*
10573   eval "ac_cv_lib_$ac_lib_var=yes"
10574 else
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   eval "ac_cv_lib_$ac_lib_var=no"
10579 fi
10580 rm -f conftest*
10581 LIBS="$ac_save_LIBS"
10582
10583 fi
10584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10587     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10588   cat >> confdefs.h <<EOF
10589 #define $ac_tr_lib 1
10590 EOF
10591
10592   LIBS="-lresolv $LIBS"
10593
10594 else
10595   echo "$ac_t""no" 1>&6
10596 fi
10597
10598         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10599 fi
10600
10601 if test "$ac_cv_func_res_query" = yes ; then
10602         cat >> confdefs.h <<\EOF
10603 #define HAVE_RES_QUERY 1
10604 EOF
10605
10606
10607         if test $ol_enable_dnssrv != no ; then
10608                 ol_link_dnssrv=yes
10609         fi
10610 fi
10611
10612 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10613         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10614 fi
10615
10616 for ac_func in hstrerror 
10617 do
10618 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10619 echo "configure:10620: checking for $ac_func" >&5
10620 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10621   echo $ac_n "(cached) $ac_c" 1>&6
10622 else
10623   cat > conftest.$ac_ext <<EOF
10624 #line 10625 "configure"
10625 #include "confdefs.h"
10626 /* System header to define __stub macros and hopefully few prototypes,
10627     which can conflict with char $ac_func(); below.  */
10628 #include <assert.h>
10629 /* Override any gcc2 internal prototype to avoid an error.  */
10630 /* We use char because int might match the return type of a gcc2
10631     builtin and then its argument prototype would still apply.  */
10632 char $ac_func();
10633 char (*f)();
10634
10635 int main() {
10636
10637 /* The GNU C library defines this for functions which it implements
10638     to always fail with ENOSYS.  Some functions are actually named
10639     something starting with __ and the normal name is an alias.  */
10640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10641 choke me
10642 #else
10643 f = $ac_func;
10644 #endif
10645
10646 ; return 0; }
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10649   rm -rf conftest*
10650   eval "ac_cv_func_$ac_func=yes"
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -rf conftest*
10655   eval "ac_cv_func_$ac_func=no"
10656 fi
10657 rm -f conftest*
10658 fi
10659
10660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10661   echo "$ac_t""yes" 1>&6
10662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10663   cat >> confdefs.h <<EOF
10664 #define $ac_tr_func 1
10665 EOF
10666  
10667 else
10668   echo "$ac_t""no" 1>&6
10669 fi
10670 done
10671
10672
10673 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10674 do
10675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10676 echo "configure:10677: checking for $ac_func" >&5
10677 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 /* System header to define __stub macros and hopefully few prototypes,
10684     which can conflict with char $ac_func(); below.  */
10685 #include <assert.h>
10686 /* Override any gcc2 internal prototype to avoid an error.  */
10687 /* We use char because int might match the return type of a gcc2
10688     builtin and then its argument prototype would still apply.  */
10689 char $ac_func();
10690 char (*f)();
10691
10692 int main() {
10693
10694 /* The GNU C library defines this for functions which it implements
10695     to always fail with ENOSYS.  Some functions are actually named
10696     something starting with __ and the normal name is an alias.  */
10697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10698 choke me
10699 #else
10700 f = $ac_func;
10701 #endif
10702
10703 ; return 0; }
10704 EOF
10705 if { (eval echo configure:10706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10706   rm -rf conftest*
10707   eval "ac_cv_func_$ac_func=yes"
10708 else
10709   echo "configure: failed program was:" >&5
10710   cat conftest.$ac_ext >&5
10711   rm -rf conftest*
10712   eval "ac_cv_func_$ac_func=no"
10713 fi
10714 rm -f conftest*
10715 fi
10716
10717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10718   echo "$ac_t""yes" 1>&6
10719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10720   cat >> confdefs.h <<EOF
10721 #define $ac_tr_func 1
10722 EOF
10723  
10724 else
10725   echo "$ac_t""no" 1>&6
10726 fi
10727 done
10728
10729
10730 ol_link_ipv6=no
10731 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10732         if test $ol_enable_ipv6 = yes ; then
10733                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10734         fi
10735 elif test $ol_enable_ipv6 != no ; then
10736         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10737 echo "configure:10738: checking INET6_ADDRSTRLEN" >&5
10738 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   
10742                 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745
10746 #                       include <netinet/in.h>
10747 #                       ifdef INET6_ADDRSTRLEN
10748                                 __has_inet6_addrstrlen__;
10749 #                       endif
10750                 
10751 EOF
10752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10753   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10754   rm -rf conftest*
10755   ol_cv_inet6_addrstrlen=yes
10756 else
10757   rm -rf conftest*
10758   ol_cv_inet6_addrstrlen=no
10759 fi
10760 rm -f conftest*
10761
10762 fi
10763
10764 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10765
10766
10767         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10768 echo "configure:10769: checking struct sockaddr_storage" >&5
10769 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10770   echo $ac_n "(cached) $ac_c" 1>&6
10771 else
10772   
10773                 cat > conftest.$ac_ext <<EOF
10774 #line 10775 "configure"
10775 #include "confdefs.h"
10776
10777 #include <sys/types.h>
10778 #include <sys/socket.h>
10779
10780 int main() {
10781
10782                         struct sockaddr_storage ss;
10783
10784 ; return 0; }
10785 EOF
10786 if { (eval echo configure:10787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10787   rm -rf conftest*
10788   ol_cv_struct_sockaddr_storage=yes
10789 else
10790   echo "configure: failed program was:" >&5
10791   cat conftest.$ac_ext >&5
10792   rm -rf conftest*
10793   ol_cv_struct_sockaddr_storage=no
10794 fi
10795 rm -f conftest*
10796 fi
10797
10798 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10799
10800         if test $ol_cv_inet6_addrstrlen = yes \
10801                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10802                 ol_link_ipv6=yes
10803         elif test $ol_enable_ipv6 = yes \
10804                         -a $ol_cv_inet6_addrstrlen = no ; then
10805                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10806         elif test $ol_enable_ipv6 = yes \
10807                         -a $ol_cv_struct_sockaddr_storage = no ; then
10808                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10809         fi
10810 fi
10811
10812 if test $ol_enable_local != no ; then
10813         for ac_hdr in sys/un.h 
10814 do
10815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10817 echo "configure:10818: checking for $ac_hdr" >&5
10818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824 #include <$ac_hdr>
10825 EOF
10826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10827 { (eval echo configure:10828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10829 if test -z "$ac_err"; then
10830   rm -rf conftest*
10831   eval "ac_cv_header_$ac_safe=yes"
10832 else
10833   echo "$ac_err" >&5
10834   echo "configure: failed program was:" >&5
10835   cat conftest.$ac_ext >&5
10836   rm -rf conftest*
10837   eval "ac_cv_header_$ac_safe=no"
10838 fi
10839 rm -f conftest*
10840 fi
10841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10842   echo "$ac_t""yes" 1>&6
10843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10844   cat >> confdefs.h <<EOF
10845 #define $ac_tr_hdr 1
10846 EOF
10847  
10848 else
10849   echo "$ac_t""no" 1>&6
10850 fi
10851 done
10852
10853
10854         if test $ol_enable_local = auto ; then
10855                 ol_enable_local=$ac_cv_header_sys_un_h
10856         elif test $ac_cv_header_sys_un_h = no ; then
10857                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10858         fi
10859 fi
10860
10861 ol_link_kbind=no
10862 ol_link_krb5=no
10863 ol_link_krb4=no
10864
10865 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10866         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10867         -o $ol_with_kerberos = k425 ; then
10868
10869         for ac_hdr in krb5.h
10870 do
10871 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10872 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10873 echo "configure:10874: checking for $ac_hdr" >&5
10874 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 #include <$ac_hdr>
10881 EOF
10882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10883 { (eval echo configure:10884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10885 if test -z "$ac_err"; then
10886   rm -rf conftest*
10887   eval "ac_cv_header_$ac_safe=yes"
10888 else
10889   echo "$ac_err" >&5
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_header_$ac_safe=no"
10894 fi
10895 rm -f conftest*
10896 fi
10897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10900   cat >> confdefs.h <<EOF
10901 #define $ac_tr_hdr 1
10902 EOF
10903  
10904 else
10905   echo "$ac_t""no" 1>&6
10906 fi
10907 done
10908
10909
10910         if test $ac_cv_header_krb5_h = yes ; then
10911                                 for ac_hdr in heim_err.h
10912 do
10913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10915 echo "configure:10916: checking for $ac_hdr" >&5
10916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10917   echo $ac_n "(cached) $ac_c" 1>&6
10918 else
10919   cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 #include <$ac_hdr>
10923 EOF
10924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10925 { (eval echo configure:10926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10927 if test -z "$ac_err"; then
10928   rm -rf conftest*
10929   eval "ac_cv_header_$ac_safe=yes"
10930 else
10931   echo "$ac_err" >&5
10932   echo "configure: failed program was:" >&5
10933   cat conftest.$ac_ext >&5
10934   rm -rf conftest*
10935   eval "ac_cv_header_$ac_safe=no"
10936 fi
10937 rm -f conftest*
10938 fi
10939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10940   echo "$ac_t""yes" 1>&6
10941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10942   cat >> confdefs.h <<EOF
10943 #define $ac_tr_hdr 1
10944 EOF
10945  
10946 else
10947   echo "$ac_t""no" 1>&6
10948 fi
10949 done
10950
10951                 if test $ac_cv_header_heim_err_h = yes ; then
10952                         krb5_impl=heimdal
10953                 else
10954                         krb5_impl=mit
10955                 fi
10956
10957                 if test $krb5_impl = mit; then
10958                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10959 echo "configure:10960: checking for main in -lk5crypto" >&5
10960 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10962   echo $ac_n "(cached) $ac_c" 1>&6
10963 else
10964   ac_save_LIBS="$LIBS"
10965 LIBS="-lk5crypto  $LIBS"
10966 cat > conftest.$ac_ext <<EOF
10967 #line 10968 "configure"
10968 #include "confdefs.h"
10969
10970 int main() {
10971 main()
10972 ; return 0; }
10973 EOF
10974 if { (eval echo configure:10975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=yes"
10977 else
10978   echo "configure: failed program was:" >&5
10979   cat conftest.$ac_ext >&5
10980   rm -rf conftest*
10981   eval "ac_cv_lib_$ac_lib_var=no"
10982 fi
10983 rm -f conftest*
10984 LIBS="$ac_save_LIBS"
10985
10986 fi
10987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10988   echo "$ac_t""yes" 1>&6
10989   krb5crypto=k5crypto
10990 else
10991   echo "$ac_t""no" 1>&6
10992 krb5crypto=crypto
10993 fi
10994
10995
10996                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10997 echo "configure:10998: checking for main in -lkrb5" >&5
10998 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11000   echo $ac_n "(cached) $ac_c" 1>&6
11001 else
11002   ac_save_LIBS="$LIBS"
11003 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
11004 cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007
11008 int main() {
11009 main()
11010 ; return 0; }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=yes"
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   eval "ac_cv_lib_$ac_lib_var=no"
11020 fi
11021 rm -f conftest*
11022 LIBS="$ac_save_LIBS"
11023
11024 fi
11025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027   have_krb5=yes
11028                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
11029 else
11030   echo "$ac_t""no" 1>&6
11031 have_krb5=no
11032 fi
11033
11034
11035                 elif test $krb5_impl = heimdal; then
11036                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11037 echo "configure:11038: checking for main in -ldes" >&5
11038 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11040   echo $ac_n "(cached) $ac_c" 1>&6
11041 else
11042   ac_save_LIBS="$LIBS"
11043 LIBS="-ldes  $LIBS"
11044 cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047
11048 int main() {
11049 main()
11050 ; return 0; }
11051 EOF
11052 if { (eval echo configure:11053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11053   rm -rf conftest*
11054   eval "ac_cv_lib_$ac_lib_var=yes"
11055 else
11056   echo "configure: failed program was:" >&5
11057   cat conftest.$ac_ext >&5
11058   rm -rf conftest*
11059   eval "ac_cv_lib_$ac_lib_var=no"
11060 fi
11061 rm -f conftest*
11062 LIBS="$ac_save_LIBS"
11063
11064 fi
11065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11066   echo "$ac_t""yes" 1>&6
11067   krb5crypto=des
11068 else
11069   echo "$ac_t""no" 1>&6
11070 krb5crypto=crypto
11071 fi
11072
11073
11074                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11075 echo "configure:11076: checking for main in -lkrb5" >&5
11076 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   ac_save_LIBS="$LIBS"
11081 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11082 cat > conftest.$ac_ext <<EOF
11083 #line 11084 "configure"
11084 #include "confdefs.h"
11085
11086 int main() {
11087 main()
11088 ; return 0; }
11089 EOF
11090 if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11091   rm -rf conftest*
11092   eval "ac_cv_lib_$ac_lib_var=yes"
11093 else
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=no"
11098 fi
11099 rm -f conftest*
11100 LIBS="$ac_save_LIBS"
11101
11102 fi
11103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11104   echo "$ac_t""yes" 1>&6
11105   have_krb5=yes
11106                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11107 else
11108   echo "$ac_t""no" 1>&6
11109 have_krb5=no
11110 fi
11111
11112
11113                         cat >> confdefs.h <<\EOF
11114 #define HAVE_HEIMDAL_KERBEROS 1
11115 EOF
11116
11117
11118                 else
11119                         have_krb5=no
11120                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11121                 fi
11122
11123                 if test $have_krb5 = yes ; then
11124                         ol_link_krb5=yes
11125
11126                         cat >> confdefs.h <<\EOF
11127 #define HAVE_KRB5 1
11128 EOF
11129
11130
11131                         if test $ol_with_kerberos = k5only ; then
11132                                 ol_with_kerberos=found
11133                         fi
11134
11135                 elif test $ol_with_kerberos != auto ; then
11136                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11137                 fi
11138
11139         fi
11140 fi
11141
11142 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11143         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11144
11145         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11146 do
11147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11149 echo "configure:11150: checking for $ac_hdr" >&5
11150 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   cat > conftest.$ac_ext <<EOF
11154 #line 11155 "configure"
11155 #include "confdefs.h"
11156 #include <$ac_hdr>
11157 EOF
11158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11159 { (eval echo configure:11160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11161 if test -z "$ac_err"; then
11162   rm -rf conftest*
11163   eval "ac_cv_header_$ac_safe=yes"
11164 else
11165   echo "$ac_err" >&5
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -rf conftest*
11169   eval "ac_cv_header_$ac_safe=no"
11170 fi
11171 rm -f conftest*
11172 fi
11173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11174   echo "$ac_t""yes" 1>&6
11175     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11176   cat >> confdefs.h <<EOF
11177 #define $ac_tr_hdr 1
11178 EOF
11179  
11180 else
11181   echo "$ac_t""no" 1>&6
11182 fi
11183 done
11184
11185
11186         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11187                 if test $krb5_impl = mit; then
11188                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11189 echo "configure:11190: checking for main in -lkrb4" >&5
11190 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11192   echo $ac_n "(cached) $ac_c" 1>&6
11193 else
11194   ac_save_LIBS="$LIBS"
11195 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11196 cat > conftest.$ac_ext <<EOF
11197 #line 11198 "configure"
11198 #include "confdefs.h"
11199
11200 int main() {
11201 main()
11202 ; return 0; }
11203 EOF
11204 if { (eval echo configure:11205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11205   rm -rf conftest*
11206   eval "ac_cv_lib_$ac_lib_var=yes"
11207 else
11208   echo "configure: failed program was:" >&5
11209   cat conftest.$ac_ext >&5
11210   rm -rf conftest*
11211   eval "ac_cv_lib_$ac_lib_var=no"
11212 fi
11213 rm -f conftest*
11214 LIBS="$ac_save_LIBS"
11215
11216 fi
11217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11218   echo "$ac_t""yes" 1>&6
11219   have_k425=yes
11220                                 KRB4_LIBS="-lkrb4 -ldes425"
11221 else
11222   echo "$ac_t""no" 1>&6
11223 have_k425=no
11224 fi
11225
11226
11227                 elif test $krb5_impl = heimdal; then
11228                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11229 echo "configure:11230: checking for main in -lkrb4" >&5
11230 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11232   echo $ac_n "(cached) $ac_c" 1>&6
11233 else
11234   ac_save_LIBS="$LIBS"
11235 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11236 cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239
11240 int main() {
11241 main()
11242 ; return 0; }
11243 EOF
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11245   rm -rf conftest*
11246   eval "ac_cv_lib_$ac_lib_var=yes"
11247 else
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -rf conftest*
11251   eval "ac_cv_lib_$ac_lib_var=no"
11252 fi
11253 rm -f conftest*
11254 LIBS="$ac_save_LIBS"
11255
11256 fi
11257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11258   echo "$ac_t""yes" 1>&6
11259   have_k425=yes
11260                                 KRB4_LIBS="-lkrb4"
11261 else
11262   echo "$ac_t""no" 1>&6
11263 have_k425=no
11264 fi
11265
11266
11267                 else
11268                         have_425=no
11269                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11270                 fi
11271
11272                 if test $have_k425 = yes ; then
11273                         ol_with_kerberos=found
11274                         ol_link_krb4=yes
11275
11276                         cat >> confdefs.h <<\EOF
11277 #define HAVE_KRB425 1
11278 EOF
11279
11280                         cat >> confdefs.h <<\EOF
11281 #define HAVE_KRB4 1
11282 EOF
11283
11284
11285                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11286 echo "configure:11287: checking for des_debug in Kerberos libraries" >&5
11287 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   
11291                                                                 save_LIBS="$LIBS"
11292                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11293                                 cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296
11297 #include <kerberosIV/krb.h>
11298 #include <kerberosIV/des.h>
11299 extern int des_debug;
11300
11301 int main() {
11302
11303 des_debug = 1;
11304
11305 ; return 0; }
11306 EOF
11307 if { (eval echo configure:11308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11308   rm -rf conftest*
11309   ol_cv_var_des_debug=yes
11310 else
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -rf conftest*
11314   ol_cv_var_des_debug=no
11315 fi
11316 rm -f conftest*
11317                                                                 LIBS="$save_LIBS"
11318                         
11319 fi
11320
11321 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11322
11323                         if test $ol_cv_var_des_debug = yes ; then
11324                                 cat >> confdefs.h <<\EOF
11325 #define HAVE_DES_DEBUG 1
11326 EOF
11327
11328                         fi
11329
11330                         LIBS="$save_LIBS"
11331                 fi
11332         fi
11333 fi
11334
11335 if test $ol_link_krb5 = yes ; then
11336         ol_with_kerberos=found
11337 fi
11338
11339 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11340         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11341
11342         for ac_hdr in krb.h des.h krb-archaeology.h 
11343 do
11344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11346 echo "configure:11347: checking for $ac_hdr" >&5
11347 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11348   echo $ac_n "(cached) $ac_c" 1>&6
11349 else
11350   cat > conftest.$ac_ext <<EOF
11351 #line 11352 "configure"
11352 #include "confdefs.h"
11353 #include <$ac_hdr>
11354 EOF
11355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11356 { (eval echo configure:11357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11358 if test -z "$ac_err"; then
11359   rm -rf conftest*
11360   eval "ac_cv_header_$ac_safe=yes"
11361 else
11362   echo "$ac_err" >&5
11363   echo "configure: failed program was:" >&5
11364   cat conftest.$ac_ext >&5
11365   rm -rf conftest*
11366   eval "ac_cv_header_$ac_safe=no"
11367 fi
11368 rm -f conftest*
11369 fi
11370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11371   echo "$ac_t""yes" 1>&6
11372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11373   cat >> confdefs.h <<EOF
11374 #define $ac_tr_hdr 1
11375 EOF
11376  
11377 else
11378   echo "$ac_t""no" 1>&6
11379 fi
11380 done
11381
11382
11383         if test $ac_cv_header_krb_h = yes ; then
11384                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11385 echo "configure:11386: checking for main in -lkrb" >&5
11386 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11387 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11388   echo $ac_n "(cached) $ac_c" 1>&6
11389 else
11390   ac_save_LIBS="$LIBS"
11391 LIBS="-lkrb -ldes $LIBS"
11392 cat > conftest.$ac_ext <<EOF
11393 #line 11394 "configure"
11394 #include "confdefs.h"
11395
11396 int main() {
11397 main()
11398 ; return 0; }
11399 EOF
11400 if { (eval echo configure:11401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11401   rm -rf conftest*
11402   eval "ac_cv_lib_$ac_lib_var=yes"
11403 else
11404   echo "configure: failed program was:" >&5
11405   cat conftest.$ac_ext >&5
11406   rm -rf conftest*
11407   eval "ac_cv_lib_$ac_lib_var=no"
11408 fi
11409 rm -f conftest*
11410 LIBS="$ac_save_LIBS"
11411
11412 fi
11413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11414   echo "$ac_t""yes" 1>&6
11415   have_k4=yes
11416 else
11417   echo "$ac_t""no" 1>&6
11418 have_k4=no
11419 fi
11420
11421
11422                 if test $have_k4 = yes ; then
11423                         ol_with_kerberos=found
11424                         ol_link_krb4=yes
11425
11426                         cat >> confdefs.h <<\EOF
11427 #define HAVE_KRB4 1
11428 EOF
11429
11430
11431                         KRB4_LIBS="-lkrb -ldes"
11432
11433                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11434                                 cat >> confdefs.h <<\EOF
11435 #define HAVE_KTH_KERBEROS 1
11436 EOF
11437
11438                         fi
11439                 fi
11440         fi
11441 fi
11442
11443 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11444         ol_link_kbind=yes
11445
11446 elif test $ol_enable_kbind = yes ; then
11447         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11448 fi
11449
11450 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11451         cat >> confdefs.h <<\EOF
11452 #define HAVE_KERBEROS 1
11453 EOF
11454
11455
11456 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11457         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11458 fi
11459
11460         
11461 ol_link_tls=no
11462 if test $ol_with_tls != no ; then
11463         for ac_hdr in openssl/ssl.h ssl.h
11464 do
11465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11467 echo "configure:11468: checking for $ac_hdr" >&5
11468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <$ac_hdr>
11475 EOF
11476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11477 { (eval echo configure:11478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11479 if test -z "$ac_err"; then
11480   rm -rf conftest*
11481   eval "ac_cv_header_$ac_safe=yes"
11482 else
11483   echo "$ac_err" >&5
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   eval "ac_cv_header_$ac_safe=no"
11488 fi
11489 rm -f conftest*
11490 fi
11491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11492   echo "$ac_t""yes" 1>&6
11493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11494   cat >> confdefs.h <<EOF
11495 #define $ac_tr_hdr 1
11496 EOF
11497  
11498 else
11499   echo "$ac_t""no" 1>&6
11500 fi
11501 done
11502
11503
11504         if test $ac_cv_header_openssl_ssl_h = yes \
11505                 -o $ac_cv_header_ssl_h = yes ; then
11506                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11507 echo "configure:11508: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11508 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11510   echo $ac_n "(cached) $ac_c" 1>&6
11511 else
11512   ac_save_LIBS="$LIBS"
11513 LIBS="-lssl -lcrypto $LIBS"
11514 cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517 /* Override any gcc2 internal prototype to avoid an error.  */
11518 /* We use char because int might match the return type of a gcc2
11519     builtin and then its argument prototype would still apply.  */
11520 char SSLeay_add_ssl_algorithms();
11521
11522 int main() {
11523 SSLeay_add_ssl_algorithms()
11524 ; return 0; }
11525 EOF
11526 if { (eval echo configure:11527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11527   rm -rf conftest*
11528   eval "ac_cv_lib_$ac_lib_var=yes"
11529 else
11530   echo "configure: failed program was:" >&5
11531   cat conftest.$ac_ext >&5
11532   rm -rf conftest*
11533   eval "ac_cv_lib_$ac_lib_var=no"
11534 fi
11535 rm -f conftest*
11536 LIBS="$ac_save_LIBS"
11537
11538 fi
11539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11540   echo "$ac_t""yes" 1>&6
11541   have_ssleay=yes
11542                         need_rsaref=no
11543 else
11544   echo "$ac_t""no" 1>&6
11545 have_ssleay=no
11546 fi
11547
11548                         
11549                 if test $have_ssleay = no ; then
11550                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11551 echo "configure:11552: checking for SSL_library_init in -lssl" >&5
11552 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11554   echo $ac_n "(cached) $ac_c" 1>&6
11555 else
11556   ac_save_LIBS="$LIBS"
11557 LIBS="-lssl -lcrypto $LIBS"
11558 cat > conftest.$ac_ext <<EOF
11559 #line 11560 "configure"
11560 #include "confdefs.h"
11561 /* Override any gcc2 internal prototype to avoid an error.  */
11562 /* We use char because int might match the return type of a gcc2
11563     builtin and then its argument prototype would still apply.  */
11564 char SSL_library_init();
11565
11566 int main() {
11567 SSL_library_init()
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11571   rm -rf conftest*
11572   eval "ac_cv_lib_$ac_lib_var=yes"
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   eval "ac_cv_lib_$ac_lib_var=no"
11578 fi
11579 rm -f conftest*
11580 LIBS="$ac_save_LIBS"
11581
11582 fi
11583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585   have_ssleay=yes
11586                                 need_rsaref=no
11587 else
11588   echo "$ac_t""no" 1>&6
11589 have_ssleay=no
11590 fi
11591
11592                 fi
11593
11594                 if test $have_ssleay = no ; then
11595                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11596 echo "configure:11597: checking for ssl3_accept in -lssl" >&5
11597 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11598 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11599   echo $ac_n "(cached) $ac_c" 1>&6
11600 else
11601   ac_save_LIBS="$LIBS"
11602 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11603 cat > conftest.$ac_ext <<EOF
11604 #line 11605 "configure"
11605 #include "confdefs.h"
11606 /* Override any gcc2 internal prototype to avoid an error.  */
11607 /* We use char because int might match the return type of a gcc2
11608     builtin and then its argument prototype would still apply.  */
11609 char ssl3_accept();
11610
11611 int main() {
11612 ssl3_accept()
11613 ; return 0; }
11614 EOF
11615 if { (eval echo configure:11616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=yes"
11618 else
11619   echo "configure: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   rm -rf conftest*
11622   eval "ac_cv_lib_$ac_lib_var=no"
11623 fi
11624 rm -f conftest*
11625 LIBS="$ac_save_LIBS"
11626
11627 fi
11628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11629   echo "$ac_t""yes" 1>&6
11630   have_ssleay=yes
11631                                 need_rsaref=yes
11632 else
11633   echo "$ac_t""no" 1>&6
11634 have_ssleay=no
11635 fi
11636
11637                 fi
11638
11639                 if test $have_ssleay = yes ; then
11640                         ol_with_tls=found
11641                         ol_link_tls=yes
11642
11643                         cat >> confdefs.h <<\EOF
11644 #define HAVE_SSLEAY 1
11645 EOF
11646
11647
11648                         if test $need_rsaref = yes; then
11649                                 cat >> confdefs.h <<\EOF
11650 #define HAVE_RSAREF 1
11651 EOF
11652
11653
11654                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11655                         else
11656                                 TLS_LIBS="-lssl -lcrypto"
11657                         fi
11658                 fi
11659                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11660 echo "configure:11661: checking OpenSSL library version (CRL checking capability)" >&5
11661 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11662   echo $ac_n "(cached) $ac_c" 1>&6
11663 else
11664   
11665         cat > conftest.$ac_ext <<EOF
11666 #line 11667 "configure"
11667 #include "confdefs.h"
11668
11669 #ifdef HAVE_OPENSSL_SSL_H
11670 #include <openssl/ssl.h>
11671 #else
11672 #include <ssl.h>
11673 #endif
11674
11675 /* Require 0.9.7d+ */
11676 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11677         char *__ssl_compat = "0.9.7d";
11678 #endif
11679         
11680 EOF
11681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11682   egrep "__ssl_compat" >/dev/null 2>&1; then
11683   rm -rf conftest*
11684   ol_cv_ssl_crl_compat=yes
11685 else
11686   rm -rf conftest*
11687   ol_cv_ssl_crl_compat=no
11688 fi
11689 rm -f conftest*
11690
11691 fi
11692
11693 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11694
11695                 if test $ol_cv_ssl_crl_compat = no ; then
11696                         ol_link_ssl=no
11697                 else 
11698                         cat >> confdefs.h <<\EOF
11699 #define HAVE_OPENSSL_CRL 1
11700 EOF
11701
11702                 fi
11703         fi
11704
11705 else
11706         echo "configure: warning: TLS data protection not supported!" 1>&2
11707 fi
11708
11709 WITH_TLS=no
11710 if test $ol_link_tls = yes ; then
11711         cat >> confdefs.h <<\EOF
11712 #define HAVE_TLS 1
11713 EOF
11714
11715         WITH_TLS=yes
11716
11717 elif test $ol_with_tls = auto ; then
11718         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11719         echo "configure: warning: TLS data protection not supported!" 1>&2
11720
11721 elif test $ol_with_tls != no ; then
11722         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11723 fi
11724
11725 if test $ol_enable_lmpasswd != no; then
11726         if test $ol_link_tls != yes ; then
11727                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11728         fi
11729
11730         cat >> confdefs.h <<\EOF
11731 #define SLAPD_LMHASH 1
11732 EOF
11733
11734 fi
11735
11736 ol_link_threads=no
11737
11738 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11739         -o $ol_with_threads = nt ; then
11740
11741         
11742         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11743 echo "configure:11744: checking for _beginthread" >&5
11744 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11745   echo $ac_n "(cached) $ac_c" 1>&6
11746 else
11747   cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750 /* System header to define __stub macros and hopefully few prototypes,
11751     which can conflict with char _beginthread(); below.  */
11752 #include <assert.h>
11753 /* Override any gcc2 internal prototype to avoid an error.  */
11754 /* We use char because int might match the return type of a gcc2
11755     builtin and then its argument prototype would still apply.  */
11756 char _beginthread();
11757 char (*f)();
11758
11759 int main() {
11760
11761 /* The GNU C library defines this for functions which it implements
11762     to always fail with ENOSYS.  Some functions are actually named
11763     something starting with __ and the normal name is an alias.  */
11764 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11765 choke me
11766 #else
11767 f = _beginthread;
11768 #endif
11769
11770 ; return 0; }
11771 EOF
11772 if { (eval echo configure:11773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11773   rm -rf conftest*
11774   eval "ac_cv_func__beginthread=yes"
11775 else
11776   echo "configure: failed program was:" >&5
11777   cat conftest.$ac_ext >&5
11778   rm -rf conftest*
11779   eval "ac_cv_func__beginthread=no"
11780 fi
11781 rm -f conftest*
11782 fi
11783
11784 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11785   echo "$ac_t""yes" 1>&6
11786   :
11787 else
11788   echo "$ac_t""no" 1>&6
11789 fi
11790
11791
11792         if test $ac_cv_func__beginthread = yes ; then
11793                 cat >> confdefs.h <<\EOF
11794 #define HAVE_NT_THREADS 1
11795 EOF
11796
11797                 ol_cv_nt_threads=yes
11798         fi
11799
11800
11801         if test "$ol_cv_nt_threads" = yes ; then
11802                 ol_link_threads=nt
11803                 ol_with_threads=found
11804                 ol_with_yielding_select=yes
11805
11806                 cat >> confdefs.h <<\EOF
11807 #define HAVE_NT_SERVICE_MANAGER 1
11808 EOF
11809
11810                 cat >> confdefs.h <<\EOF
11811 #define HAVE_NT_EVENT_LOG 1
11812 EOF
11813
11814         fi
11815
11816         if test $ol_with_threads = nt ; then
11817                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11818         fi
11819 fi
11820
11821 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11822         -o $ol_with_threads = posix ; then
11823
11824         for ac_hdr in pthread.h
11825 do
11826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11828 echo "configure:11829: checking for $ac_hdr" >&5
11829 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11830   echo $ac_n "(cached) $ac_c" 1>&6
11831 else
11832   cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835 #include <$ac_hdr>
11836 EOF
11837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11838 { (eval echo configure:11839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11840 if test -z "$ac_err"; then
11841   rm -rf conftest*
11842   eval "ac_cv_header_$ac_safe=yes"
11843 else
11844   echo "$ac_err" >&5
11845   echo "configure: failed program was:" >&5
11846   cat conftest.$ac_ext >&5
11847   rm -rf conftest*
11848   eval "ac_cv_header_$ac_safe=no"
11849 fi
11850 rm -f conftest*
11851 fi
11852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11853   echo "$ac_t""yes" 1>&6
11854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11855   cat >> confdefs.h <<EOF
11856 #define $ac_tr_hdr 1
11857 EOF
11858  
11859 else
11860   echo "$ac_t""no" 1>&6
11861 fi
11862 done
11863
11864
11865         if test $ac_cv_header_pthread_h = yes ; then
11866                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11867 echo "configure:11868: checking POSIX thread version" >&5
11868 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11869   echo $ac_n "(cached) $ac_c" 1>&6
11870 else
11871   
11872         cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875
11876 #               include <pthread.h>
11877         
11878 int main() {
11879
11880                 int i = PTHREAD_CREATE_JOINABLE;
11881         
11882 ; return 0; }
11883 EOF
11884 if { (eval echo configure:11885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11885   rm -rf conftest*
11886   
11887         cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890 #include <pthread.h>
11891 EOF
11892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11893   egrep "pthread_detach" >/dev/null 2>&1; then
11894   rm -rf conftest*
11895   ol_cv_pthread_version=10
11896 else
11897   rm -rf conftest*
11898   ol_cv_pthread_version=8
11899 fi
11900 rm -f conftest*
11901
11902 else
11903   echo "configure: failed program was:" >&5
11904   cat conftest.$ac_ext >&5
11905   rm -rf conftest*
11906   
11907         cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910
11911 #               include <pthread.h>
11912 #               ifdef PTHREAD_CREATE_UNDETACHED
11913                 draft7
11914 #               endif
11915         
11916 EOF
11917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11918   egrep "draft7" >/dev/null 2>&1; then
11919   rm -rf conftest*
11920   ol_cv_pthread_version=7
11921 else
11922   rm -rf conftest*
11923   
11924         cat > conftest.$ac_ext <<EOF
11925 #line 11926 "configure"
11926 #include "confdefs.h"
11927 #include <pthread.h>
11928 EOF
11929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11930   egrep "pthread_attr_init" >/dev/null 2>&1; then
11931   rm -rf conftest*
11932   ol_cv_pthread_version=6
11933 else
11934   rm -rf conftest*
11935   
11936         cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939
11940 #               include <pthread.h>
11941 #ifdef          PTHREAD_MUTEX_INITIALIZER
11942                 draft5
11943 #endif
11944         
11945 EOF
11946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11947   egrep "draft5" >/dev/null 2>&1; then
11948   rm -rf conftest*
11949   ol_cv_pthread_version=5
11950 else
11951   rm -rf conftest*
11952   ol_cv_pthread_version=4
11953 fi
11954 rm -f conftest*
11955  
11956 fi
11957 rm -f conftest*
11958  
11959 fi
11960 rm -f conftest*
11961  
11962 fi
11963 rm -f conftest*
11964
11965 fi
11966
11967 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11968
11969
11970                 if test $ol_cv_pthread_version != 0 ; then
11971                         cat >> confdefs.h <<EOF
11972 #define HAVE_PTHREADS $ol_cv_pthread_version
11973 EOF
11974
11975                 else
11976                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11977                 fi
11978
11979                 # consider threads found
11980                 ol_with_threads=found
11981
11982                 
11983         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11984 echo "configure:11985: checking for LinuxThreads pthread.h" >&5
11985 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11986   echo $ac_n "(cached) $ac_c" 1>&6
11987 else
11988   cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 #include <pthread.h>
11992 EOF
11993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11994   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11995   rm -rf conftest*
11996   ol_cv_header_linux_threads=yes
11997 else
11998   rm -rf conftest*
11999   ol_cv_header_linux_threads=no
12000 fi
12001 rm -f conftest*
12002
12003                 
12004 fi
12005
12006 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12007         if test $ol_cv_header_linux_threads = yes; then
12008                 cat >> confdefs.h <<\EOF
12009 #define HAVE_LINUX_THREADS 1
12010 EOF
12011
12012         fi
12013
12014                 
12015         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
12016 echo "configure:12017: checking for GNU Pth pthread.h" >&5
12017 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
12018   echo $ac_n "(cached) $ac_c" 1>&6
12019 else
12020   cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023 #include <pthread.h>
12024 #ifdef _POSIX_THREAD_IS_GNU_PTH
12025         __gnu_pth__;
12026 #endif
12027
12028 EOF
12029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12030   egrep "__gnu_pth__" >/dev/null 2>&1; then
12031   rm -rf conftest*
12032   ol_cv_header_gnu_pth_pthread_h=yes
12033 else
12034   rm -rf conftest*
12035   ol_cv_header_gnu_pth_pthread_h=no
12036 fi
12037 rm -f conftest*
12038
12039                 
12040 fi
12041
12042 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12043
12044
12045                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12046                         for ac_hdr in sched.h
12047 do
12048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12050 echo "configure:12051: checking for $ac_hdr" >&5
12051 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057 #include <$ac_hdr>
12058 EOF
12059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12060 { (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12062 if test -z "$ac_err"; then
12063   rm -rf conftest*
12064   eval "ac_cv_header_$ac_safe=yes"
12065 else
12066   echo "$ac_err" >&5
12067   echo "configure: failed program was:" >&5
12068   cat conftest.$ac_ext >&5
12069   rm -rf conftest*
12070   eval "ac_cv_header_$ac_safe=no"
12071 fi
12072 rm -f conftest*
12073 fi
12074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12075   echo "$ac_t""yes" 1>&6
12076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12077   cat >> confdefs.h <<EOF
12078 #define $ac_tr_hdr 1
12079 EOF
12080  
12081 else
12082   echo "$ac_t""no" 1>&6
12083 fi
12084 done
12085
12086                 fi
12087
12088                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12089                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12090 echo "configure:12091: checking for pthread_create in default libraries" >&5
12091 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12092   echo $ac_n "(cached) $ac_c" 1>&6
12093 else
12094   
12095                 if test "$cross_compiling" = yes; then
12096   cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099 /* pthread test headers */
12100 #include <pthread.h>
12101 #if HAVE_PTHREADS < 7
12102 #include <errno.h>
12103 #endif
12104 #ifndef NULL
12105 #define NULL (void*)0
12106 #endif
12107
12108 static void *task(p)
12109         void *p;
12110 {
12111         return (void *) (p == NULL);
12112 }
12113
12114 int main() {
12115
12116         /* pthread test function */
12117 #ifndef PTHREAD_CREATE_DETACHED
12118 #define PTHREAD_CREATE_DETACHED 1
12119 #endif
12120         pthread_t t;
12121         int status;
12122         int detach = PTHREAD_CREATE_DETACHED;
12123
12124 #if HAVE_PTHREADS > 4
12125         /* Final pthreads */
12126         pthread_attr_t attr;
12127
12128         status = pthread_attr_init(&attr);
12129         if( status ) return status;
12130
12131 #if HAVE_PTHREADS < 7
12132         status = pthread_attr_setdetachstate(&attr, &detach);
12133         if( status < 0 ) status = errno;
12134 #else
12135         status = pthread_attr_setdetachstate(&attr, detach);
12136 #endif
12137         if( status ) return status;
12138         status = pthread_create( &t, &attr, task, NULL );
12139 #if HAVE_PTHREADS < 7
12140         if( status < 0 ) status = errno;
12141 #endif
12142         if( status ) return status;
12143 #else
12144         /* Draft 4 pthreads */
12145         status = pthread_create( &t, pthread_attr_default, task, NULL );
12146         if( status ) return errno;
12147
12148         /* give thread a chance to complete */
12149         /* it should remain joinable and hence detachable */
12150         sleep( 1 );
12151
12152         status = pthread_detach( &t );
12153         if( status ) return errno;
12154 #endif
12155
12156 #ifdef HAVE_LINUX_THREADS
12157         pthread_kill_other_threads_np();
12158 #endif
12159
12160         return 0;
12161
12162 ; return 0; }
12163 EOF
12164 if { (eval echo configure:12165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12165   rm -rf conftest*
12166   ol_cv_pthread_create=yes
12167 else
12168   echo "configure: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   rm -rf conftest*
12171   ol_cv_pthread_create=no
12172 fi
12173 rm -f conftest*
12174 else
12175   cat > conftest.$ac_ext <<EOF
12176 #line 12177 "configure"
12177 #include "confdefs.h"
12178 /* pthread test headers */
12179 #include <pthread.h>
12180 #if HAVE_PTHREADS < 7
12181 #include <errno.h>
12182 #endif
12183 #ifndef NULL
12184 #define NULL (void*)0
12185 #endif
12186
12187 static void *task(p)
12188         void *p;
12189 {
12190         return (void *) (p == NULL);
12191 }
12192
12193
12194 int main(argc, argv)
12195         int argc;
12196         char **argv;
12197 {
12198
12199         /* pthread test function */
12200 #ifndef PTHREAD_CREATE_DETACHED
12201 #define PTHREAD_CREATE_DETACHED 1
12202 #endif
12203         pthread_t t;
12204         int status;
12205         int detach = PTHREAD_CREATE_DETACHED;
12206
12207 #if HAVE_PTHREADS > 4
12208         /* Final pthreads */
12209         pthread_attr_t attr;
12210
12211         status = pthread_attr_init(&attr);
12212         if( status ) return status;
12213
12214 #if HAVE_PTHREADS < 7
12215         status = pthread_attr_setdetachstate(&attr, &detach);
12216         if( status < 0 ) status = errno;
12217 #else
12218         status = pthread_attr_setdetachstate(&attr, detach);
12219 #endif
12220         if( status ) return status;
12221         status = pthread_create( &t, &attr, task, NULL );
12222 #if HAVE_PTHREADS < 7
12223         if( status < 0 ) status = errno;
12224 #endif
12225         if( status ) return status;
12226 #else
12227         /* Draft 4 pthreads */
12228         status = pthread_create( &t, pthread_attr_default, task, NULL );
12229         if( status ) return errno;
12230
12231         /* give thread a chance to complete */
12232         /* it should remain joinable and hence detachable */
12233         sleep( 1 );
12234
12235         status = pthread_detach( &t );
12236         if( status ) return errno;
12237 #endif
12238
12239 #ifdef HAVE_LINUX_THREADS
12240         pthread_kill_other_threads_np();
12241 #endif
12242
12243         return 0;
12244
12245 }
12246
12247 EOF
12248 if { (eval echo configure:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12249 then
12250   ol_cv_pthread_create=yes
12251 else
12252   echo "configure: failed program was:" >&5
12253   cat conftest.$ac_ext >&5
12254   rm -fr conftest*
12255   ol_cv_pthread_create=no
12256 fi
12257 rm -fr conftest*
12258 fi
12259
12260 fi
12261
12262 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12263
12264                 if test $ol_cv_pthread_create != no ; then
12265                         ol_link_threads=posix
12266                         ol_link_pthreads=""
12267                 fi
12268                 
12269                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12270 if test "$ol_link_threads" = no ; then
12271         # try -kthread
12272         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12273 echo "configure:12274: checking for pthread link with -kthread" >&5
12274 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12275   echo $ac_n "(cached) $ac_c" 1>&6
12276 else
12277   
12278                 # save the flags
12279                 ol_LIBS="$LIBS"
12280                 LIBS="-kthread $LIBS"
12281
12282                 if test "$cross_compiling" = yes; then
12283   cat > conftest.$ac_ext <<EOF
12284 #line 12285 "configure"
12285 #include "confdefs.h"
12286 /* pthread test headers */
12287 #include <pthread.h>
12288 #if HAVE_PTHREADS < 7
12289 #include <errno.h>
12290 #endif
12291 #ifndef NULL
12292 #define NULL (void*)0
12293 #endif
12294
12295 static void *task(p)
12296         void *p;
12297 {
12298         return (void *) (p == NULL);
12299 }
12300
12301 int main() {
12302
12303         /* pthread test function */
12304 #ifndef PTHREAD_CREATE_DETACHED
12305 #define PTHREAD_CREATE_DETACHED 1
12306 #endif
12307         pthread_t t;
12308         int status;
12309         int detach = PTHREAD_CREATE_DETACHED;
12310
12311 #if HAVE_PTHREADS > 4
12312         /* Final pthreads */
12313         pthread_attr_t attr;
12314
12315         status = pthread_attr_init(&attr);
12316         if( status ) return status;
12317
12318 #if HAVE_PTHREADS < 7
12319         status = pthread_attr_setdetachstate(&attr, &detach);
12320         if( status < 0 ) status = errno;
12321 #else
12322         status = pthread_attr_setdetachstate(&attr, detach);
12323 #endif
12324         if( status ) return status;
12325         status = pthread_create( &t, &attr, task, NULL );
12326 #if HAVE_PTHREADS < 7
12327         if( status < 0 ) status = errno;
12328 #endif
12329         if( status ) return status;
12330 #else
12331         /* Draft 4 pthreads */
12332         status = pthread_create( &t, pthread_attr_default, task, NULL );
12333         if( status ) return errno;
12334
12335         /* give thread a chance to complete */
12336         /* it should remain joinable and hence detachable */
12337         sleep( 1 );
12338
12339         status = pthread_detach( &t );
12340         if( status ) return errno;
12341 #endif
12342
12343 #ifdef HAVE_LINUX_THREADS
12344         pthread_kill_other_threads_np();
12345 #endif
12346
12347         return 0;
12348
12349 ; return 0; }
12350 EOF
12351 if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12352   rm -rf conftest*
12353   ol_cv_pthread_kthread=yes
12354 else
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -rf conftest*
12358   ol_cv_pthread_kthread=no
12359 fi
12360 rm -f conftest*
12361 else
12362   cat > conftest.$ac_ext <<EOF
12363 #line 12364 "configure"
12364 #include "confdefs.h"
12365 /* pthread test headers */
12366 #include <pthread.h>
12367 #if HAVE_PTHREADS < 7
12368 #include <errno.h>
12369 #endif
12370 #ifndef NULL
12371 #define NULL (void*)0
12372 #endif
12373
12374 static void *task(p)
12375         void *p;
12376 {
12377         return (void *) (p == NULL);
12378 }
12379
12380
12381 int main(argc, argv)
12382         int argc;
12383         char **argv;
12384 {
12385
12386         /* pthread test function */
12387 #ifndef PTHREAD_CREATE_DETACHED
12388 #define PTHREAD_CREATE_DETACHED 1
12389 #endif
12390         pthread_t t;
12391         int status;
12392         int detach = PTHREAD_CREATE_DETACHED;
12393
12394 #if HAVE_PTHREADS > 4
12395         /* Final pthreads */
12396         pthread_attr_t attr;
12397
12398         status = pthread_attr_init(&attr);
12399         if( status ) return status;
12400
12401 #if HAVE_PTHREADS < 7
12402         status = pthread_attr_setdetachstate(&attr, &detach);
12403         if( status < 0 ) status = errno;
12404 #else
12405         status = pthread_attr_setdetachstate(&attr, detach);
12406 #endif
12407         if( status ) return status;
12408         status = pthread_create( &t, &attr, task, NULL );
12409 #if HAVE_PTHREADS < 7
12410         if( status < 0 ) status = errno;
12411 #endif
12412         if( status ) return status;
12413 #else
12414         /* Draft 4 pthreads */
12415         status = pthread_create( &t, pthread_attr_default, task, NULL );
12416         if( status ) return errno;
12417
12418         /* give thread a chance to complete */
12419         /* it should remain joinable and hence detachable */
12420         sleep( 1 );
12421
12422         status = pthread_detach( &t );
12423         if( status ) return errno;
12424 #endif
12425
12426 #ifdef HAVE_LINUX_THREADS
12427         pthread_kill_other_threads_np();
12428 #endif
12429
12430         return 0;
12431
12432 }
12433
12434 EOF
12435 if { (eval echo configure:12436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12436 then
12437   ol_cv_pthread_kthread=yes
12438 else
12439   echo "configure: failed program was:" >&5
12440   cat conftest.$ac_ext >&5
12441   rm -fr conftest*
12442   ol_cv_pthread_kthread=no
12443 fi
12444 rm -fr conftest*
12445 fi
12446
12447
12448                 # restore the LIBS
12449                 LIBS="$ol_LIBS"
12450         
12451 fi
12452
12453 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12454
12455         if test $ol_cv_pthread_kthread = yes ; then
12456                 ol_link_pthreads="-kthread"
12457                 ol_link_threads=posix
12458         fi
12459 fi
12460
12461                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12462 if test "$ol_link_threads" = no ; then
12463         # try -pthread
12464         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12465 echo "configure:12466: checking for pthread link with -pthread" >&5
12466 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12467   echo $ac_n "(cached) $ac_c" 1>&6
12468 else
12469   
12470                 # save the flags
12471                 ol_LIBS="$LIBS"
12472                 LIBS="-pthread $LIBS"
12473
12474                 if test "$cross_compiling" = yes; then
12475   cat > conftest.$ac_ext <<EOF
12476 #line 12477 "configure"
12477 #include "confdefs.h"
12478 /* pthread test headers */
12479 #include <pthread.h>
12480 #if HAVE_PTHREADS < 7
12481 #include <errno.h>
12482 #endif
12483 #ifndef NULL
12484 #define NULL (void*)0
12485 #endif
12486
12487 static void *task(p)
12488         void *p;
12489 {
12490         return (void *) (p == NULL);
12491 }
12492
12493 int main() {
12494
12495         /* pthread test function */
12496 #ifndef PTHREAD_CREATE_DETACHED
12497 #define PTHREAD_CREATE_DETACHED 1
12498 #endif
12499         pthread_t t;
12500         int status;
12501         int detach = PTHREAD_CREATE_DETACHED;
12502
12503 #if HAVE_PTHREADS > 4
12504         /* Final pthreads */
12505         pthread_attr_t attr;
12506
12507         status = pthread_attr_init(&attr);
12508         if( status ) return status;
12509
12510 #if HAVE_PTHREADS < 7
12511         status = pthread_attr_setdetachstate(&attr, &detach);
12512         if( status < 0 ) status = errno;
12513 #else
12514         status = pthread_attr_setdetachstate(&attr, detach);
12515 #endif
12516         if( status ) return status;
12517         status = pthread_create( &t, &attr, task, NULL );
12518 #if HAVE_PTHREADS < 7
12519         if( status < 0 ) status = errno;
12520 #endif
12521         if( status ) return status;
12522 #else
12523         /* Draft 4 pthreads */
12524         status = pthread_create( &t, pthread_attr_default, task, NULL );
12525         if( status ) return errno;
12526
12527         /* give thread a chance to complete */
12528         /* it should remain joinable and hence detachable */
12529         sleep( 1 );
12530
12531         status = pthread_detach( &t );
12532         if( status ) return errno;
12533 #endif
12534
12535 #ifdef HAVE_LINUX_THREADS
12536         pthread_kill_other_threads_np();
12537 #endif
12538
12539         return 0;
12540
12541 ; return 0; }
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12544   rm -rf conftest*
12545   ol_cv_pthread_pthread=yes
12546 else
12547   echo "configure: failed program was:" >&5
12548   cat conftest.$ac_ext >&5
12549   rm -rf conftest*
12550   ol_cv_pthread_pthread=no
12551 fi
12552 rm -f conftest*
12553 else
12554   cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 /* pthread test headers */
12558 #include <pthread.h>
12559 #if HAVE_PTHREADS < 7
12560 #include <errno.h>
12561 #endif
12562 #ifndef NULL
12563 #define NULL (void*)0
12564 #endif
12565
12566 static void *task(p)
12567         void *p;
12568 {
12569         return (void *) (p == NULL);
12570 }
12571
12572
12573 int main(argc, argv)
12574         int argc;
12575         char **argv;
12576 {
12577
12578         /* pthread test function */
12579 #ifndef PTHREAD_CREATE_DETACHED
12580 #define PTHREAD_CREATE_DETACHED 1
12581 #endif
12582         pthread_t t;
12583         int status;
12584         int detach = PTHREAD_CREATE_DETACHED;
12585
12586 #if HAVE_PTHREADS > 4
12587         /* Final pthreads */
12588         pthread_attr_t attr;
12589
12590         status = pthread_attr_init(&attr);
12591         if( status ) return status;
12592
12593 #if HAVE_PTHREADS < 7
12594         status = pthread_attr_setdetachstate(&attr, &detach);
12595         if( status < 0 ) status = errno;
12596 #else
12597         status = pthread_attr_setdetachstate(&attr, detach);
12598 #endif
12599         if( status ) return status;
12600         status = pthread_create( &t, &attr, task, NULL );
12601 #if HAVE_PTHREADS < 7
12602         if( status < 0 ) status = errno;
12603 #endif
12604         if( status ) return status;
12605 #else
12606         /* Draft 4 pthreads */
12607         status = pthread_create( &t, pthread_attr_default, task, NULL );
12608         if( status ) return errno;
12609
12610         /* give thread a chance to complete */
12611         /* it should remain joinable and hence detachable */
12612         sleep( 1 );
12613
12614         status = pthread_detach( &t );
12615         if( status ) return errno;
12616 #endif
12617
12618 #ifdef HAVE_LINUX_THREADS
12619         pthread_kill_other_threads_np();
12620 #endif
12621
12622         return 0;
12623
12624 }
12625
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12628 then
12629   ol_cv_pthread_pthread=yes
12630 else
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -fr conftest*
12634   ol_cv_pthread_pthread=no
12635 fi
12636 rm -fr conftest*
12637 fi
12638
12639
12640                 # restore the LIBS
12641                 LIBS="$ol_LIBS"
12642         
12643 fi
12644
12645 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12646
12647         if test $ol_cv_pthread_pthread = yes ; then
12648                 ol_link_pthreads="-pthread"
12649                 ol_link_threads=posix
12650         fi
12651 fi
12652
12653                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12654 if test "$ol_link_threads" = no ; then
12655         # try -pthreads
12656         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12657 echo "configure:12658: checking for pthread link with -pthreads" >&5
12658 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12659   echo $ac_n "(cached) $ac_c" 1>&6
12660 else
12661   
12662                 # save the flags
12663                 ol_LIBS="$LIBS"
12664                 LIBS="-pthreads $LIBS"
12665
12666                 if test "$cross_compiling" = yes; then
12667   cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* pthread test headers */
12671 #include <pthread.h>
12672 #if HAVE_PTHREADS < 7
12673 #include <errno.h>
12674 #endif
12675 #ifndef NULL
12676 #define NULL (void*)0
12677 #endif
12678
12679 static void *task(p)
12680         void *p;
12681 {
12682         return (void *) (p == NULL);
12683 }
12684
12685 int main() {
12686
12687         /* pthread test function */
12688 #ifndef PTHREAD_CREATE_DETACHED
12689 #define PTHREAD_CREATE_DETACHED 1
12690 #endif
12691         pthread_t t;
12692         int status;
12693         int detach = PTHREAD_CREATE_DETACHED;
12694
12695 #if HAVE_PTHREADS > 4
12696         /* Final pthreads */
12697         pthread_attr_t attr;
12698
12699         status = pthread_attr_init(&attr);
12700         if( status ) return status;
12701
12702 #if HAVE_PTHREADS < 7
12703         status = pthread_attr_setdetachstate(&attr, &detach);
12704         if( status < 0 ) status = errno;
12705 #else
12706         status = pthread_attr_setdetachstate(&attr, detach);
12707 #endif
12708         if( status ) return status;
12709         status = pthread_create( &t, &attr, task, NULL );
12710 #if HAVE_PTHREADS < 7
12711         if( status < 0 ) status = errno;
12712 #endif
12713         if( status ) return status;
12714 #else
12715         /* Draft 4 pthreads */
12716         status = pthread_create( &t, pthread_attr_default, task, NULL );
12717         if( status ) return errno;
12718
12719         /* give thread a chance to complete */
12720         /* it should remain joinable and hence detachable */
12721         sleep( 1 );
12722
12723         status = pthread_detach( &t );
12724         if( status ) return errno;
12725 #endif
12726
12727 #ifdef HAVE_LINUX_THREADS
12728         pthread_kill_other_threads_np();
12729 #endif
12730
12731         return 0;
12732
12733 ; return 0; }
12734 EOF
12735 if { (eval echo configure:12736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12736   rm -rf conftest*
12737   ol_cv_pthread_pthreads=yes
12738 else
12739   echo "configure: failed program was:" >&5
12740   cat conftest.$ac_ext >&5
12741   rm -rf conftest*
12742   ol_cv_pthread_pthreads=no
12743 fi
12744 rm -f conftest*
12745 else
12746   cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749 /* pthread test headers */
12750 #include <pthread.h>
12751 #if HAVE_PTHREADS < 7
12752 #include <errno.h>
12753 #endif
12754 #ifndef NULL
12755 #define NULL (void*)0
12756 #endif
12757
12758 static void *task(p)
12759         void *p;
12760 {
12761         return (void *) (p == NULL);
12762 }
12763
12764
12765 int main(argc, argv)
12766         int argc;
12767         char **argv;
12768 {
12769
12770         /* pthread test function */
12771 #ifndef PTHREAD_CREATE_DETACHED
12772 #define PTHREAD_CREATE_DETACHED 1
12773 #endif
12774         pthread_t t;
12775         int status;
12776         int detach = PTHREAD_CREATE_DETACHED;
12777
12778 #if HAVE_PTHREADS > 4
12779         /* Final pthreads */
12780         pthread_attr_t attr;
12781
12782         status = pthread_attr_init(&attr);
12783         if( status ) return status;
12784
12785 #if HAVE_PTHREADS < 7
12786         status = pthread_attr_setdetachstate(&attr, &detach);
12787         if( status < 0 ) status = errno;
12788 #else
12789         status = pthread_attr_setdetachstate(&attr, detach);
12790 #endif
12791         if( status ) return status;
12792         status = pthread_create( &t, &attr, task, NULL );
12793 #if HAVE_PTHREADS < 7
12794         if( status < 0 ) status = errno;
12795 #endif
12796         if( status ) return status;
12797 #else
12798         /* Draft 4 pthreads */
12799         status = pthread_create( &t, pthread_attr_default, task, NULL );
12800         if( status ) return errno;
12801
12802         /* give thread a chance to complete */
12803         /* it should remain joinable and hence detachable */
12804         sleep( 1 );
12805
12806         status = pthread_detach( &t );
12807         if( status ) return errno;
12808 #endif
12809
12810 #ifdef HAVE_LINUX_THREADS
12811         pthread_kill_other_threads_np();
12812 #endif
12813
12814         return 0;
12815
12816 }
12817
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12820 then
12821   ol_cv_pthread_pthreads=yes
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -fr conftest*
12826   ol_cv_pthread_pthreads=no
12827 fi
12828 rm -fr conftest*
12829 fi
12830
12831
12832                 # restore the LIBS
12833                 LIBS="$ol_LIBS"
12834         
12835 fi
12836
12837 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12838
12839         if test $ol_cv_pthread_pthreads = yes ; then
12840                 ol_link_pthreads="-pthreads"
12841                 ol_link_threads=posix
12842         fi
12843 fi
12844
12845                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12846 if test "$ol_link_threads" = no ; then
12847         # try -mthreads
12848         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12849 echo "configure:12850: checking for pthread link with -mthreads" >&5
12850 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12851   echo $ac_n "(cached) $ac_c" 1>&6
12852 else
12853   
12854                 # save the flags
12855                 ol_LIBS="$LIBS"
12856                 LIBS="-mthreads $LIBS"
12857
12858                 if test "$cross_compiling" = yes; then
12859   cat > conftest.$ac_ext <<EOF
12860 #line 12861 "configure"
12861 #include "confdefs.h"
12862 /* pthread test headers */
12863 #include <pthread.h>
12864 #if HAVE_PTHREADS < 7
12865 #include <errno.h>
12866 #endif
12867 #ifndef NULL
12868 #define NULL (void*)0
12869 #endif
12870
12871 static void *task(p)
12872         void *p;
12873 {
12874         return (void *) (p == NULL);
12875 }
12876
12877 int main() {
12878
12879         /* pthread test function */
12880 #ifndef PTHREAD_CREATE_DETACHED
12881 #define PTHREAD_CREATE_DETACHED 1
12882 #endif
12883         pthread_t t;
12884         int status;
12885         int detach = PTHREAD_CREATE_DETACHED;
12886
12887 #if HAVE_PTHREADS > 4
12888         /* Final pthreads */
12889         pthread_attr_t attr;
12890
12891         status = pthread_attr_init(&attr);
12892         if( status ) return status;
12893
12894 #if HAVE_PTHREADS < 7
12895         status = pthread_attr_setdetachstate(&attr, &detach);
12896         if( status < 0 ) status = errno;
12897 #else
12898         status = pthread_attr_setdetachstate(&attr, detach);
12899 #endif
12900         if( status ) return status;
12901         status = pthread_create( &t, &attr, task, NULL );
12902 #if HAVE_PTHREADS < 7
12903         if( status < 0 ) status = errno;
12904 #endif
12905         if( status ) return status;
12906 #else
12907         /* Draft 4 pthreads */
12908         status = pthread_create( &t, pthread_attr_default, task, NULL );
12909         if( status ) return errno;
12910
12911         /* give thread a chance to complete */
12912         /* it should remain joinable and hence detachable */
12913         sleep( 1 );
12914
12915         status = pthread_detach( &t );
12916         if( status ) return errno;
12917 #endif
12918
12919 #ifdef HAVE_LINUX_THREADS
12920         pthread_kill_other_threads_np();
12921 #endif
12922
12923         return 0;
12924
12925 ; return 0; }
12926 EOF
12927 if { (eval echo configure:12928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12928   rm -rf conftest*
12929   ol_cv_pthread_mthreads=yes
12930 else
12931   echo "configure: failed program was:" >&5
12932   cat conftest.$ac_ext >&5
12933   rm -rf conftest*
12934   ol_cv_pthread_mthreads=no
12935 fi
12936 rm -f conftest*
12937 else
12938   cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* pthread test headers */
12942 #include <pthread.h>
12943 #if HAVE_PTHREADS < 7
12944 #include <errno.h>
12945 #endif
12946 #ifndef NULL
12947 #define NULL (void*)0
12948 #endif
12949
12950 static void *task(p)
12951         void *p;
12952 {
12953         return (void *) (p == NULL);
12954 }
12955
12956
12957 int main(argc, argv)
12958         int argc;
12959         char **argv;
12960 {
12961
12962         /* pthread test function */
12963 #ifndef PTHREAD_CREATE_DETACHED
12964 #define PTHREAD_CREATE_DETACHED 1
12965 #endif
12966         pthread_t t;
12967         int status;
12968         int detach = PTHREAD_CREATE_DETACHED;
12969
12970 #if HAVE_PTHREADS > 4
12971         /* Final pthreads */
12972         pthread_attr_t attr;
12973
12974         status = pthread_attr_init(&attr);
12975         if( status ) return status;
12976
12977 #if HAVE_PTHREADS < 7
12978         status = pthread_attr_setdetachstate(&attr, &detach);
12979         if( status < 0 ) status = errno;
12980 #else
12981         status = pthread_attr_setdetachstate(&attr, detach);
12982 #endif
12983         if( status ) return status;
12984         status = pthread_create( &t, &attr, task, NULL );
12985 #if HAVE_PTHREADS < 7
12986         if( status < 0 ) status = errno;
12987 #endif
12988         if( status ) return status;
12989 #else
12990         /* Draft 4 pthreads */
12991         status = pthread_create( &t, pthread_attr_default, task, NULL );
12992         if( status ) return errno;
12993
12994         /* give thread a chance to complete */
12995         /* it should remain joinable and hence detachable */
12996         sleep( 1 );
12997
12998         status = pthread_detach( &t );
12999         if( status ) return errno;
13000 #endif
13001
13002 #ifdef HAVE_LINUX_THREADS
13003         pthread_kill_other_threads_np();
13004 #endif
13005
13006         return 0;
13007
13008 }
13009
13010 EOF
13011 if { (eval echo configure:13012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13012 then
13013   ol_cv_pthread_mthreads=yes
13014 else
13015   echo "configure: failed program was:" >&5
13016   cat conftest.$ac_ext >&5
13017   rm -fr conftest*
13018   ol_cv_pthread_mthreads=no
13019 fi
13020 rm -fr conftest*
13021 fi
13022
13023
13024                 # restore the LIBS
13025                 LIBS="$ol_LIBS"
13026         
13027 fi
13028
13029 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13030
13031         if test $ol_cv_pthread_mthreads = yes ; then
13032                 ol_link_pthreads="-mthreads"
13033                 ol_link_threads=posix
13034         fi
13035 fi
13036
13037                 # Pthread try link: -thread (ol_cv_pthread_thread)
13038 if test "$ol_link_threads" = no ; then
13039         # try -thread
13040         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13041 echo "configure:13042: checking for pthread link with -thread" >&5
13042 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13043   echo $ac_n "(cached) $ac_c" 1>&6
13044 else
13045   
13046                 # save the flags
13047                 ol_LIBS="$LIBS"
13048                 LIBS="-thread $LIBS"
13049
13050                 if test "$cross_compiling" = yes; then
13051   cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054 /* pthread test headers */
13055 #include <pthread.h>
13056 #if HAVE_PTHREADS < 7
13057 #include <errno.h>
13058 #endif
13059 #ifndef NULL
13060 #define NULL (void*)0
13061 #endif
13062
13063 static void *task(p)
13064         void *p;
13065 {
13066         return (void *) (p == NULL);
13067 }
13068
13069 int main() {
13070
13071         /* pthread test function */
13072 #ifndef PTHREAD_CREATE_DETACHED
13073 #define PTHREAD_CREATE_DETACHED 1
13074 #endif
13075         pthread_t t;
13076         int status;
13077         int detach = PTHREAD_CREATE_DETACHED;
13078
13079 #if HAVE_PTHREADS > 4
13080         /* Final pthreads */
13081         pthread_attr_t attr;
13082
13083         status = pthread_attr_init(&attr);
13084         if( status ) return status;
13085
13086 #if HAVE_PTHREADS < 7
13087         status = pthread_attr_setdetachstate(&attr, &detach);
13088         if( status < 0 ) status = errno;
13089 #else
13090         status = pthread_attr_setdetachstate(&attr, detach);
13091 #endif
13092         if( status ) return status;
13093         status = pthread_create( &t, &attr, task, NULL );
13094 #if HAVE_PTHREADS < 7
13095         if( status < 0 ) status = errno;
13096 #endif
13097         if( status ) return status;
13098 #else
13099         /* Draft 4 pthreads */
13100         status = pthread_create( &t, pthread_attr_default, task, NULL );
13101         if( status ) return errno;
13102
13103         /* give thread a chance to complete */
13104         /* it should remain joinable and hence detachable */
13105         sleep( 1 );
13106
13107         status = pthread_detach( &t );
13108         if( status ) return errno;
13109 #endif
13110
13111 #ifdef HAVE_LINUX_THREADS
13112         pthread_kill_other_threads_np();
13113 #endif
13114
13115         return 0;
13116
13117 ; return 0; }
13118 EOF
13119 if { (eval echo configure:13120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13120   rm -rf conftest*
13121   ol_cv_pthread_thread=yes
13122 else
13123   echo "configure: failed program was:" >&5
13124   cat conftest.$ac_ext >&5
13125   rm -rf conftest*
13126   ol_cv_pthread_thread=no
13127 fi
13128 rm -f conftest*
13129 else
13130   cat > conftest.$ac_ext <<EOF
13131 #line 13132 "configure"
13132 #include "confdefs.h"
13133 /* pthread test headers */
13134 #include <pthread.h>
13135 #if HAVE_PTHREADS < 7
13136 #include <errno.h>
13137 #endif
13138 #ifndef NULL
13139 #define NULL (void*)0
13140 #endif
13141
13142 static void *task(p)
13143         void *p;
13144 {
13145         return (void *) (p == NULL);
13146 }
13147
13148
13149 int main(argc, argv)
13150         int argc;
13151         char **argv;
13152 {
13153
13154         /* pthread test function */
13155 #ifndef PTHREAD_CREATE_DETACHED
13156 #define PTHREAD_CREATE_DETACHED 1
13157 #endif
13158         pthread_t t;
13159         int status;
13160         int detach = PTHREAD_CREATE_DETACHED;
13161
13162 #if HAVE_PTHREADS > 4
13163         /* Final pthreads */
13164         pthread_attr_t attr;
13165
13166         status = pthread_attr_init(&attr);
13167         if( status ) return status;
13168
13169 #if HAVE_PTHREADS < 7
13170         status = pthread_attr_setdetachstate(&attr, &detach);
13171         if( status < 0 ) status = errno;
13172 #else
13173         status = pthread_attr_setdetachstate(&attr, detach);
13174 #endif
13175         if( status ) return status;
13176         status = pthread_create( &t, &attr, task, NULL );
13177 #if HAVE_PTHREADS < 7
13178         if( status < 0 ) status = errno;
13179 #endif
13180         if( status ) return status;
13181 #else
13182         /* Draft 4 pthreads */
13183         status = pthread_create( &t, pthread_attr_default, task, NULL );
13184         if( status ) return errno;
13185
13186         /* give thread a chance to complete */
13187         /* it should remain joinable and hence detachable */
13188         sleep( 1 );
13189
13190         status = pthread_detach( &t );
13191         if( status ) return errno;
13192 #endif
13193
13194 #ifdef HAVE_LINUX_THREADS
13195         pthread_kill_other_threads_np();
13196 #endif
13197
13198         return 0;
13199
13200 }
13201
13202 EOF
13203 if { (eval echo configure:13204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13204 then
13205   ol_cv_pthread_thread=yes
13206 else
13207   echo "configure: failed program was:" >&5
13208   cat conftest.$ac_ext >&5
13209   rm -fr conftest*
13210   ol_cv_pthread_thread=no
13211 fi
13212 rm -fr conftest*
13213 fi
13214
13215
13216                 # restore the LIBS
13217                 LIBS="$ol_LIBS"
13218         
13219 fi
13220
13221 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13222
13223         if test $ol_cv_pthread_thread = yes ; then
13224                 ol_link_pthreads="-thread"
13225                 ol_link_threads=posix
13226         fi
13227 fi
13228
13229
13230                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13231 if test "$ol_link_threads" = no ; then
13232         # try -lpthread -lmach -lexc -lc_r
13233         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13234 echo "configure:13235: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13235 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13236   echo $ac_n "(cached) $ac_c" 1>&6
13237 else
13238   
13239                 # save the flags
13240                 ol_LIBS="$LIBS"
13241                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13242
13243                 if test "$cross_compiling" = yes; then
13244   cat > conftest.$ac_ext <<EOF
13245 #line 13246 "configure"
13246 #include "confdefs.h"
13247 /* pthread test headers */
13248 #include <pthread.h>
13249 #if HAVE_PTHREADS < 7
13250 #include <errno.h>
13251 #endif
13252 #ifndef NULL
13253 #define NULL (void*)0
13254 #endif
13255
13256 static void *task(p)
13257         void *p;
13258 {
13259         return (void *) (p == NULL);
13260 }
13261
13262 int main() {
13263
13264         /* pthread test function */
13265 #ifndef PTHREAD_CREATE_DETACHED
13266 #define PTHREAD_CREATE_DETACHED 1
13267 #endif
13268         pthread_t t;
13269         int status;
13270         int detach = PTHREAD_CREATE_DETACHED;
13271
13272 #if HAVE_PTHREADS > 4
13273         /* Final pthreads */
13274         pthread_attr_t attr;
13275
13276         status = pthread_attr_init(&attr);
13277         if( status ) return status;
13278
13279 #if HAVE_PTHREADS < 7
13280         status = pthread_attr_setdetachstate(&attr, &detach);
13281         if( status < 0 ) status = errno;
13282 #else
13283         status = pthread_attr_setdetachstate(&attr, detach);
13284 #endif
13285         if( status ) return status;
13286         status = pthread_create( &t, &attr, task, NULL );
13287 #if HAVE_PTHREADS < 7
13288         if( status < 0 ) status = errno;
13289 #endif
13290         if( status ) return status;
13291 #else
13292         /* Draft 4 pthreads */
13293         status = pthread_create( &t, pthread_attr_default, task, NULL );
13294         if( status ) return errno;
13295
13296         /* give thread a chance to complete */
13297         /* it should remain joinable and hence detachable */
13298         sleep( 1 );
13299
13300         status = pthread_detach( &t );
13301         if( status ) return errno;
13302 #endif
13303
13304 #ifdef HAVE_LINUX_THREADS
13305         pthread_kill_other_threads_np();
13306 #endif
13307
13308         return 0;
13309
13310 ; return 0; }
13311 EOF
13312 if { (eval echo configure:13313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13313   rm -rf conftest*
13314   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13315 else
13316   echo "configure: failed program was:" >&5
13317   cat conftest.$ac_ext >&5
13318   rm -rf conftest*
13319   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13320 fi
13321 rm -f conftest*
13322 else
13323   cat > conftest.$ac_ext <<EOF
13324 #line 13325 "configure"
13325 #include "confdefs.h"
13326 /* pthread test headers */
13327 #include <pthread.h>
13328 #if HAVE_PTHREADS < 7
13329 #include <errno.h>
13330 #endif
13331 #ifndef NULL
13332 #define NULL (void*)0
13333 #endif
13334
13335 static void *task(p)
13336         void *p;
13337 {
13338         return (void *) (p == NULL);
13339 }
13340
13341
13342 int main(argc, argv)
13343         int argc;
13344         char **argv;
13345 {
13346
13347         /* pthread test function */
13348 #ifndef PTHREAD_CREATE_DETACHED
13349 #define PTHREAD_CREATE_DETACHED 1
13350 #endif
13351         pthread_t t;
13352         int status;
13353         int detach = PTHREAD_CREATE_DETACHED;
13354
13355 #if HAVE_PTHREADS > 4
13356         /* Final pthreads */
13357         pthread_attr_t attr;
13358
13359         status = pthread_attr_init(&attr);
13360         if( status ) return status;
13361
13362 #if HAVE_PTHREADS < 7
13363         status = pthread_attr_setdetachstate(&attr, &detach);
13364         if( status < 0 ) status = errno;
13365 #else
13366         status = pthread_attr_setdetachstate(&attr, detach);
13367 #endif
13368         if( status ) return status;
13369         status = pthread_create( &t, &attr, task, NULL );
13370 #if HAVE_PTHREADS < 7
13371         if( status < 0 ) status = errno;
13372 #endif
13373         if( status ) return status;
13374 #else
13375         /* Draft 4 pthreads */
13376         status = pthread_create( &t, pthread_attr_default, task, NULL );
13377         if( status ) return errno;
13378
13379         /* give thread a chance to complete */
13380         /* it should remain joinable and hence detachable */
13381         sleep( 1 );
13382
13383         status = pthread_detach( &t );
13384         if( status ) return errno;
13385 #endif
13386
13387 #ifdef HAVE_LINUX_THREADS
13388         pthread_kill_other_threads_np();
13389 #endif
13390
13391         return 0;
13392
13393 }
13394
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13397 then
13398   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402   rm -fr conftest*
13403   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13404 fi
13405 rm -fr conftest*
13406 fi
13407
13408
13409                 # restore the LIBS
13410                 LIBS="$ol_LIBS"
13411         
13412 fi
13413
13414 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13415
13416         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13417                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13418                 ol_link_threads=posix
13419         fi
13420 fi
13421
13422                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13423 if test "$ol_link_threads" = no ; then
13424         # try -lpthread -lmach -lexc
13425         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13426 echo "configure:13427: checking for pthread link with -lpthread -lmach -lexc" >&5
13427 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13428   echo $ac_n "(cached) $ac_c" 1>&6
13429 else
13430   
13431                 # save the flags
13432                 ol_LIBS="$LIBS"
13433                 LIBS="-lpthread -lmach -lexc $LIBS"
13434
13435                 if test "$cross_compiling" = yes; then
13436   cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439 /* pthread test headers */
13440 #include <pthread.h>
13441 #if HAVE_PTHREADS < 7
13442 #include <errno.h>
13443 #endif
13444 #ifndef NULL
13445 #define NULL (void*)0
13446 #endif
13447
13448 static void *task(p)
13449         void *p;
13450 {
13451         return (void *) (p == NULL);
13452 }
13453
13454 int main() {
13455
13456         /* pthread test function */
13457 #ifndef PTHREAD_CREATE_DETACHED
13458 #define PTHREAD_CREATE_DETACHED 1
13459 #endif
13460         pthread_t t;
13461         int status;
13462         int detach = PTHREAD_CREATE_DETACHED;
13463
13464 #if HAVE_PTHREADS > 4
13465         /* Final pthreads */
13466         pthread_attr_t attr;
13467
13468         status = pthread_attr_init(&attr);
13469         if( status ) return status;
13470
13471 #if HAVE_PTHREADS < 7
13472         status = pthread_attr_setdetachstate(&attr, &detach);
13473         if( status < 0 ) status = errno;
13474 #else
13475         status = pthread_attr_setdetachstate(&attr, detach);
13476 #endif
13477         if( status ) return status;
13478         status = pthread_create( &t, &attr, task, NULL );
13479 #if HAVE_PTHREADS < 7
13480         if( status < 0 ) status = errno;
13481 #endif
13482         if( status ) return status;
13483 #else
13484         /* Draft 4 pthreads */
13485         status = pthread_create( &t, pthread_attr_default, task, NULL );
13486         if( status ) return errno;
13487
13488         /* give thread a chance to complete */
13489         /* it should remain joinable and hence detachable */
13490         sleep( 1 );
13491
13492         status = pthread_detach( &t );
13493         if( status ) return errno;
13494 #endif
13495
13496 #ifdef HAVE_LINUX_THREADS
13497         pthread_kill_other_threads_np();
13498 #endif
13499
13500         return 0;
13501
13502 ; return 0; }
13503 EOF
13504 if { (eval echo configure:13505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13505   rm -rf conftest*
13506   ol_cv_pthread_lpthread_lmach_lexc=yes
13507 else
13508   echo "configure: failed program was:" >&5
13509   cat conftest.$ac_ext >&5
13510   rm -rf conftest*
13511   ol_cv_pthread_lpthread_lmach_lexc=no
13512 fi
13513 rm -f conftest*
13514 else
13515   cat > conftest.$ac_ext <<EOF
13516 #line 13517 "configure"
13517 #include "confdefs.h"
13518 /* pthread test headers */
13519 #include <pthread.h>
13520 #if HAVE_PTHREADS < 7
13521 #include <errno.h>
13522 #endif
13523 #ifndef NULL
13524 #define NULL (void*)0
13525 #endif
13526
13527 static void *task(p)
13528         void *p;
13529 {
13530         return (void *) (p == NULL);
13531 }
13532
13533
13534 int main(argc, argv)
13535         int argc;
13536         char **argv;
13537 {
13538
13539         /* pthread test function */
13540 #ifndef PTHREAD_CREATE_DETACHED
13541 #define PTHREAD_CREATE_DETACHED 1
13542 #endif
13543         pthread_t t;
13544         int status;
13545         int detach = PTHREAD_CREATE_DETACHED;
13546
13547 #if HAVE_PTHREADS > 4
13548         /* Final pthreads */
13549         pthread_attr_t attr;
13550
13551         status = pthread_attr_init(&attr);
13552         if( status ) return status;
13553
13554 #if HAVE_PTHREADS < 7
13555         status = pthread_attr_setdetachstate(&attr, &detach);
13556         if( status < 0 ) status = errno;
13557 #else
13558         status = pthread_attr_setdetachstate(&attr, detach);
13559 #endif
13560         if( status ) return status;
13561         status = pthread_create( &t, &attr, task, NULL );
13562 #if HAVE_PTHREADS < 7
13563         if( status < 0 ) status = errno;
13564 #endif
13565         if( status ) return status;
13566 #else
13567         /* Draft 4 pthreads */
13568         status = pthread_create( &t, pthread_attr_default, task, NULL );
13569         if( status ) return errno;
13570
13571         /* give thread a chance to complete */
13572         /* it should remain joinable and hence detachable */
13573         sleep( 1 );
13574
13575         status = pthread_detach( &t );
13576         if( status ) return errno;
13577 #endif
13578
13579 #ifdef HAVE_LINUX_THREADS
13580         pthread_kill_other_threads_np();
13581 #endif
13582
13583         return 0;
13584
13585 }
13586
13587 EOF
13588 if { (eval echo configure:13589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13589 then
13590   ol_cv_pthread_lpthread_lmach_lexc=yes
13591 else
13592   echo "configure: failed program was:" >&5
13593   cat conftest.$ac_ext >&5
13594   rm -fr conftest*
13595   ol_cv_pthread_lpthread_lmach_lexc=no
13596 fi
13597 rm -fr conftest*
13598 fi
13599
13600
13601                 # restore the LIBS
13602                 LIBS="$ol_LIBS"
13603         
13604 fi
13605
13606 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13607
13608         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13609                 ol_link_pthreads="-lpthread -lmach -lexc"
13610                 ol_link_threads=posix
13611         fi
13612 fi
13613
13614
13615                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13616 if test "$ol_link_threads" = no ; then
13617         # try -lpthread -Wl,-woff,85
13618         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13619 echo "configure:13620: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13620 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13621   echo $ac_n "(cached) $ac_c" 1>&6
13622 else
13623   
13624                 # save the flags
13625                 ol_LIBS="$LIBS"
13626                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13627
13628                 if test "$cross_compiling" = yes; then
13629   cat > conftest.$ac_ext <<EOF
13630 #line 13631 "configure"
13631 #include "confdefs.h"
13632 /* pthread test headers */
13633 #include <pthread.h>
13634 #if HAVE_PTHREADS < 7
13635 #include <errno.h>
13636 #endif
13637 #ifndef NULL
13638 #define NULL (void*)0
13639 #endif
13640
13641 static void *task(p)
13642         void *p;
13643 {
13644         return (void *) (p == NULL);
13645 }
13646
13647 int main() {
13648
13649         /* pthread test function */
13650 #ifndef PTHREAD_CREATE_DETACHED
13651 #define PTHREAD_CREATE_DETACHED 1
13652 #endif
13653         pthread_t t;
13654         int status;
13655         int detach = PTHREAD_CREATE_DETACHED;
13656
13657 #if HAVE_PTHREADS > 4
13658         /* Final pthreads */
13659         pthread_attr_t attr;
13660
13661         status = pthread_attr_init(&attr);
13662         if( status ) return status;
13663
13664 #if HAVE_PTHREADS < 7
13665         status = pthread_attr_setdetachstate(&attr, &detach);
13666         if( status < 0 ) status = errno;
13667 #else
13668         status = pthread_attr_setdetachstate(&attr, detach);
13669 #endif
13670         if( status ) return status;
13671         status = pthread_create( &t, &attr, task, NULL );
13672 #if HAVE_PTHREADS < 7
13673         if( status < 0 ) status = errno;
13674 #endif
13675         if( status ) return status;
13676 #else
13677         /* Draft 4 pthreads */
13678         status = pthread_create( &t, pthread_attr_default, task, NULL );
13679         if( status ) return errno;
13680
13681         /* give thread a chance to complete */
13682         /* it should remain joinable and hence detachable */
13683         sleep( 1 );
13684
13685         status = pthread_detach( &t );
13686         if( status ) return errno;
13687 #endif
13688
13689 #ifdef HAVE_LINUX_THREADS
13690         pthread_kill_other_threads_np();
13691 #endif
13692
13693         return 0;
13694
13695 ; return 0; }
13696 EOF
13697 if { (eval echo configure:13698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13698   rm -rf conftest*
13699   ol_cv_pthread_lib_lpthread_woff=yes
13700 else
13701   echo "configure: failed program was:" >&5
13702   cat conftest.$ac_ext >&5
13703   rm -rf conftest*
13704   ol_cv_pthread_lib_lpthread_woff=no
13705 fi
13706 rm -f conftest*
13707 else
13708   cat > conftest.$ac_ext <<EOF
13709 #line 13710 "configure"
13710 #include "confdefs.h"
13711 /* pthread test headers */
13712 #include <pthread.h>
13713 #if HAVE_PTHREADS < 7
13714 #include <errno.h>
13715 #endif
13716 #ifndef NULL
13717 #define NULL (void*)0
13718 #endif
13719
13720 static void *task(p)
13721         void *p;
13722 {
13723         return (void *) (p == NULL);
13724 }
13725
13726
13727 int main(argc, argv)
13728         int argc;
13729         char **argv;
13730 {
13731
13732         /* pthread test function */
13733 #ifndef PTHREAD_CREATE_DETACHED
13734 #define PTHREAD_CREATE_DETACHED 1
13735 #endif
13736         pthread_t t;
13737         int status;
13738         int detach = PTHREAD_CREATE_DETACHED;
13739
13740 #if HAVE_PTHREADS > 4
13741         /* Final pthreads */
13742         pthread_attr_t attr;
13743
13744         status = pthread_attr_init(&attr);
13745         if( status ) return status;
13746
13747 #if HAVE_PTHREADS < 7
13748         status = pthread_attr_setdetachstate(&attr, &detach);
13749         if( status < 0 ) status = errno;
13750 #else
13751         status = pthread_attr_setdetachstate(&attr, detach);
13752 #endif
13753         if( status ) return status;
13754         status = pthread_create( &t, &attr, task, NULL );
13755 #if HAVE_PTHREADS < 7
13756         if( status < 0 ) status = errno;
13757 #endif
13758         if( status ) return status;
13759 #else
13760         /* Draft 4 pthreads */
13761         status = pthread_create( &t, pthread_attr_default, task, NULL );
13762         if( status ) return errno;
13763
13764         /* give thread a chance to complete */
13765         /* it should remain joinable and hence detachable */
13766         sleep( 1 );
13767
13768         status = pthread_detach( &t );
13769         if( status ) return errno;
13770 #endif
13771
13772 #ifdef HAVE_LINUX_THREADS
13773         pthread_kill_other_threads_np();
13774 #endif
13775
13776         return 0;
13777
13778 }
13779
13780 EOF
13781 if { (eval echo configure:13782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13782 then
13783   ol_cv_pthread_lib_lpthread_woff=yes
13784 else
13785   echo "configure: failed program was:" >&5
13786   cat conftest.$ac_ext >&5
13787   rm -fr conftest*
13788   ol_cv_pthread_lib_lpthread_woff=no
13789 fi
13790 rm -fr conftest*
13791 fi
13792
13793
13794                 # restore the LIBS
13795                 LIBS="$ol_LIBS"
13796         
13797 fi
13798
13799 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13800
13801         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13802                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13803                 ol_link_threads=posix
13804         fi
13805 fi
13806
13807
13808                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13809 if test "$ol_link_threads" = no ; then
13810         # try -lpthread
13811         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13812 echo "configure:13813: checking for pthread link with -lpthread" >&5
13813 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13814   echo $ac_n "(cached) $ac_c" 1>&6
13815 else
13816   
13817                 # save the flags
13818                 ol_LIBS="$LIBS"
13819                 LIBS="-lpthread $LIBS"
13820
13821                 if test "$cross_compiling" = yes; then
13822   cat > conftest.$ac_ext <<EOF
13823 #line 13824 "configure"
13824 #include "confdefs.h"
13825 /* pthread test headers */
13826 #include <pthread.h>
13827 #if HAVE_PTHREADS < 7
13828 #include <errno.h>
13829 #endif
13830 #ifndef NULL
13831 #define NULL (void*)0
13832 #endif
13833
13834 static void *task(p)
13835         void *p;
13836 {
13837         return (void *) (p == NULL);
13838 }
13839
13840 int main() {
13841
13842         /* pthread test function */
13843 #ifndef PTHREAD_CREATE_DETACHED
13844 #define PTHREAD_CREATE_DETACHED 1
13845 #endif
13846         pthread_t t;
13847         int status;
13848         int detach = PTHREAD_CREATE_DETACHED;
13849
13850 #if HAVE_PTHREADS > 4
13851         /* Final pthreads */
13852         pthread_attr_t attr;
13853
13854         status = pthread_attr_init(&attr);
13855         if( status ) return status;
13856
13857 #if HAVE_PTHREADS < 7
13858         status = pthread_attr_setdetachstate(&attr, &detach);
13859         if( status < 0 ) status = errno;
13860 #else
13861         status = pthread_attr_setdetachstate(&attr, detach);
13862 #endif
13863         if( status ) return status;
13864         status = pthread_create( &t, &attr, task, NULL );
13865 #if HAVE_PTHREADS < 7
13866         if( status < 0 ) status = errno;
13867 #endif
13868         if( status ) return status;
13869 #else
13870         /* Draft 4 pthreads */
13871         status = pthread_create( &t, pthread_attr_default, task, NULL );
13872         if( status ) return errno;
13873
13874         /* give thread a chance to complete */
13875         /* it should remain joinable and hence detachable */
13876         sleep( 1 );
13877
13878         status = pthread_detach( &t );
13879         if( status ) return errno;
13880 #endif
13881
13882 #ifdef HAVE_LINUX_THREADS
13883         pthread_kill_other_threads_np();
13884 #endif
13885
13886         return 0;
13887
13888 ; return 0; }
13889 EOF
13890 if { (eval echo configure:13891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13891   rm -rf conftest*
13892   ol_cv_pthread_lpthread=yes
13893 else
13894   echo "configure: failed program was:" >&5
13895   cat conftest.$ac_ext >&5
13896   rm -rf conftest*
13897   ol_cv_pthread_lpthread=no
13898 fi
13899 rm -f conftest*
13900 else
13901   cat > conftest.$ac_ext <<EOF
13902 #line 13903 "configure"
13903 #include "confdefs.h"
13904 /* pthread test headers */
13905 #include <pthread.h>
13906 #if HAVE_PTHREADS < 7
13907 #include <errno.h>
13908 #endif
13909 #ifndef NULL
13910 #define NULL (void*)0
13911 #endif
13912
13913 static void *task(p)
13914         void *p;
13915 {
13916         return (void *) (p == NULL);
13917 }
13918
13919
13920 int main(argc, argv)
13921         int argc;
13922         char **argv;
13923 {
13924
13925         /* pthread test function */
13926 #ifndef PTHREAD_CREATE_DETACHED
13927 #define PTHREAD_CREATE_DETACHED 1
13928 #endif
13929         pthread_t t;
13930         int status;
13931         int detach = PTHREAD_CREATE_DETACHED;
13932
13933 #if HAVE_PTHREADS > 4
13934         /* Final pthreads */
13935         pthread_attr_t attr;
13936
13937         status = pthread_attr_init(&attr);
13938         if( status ) return status;
13939
13940 #if HAVE_PTHREADS < 7
13941         status = pthread_attr_setdetachstate(&attr, &detach);
13942         if( status < 0 ) status = errno;
13943 #else
13944         status = pthread_attr_setdetachstate(&attr, detach);
13945 #endif
13946         if( status ) return status;
13947         status = pthread_create( &t, &attr, task, NULL );
13948 #if HAVE_PTHREADS < 7
13949         if( status < 0 ) status = errno;
13950 #endif
13951         if( status ) return status;
13952 #else
13953         /* Draft 4 pthreads */
13954         status = pthread_create( &t, pthread_attr_default, task, NULL );
13955         if( status ) return errno;
13956
13957         /* give thread a chance to complete */
13958         /* it should remain joinable and hence detachable */
13959         sleep( 1 );
13960
13961         status = pthread_detach( &t );
13962         if( status ) return errno;
13963 #endif
13964
13965 #ifdef HAVE_LINUX_THREADS
13966         pthread_kill_other_threads_np();
13967 #endif
13968
13969         return 0;
13970
13971 }
13972
13973 EOF
13974 if { (eval echo configure:13975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13975 then
13976   ol_cv_pthread_lpthread=yes
13977 else
13978   echo "configure: failed program was:" >&5
13979   cat conftest.$ac_ext >&5
13980   rm -fr conftest*
13981   ol_cv_pthread_lpthread=no
13982 fi
13983 rm -fr conftest*
13984 fi
13985
13986
13987                 # restore the LIBS
13988                 LIBS="$ol_LIBS"
13989         
13990 fi
13991
13992 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13993
13994         if test $ol_cv_pthread_lpthread = yes ; then
13995                 ol_link_pthreads="-lpthread"
13996                 ol_link_threads=posix
13997         fi
13998 fi
13999
14000                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14001 if test "$ol_link_threads" = no ; then
14002         # try -lc_r
14003         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14004 echo "configure:14005: checking for pthread link with -lc_r" >&5
14005 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14006   echo $ac_n "(cached) $ac_c" 1>&6
14007 else
14008   
14009                 # save the flags
14010                 ol_LIBS="$LIBS"
14011                 LIBS="-lc_r $LIBS"
14012
14013                 if test "$cross_compiling" = yes; then
14014   cat > conftest.$ac_ext <<EOF
14015 #line 14016 "configure"
14016 #include "confdefs.h"
14017 /* pthread test headers */
14018 #include <pthread.h>
14019 #if HAVE_PTHREADS < 7
14020 #include <errno.h>
14021 #endif
14022 #ifndef NULL
14023 #define NULL (void*)0
14024 #endif
14025
14026 static void *task(p)
14027         void *p;
14028 {
14029         return (void *) (p == NULL);
14030 }
14031
14032 int main() {
14033
14034         /* pthread test function */
14035 #ifndef PTHREAD_CREATE_DETACHED
14036 #define PTHREAD_CREATE_DETACHED 1
14037 #endif
14038         pthread_t t;
14039         int status;
14040         int detach = PTHREAD_CREATE_DETACHED;
14041
14042 #if HAVE_PTHREADS > 4
14043         /* Final pthreads */
14044         pthread_attr_t attr;
14045
14046         status = pthread_attr_init(&attr);
14047         if( status ) return status;
14048
14049 #if HAVE_PTHREADS < 7
14050         status = pthread_attr_setdetachstate(&attr, &detach);
14051         if( status < 0 ) status = errno;
14052 #else
14053         status = pthread_attr_setdetachstate(&attr, detach);
14054 #endif
14055         if( status ) return status;
14056         status = pthread_create( &t, &attr, task, NULL );
14057 #if HAVE_PTHREADS < 7
14058         if( status < 0 ) status = errno;
14059 #endif
14060         if( status ) return status;
14061 #else
14062         /* Draft 4 pthreads */
14063         status = pthread_create( &t, pthread_attr_default, task, NULL );
14064         if( status ) return errno;
14065
14066         /* give thread a chance to complete */
14067         /* it should remain joinable and hence detachable */
14068         sleep( 1 );
14069
14070         status = pthread_detach( &t );
14071         if( status ) return errno;
14072 #endif
14073
14074 #ifdef HAVE_LINUX_THREADS
14075         pthread_kill_other_threads_np();
14076 #endif
14077
14078         return 0;
14079
14080 ; return 0; }
14081 EOF
14082 if { (eval echo configure:14083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14083   rm -rf conftest*
14084   ol_cv_pthread_lc_r=yes
14085 else
14086   echo "configure: failed program was:" >&5
14087   cat conftest.$ac_ext >&5
14088   rm -rf conftest*
14089   ol_cv_pthread_lc_r=no
14090 fi
14091 rm -f conftest*
14092 else
14093   cat > conftest.$ac_ext <<EOF
14094 #line 14095 "configure"
14095 #include "confdefs.h"
14096 /* pthread test headers */
14097 #include <pthread.h>
14098 #if HAVE_PTHREADS < 7
14099 #include <errno.h>
14100 #endif
14101 #ifndef NULL
14102 #define NULL (void*)0
14103 #endif
14104
14105 static void *task(p)
14106         void *p;
14107 {
14108         return (void *) (p == NULL);
14109 }
14110
14111
14112 int main(argc, argv)
14113         int argc;
14114         char **argv;
14115 {
14116
14117         /* pthread test function */
14118 #ifndef PTHREAD_CREATE_DETACHED
14119 #define PTHREAD_CREATE_DETACHED 1
14120 #endif
14121         pthread_t t;
14122         int status;
14123         int detach = PTHREAD_CREATE_DETACHED;
14124
14125 #if HAVE_PTHREADS > 4
14126         /* Final pthreads */
14127         pthread_attr_t attr;
14128
14129         status = pthread_attr_init(&attr);
14130         if( status ) return status;
14131
14132 #if HAVE_PTHREADS < 7
14133         status = pthread_attr_setdetachstate(&attr, &detach);
14134         if( status < 0 ) status = errno;
14135 #else
14136         status = pthread_attr_setdetachstate(&attr, detach);
14137 #endif
14138         if( status ) return status;
14139         status = pthread_create( &t, &attr, task, NULL );
14140 #if HAVE_PTHREADS < 7
14141         if( status < 0 ) status = errno;
14142 #endif
14143         if( status ) return status;
14144 #else
14145         /* Draft 4 pthreads */
14146         status = pthread_create( &t, pthread_attr_default, task, NULL );
14147         if( status ) return errno;
14148
14149         /* give thread a chance to complete */
14150         /* it should remain joinable and hence detachable */
14151         sleep( 1 );
14152
14153         status = pthread_detach( &t );
14154         if( status ) return errno;
14155 #endif
14156
14157 #ifdef HAVE_LINUX_THREADS
14158         pthread_kill_other_threads_np();
14159 #endif
14160
14161         return 0;
14162
14163 }
14164
14165 EOF
14166 if { (eval echo configure:14167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14167 then
14168   ol_cv_pthread_lc_r=yes
14169 else
14170   echo "configure: failed program was:" >&5
14171   cat conftest.$ac_ext >&5
14172   rm -fr conftest*
14173   ol_cv_pthread_lc_r=no
14174 fi
14175 rm -fr conftest*
14176 fi
14177
14178
14179                 # restore the LIBS
14180                 LIBS="$ol_LIBS"
14181         
14182 fi
14183
14184 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14185
14186         if test $ol_cv_pthread_lc_r = yes ; then
14187                 ol_link_pthreads="-lc_r"
14188                 ol_link_threads=posix
14189         fi
14190 fi
14191
14192
14193                 # Pthread try link: -threads (ol_cv_pthread_threads)
14194 if test "$ol_link_threads" = no ; then
14195         # try -threads
14196         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14197 echo "configure:14198: checking for pthread link with -threads" >&5
14198 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14199   echo $ac_n "(cached) $ac_c" 1>&6
14200 else
14201   
14202                 # save the flags
14203                 ol_LIBS="$LIBS"
14204                 LIBS="-threads $LIBS"
14205
14206                 if test "$cross_compiling" = yes; then
14207   cat > conftest.$ac_ext <<EOF
14208 #line 14209 "configure"
14209 #include "confdefs.h"
14210 /* pthread test headers */
14211 #include <pthread.h>
14212 #if HAVE_PTHREADS < 7
14213 #include <errno.h>
14214 #endif
14215 #ifndef NULL
14216 #define NULL (void*)0
14217 #endif
14218
14219 static void *task(p)
14220         void *p;
14221 {
14222         return (void *) (p == NULL);
14223 }
14224
14225 int main() {
14226
14227         /* pthread test function */
14228 #ifndef PTHREAD_CREATE_DETACHED
14229 #define PTHREAD_CREATE_DETACHED 1
14230 #endif
14231         pthread_t t;
14232         int status;
14233         int detach = PTHREAD_CREATE_DETACHED;
14234
14235 #if HAVE_PTHREADS > 4
14236         /* Final pthreads */
14237         pthread_attr_t attr;
14238
14239         status = pthread_attr_init(&attr);
14240         if( status ) return status;
14241
14242 #if HAVE_PTHREADS < 7
14243         status = pthread_attr_setdetachstate(&attr, &detach);
14244         if( status < 0 ) status = errno;
14245 #else
14246         status = pthread_attr_setdetachstate(&attr, detach);
14247 #endif
14248         if( status ) return status;
14249         status = pthread_create( &t, &attr, task, NULL );
14250 #if HAVE_PTHREADS < 7
14251         if( status < 0 ) status = errno;
14252 #endif
14253         if( status ) return status;
14254 #else
14255         /* Draft 4 pthreads */
14256         status = pthread_create( &t, pthread_attr_default, task, NULL );
14257         if( status ) return errno;
14258
14259         /* give thread a chance to complete */
14260         /* it should remain joinable and hence detachable */
14261         sleep( 1 );
14262
14263         status = pthread_detach( &t );
14264         if( status ) return errno;
14265 #endif
14266
14267 #ifdef HAVE_LINUX_THREADS
14268         pthread_kill_other_threads_np();
14269 #endif
14270
14271         return 0;
14272
14273 ; return 0; }
14274 EOF
14275 if { (eval echo configure:14276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14276   rm -rf conftest*
14277   ol_cv_pthread_threads=yes
14278 else
14279   echo "configure: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   rm -rf conftest*
14282   ol_cv_pthread_threads=no
14283 fi
14284 rm -f conftest*
14285 else
14286   cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 /* pthread test headers */
14290 #include <pthread.h>
14291 #if HAVE_PTHREADS < 7
14292 #include <errno.h>
14293 #endif
14294 #ifndef NULL
14295 #define NULL (void*)0
14296 #endif
14297
14298 static void *task(p)
14299         void *p;
14300 {
14301         return (void *) (p == NULL);
14302 }
14303
14304
14305 int main(argc, argv)
14306         int argc;
14307         char **argv;
14308 {
14309
14310         /* pthread test function */
14311 #ifndef PTHREAD_CREATE_DETACHED
14312 #define PTHREAD_CREATE_DETACHED 1
14313 #endif
14314         pthread_t t;
14315         int status;
14316         int detach = PTHREAD_CREATE_DETACHED;
14317
14318 #if HAVE_PTHREADS > 4
14319         /* Final pthreads */
14320         pthread_attr_t attr;
14321
14322         status = pthread_attr_init(&attr);
14323         if( status ) return status;
14324
14325 #if HAVE_PTHREADS < 7
14326         status = pthread_attr_setdetachstate(&attr, &detach);
14327         if( status < 0 ) status = errno;
14328 #else
14329         status = pthread_attr_setdetachstate(&attr, detach);
14330 #endif
14331         if( status ) return status;
14332         status = pthread_create( &t, &attr, task, NULL );
14333 #if HAVE_PTHREADS < 7
14334         if( status < 0 ) status = errno;
14335 #endif
14336         if( status ) return status;
14337 #else
14338         /* Draft 4 pthreads */
14339         status = pthread_create( &t, pthread_attr_default, task, NULL );
14340         if( status ) return errno;
14341
14342         /* give thread a chance to complete */
14343         /* it should remain joinable and hence detachable */
14344         sleep( 1 );
14345
14346         status = pthread_detach( &t );
14347         if( status ) return errno;
14348 #endif
14349
14350 #ifdef HAVE_LINUX_THREADS
14351         pthread_kill_other_threads_np();
14352 #endif
14353
14354         return 0;
14355
14356 }
14357
14358 EOF
14359 if { (eval echo configure:14360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14360 then
14361   ol_cv_pthread_threads=yes
14362 else
14363   echo "configure: failed program was:" >&5
14364   cat conftest.$ac_ext >&5
14365   rm -fr conftest*
14366   ol_cv_pthread_threads=no
14367 fi
14368 rm -fr conftest*
14369 fi
14370
14371
14372                 # restore the LIBS
14373                 LIBS="$ol_LIBS"
14374         
14375 fi
14376
14377 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14378
14379         if test $ol_cv_pthread_threads = yes ; then
14380                 ol_link_pthreads="-threads"
14381                 ol_link_threads=posix
14382         fi
14383 fi
14384
14385
14386                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14387 if test "$ol_link_threads" = no ; then
14388         # try -lpthreads -lmach -lexc -lc_r
14389         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14390 echo "configure:14391: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14391 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14392   echo $ac_n "(cached) $ac_c" 1>&6
14393 else
14394   
14395                 # save the flags
14396                 ol_LIBS="$LIBS"
14397                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14398
14399                 if test "$cross_compiling" = yes; then
14400   cat > conftest.$ac_ext <<EOF
14401 #line 14402 "configure"
14402 #include "confdefs.h"
14403 /* pthread test headers */
14404 #include <pthread.h>
14405 #if HAVE_PTHREADS < 7
14406 #include <errno.h>
14407 #endif
14408 #ifndef NULL
14409 #define NULL (void*)0
14410 #endif
14411
14412 static void *task(p)
14413         void *p;
14414 {
14415         return (void *) (p == NULL);
14416 }
14417
14418 int main() {
14419
14420         /* pthread test function */
14421 #ifndef PTHREAD_CREATE_DETACHED
14422 #define PTHREAD_CREATE_DETACHED 1
14423 #endif
14424         pthread_t t;
14425         int status;
14426         int detach = PTHREAD_CREATE_DETACHED;
14427
14428 #if HAVE_PTHREADS > 4
14429         /* Final pthreads */
14430         pthread_attr_t attr;
14431
14432         status = pthread_attr_init(&attr);
14433         if( status ) return status;
14434
14435 #if HAVE_PTHREADS < 7
14436         status = pthread_attr_setdetachstate(&attr, &detach);
14437         if( status < 0 ) status = errno;
14438 #else
14439         status = pthread_attr_setdetachstate(&attr, detach);
14440 #endif
14441         if( status ) return status;
14442         status = pthread_create( &t, &attr, task, NULL );
14443 #if HAVE_PTHREADS < 7
14444         if( status < 0 ) status = errno;
14445 #endif
14446         if( status ) return status;
14447 #else
14448         /* Draft 4 pthreads */
14449         status = pthread_create( &t, pthread_attr_default, task, NULL );
14450         if( status ) return errno;
14451
14452         /* give thread a chance to complete */
14453         /* it should remain joinable and hence detachable */
14454         sleep( 1 );
14455
14456         status = pthread_detach( &t );
14457         if( status ) return errno;
14458 #endif
14459
14460 #ifdef HAVE_LINUX_THREADS
14461         pthread_kill_other_threads_np();
14462 #endif
14463
14464         return 0;
14465
14466 ; return 0; }
14467 EOF
14468 if { (eval echo configure:14469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14469   rm -rf conftest*
14470   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14471 else
14472   echo "configure: failed program was:" >&5
14473   cat conftest.$ac_ext >&5
14474   rm -rf conftest*
14475   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14476 fi
14477 rm -f conftest*
14478 else
14479   cat > conftest.$ac_ext <<EOF
14480 #line 14481 "configure"
14481 #include "confdefs.h"
14482 /* pthread test headers */
14483 #include <pthread.h>
14484 #if HAVE_PTHREADS < 7
14485 #include <errno.h>
14486 #endif
14487 #ifndef NULL
14488 #define NULL (void*)0
14489 #endif
14490
14491 static void *task(p)
14492         void *p;
14493 {
14494         return (void *) (p == NULL);
14495 }
14496
14497
14498 int main(argc, argv)
14499         int argc;
14500         char **argv;
14501 {
14502
14503         /* pthread test function */
14504 #ifndef PTHREAD_CREATE_DETACHED
14505 #define PTHREAD_CREATE_DETACHED 1
14506 #endif
14507         pthread_t t;
14508         int status;
14509         int detach = PTHREAD_CREATE_DETACHED;
14510
14511 #if HAVE_PTHREADS > 4
14512         /* Final pthreads */
14513         pthread_attr_t attr;
14514
14515         status = pthread_attr_init(&attr);
14516         if( status ) return status;
14517
14518 #if HAVE_PTHREADS < 7
14519         status = pthread_attr_setdetachstate(&attr, &detach);
14520         if( status < 0 ) status = errno;
14521 #else
14522         status = pthread_attr_setdetachstate(&attr, detach);
14523 #endif
14524         if( status ) return status;
14525         status = pthread_create( &t, &attr, task, NULL );
14526 #if HAVE_PTHREADS < 7
14527         if( status < 0 ) status = errno;
14528 #endif
14529         if( status ) return status;
14530 #else
14531         /* Draft 4 pthreads */
14532         status = pthread_create( &t, pthread_attr_default, task, NULL );
14533         if( status ) return errno;
14534
14535         /* give thread a chance to complete */
14536         /* it should remain joinable and hence detachable */
14537         sleep( 1 );
14538
14539         status = pthread_detach( &t );
14540         if( status ) return errno;
14541 #endif
14542
14543 #ifdef HAVE_LINUX_THREADS
14544         pthread_kill_other_threads_np();
14545 #endif
14546
14547         return 0;
14548
14549 }
14550
14551 EOF
14552 if { (eval echo configure:14553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14553 then
14554   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14555 else
14556   echo "configure: failed program was:" >&5
14557   cat conftest.$ac_ext >&5
14558   rm -fr conftest*
14559   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14560 fi
14561 rm -fr conftest*
14562 fi
14563
14564
14565                 # restore the LIBS
14566                 LIBS="$ol_LIBS"
14567         
14568 fi
14569
14570 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14571
14572         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14573                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14574                 ol_link_threads=posix
14575         fi
14576 fi
14577
14578                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14579 if test "$ol_link_threads" = no ; then
14580         # try -lpthreads -lmach -lexc
14581         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14582 echo "configure:14583: checking for pthread link with -lpthreads -lmach -lexc" >&5
14583 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14584   echo $ac_n "(cached) $ac_c" 1>&6
14585 else
14586   
14587                 # save the flags
14588                 ol_LIBS="$LIBS"
14589                 LIBS="-lpthreads -lmach -lexc $LIBS"
14590
14591                 if test "$cross_compiling" = yes; then
14592   cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 /* pthread test headers */
14596 #include <pthread.h>
14597 #if HAVE_PTHREADS < 7
14598 #include <errno.h>
14599 #endif
14600 #ifndef NULL
14601 #define NULL (void*)0
14602 #endif
14603
14604 static void *task(p)
14605         void *p;
14606 {
14607         return (void *) (p == NULL);
14608 }
14609
14610 int main() {
14611
14612         /* pthread test function */
14613 #ifndef PTHREAD_CREATE_DETACHED
14614 #define PTHREAD_CREATE_DETACHED 1
14615 #endif
14616         pthread_t t;
14617         int status;
14618         int detach = PTHREAD_CREATE_DETACHED;
14619
14620 #if HAVE_PTHREADS > 4
14621         /* Final pthreads */
14622         pthread_attr_t attr;
14623
14624         status = pthread_attr_init(&attr);
14625         if( status ) return status;
14626
14627 #if HAVE_PTHREADS < 7
14628         status = pthread_attr_setdetachstate(&attr, &detach);
14629         if( status < 0 ) status = errno;
14630 #else
14631         status = pthread_attr_setdetachstate(&attr, detach);
14632 #endif
14633         if( status ) return status;
14634         status = pthread_create( &t, &attr, task, NULL );
14635 #if HAVE_PTHREADS < 7
14636         if( status < 0 ) status = errno;
14637 #endif
14638         if( status ) return status;
14639 #else
14640         /* Draft 4 pthreads */
14641         status = pthread_create( &t, pthread_attr_default, task, NULL );
14642         if( status ) return errno;
14643
14644         /* give thread a chance to complete */
14645         /* it should remain joinable and hence detachable */
14646         sleep( 1 );
14647
14648         status = pthread_detach( &t );
14649         if( status ) return errno;
14650 #endif
14651
14652 #ifdef HAVE_LINUX_THREADS
14653         pthread_kill_other_threads_np();
14654 #endif
14655
14656         return 0;
14657
14658 ; return 0; }
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14661   rm -rf conftest*
14662   ol_cv_pthread_lpthreads_lmach_lexc=yes
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   ol_cv_pthread_lpthreads_lmach_lexc=no
14668 fi
14669 rm -f conftest*
14670 else
14671   cat > conftest.$ac_ext <<EOF
14672 #line 14673 "configure"
14673 #include "confdefs.h"
14674 /* pthread test headers */
14675 #include <pthread.h>
14676 #if HAVE_PTHREADS < 7
14677 #include <errno.h>
14678 #endif
14679 #ifndef NULL
14680 #define NULL (void*)0
14681 #endif
14682
14683 static void *task(p)
14684         void *p;
14685 {
14686         return (void *) (p == NULL);
14687 }
14688
14689
14690 int main(argc, argv)
14691         int argc;
14692         char **argv;
14693 {
14694
14695         /* pthread test function */
14696 #ifndef PTHREAD_CREATE_DETACHED
14697 #define PTHREAD_CREATE_DETACHED 1
14698 #endif
14699         pthread_t t;
14700         int status;
14701         int detach = PTHREAD_CREATE_DETACHED;
14702
14703 #if HAVE_PTHREADS > 4
14704         /* Final pthreads */
14705         pthread_attr_t attr;
14706
14707         status = pthread_attr_init(&attr);
14708         if( status ) return status;
14709
14710 #if HAVE_PTHREADS < 7
14711         status = pthread_attr_setdetachstate(&attr, &detach);
14712         if( status < 0 ) status = errno;
14713 #else
14714         status = pthread_attr_setdetachstate(&attr, detach);
14715 #endif
14716         if( status ) return status;
14717         status = pthread_create( &t, &attr, task, NULL );
14718 #if HAVE_PTHREADS < 7
14719         if( status < 0 ) status = errno;
14720 #endif
14721         if( status ) return status;
14722 #else
14723         /* Draft 4 pthreads */
14724         status = pthread_create( &t, pthread_attr_default, task, NULL );
14725         if( status ) return errno;
14726
14727         /* give thread a chance to complete */
14728         /* it should remain joinable and hence detachable */
14729         sleep( 1 );
14730
14731         status = pthread_detach( &t );
14732         if( status ) return errno;
14733 #endif
14734
14735 #ifdef HAVE_LINUX_THREADS
14736         pthread_kill_other_threads_np();
14737 #endif
14738
14739         return 0;
14740
14741 }
14742
14743 EOF
14744 if { (eval echo configure:14745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14745 then
14746   ol_cv_pthread_lpthreads_lmach_lexc=yes
14747 else
14748   echo "configure: failed program was:" >&5
14749   cat conftest.$ac_ext >&5
14750   rm -fr conftest*
14751   ol_cv_pthread_lpthreads_lmach_lexc=no
14752 fi
14753 rm -fr conftest*
14754 fi
14755
14756
14757                 # restore the LIBS
14758                 LIBS="$ol_LIBS"
14759         
14760 fi
14761
14762 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14763
14764         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14765                 ol_link_pthreads="-lpthreads -lmach -lexc"
14766                 ol_link_threads=posix
14767         fi
14768 fi
14769
14770                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14771 if test "$ol_link_threads" = no ; then
14772         # try -lpthreads -lexc
14773         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14774 echo "configure:14775: checking for pthread link with -lpthreads -lexc" >&5
14775 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14776   echo $ac_n "(cached) $ac_c" 1>&6
14777 else
14778   
14779                 # save the flags
14780                 ol_LIBS="$LIBS"
14781                 LIBS="-lpthreads -lexc $LIBS"
14782
14783                 if test "$cross_compiling" = yes; then
14784   cat > conftest.$ac_ext <<EOF
14785 #line 14786 "configure"
14786 #include "confdefs.h"
14787 /* pthread test headers */
14788 #include <pthread.h>
14789 #if HAVE_PTHREADS < 7
14790 #include <errno.h>
14791 #endif
14792 #ifndef NULL
14793 #define NULL (void*)0
14794 #endif
14795
14796 static void *task(p)
14797         void *p;
14798 {
14799         return (void *) (p == NULL);
14800 }
14801
14802 int main() {
14803
14804         /* pthread test function */
14805 #ifndef PTHREAD_CREATE_DETACHED
14806 #define PTHREAD_CREATE_DETACHED 1
14807 #endif
14808         pthread_t t;
14809         int status;
14810         int detach = PTHREAD_CREATE_DETACHED;
14811
14812 #if HAVE_PTHREADS > 4
14813         /* Final pthreads */
14814         pthread_attr_t attr;
14815
14816         status = pthread_attr_init(&attr);
14817         if( status ) return status;
14818
14819 #if HAVE_PTHREADS < 7
14820         status = pthread_attr_setdetachstate(&attr, &detach);
14821         if( status < 0 ) status = errno;
14822 #else
14823         status = pthread_attr_setdetachstate(&attr, detach);
14824 #endif
14825         if( status ) return status;
14826         status = pthread_create( &t, &attr, task, NULL );
14827 #if HAVE_PTHREADS < 7
14828         if( status < 0 ) status = errno;
14829 #endif
14830         if( status ) return status;
14831 #else
14832         /* Draft 4 pthreads */
14833         status = pthread_create( &t, pthread_attr_default, task, NULL );
14834         if( status ) return errno;
14835
14836         /* give thread a chance to complete */
14837         /* it should remain joinable and hence detachable */
14838         sleep( 1 );
14839
14840         status = pthread_detach( &t );
14841         if( status ) return errno;
14842 #endif
14843
14844 #ifdef HAVE_LINUX_THREADS
14845         pthread_kill_other_threads_np();
14846 #endif
14847
14848         return 0;
14849
14850 ; return 0; }
14851 EOF
14852 if { (eval echo configure:14853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14853   rm -rf conftest*
14854   ol_cv_pthread_lpthreads_lexc=yes
14855 else
14856   echo "configure: failed program was:" >&5
14857   cat conftest.$ac_ext >&5
14858   rm -rf conftest*
14859   ol_cv_pthread_lpthreads_lexc=no
14860 fi
14861 rm -f conftest*
14862 else
14863   cat > conftest.$ac_ext <<EOF
14864 #line 14865 "configure"
14865 #include "confdefs.h"
14866 /* pthread test headers */
14867 #include <pthread.h>
14868 #if HAVE_PTHREADS < 7
14869 #include <errno.h>
14870 #endif
14871 #ifndef NULL
14872 #define NULL (void*)0
14873 #endif
14874
14875 static void *task(p)
14876         void *p;
14877 {
14878         return (void *) (p == NULL);
14879 }
14880
14881
14882 int main(argc, argv)
14883         int argc;
14884         char **argv;
14885 {
14886
14887         /* pthread test function */
14888 #ifndef PTHREAD_CREATE_DETACHED
14889 #define PTHREAD_CREATE_DETACHED 1
14890 #endif
14891         pthread_t t;
14892         int status;
14893         int detach = PTHREAD_CREATE_DETACHED;
14894
14895 #if HAVE_PTHREADS > 4
14896         /* Final pthreads */
14897         pthread_attr_t attr;
14898
14899         status = pthread_attr_init(&attr);
14900         if( status ) return status;
14901
14902 #if HAVE_PTHREADS < 7
14903         status = pthread_attr_setdetachstate(&attr, &detach);
14904         if( status < 0 ) status = errno;
14905 #else
14906         status = pthread_attr_setdetachstate(&attr, detach);
14907 #endif
14908         if( status ) return status;
14909         status = pthread_create( &t, &attr, task, NULL );
14910 #if HAVE_PTHREADS < 7
14911         if( status < 0 ) status = errno;
14912 #endif
14913         if( status ) return status;
14914 #else
14915         /* Draft 4 pthreads */
14916         status = pthread_create( &t, pthread_attr_default, task, NULL );
14917         if( status ) return errno;
14918
14919         /* give thread a chance to complete */
14920         /* it should remain joinable and hence detachable */
14921         sleep( 1 );
14922
14923         status = pthread_detach( &t );
14924         if( status ) return errno;
14925 #endif
14926
14927 #ifdef HAVE_LINUX_THREADS
14928         pthread_kill_other_threads_np();
14929 #endif
14930
14931         return 0;
14932
14933 }
14934
14935 EOF
14936 if { (eval echo configure:14937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14937 then
14938   ol_cv_pthread_lpthreads_lexc=yes
14939 else
14940   echo "configure: failed program was:" >&5
14941   cat conftest.$ac_ext >&5
14942   rm -fr conftest*
14943   ol_cv_pthread_lpthreads_lexc=no
14944 fi
14945 rm -fr conftest*
14946 fi
14947
14948
14949                 # restore the LIBS
14950                 LIBS="$ol_LIBS"
14951         
14952 fi
14953
14954 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14955
14956         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14957                 ol_link_pthreads="-lpthreads -lexc"
14958                 ol_link_threads=posix
14959         fi
14960 fi
14961
14962
14963                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14964 if test "$ol_link_threads" = no ; then
14965         # try -lpthreads
14966         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14967 echo "configure:14968: checking for pthread link with -lpthreads" >&5
14968 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14969   echo $ac_n "(cached) $ac_c" 1>&6
14970 else
14971   
14972                 # save the flags
14973                 ol_LIBS="$LIBS"
14974                 LIBS="-lpthreads $LIBS"
14975
14976                 if test "$cross_compiling" = yes; then
14977   cat > conftest.$ac_ext <<EOF
14978 #line 14979 "configure"
14979 #include "confdefs.h"
14980 /* pthread test headers */
14981 #include <pthread.h>
14982 #if HAVE_PTHREADS < 7
14983 #include <errno.h>
14984 #endif
14985 #ifndef NULL
14986 #define NULL (void*)0
14987 #endif
14988
14989 static void *task(p)
14990         void *p;
14991 {
14992         return (void *) (p == NULL);
14993 }
14994
14995 int main() {
14996
14997         /* pthread test function */
14998 #ifndef PTHREAD_CREATE_DETACHED
14999 #define PTHREAD_CREATE_DETACHED 1
15000 #endif
15001         pthread_t t;
15002         int status;
15003         int detach = PTHREAD_CREATE_DETACHED;
15004
15005 #if HAVE_PTHREADS > 4
15006         /* Final pthreads */
15007         pthread_attr_t attr;
15008
15009         status = pthread_attr_init(&attr);
15010         if( status ) return status;
15011
15012 #if HAVE_PTHREADS < 7
15013         status = pthread_attr_setdetachstate(&attr, &detach);
15014         if( status < 0 ) status = errno;
15015 #else
15016         status = pthread_attr_setdetachstate(&attr, detach);
15017 #endif
15018         if( status ) return status;
15019         status = pthread_create( &t, &attr, task, NULL );
15020 #if HAVE_PTHREADS < 7
15021         if( status < 0 ) status = errno;
15022 #endif
15023         if( status ) return status;
15024 #else
15025         /* Draft 4 pthreads */
15026         status = pthread_create( &t, pthread_attr_default, task, NULL );
15027         if( status ) return errno;
15028
15029         /* give thread a chance to complete */
15030         /* it should remain joinable and hence detachable */
15031         sleep( 1 );
15032
15033         status = pthread_detach( &t );
15034         if( status ) return errno;
15035 #endif
15036
15037 #ifdef HAVE_LINUX_THREADS
15038         pthread_kill_other_threads_np();
15039 #endif
15040
15041         return 0;
15042
15043 ; return 0; }
15044 EOF
15045 if { (eval echo configure:15046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15046   rm -rf conftest*
15047   ol_cv_pthread_lib_lpthreads=yes
15048 else
15049   echo "configure: failed program was:" >&5
15050   cat conftest.$ac_ext >&5
15051   rm -rf conftest*
15052   ol_cv_pthread_lib_lpthreads=no
15053 fi
15054 rm -f conftest*
15055 else
15056   cat > conftest.$ac_ext <<EOF
15057 #line 15058 "configure"
15058 #include "confdefs.h"
15059 /* pthread test headers */
15060 #include <pthread.h>
15061 #if HAVE_PTHREADS < 7
15062 #include <errno.h>
15063 #endif
15064 #ifndef NULL
15065 #define NULL (void*)0
15066 #endif
15067
15068 static void *task(p)
15069         void *p;
15070 {
15071         return (void *) (p == NULL);
15072 }
15073
15074
15075 int main(argc, argv)
15076         int argc;
15077         char **argv;
15078 {
15079
15080         /* pthread test function */
15081 #ifndef PTHREAD_CREATE_DETACHED
15082 #define PTHREAD_CREATE_DETACHED 1
15083 #endif
15084         pthread_t t;
15085         int status;
15086         int detach = PTHREAD_CREATE_DETACHED;
15087
15088 #if HAVE_PTHREADS > 4
15089         /* Final pthreads */
15090         pthread_attr_t attr;
15091
15092         status = pthread_attr_init(&attr);
15093         if( status ) return status;
15094
15095 #if HAVE_PTHREADS < 7
15096         status = pthread_attr_setdetachstate(&attr, &detach);
15097         if( status < 0 ) status = errno;
15098 #else
15099         status = pthread_attr_setdetachstate(&attr, detach);
15100 #endif
15101         if( status ) return status;
15102         status = pthread_create( &t, &attr, task, NULL );
15103 #if HAVE_PTHREADS < 7
15104         if( status < 0 ) status = errno;
15105 #endif
15106         if( status ) return status;
15107 #else
15108         /* Draft 4 pthreads */
15109         status = pthread_create( &t, pthread_attr_default, task, NULL );
15110         if( status ) return errno;
15111
15112         /* give thread a chance to complete */
15113         /* it should remain joinable and hence detachable */
15114         sleep( 1 );
15115
15116         status = pthread_detach( &t );
15117         if( status ) return errno;
15118 #endif
15119
15120 #ifdef HAVE_LINUX_THREADS
15121         pthread_kill_other_threads_np();
15122 #endif
15123
15124         return 0;
15125
15126 }
15127
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15130 then
15131   ol_cv_pthread_lib_lpthreads=yes
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135   rm -fr conftest*
15136   ol_cv_pthread_lib_lpthreads=no
15137 fi
15138 rm -fr conftest*
15139 fi
15140
15141
15142                 # restore the LIBS
15143                 LIBS="$ol_LIBS"
15144         
15145 fi
15146
15147 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15148
15149         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15150                 ol_link_pthreads="-lpthreads"
15151                 ol_link_threads=posix
15152         fi
15153 fi
15154
15155
15156                 if test $ol_link_threads != no ; then
15157                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15158
15159                                                 save_CPPFLAGS="$CPPFLAGS"
15160                         save_LIBS="$LIBS"
15161                         LIBS="$LTHREAD_LIBS $LIBS"
15162
15163                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15164 do
15165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15166 echo "configure:15167: checking for $ac_func" >&5
15167 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15168   echo $ac_n "(cached) $ac_c" 1>&6
15169 else
15170   cat > conftest.$ac_ext <<EOF
15171 #line 15172 "configure"
15172 #include "confdefs.h"
15173 /* System header to define __stub macros and hopefully few prototypes,
15174     which can conflict with char $ac_func(); below.  */
15175 #include <assert.h>
15176 /* Override any gcc2 internal prototype to avoid an error.  */
15177 /* We use char because int might match the return type of a gcc2
15178     builtin and then its argument prototype would still apply.  */
15179 char $ac_func();
15180 char (*f)();
15181
15182 int main() {
15183
15184 /* The GNU C library defines this for functions which it implements
15185     to always fail with ENOSYS.  Some functions are actually named
15186     something starting with __ and the normal name is an alias.  */
15187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15188 choke me
15189 #else
15190 f = $ac_func;
15191 #endif
15192
15193 ; return 0; }
15194 EOF
15195 if { (eval echo configure:15196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15196   rm -rf conftest*
15197   eval "ac_cv_func_$ac_func=yes"
15198 else
15199   echo "configure: failed program was:" >&5
15200   cat conftest.$ac_ext >&5
15201   rm -rf conftest*
15202   eval "ac_cv_func_$ac_func=no"
15203 fi
15204 rm -f conftest*
15205 fi
15206
15207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15208   echo "$ac_t""yes" 1>&6
15209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15210   cat >> confdefs.h <<EOF
15211 #define $ac_tr_func 1
15212 EOF
15213  
15214 else
15215   echo "$ac_t""no" 1>&6
15216 fi
15217 done
15218
15219
15220                         if test $ac_cv_func_sched_yield = no -a \
15221                                 $ac_cv_func_pthread_yield = no -a \
15222                                 $ac_cv_func_thr_yield = no ; then
15223                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15224 echo "configure:15225: checking for sched_yield in -lrt" >&5
15225 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15227   echo $ac_n "(cached) $ac_c" 1>&6
15228 else
15229   ac_save_LIBS="$LIBS"
15230 LIBS="-lrt  $LIBS"
15231 cat > conftest.$ac_ext <<EOF
15232 #line 15233 "configure"
15233 #include "confdefs.h"
15234 /* Override any gcc2 internal prototype to avoid an error.  */
15235 /* We use char because int might match the return type of a gcc2
15236     builtin and then its argument prototype would still apply.  */
15237 char sched_yield();
15238
15239 int main() {
15240 sched_yield()
15241 ; return 0; }
15242 EOF
15243 if { (eval echo configure:15244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15244   rm -rf conftest*
15245   eval "ac_cv_lib_$ac_lib_var=yes"
15246 else
15247   echo "configure: failed program was:" >&5
15248   cat conftest.$ac_ext >&5
15249   rm -rf conftest*
15250   eval "ac_cv_lib_$ac_lib_var=no"
15251 fi
15252 rm -f conftest*
15253 LIBS="$ac_save_LIBS"
15254
15255 fi
15256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15257   echo "$ac_t""yes" 1>&6
15258   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15259                                         cat >> confdefs.h <<\EOF
15260 #define HAVE_SCHED_YIELD 1
15261 EOF
15262
15263                                         ac_cv_func_sched_yield=yes
15264 else
15265   echo "$ac_t""no" 1>&6
15266 ac_cv_func_sched_yield=no
15267 fi
15268
15269                         fi
15270                         if test $ac_cv_func_sched_yield = no -a \
15271                                 $ac_cv_func_pthread_yield = no -a \
15272                                 "$ac_cv_func_thr_yield" = no ; then
15273                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15274                         fi
15275
15276                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15277 do
15278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15279 echo "configure:15280: checking for $ac_func" >&5
15280 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   cat > conftest.$ac_ext <<EOF
15284 #line 15285 "configure"
15285 #include "confdefs.h"
15286 /* System header to define __stub macros and hopefully few prototypes,
15287     which can conflict with char $ac_func(); below.  */
15288 #include <assert.h>
15289 /* Override any gcc2 internal prototype to avoid an error.  */
15290 /* We use char because int might match the return type of a gcc2
15291     builtin and then its argument prototype would still apply.  */
15292 char $ac_func();
15293 char (*f)();
15294
15295 int main() {
15296
15297 /* The GNU C library defines this for functions which it implements
15298     to always fail with ENOSYS.  Some functions are actually named
15299     something starting with __ and the normal name is an alias.  */
15300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15301 choke me
15302 #else
15303 f = $ac_func;
15304 #endif
15305
15306 ; return 0; }
15307 EOF
15308 if { (eval echo configure:15309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15309   rm -rf conftest*
15310   eval "ac_cv_func_$ac_func=yes"
15311 else
15312   echo "configure: failed program was:" >&5
15313   cat conftest.$ac_ext >&5
15314   rm -rf conftest*
15315   eval "ac_cv_func_$ac_func=no"
15316 fi
15317 rm -f conftest*
15318 fi
15319
15320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15321   echo "$ac_t""yes" 1>&6
15322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15323   cat >> confdefs.h <<EOF
15324 #define $ac_tr_func 1
15325 EOF
15326  
15327 else
15328   echo "$ac_t""no" 1>&6
15329 fi
15330 done
15331
15332
15333                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15334 echo "configure:15335: checking for pthread_detach with <pthread.h>" >&5
15335 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15336   echo $ac_n "(cached) $ac_c" 1>&6
15337 else
15338   
15339                                                                 cat > conftest.$ac_ext <<EOF
15340 #line 15341 "configure"
15341 #include "confdefs.h"
15342
15343 #include <pthread.h>
15344 #ifndef NULL
15345 #define NULL (void*)0
15346 #endif
15347
15348 int main() {
15349 pthread_detach(NULL);
15350 ; return 0; }
15351 EOF
15352 if { (eval echo configure:15353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15353   rm -rf conftest*
15354   ol_cv_func_pthread_detach=yes
15355 else
15356   echo "configure: failed program was:" >&5
15357   cat conftest.$ac_ext >&5
15358   rm -rf conftest*
15359   ol_cv_func_pthread_detach=no
15360 fi
15361 rm -f conftest*
15362                         
15363 fi
15364
15365 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15366
15367                         if test $ol_cv_func_pthread_detach = no ; then
15368                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15369                         fi
15370
15371                         cat >> confdefs.h <<\EOF
15372 #define HAVE_PTHREAD_DETACH 1
15373 EOF
15374
15375
15376                                                 for ac_func in \
15377                                 pthread_setconcurrency \
15378                                 pthread_getconcurrency \
15379                                 thr_setconcurrency \
15380                                 thr_getconcurrency \
15381                         
15382 do
15383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15384 echo "configure:15385: checking for $ac_func" >&5
15385 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15386   echo $ac_n "(cached) $ac_c" 1>&6
15387 else
15388   cat > conftest.$ac_ext <<EOF
15389 #line 15390 "configure"
15390 #include "confdefs.h"
15391 /* System header to define __stub macros and hopefully few prototypes,
15392     which can conflict with char $ac_func(); below.  */
15393 #include <assert.h>
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 /* We use char because int might match the return type of a gcc2
15396     builtin and then its argument prototype would still apply.  */
15397 char $ac_func();
15398 char (*f)();
15399
15400 int main() {
15401
15402 /* The GNU C library defines this for functions which it implements
15403     to always fail with ENOSYS.  Some functions are actually named
15404     something starting with __ and the normal name is an alias.  */
15405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15406 choke me
15407 #else
15408 f = $ac_func;
15409 #endif
15410
15411 ; return 0; }
15412 EOF
15413 if { (eval echo configure:15414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15414   rm -rf conftest*
15415   eval "ac_cv_func_$ac_func=yes"
15416 else
15417   echo "configure: failed program was:" >&5
15418   cat conftest.$ac_ext >&5
15419   rm -rf conftest*
15420   eval "ac_cv_func_$ac_func=no"
15421 fi
15422 rm -f conftest*
15423 fi
15424
15425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15426   echo "$ac_t""yes" 1>&6
15427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15428   cat >> confdefs.h <<EOF
15429 #define $ac_tr_func 1
15430 EOF
15431  
15432 else
15433   echo "$ac_t""no" 1>&6
15434 fi
15435 done
15436
15437
15438                         
15439         for ac_func in pthread_kill_other_threads_np
15440 do
15441 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15442 echo "configure:15443: checking for $ac_func" >&5
15443 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15444   echo $ac_n "(cached) $ac_c" 1>&6
15445 else
15446   cat > conftest.$ac_ext <<EOF
15447 #line 15448 "configure"
15448 #include "confdefs.h"
15449 /* System header to define __stub macros and hopefully few prototypes,
15450     which can conflict with char $ac_func(); below.  */
15451 #include <assert.h>
15452 /* Override any gcc2 internal prototype to avoid an error.  */
15453 /* We use char because int might match the return type of a gcc2
15454     builtin and then its argument prototype would still apply.  */
15455 char $ac_func();
15456 char (*f)();
15457
15458 int main() {
15459
15460 /* The GNU C library defines this for functions which it implements
15461     to always fail with ENOSYS.  Some functions are actually named
15462     something starting with __ and the normal name is an alias.  */
15463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15464 choke me
15465 #else
15466 f = $ac_func;
15467 #endif
15468
15469 ; return 0; }
15470 EOF
15471 if { (eval echo configure:15472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15472   rm -rf conftest*
15473   eval "ac_cv_func_$ac_func=yes"
15474 else
15475   echo "configure: failed program was:" >&5
15476   cat conftest.$ac_ext >&5
15477   rm -rf conftest*
15478   eval "ac_cv_func_$ac_func=no"
15479 fi
15480 rm -f conftest*
15481 fi
15482
15483 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15484   echo "$ac_t""yes" 1>&6
15485     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15486   cat >> confdefs.h <<EOF
15487 #define $ac_tr_func 1
15488 EOF
15489  
15490 else
15491   echo "$ac_t""no" 1>&6
15492 fi
15493 done
15494
15495         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15496 echo "configure:15497: checking for LinuxThreads implementation" >&5
15497 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15498   echo $ac_n "(cached) $ac_c" 1>&6
15499 else
15500   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15501 fi
15502
15503 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15504
15505                         
15506         
15507         
15508         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15509 echo "configure:15510: checking for LinuxThreads consistency" >&5
15510 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15511   echo $ac_n "(cached) $ac_c" 1>&6
15512 else
15513   
15514                 if test $ol_cv_header_linux_threads = yes -a \
15515                         $ol_cv_sys_linux_threads = yes; then
15516                         ol_cv_linux_threads=yes
15517                 elif test $ol_cv_header_linux_threads = no -a \
15518                         $ol_cv_sys_linux_threads = no; then
15519                         ol_cv_linux_threads=no
15520                 else
15521                         ol_cv_linux_threads=error
15522                 fi
15523         
15524 fi
15525
15526 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15527
15528
15529                         if test $ol_cv_linux_threads = error; then
15530                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15531                         fi
15532
15533                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15534 echo "configure:15535: checking if pthread_create() works" >&5
15535 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15536   echo $ac_n "(cached) $ac_c" 1>&6
15537 else
15538   
15539                         if test "$cross_compiling" = yes; then
15540                                 ol_cv_pthread_create_works=yes
15541 else
15542   cat > conftest.$ac_ext <<EOF
15543 #line 15544 "configure"
15544 #include "confdefs.h"
15545 /* pthread test headers */
15546 #include <pthread.h>
15547 #if HAVE_PTHREADS < 7
15548 #include <errno.h>
15549 #endif
15550 #ifndef NULL
15551 #define NULL (void*)0
15552 #endif
15553
15554 static void *task(p)
15555         void *p;
15556 {
15557         return (void *) (p == NULL);
15558 }
15559
15560
15561 int main(argc, argv)
15562         int argc;
15563         char **argv;
15564 {
15565
15566         /* pthread test function */
15567 #ifndef PTHREAD_CREATE_DETACHED
15568 #define PTHREAD_CREATE_DETACHED 1
15569 #endif
15570         pthread_t t;
15571         int status;
15572         int detach = PTHREAD_CREATE_DETACHED;
15573
15574 #if HAVE_PTHREADS > 4
15575         /* Final pthreads */
15576         pthread_attr_t attr;
15577
15578         status = pthread_attr_init(&attr);
15579         if( status ) return status;
15580
15581 #if HAVE_PTHREADS < 7
15582         status = pthread_attr_setdetachstate(&attr, &detach);
15583         if( status < 0 ) status = errno;
15584 #else
15585         status = pthread_attr_setdetachstate(&attr, detach);
15586 #endif
15587         if( status ) return status;
15588         status = pthread_create( &t, &attr, task, NULL );
15589 #if HAVE_PTHREADS < 7
15590         if( status < 0 ) status = errno;
15591 #endif
15592         if( status ) return status;
15593 #else
15594         /* Draft 4 pthreads */
15595         status = pthread_create( &t, pthread_attr_default, task, NULL );
15596         if( status ) return errno;
15597
15598         /* give thread a chance to complete */
15599         /* it should remain joinable and hence detachable */
15600         sleep( 1 );
15601
15602         status = pthread_detach( &t );
15603         if( status ) return errno;
15604 #endif
15605
15606 #ifdef HAVE_LINUX_THREADS
15607         pthread_kill_other_threads_np();
15608 #endif
15609
15610         return 0;
15611
15612 }
15613
15614 EOF
15615 if { (eval echo configure:15616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15616 then
15617   ol_cv_pthread_create_works=yes
15618 else
15619   echo "configure: failed program was:" >&5
15620   cat conftest.$ac_ext >&5
15621   rm -fr conftest*
15622   ol_cv_pthread_create_works=no
15623 fi
15624 rm -fr conftest*
15625 fi
15626
15627 fi
15628
15629 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15630
15631                         if test $ol_cv_pthread_create_works = no ; then
15632                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15633                         fi
15634
15635                                                 if test $ol_with_yielding_select = auto ; then
15636                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15637 echo "configure:15638: checking if select yields when using pthreads" >&5
15638 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15639   echo $ac_n "(cached) $ac_c" 1>&6
15640 else
15641   
15642                                 if test "$cross_compiling" = yes; then
15643   ol_cv_pthread_select_yields=cross
15644 else
15645   cat > conftest.$ac_ext <<EOF
15646 #line 15647 "configure"
15647 #include "confdefs.h"
15648
15649 #include <sys/types.h>
15650 #include <sys/time.h>
15651 #include <unistd.h>
15652 #include <pthread.h>
15653 #ifndef NULL
15654 #define NULL (void*) 0
15655 #endif
15656
15657 static int fildes[2];
15658
15659 static void *task(p)
15660         void *p;
15661 {
15662         int i;
15663         struct timeval tv;
15664
15665         fd_set rfds;
15666
15667         tv.tv_sec=10;
15668         tv.tv_usec=0;
15669
15670         FD_ZERO(&rfds);
15671         FD_SET(fildes[0], &rfds);
15672
15673         /* we're not interested in any fds */
15674         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15675
15676         if(i < 0) {
15677                 perror("select");
15678                 exit(10);
15679         }
15680
15681         exit(0); /* if we exit here, the select blocked the whole process */
15682 }
15683
15684 int main(argc, argv)
15685         int argc;
15686         char **argv;
15687 {
15688         pthread_t t;
15689
15690         /* create a pipe to select */
15691         if(pipe(&fildes[0])) {
15692                 perror("select");
15693                 exit(1);
15694         }
15695
15696 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15697         (void) pthread_setconcurrency(2);
15698 #else
15699 #ifdef HAVE_THR_SETCONCURRENCY
15700         /* Set Solaris LWP concurrency to 2 */
15701         thr_setconcurrency(2);
15702 #endif
15703 #endif
15704
15705 #if HAVE_PTHREADS < 6
15706         pthread_create(&t, pthread_attr_default, task, NULL);
15707 #else
15708         pthread_create(&t, NULL, task, NULL);
15709 #endif
15710
15711         /* make sure task runs first */
15712 #if HAVE_THR_YIELD
15713         thr_yield();
15714 #elif defined( HAVE_SCHED_YIELD )
15715         sched_yield();
15716 #elif defined( HAVE_PTHREAD_YIELD )
15717         pthread_yield();
15718 #endif
15719
15720         exit(2);
15721 }
15722 EOF
15723 if { (eval echo configure:15724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15724 then
15725   ol_cv_pthread_select_yields=no
15726 else
15727   echo "configure: failed program was:" >&5
15728   cat conftest.$ac_ext >&5
15729   rm -fr conftest*
15730   ol_cv_pthread_select_yields=yes
15731 fi
15732 rm -fr conftest*
15733 fi
15734
15735 fi
15736
15737 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15738
15739                                 if test $ol_cv_pthread_select_yields = cross ; then
15740                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15741                                 fi
15742
15743                                 if test $ol_cv_pthread_select_yields = yes ; then
15744                                         ol_with_yielding_select=yes
15745                                 fi
15746                         fi
15747
15748                                                 CPPFLAGS="$save_CPPFLAGS"
15749                         LIBS="$save_LIBS"
15750                 else
15751                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15752                 fi
15753         fi
15754
15755         if test $ol_with_threads = posix ; then
15756                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15757         fi
15758 fi
15759
15760 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15761         -o $ol_with_threads = mach ; then
15762
15763                 for ac_hdr in mach/cthreads.h cthreads.h
15764 do
15765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15767 echo "configure:15768: checking for $ac_hdr" >&5
15768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15769   echo $ac_n "(cached) $ac_c" 1>&6
15770 else
15771   cat > conftest.$ac_ext <<EOF
15772 #line 15773 "configure"
15773 #include "confdefs.h"
15774 #include <$ac_hdr>
15775 EOF
15776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15777 { (eval echo configure:15778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15779 if test -z "$ac_err"; then
15780   rm -rf conftest*
15781   eval "ac_cv_header_$ac_safe=yes"
15782 else
15783   echo "$ac_err" >&5
15784   echo "configure: failed program was:" >&5
15785   cat conftest.$ac_ext >&5
15786   rm -rf conftest*
15787   eval "ac_cv_header_$ac_safe=no"
15788 fi
15789 rm -f conftest*
15790 fi
15791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15792   echo "$ac_t""yes" 1>&6
15793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15794   cat >> confdefs.h <<EOF
15795 #define $ac_tr_hdr 1
15796 EOF
15797  
15798 else
15799   echo "$ac_t""no" 1>&6
15800 fi
15801 done
15802
15803         if test $ac_cv_header_mach_cthreads_h = yes ; then
15804                 ol_with_threads=found
15805
15806                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15807 echo "configure:15808: checking for cthread_fork" >&5
15808 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15809   echo $ac_n "(cached) $ac_c" 1>&6
15810 else
15811   cat > conftest.$ac_ext <<EOF
15812 #line 15813 "configure"
15813 #include "confdefs.h"
15814 /* System header to define __stub macros and hopefully few prototypes,
15815     which can conflict with char cthread_fork(); below.  */
15816 #include <assert.h>
15817 /* Override any gcc2 internal prototype to avoid an error.  */
15818 /* We use char because int might match the return type of a gcc2
15819     builtin and then its argument prototype would still apply.  */
15820 char cthread_fork();
15821 char (*f)();
15822
15823 int main() {
15824
15825 /* The GNU C library defines this for functions which it implements
15826     to always fail with ENOSYS.  Some functions are actually named
15827     something starting with __ and the normal name is an alias.  */
15828 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15829 choke me
15830 #else
15831 f = cthread_fork;
15832 #endif
15833
15834 ; return 0; }
15835 EOF
15836 if { (eval echo configure:15837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15837   rm -rf conftest*
15838   eval "ac_cv_func_cthread_fork=yes"
15839 else
15840   echo "configure: failed program was:" >&5
15841   cat conftest.$ac_ext >&5
15842   rm -rf conftest*
15843   eval "ac_cv_func_cthread_fork=no"
15844 fi
15845 rm -f conftest*
15846 fi
15847
15848 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15849   echo "$ac_t""yes" 1>&6
15850   ol_link_threads=yes
15851 else
15852   echo "$ac_t""no" 1>&6
15853 fi
15854
15855
15856                 if test $ol_link_threads = no ; then
15857                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15858 echo "configure:15859: checking for cthread_fork with -all_load" >&5
15859 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15860   echo $ac_n "(cached) $ac_c" 1>&6
15861 else
15862   
15863                                                                 save_LIBS="$LIBS"
15864                                 LIBS="-all_load $LIBS"
15865                                 cat > conftest.$ac_ext <<EOF
15866 #line 15867 "configure"
15867 #include "confdefs.h"
15868 #include <mach/cthreads.h>
15869 int main() {
15870
15871                                         cthread_fork((void *)0, (void *)0);
15872                                         
15873 ; return 0; }
15874 EOF
15875 if { (eval echo configure:15876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15876   rm -rf conftest*
15877   ol_cv_cthread_all_load=yes
15878 else
15879   echo "configure: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   rm -rf conftest*
15882   ol_cv_cthread_all_load=no
15883 fi
15884 rm -f conftest*
15885                                                                 LIBS="$save_LIBS"
15886                         
15887 fi
15888
15889 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15890
15891                         if test $ol_cv_cthread_all_load = yes ; then
15892                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15893                                 ol_link_threads=mach
15894                                 ol_with_threads=found
15895                         fi
15896                 fi
15897
15898         elif test $ac_cv_header_cthreads_h = yes ; then
15899                                 
15900                 ol_with_threads=found
15901  
15902                                 save_LIBS="$LIBS"
15903                 LIBS="$LIBS -lthreads"
15904                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15905 echo "configure:15906: checking for cthread_fork" >&5
15906 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15907   echo $ac_n "(cached) $ac_c" 1>&6
15908 else
15909   cat > conftest.$ac_ext <<EOF
15910 #line 15911 "configure"
15911 #include "confdefs.h"
15912 /* System header to define __stub macros and hopefully few prototypes,
15913     which can conflict with char cthread_fork(); below.  */
15914 #include <assert.h>
15915 /* Override any gcc2 internal prototype to avoid an error.  */
15916 /* We use char because int might match the return type of a gcc2
15917     builtin and then its argument prototype would still apply.  */
15918 char cthread_fork();
15919 char (*f)();
15920
15921 int main() {
15922
15923 /* The GNU C library defines this for functions which it implements
15924     to always fail with ENOSYS.  Some functions are actually named
15925     something starting with __ and the normal name is an alias.  */
15926 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15927 choke me
15928 #else
15929 f = cthread_fork;
15930 #endif
15931
15932 ; return 0; }
15933 EOF
15934 if { (eval echo configure:15935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15935   rm -rf conftest*
15936   eval "ac_cv_func_cthread_fork=yes"
15937 else
15938   echo "configure: failed program was:" >&5
15939   cat conftest.$ac_ext >&5
15940   rm -rf conftest*
15941   eval "ac_cv_func_cthread_fork=no"
15942 fi
15943 rm -f conftest*
15944 fi
15945
15946 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15947   echo "$ac_t""yes" 1>&6
15948   ol_link_threads=yes
15949 else
15950   echo "$ac_t""no" 1>&6
15951 fi
15952
15953                 LIBS="$save_LIBS"
15954
15955                 if test $ol_link_threads = yes ; then
15956                         LTHREAD_LIBS="-lthreads"
15957                         ol_link_threads=mach
15958                         ol_with_threads=found
15959                 else
15960                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15961                 fi
15962
15963         elif test $ol_with_threads = mach ; then
15964                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15965         fi
15966
15967         if test $ol_link_threads = mach ; then
15968                 cat >> confdefs.h <<\EOF
15969 #define HAVE_MACH_CTHREADS 1
15970 EOF
15971
15972         elif test $ol_with_threads = found ; then
15973                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15974         fi
15975 fi
15976
15977 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15978         -o $ol_with_threads = pth ; then
15979
15980         for ac_hdr in pth.h
15981 do
15982 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15983 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15984 echo "configure:15985: checking for $ac_hdr" >&5
15985 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15986   echo $ac_n "(cached) $ac_c" 1>&6
15987 else
15988   cat > conftest.$ac_ext <<EOF
15989 #line 15990 "configure"
15990 #include "confdefs.h"
15991 #include <$ac_hdr>
15992 EOF
15993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15994 { (eval echo configure:15995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15996 if test -z "$ac_err"; then
15997   rm -rf conftest*
15998   eval "ac_cv_header_$ac_safe=yes"
15999 else
16000   echo "$ac_err" >&5
16001   echo "configure: failed program was:" >&5
16002   cat conftest.$ac_ext >&5
16003   rm -rf conftest*
16004   eval "ac_cv_header_$ac_safe=no"
16005 fi
16006 rm -f conftest*
16007 fi
16008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16009   echo "$ac_t""yes" 1>&6
16010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16011   cat >> confdefs.h <<EOF
16012 #define $ac_tr_hdr 1
16013 EOF
16014  
16015 else
16016   echo "$ac_t""no" 1>&6
16017 fi
16018 done
16019
16020
16021         if test $ac_cv_header_pth_h = yes ; then
16022                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16023 echo "configure:16024: checking for pth_version in -lpth" >&5
16024 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16026   echo $ac_n "(cached) $ac_c" 1>&6
16027 else
16028   ac_save_LIBS="$LIBS"
16029 LIBS="-lpth  $LIBS"
16030 cat > conftest.$ac_ext <<EOF
16031 #line 16032 "configure"
16032 #include "confdefs.h"
16033 /* Override any gcc2 internal prototype to avoid an error.  */
16034 /* We use char because int might match the return type of a gcc2
16035     builtin and then its argument prototype would still apply.  */
16036 char pth_version();
16037
16038 int main() {
16039 pth_version()
16040 ; return 0; }
16041 EOF
16042 if { (eval echo configure:16043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16043   rm -rf conftest*
16044   eval "ac_cv_lib_$ac_lib_var=yes"
16045 else
16046   echo "configure: failed program was:" >&5
16047   cat conftest.$ac_ext >&5
16048   rm -rf conftest*
16049   eval "ac_cv_lib_$ac_lib_var=no"
16050 fi
16051 rm -f conftest*
16052 LIBS="$ac_save_LIBS"
16053
16054 fi
16055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16056   echo "$ac_t""yes" 1>&6
16057   have_pth=yes
16058 else
16059   echo "$ac_t""no" 1>&6
16060 have_pth=no
16061 fi
16062
16063
16064                 if test $have_pth = yes ; then
16065                         cat >> confdefs.h <<\EOF
16066 #define HAVE_GNU_PTH 1
16067 EOF
16068
16069                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16070                         ol_link_threads=pth
16071                         ol_with_threads=found
16072
16073                         if test $ol_with_yielding_select = auto ; then
16074                                 ol_with_yielding_select=yes
16075                         fi
16076                 fi
16077         fi
16078 fi
16079
16080 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16081         -o $ol_with_threads = lwp ; then
16082
16083                 for ac_hdr in thread.h synch.h
16084 do
16085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16087 echo "configure:16088: checking for $ac_hdr" >&5
16088 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16089   echo $ac_n "(cached) $ac_c" 1>&6
16090 else
16091   cat > conftest.$ac_ext <<EOF
16092 #line 16093 "configure"
16093 #include "confdefs.h"
16094 #include <$ac_hdr>
16095 EOF
16096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16097 { (eval echo configure:16098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16099 if test -z "$ac_err"; then
16100   rm -rf conftest*
16101   eval "ac_cv_header_$ac_safe=yes"
16102 else
16103   echo "$ac_err" >&5
16104   echo "configure: failed program was:" >&5
16105   cat conftest.$ac_ext >&5
16106   rm -rf conftest*
16107   eval "ac_cv_header_$ac_safe=no"
16108 fi
16109 rm -f conftest*
16110 fi
16111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16112   echo "$ac_t""yes" 1>&6
16113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16114   cat >> confdefs.h <<EOF
16115 #define $ac_tr_hdr 1
16116 EOF
16117  
16118 else
16119   echo "$ac_t""no" 1>&6
16120 fi
16121 done
16122
16123         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16124                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16125 echo "configure:16126: checking for thr_create in -lthread" >&5
16126 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16128   echo $ac_n "(cached) $ac_c" 1>&6
16129 else
16130   ac_save_LIBS="$LIBS"
16131 LIBS="-lthread  $LIBS"
16132 cat > conftest.$ac_ext <<EOF
16133 #line 16134 "configure"
16134 #include "confdefs.h"
16135 /* Override any gcc2 internal prototype to avoid an error.  */
16136 /* We use char because int might match the return type of a gcc2
16137     builtin and then its argument prototype would still apply.  */
16138 char thr_create();
16139
16140 int main() {
16141 thr_create()
16142 ; return 0; }
16143 EOF
16144 if { (eval echo configure:16145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16145   rm -rf conftest*
16146   eval "ac_cv_lib_$ac_lib_var=yes"
16147 else
16148   echo "configure: failed program was:" >&5
16149   cat conftest.$ac_ext >&5
16150   rm -rf conftest*
16151   eval "ac_cv_lib_$ac_lib_var=no"
16152 fi
16153 rm -f conftest*
16154 LIBS="$ac_save_LIBS"
16155
16156 fi
16157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16158   echo "$ac_t""yes" 1>&6
16159   have_thr=yes
16160 else
16161   echo "$ac_t""no" 1>&6
16162 have_thr=no
16163 fi
16164
16165
16166                 if test $have_thr = yes ; then
16167                         cat >> confdefs.h <<\EOF
16168 #define HAVE_THR 1
16169 EOF
16170
16171                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16172                         ol_link_threads=thr
16173
16174                         if test $ol_with_yielding_select = auto ; then
16175                                 ol_with_yielding_select=yes
16176                         fi
16177
16178                                                 for ac_func in \
16179                                 thr_setconcurrency \
16180                                 thr_getconcurrency \
16181                         
16182 do
16183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16184 echo "configure:16185: checking for $ac_func" >&5
16185 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16186   echo $ac_n "(cached) $ac_c" 1>&6
16187 else
16188   cat > conftest.$ac_ext <<EOF
16189 #line 16190 "configure"
16190 #include "confdefs.h"
16191 /* System header to define __stub macros and hopefully few prototypes,
16192     which can conflict with char $ac_func(); below.  */
16193 #include <assert.h>
16194 /* Override any gcc2 internal prototype to avoid an error.  */
16195 /* We use char because int might match the return type of a gcc2
16196     builtin and then its argument prototype would still apply.  */
16197 char $ac_func();
16198 char (*f)();
16199
16200 int main() {
16201
16202 /* The GNU C library defines this for functions which it implements
16203     to always fail with ENOSYS.  Some functions are actually named
16204     something starting with __ and the normal name is an alias.  */
16205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16206 choke me
16207 #else
16208 f = $ac_func;
16209 #endif
16210
16211 ; return 0; }
16212 EOF
16213 if { (eval echo configure:16214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16214   rm -rf conftest*
16215   eval "ac_cv_func_$ac_func=yes"
16216 else
16217   echo "configure: failed program was:" >&5
16218   cat conftest.$ac_ext >&5
16219   rm -rf conftest*
16220   eval "ac_cv_func_$ac_func=no"
16221 fi
16222 rm -f conftest*
16223 fi
16224
16225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16226   echo "$ac_t""yes" 1>&6
16227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16228   cat >> confdefs.h <<EOF
16229 #define $ac_tr_func 1
16230 EOF
16231  
16232 else
16233   echo "$ac_t""no" 1>&6
16234 fi
16235 done
16236
16237                 fi
16238         fi
16239
16240                 for ac_hdr in lwp/lwp.h
16241 do
16242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16244 echo "configure:16245: checking for $ac_hdr" >&5
16245 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16246   echo $ac_n "(cached) $ac_c" 1>&6
16247 else
16248   cat > conftest.$ac_ext <<EOF
16249 #line 16250 "configure"
16250 #include "confdefs.h"
16251 #include <$ac_hdr>
16252 EOF
16253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16254 { (eval echo configure:16255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16256 if test -z "$ac_err"; then
16257   rm -rf conftest*
16258   eval "ac_cv_header_$ac_safe=yes"
16259 else
16260   echo "$ac_err" >&5
16261   echo "configure: failed program was:" >&5
16262   cat conftest.$ac_ext >&5
16263   rm -rf conftest*
16264   eval "ac_cv_header_$ac_safe=no"
16265 fi
16266 rm -f conftest*
16267 fi
16268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16269   echo "$ac_t""yes" 1>&6
16270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16271   cat >> confdefs.h <<EOF
16272 #define $ac_tr_hdr 1
16273 EOF
16274  
16275 else
16276   echo "$ac_t""no" 1>&6
16277 fi
16278 done
16279
16280         if test $ac_cv_header_lwp_lwp_h = yes ; then
16281                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16282 echo "configure:16283: checking for lwp_create in -llwp" >&5
16283 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16285   echo $ac_n "(cached) $ac_c" 1>&6
16286 else
16287   ac_save_LIBS="$LIBS"
16288 LIBS="-llwp  $LIBS"
16289 cat > conftest.$ac_ext <<EOF
16290 #line 16291 "configure"
16291 #include "confdefs.h"
16292 /* Override any gcc2 internal prototype to avoid an error.  */
16293 /* We use char because int might match the return type of a gcc2
16294     builtin and then its argument prototype would still apply.  */
16295 char lwp_create();
16296
16297 int main() {
16298 lwp_create()
16299 ; return 0; }
16300 EOF
16301 if { (eval echo configure:16302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16302   rm -rf conftest*
16303   eval "ac_cv_lib_$ac_lib_var=yes"
16304 else
16305   echo "configure: failed program was:" >&5
16306   cat conftest.$ac_ext >&5
16307   rm -rf conftest*
16308   eval "ac_cv_lib_$ac_lib_var=no"
16309 fi
16310 rm -f conftest*
16311 LIBS="$ac_save_LIBS"
16312
16313 fi
16314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16315   echo "$ac_t""yes" 1>&6
16316   have_lwp=yes
16317 else
16318   echo "$ac_t""no" 1>&6
16319 have_lwp=no
16320 fi
16321
16322
16323                 if test $have_lwp = yes ; then
16324                         cat >> confdefs.h <<\EOF
16325 #define HAVE_LWP 1
16326 EOF
16327
16328                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16329                         ol_link_threads=lwp
16330
16331                         if test $ol_with_yielding_select = auto ; then
16332                                 ol_with_yielding_select=no
16333                         fi
16334                 fi
16335         fi
16336 fi
16337
16338 if test $ol_with_yielding_select = yes ; then
16339         cat >> confdefs.h <<\EOF
16340 #define HAVE_YIELDING_SELECT 1
16341 EOF
16342
16343 fi
16344
16345 if test $ol_with_threads = manual ; then
16346                 ol_link_threads=yes
16347
16348         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16349
16350         for ac_hdr in pthread.h sched.h
16351 do
16352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16354 echo "configure:16355: checking for $ac_hdr" >&5
16355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16356   echo $ac_n "(cached) $ac_c" 1>&6
16357 else
16358   cat > conftest.$ac_ext <<EOF
16359 #line 16360 "configure"
16360 #include "confdefs.h"
16361 #include <$ac_hdr>
16362 EOF
16363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16364 { (eval echo configure:16365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16366 if test -z "$ac_err"; then
16367   rm -rf conftest*
16368   eval "ac_cv_header_$ac_safe=yes"
16369 else
16370   echo "$ac_err" >&5
16371   echo "configure: failed program was:" >&5
16372   cat conftest.$ac_ext >&5
16373   rm -rf conftest*
16374   eval "ac_cv_header_$ac_safe=no"
16375 fi
16376 rm -f conftest*
16377 fi
16378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16379   echo "$ac_t""yes" 1>&6
16380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16381   cat >> confdefs.h <<EOF
16382 #define $ac_tr_hdr 1
16383 EOF
16384  
16385 else
16386   echo "$ac_t""no" 1>&6
16387 fi
16388 done
16389
16390         for ac_func in sched_yield pthread_yield
16391 do
16392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16393 echo "configure:16394: checking for $ac_func" >&5
16394 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16395   echo $ac_n "(cached) $ac_c" 1>&6
16396 else
16397   cat > conftest.$ac_ext <<EOF
16398 #line 16399 "configure"
16399 #include "confdefs.h"
16400 /* System header to define __stub macros and hopefully few prototypes,
16401     which can conflict with char $ac_func(); below.  */
16402 #include <assert.h>
16403 /* Override any gcc2 internal prototype to avoid an error.  */
16404 /* We use char because int might match the return type of a gcc2
16405     builtin and then its argument prototype would still apply.  */
16406 char $ac_func();
16407 char (*f)();
16408
16409 int main() {
16410
16411 /* The GNU C library defines this for functions which it implements
16412     to always fail with ENOSYS.  Some functions are actually named
16413     something starting with __ and the normal name is an alias.  */
16414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16415 choke me
16416 #else
16417 f = $ac_func;
16418 #endif
16419
16420 ; return 0; }
16421 EOF
16422 if { (eval echo configure:16423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16423   rm -rf conftest*
16424   eval "ac_cv_func_$ac_func=yes"
16425 else
16426   echo "configure: failed program was:" >&5
16427   cat conftest.$ac_ext >&5
16428   rm -rf conftest*
16429   eval "ac_cv_func_$ac_func=no"
16430 fi
16431 rm -f conftest*
16432 fi
16433
16434 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16435   echo "$ac_t""yes" 1>&6
16436     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16437   cat >> confdefs.h <<EOF
16438 #define $ac_tr_func 1
16439 EOF
16440  
16441 else
16442   echo "$ac_t""no" 1>&6
16443 fi
16444 done
16445
16446         
16447         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16448 echo "configure:16449: checking for LinuxThreads pthread.h" >&5
16449 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16450   echo $ac_n "(cached) $ac_c" 1>&6
16451 else
16452   cat > conftest.$ac_ext <<EOF
16453 #line 16454 "configure"
16454 #include "confdefs.h"
16455 #include <pthread.h>
16456 EOF
16457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16458   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16459   rm -rf conftest*
16460   ol_cv_header_linux_threads=yes
16461 else
16462   rm -rf conftest*
16463   ol_cv_header_linux_threads=no
16464 fi
16465 rm -f conftest*
16466
16467                 
16468 fi
16469
16470 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16471         if test $ol_cv_header_linux_threads = yes; then
16472                 cat >> confdefs.h <<\EOF
16473 #define HAVE_LINUX_THREADS 1
16474 EOF
16475
16476         fi
16477
16478
16479         for ac_hdr in mach/cthreads.h
16480 do
16481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16483 echo "configure:16484: checking for $ac_hdr" >&5
16484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16485   echo $ac_n "(cached) $ac_c" 1>&6
16486 else
16487   cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 #include <$ac_hdr>
16491 EOF
16492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16493 { (eval echo configure:16494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16495 if test -z "$ac_err"; then
16496   rm -rf conftest*
16497   eval "ac_cv_header_$ac_safe=yes"
16498 else
16499   echo "$ac_err" >&5
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   eval "ac_cv_header_$ac_safe=no"
16504 fi
16505 rm -f conftest*
16506 fi
16507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16508   echo "$ac_t""yes" 1>&6
16509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16510   cat >> confdefs.h <<EOF
16511 #define $ac_tr_hdr 1
16512 EOF
16513  
16514 else
16515   echo "$ac_t""no" 1>&6
16516 fi
16517 done
16518
16519         for ac_hdr in lwp/lwp.h
16520 do
16521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16523 echo "configure:16524: checking for $ac_hdr" >&5
16524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16525   echo $ac_n "(cached) $ac_c" 1>&6
16526 else
16527   cat > conftest.$ac_ext <<EOF
16528 #line 16529 "configure"
16529 #include "confdefs.h"
16530 #include <$ac_hdr>
16531 EOF
16532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16533 { (eval echo configure:16534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16535 if test -z "$ac_err"; then
16536   rm -rf conftest*
16537   eval "ac_cv_header_$ac_safe=yes"
16538 else
16539   echo "$ac_err" >&5
16540   echo "configure: failed program was:" >&5
16541   cat conftest.$ac_ext >&5
16542   rm -rf conftest*
16543   eval "ac_cv_header_$ac_safe=no"
16544 fi
16545 rm -f conftest*
16546 fi
16547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16548   echo "$ac_t""yes" 1>&6
16549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16550   cat >> confdefs.h <<EOF
16551 #define $ac_tr_hdr 1
16552 EOF
16553  
16554 else
16555   echo "$ac_t""no" 1>&6
16556 fi
16557 done
16558
16559         for ac_hdr in thread.h synch.h
16560 do
16561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16563 echo "configure:16564: checking for $ac_hdr" >&5
16564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16565   echo $ac_n "(cached) $ac_c" 1>&6
16566 else
16567   cat > conftest.$ac_ext <<EOF
16568 #line 16569 "configure"
16569 #include "confdefs.h"
16570 #include <$ac_hdr>
16571 EOF
16572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16573 { (eval echo configure:16574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16575 if test -z "$ac_err"; then
16576   rm -rf conftest*
16577   eval "ac_cv_header_$ac_safe=yes"
16578 else
16579   echo "$ac_err" >&5
16580   echo "configure: failed program was:" >&5
16581   cat conftest.$ac_ext >&5
16582   rm -rf conftest*
16583   eval "ac_cv_header_$ac_safe=no"
16584 fi
16585 rm -f conftest*
16586 fi
16587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16588   echo "$ac_t""yes" 1>&6
16589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16590   cat >> confdefs.h <<EOF
16591 #define $ac_tr_hdr 1
16592 EOF
16593  
16594 else
16595   echo "$ac_t""no" 1>&6
16596 fi
16597 done
16598
16599 fi
16600
16601 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16602                         cat >> confdefs.h <<\EOF
16603 #define REENTRANT 1
16604 EOF
16605
16606         cat >> confdefs.h <<\EOF
16607 #define _REENTRANT 1
16608 EOF
16609
16610         cat >> confdefs.h <<\EOF
16611 #define THREAD_SAFE 1
16612 EOF
16613
16614         cat >> confdefs.h <<\EOF
16615 #define _THREAD_SAFE 1
16616 EOF
16617
16618         cat >> confdefs.h <<\EOF
16619 #define THREADSAFE 1
16620 EOF
16621
16622         cat >> confdefs.h <<\EOF
16623 #define _THREADSAFE 1
16624 EOF
16625
16626         cat >> confdefs.h <<\EOF
16627 #define _SGI_MP_SOURCE 1
16628 EOF
16629
16630
16631                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16632 echo "configure:16633: checking for thread specific errno" >&5
16633 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16634   echo $ac_n "(cached) $ac_c" 1>&6
16635 else
16636   
16637                 cat > conftest.$ac_ext <<EOF
16638 #line 16639 "configure"
16639 #include "confdefs.h"
16640 #include <errno.h>
16641 int main() {
16642 errno = 0;
16643 ; return 0; }
16644 EOF
16645 if { (eval echo configure:16646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16646   rm -rf conftest*
16647   ol_cv_errno_thread_specific=yes
16648 else
16649   echo "configure: failed program was:" >&5
16650   cat conftest.$ac_ext >&5
16651   rm -rf conftest*
16652   ol_cv_errno_thread_specific=no
16653 fi
16654 rm -f conftest*
16655         
16656 fi
16657
16658 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16659
16660                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16661 echo "configure:16662: checking for thread specific h_errno" >&5
16662 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16663   echo $ac_n "(cached) $ac_c" 1>&6
16664 else
16665   
16666                 cat > conftest.$ac_ext <<EOF
16667 #line 16668 "configure"
16668 #include "confdefs.h"
16669 #include <netdb.h>
16670 int main() {
16671 h_errno = 0;
16672 ; return 0; }
16673 EOF
16674 if { (eval echo configure:16675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16675   rm -rf conftest*
16676   ol_cv_h_errno_thread_specific=yes
16677 else
16678   echo "configure: failed program was:" >&5
16679   cat conftest.$ac_ext >&5
16680   rm -rf conftest*
16681   ol_cv_h_errno_thread_specific=no
16682 fi
16683 rm -f conftest*
16684         
16685 fi
16686
16687 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16688
16689         if test $ol_cv_errno_thread_specific != yes \
16690                 -o $ol_cv_h_errno_thread_specific != yes ; then
16691                 LIBS="$LTHREAD_LIBS $LIBS"
16692                 LTHREAD_LIBS=""
16693         fi
16694
16695 fi  
16696
16697 if test $ol_link_threads = no ; then
16698         if test $ol_with_threads = yes ; then
16699                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16700         fi
16701
16702         if test $ol_with_threads = auto ; then
16703                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16704                 ol_with_threads=no
16705         fi
16706
16707         cat >> confdefs.h <<\EOF
16708 #define NO_THREADS 1
16709 EOF
16710
16711         LTHREAD_LIBS=""
16712 fi
16713
16714 if test $ol_link_threads != no ; then
16715         cat >> confdefs.h <<\EOF
16716 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16717 EOF
16718
16719 fi
16720
16721 for ac_func in \
16722         ctime_r                 \
16723         gethostbyname_r gethostbyaddr_r \
16724
16725 do
16726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16727 echo "configure:16728: checking for $ac_func" >&5
16728 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16729   echo $ac_n "(cached) $ac_c" 1>&6
16730 else
16731   cat > conftest.$ac_ext <<EOF
16732 #line 16733 "configure"
16733 #include "confdefs.h"
16734 /* System header to define __stub macros and hopefully few prototypes,
16735     which can conflict with char $ac_func(); below.  */
16736 #include <assert.h>
16737 /* Override any gcc2 internal prototype to avoid an error.  */
16738 /* We use char because int might match the return type of a gcc2
16739     builtin and then its argument prototype would still apply.  */
16740 char $ac_func();
16741 char (*f)();
16742
16743 int main() {
16744
16745 /* The GNU C library defines this for functions which it implements
16746     to always fail with ENOSYS.  Some functions are actually named
16747     something starting with __ and the normal name is an alias.  */
16748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16749 choke me
16750 #else
16751 f = $ac_func;
16752 #endif
16753
16754 ; return 0; }
16755 EOF
16756 if { (eval echo configure:16757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16757   rm -rf conftest*
16758   eval "ac_cv_func_$ac_func=yes"
16759 else
16760   echo "configure: failed program was:" >&5
16761   cat conftest.$ac_ext >&5
16762   rm -rf conftest*
16763   eval "ac_cv_func_$ac_func=no"
16764 fi
16765 rm -f conftest*
16766 fi
16767
16768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16769   echo "$ac_t""yes" 1>&6
16770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16771   cat >> confdefs.h <<EOF
16772 #define $ac_tr_func 1
16773 EOF
16774  
16775 else
16776   echo "$ac_t""no" 1>&6
16777 fi
16778 done
16779
16780
16781 if test "$ac_cv_func_ctime_r" = no ; then
16782         ol_cv_func_ctime_r_nargs=0
16783 else
16784         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16785 echo "configure:16786: checking number of arguments of ctime_r" >&5
16786 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16787   echo $ac_n "(cached) $ac_c" 1>&6
16788 else
16789   cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792 #include <time.h>
16793 int main() {
16794 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16795 ; return 0; }
16796 EOF
16797 if { (eval echo configure:16798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16798   rm -rf conftest*
16799   ol_cv_func_ctime_r_nargs3=yes
16800 else
16801   echo "configure: failed program was:" >&5
16802   cat conftest.$ac_ext >&5
16803   rm -rf conftest*
16804   ol_cv_func_ctime_r_nargs3=no
16805 fi
16806 rm -f conftest*
16807
16808         cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811 #include <time.h>
16812 int main() {
16813 time_t ti; char *buffer; ctime_r(&ti,buffer);
16814 ; return 0; }
16815 EOF
16816 if { (eval echo configure:16817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16817   rm -rf conftest*
16818   ol_cv_func_ctime_r_nargs2=yes
16819 else
16820   echo "configure: failed program was:" >&5
16821   cat conftest.$ac_ext >&5
16822   rm -rf conftest*
16823   ol_cv_func_ctime_r_nargs2=no
16824 fi
16825 rm -f conftest*
16826
16827         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16828                 $ol_cv_func_ctime_r_nargs2 = no ; then
16829
16830                 ol_cv_func_ctime_r_nargs=3
16831
16832         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16833                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16834
16835                 ol_cv_func_ctime_r_nargs=2
16836
16837         else
16838                 ol_cv_func_ctime_r_nargs=0
16839         fi
16840   
16841 fi
16842
16843 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16844
16845   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16846         cat >> confdefs.h <<EOF
16847 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16848 EOF
16849
16850   fi
16851
16852 fi
16853
16854 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16855         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16856 echo "configure:16857: checking number of arguments of gethostbyname_r" >&5
16857 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16858   echo $ac_n "(cached) $ac_c" 1>&6
16859 else
16860   cat > conftest.$ac_ext <<EOF
16861 #line 16862 "configure"
16862 #include "confdefs.h"
16863 #include <sys/types.h>
16864 #include <sys/socket.h>
16865 #include <netinet/in.h>
16866 #include <netdb.h>
16867 #define BUFSIZE (sizeof(struct hostent)+10)
16868 int main() {
16869 struct hostent hent; char buffer[BUFSIZE];
16870                 int bufsize=BUFSIZE;int h_errno;
16871                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16872                         buffer, bufsize, &h_errno);
16873 ; return 0; }
16874 EOF
16875 if { (eval echo configure:16876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16876   rm -rf conftest*
16877   ol_cv_func_gethostbyname_r_nargs5=yes
16878 else
16879   echo "configure: failed program was:" >&5
16880   cat conftest.$ac_ext >&5
16881   rm -rf conftest*
16882   ol_cv_func_gethostbyname_r_nargs5=no
16883 fi
16884 rm -f conftest*
16885
16886         cat > conftest.$ac_ext <<EOF
16887 #line 16888 "configure"
16888 #include "confdefs.h"
16889 #include <sys/types.h>
16890 #include <sys/socket.h>
16891 #include <netinet/in.h>
16892 #include <netdb.h>
16893 #define BUFSIZE (sizeof(struct hostent)+10)
16894 int main() {
16895 struct hostent hent;struct hostent *rhent;
16896                 char buffer[BUFSIZE];
16897                 int bufsize=BUFSIZE;int h_errno;
16898                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16899                         &rhent, &h_errno);
16900 ; return 0; }
16901 EOF
16902 if { (eval echo configure:16903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16903   rm -rf conftest*
16904   ol_cv_func_gethostbyname_r_nargs6=yes
16905 else
16906   echo "configure: failed program was:" >&5
16907   cat conftest.$ac_ext >&5
16908   rm -rf conftest*
16909   ol_cv_func_gethostbyname_r_nargs6=no
16910 fi
16911 rm -f conftest*
16912
16913         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16914                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16915
16916                 ol_cv_func_gethostbyname_r_nargs=5
16917
16918         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16919                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16920
16921                 ol_cv_func_gethostbyname_r_nargs=6
16922
16923         else
16924                 ol_cv_func_gethostbyname_r_nargs=0
16925         fi
16926   
16927 fi
16928
16929 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16930   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16931         cat >> confdefs.h <<EOF
16932 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16933 EOF
16934
16935   fi
16936
16937 else
16938         ol_cv_func_gethostbyname_r_nargs=0
16939 fi
16940  
16941 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16942         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16943 echo "configure:16944: checking number of arguments of gethostbyaddr_r" >&5
16944 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16945   echo $ac_n "(cached) $ac_c" 1>&6
16946 else
16947   cat > conftest.$ac_ext <<EOF
16948 #line 16949 "configure"
16949 #include "confdefs.h"
16950 #include <sys/types.h>
16951 #include <sys/socket.h>
16952 #include <netinet/in.h>
16953 #include <netdb.h>
16954 #define BUFSIZE (sizeof(struct hostent)+10)
16955 int main() {
16956 struct hostent hent; char buffer[BUFSIZE]; 
16957             struct in_addr add;
16958             size_t alen=sizeof(struct in_addr);
16959             int bufsize=BUFSIZE;int h_errno;
16960                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16961                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16962 ; return 0; }
16963 EOF
16964 if { (eval echo configure:16965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16965   rm -rf conftest*
16966   ol_cv_func_gethostbyaddr_r_nargs7=yes
16967 else
16968   echo "configure: failed program was:" >&5
16969   cat conftest.$ac_ext >&5
16970   rm -rf conftest*
16971   ol_cv_func_gethostbyaddr_r_nargs7=no
16972 fi
16973 rm -f conftest*
16974
16975         cat > conftest.$ac_ext <<EOF
16976 #line 16977 "configure"
16977 #include "confdefs.h"
16978 #include <sys/types.h>
16979 #include <sys/socket.h>
16980 #include <netinet/in.h>
16981 #include <netdb.h>
16982 #define BUFSIZE (sizeof(struct hostent)+10)
16983 int main() {
16984 struct hostent hent;
16985                 struct hostent *rhent; char buffer[BUFSIZE]; 
16986                 struct in_addr add;
16987                 size_t alen=sizeof(struct in_addr);
16988                 int bufsize=BUFSIZE;int h_errno;
16989                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16990                         alen, AF_INET, &hent, buffer, bufsize, 
16991                         &rhent, &h_errno);
16992 ; return 0; }
16993 EOF
16994 if { (eval echo configure:16995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16995   rm -rf conftest*
16996   ol_cv_func_gethostbyaddr_r_nargs8=yes
16997 else
16998   echo "configure: failed program was:" >&5
16999   cat conftest.$ac_ext >&5
17000   rm -rf conftest*
17001   ol_cv_func_gethostbyaddr_r_nargs8=no
17002 fi
17003 rm -f conftest*
17004
17005         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
17006                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
17007
17008                 ol_cv_func_gethostbyaddr_r_nargs=7
17009
17010         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
17011                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
17012
17013                 ol_cv_func_gethostbyaddr_r_nargs=8
17014
17015         else
17016                 ol_cv_func_gethostbyaddr_r_nargs=0
17017         fi
17018   
17019 fi
17020
17021 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
17022   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
17023     cat >> confdefs.h <<EOF
17024 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
17025 EOF
17026
17027   fi
17028
17029 else
17030         ol_cv_func_gethostbyaddr_r_nargs=0
17031 fi
17032
17033 ol_link_ldbm=no 
17034
17035 if test $ol_with_ldbm_api = auto \
17036         -o $ol_with_ldbm_api = berkeley \
17037         -o $ol_with_ldbm_api = bcompat ; then
17038
17039         if test $ol_with_ldbm_api = bcompat; then \
17040                 for ac_hdr in db_185.h db.h
17041 do
17042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17044 echo "configure:17045: checking for $ac_hdr" >&5
17045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17046   echo $ac_n "(cached) $ac_c" 1>&6
17047 else
17048   cat > conftest.$ac_ext <<EOF
17049 #line 17050 "configure"
17050 #include "confdefs.h"
17051 #include <$ac_hdr>
17052 EOF
17053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17054 { (eval echo configure:17055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17056 if test -z "$ac_err"; then
17057   rm -rf conftest*
17058   eval "ac_cv_header_$ac_safe=yes"
17059 else
17060   echo "$ac_err" >&5
17061   echo "configure: failed program was:" >&5
17062   cat conftest.$ac_ext >&5
17063   rm -rf conftest*
17064   eval "ac_cv_header_$ac_safe=no"
17065 fi
17066 rm -f conftest*
17067 fi
17068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17069   echo "$ac_t""yes" 1>&6
17070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17071   cat >> confdefs.h <<EOF
17072 #define $ac_tr_hdr 1
17073 EOF
17074  
17075 else
17076   echo "$ac_t""no" 1>&6
17077 fi
17078 done
17079
17080 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17081         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17082 echo "configure:17083: checking if Berkeley DB header compatibility" >&5
17083 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17084   echo $ac_n "(cached) $ac_c" 1>&6
17085 else
17086   
17087                 cat > conftest.$ac_ext <<EOF
17088 #line 17089 "configure"
17089 #include "confdefs.h"
17090
17091 #if HAVE_DB_185_H
17092 #       include <db_185.h>
17093 #else
17094 #       include <db.h>
17095 #endif
17096
17097  /* this check could be improved */
17098 #ifndef DB_VERSION_MAJOR
17099 #       define DB_VERSION_MAJOR 1
17100 #endif
17101
17102 #if DB_VERSION_MAJOR == 1 
17103         __db_version_1
17104 #endif
17105
17106 EOF
17107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17108   egrep "__db_version_1" >/dev/null 2>&1; then
17109   rm -rf conftest*
17110   ol_cv_header_db1=yes
17111 else
17112   rm -rf conftest*
17113   ol_cv_header_db1=no
17114 fi
17115 rm -f conftest*
17116
17117 fi
17118
17119 echo "$ac_t""$ol_cv_header_db1" 1>&6
17120
17121         if test $ol_cv_header_db1 = yes ; then
17122                 ol_cv_lib_db=no
17123 if test $ol_cv_lib_db = no ; then
17124         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17125 echo "configure:17126: checking for Berkeley DB link (default)" >&5
17126 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17127   echo $ac_n "(cached) $ac_c" 1>&6
17128 else
17129   
17130         ol_DB_LIB=
17131         ol_LIBS=$LIBS
17132         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17133
17134         cat > conftest.$ac_ext <<EOF
17135 #line 17136 "configure"
17136 #include "confdefs.h"
17137
17138 #ifdef HAVE_DB_185_H
17139 # include <db_185.h>
17140 #else
17141 # include <db.h>
17142 #endif
17143
17144 #ifndef DB_VERSION_MAJOR
17145 # define DB_VERSION_MAJOR 1
17146 #endif
17147
17148 #ifndef NULL
17149 #define NULL ((void*)0)
17150 #endif
17151
17152 int main() {
17153
17154 #if DB_VERSION_MAJOR > 1
17155         {
17156                 char *version;
17157                 int major, minor, patch;
17158
17159                 version = db_version( &major, &minor, &patch );
17160
17161                 if( major != DB_VERSION_MAJOR ||
17162                         minor < DB_VERSION_MINOR )
17163                 {
17164                         printf("Berkeley DB version mismatch\n"
17165                                 "\theader: %s\n\tlibrary: %s\n",
17166                                 DB_VERSION_STRING, version);
17167                         return 1;
17168                 }
17169         }
17170 #endif
17171
17172 #if DB_VERSION_MAJOR > 2
17173         db_env_create( NULL, 0 );
17174 #elif DB_VERSION_MAJOR > 1
17175         db_appexit( NULL );
17176 #else
17177         (void) dbopen( NULL, 0, 0, 0, NULL);
17178 #endif
17179
17180 ; return 0; }
17181 EOF
17182 if { (eval echo configure:17183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17183   rm -rf conftest*
17184   ol_cv_db_none=yes
17185 else
17186   echo "configure: failed program was:" >&5
17187   cat conftest.$ac_ext >&5
17188   rm -rf conftest*
17189   ol_cv_db_none=no
17190 fi
17191 rm -f conftest*
17192
17193         LIBS="$ol_LIBS"
17194
17195 fi
17196
17197 echo "$ac_t""$ol_cv_db_none" 1>&6
17198
17199         if test $ol_cv_db_none = yes ; then
17200                 ol_cv_lib_db=yes
17201         fi
17202 fi
17203
17204 if test $ol_cv_lib_db = no ; then
17205         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17206 echo "configure:17207: checking for Berkeley DB link (-ldb43)" >&5
17207 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17208   echo $ac_n "(cached) $ac_c" 1>&6
17209 else
17210   
17211         ol_DB_LIB=-ldb43
17212         ol_LIBS=$LIBS
17213         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17214
17215         cat > conftest.$ac_ext <<EOF
17216 #line 17217 "configure"
17217 #include "confdefs.h"
17218
17219 #ifdef HAVE_DB_185_H
17220 # include <db_185.h>
17221 #else
17222 # include <db.h>
17223 #endif
17224
17225 #ifndef DB_VERSION_MAJOR
17226 # define DB_VERSION_MAJOR 1
17227 #endif
17228
17229 #ifndef NULL
17230 #define NULL ((void*)0)
17231 #endif
17232
17233 int main() {
17234
17235 #if DB_VERSION_MAJOR > 1
17236         {
17237                 char *version;
17238                 int major, minor, patch;
17239
17240                 version = db_version( &major, &minor, &patch );
17241
17242                 if( major != DB_VERSION_MAJOR ||
17243                         minor < DB_VERSION_MINOR )
17244                 {
17245                         printf("Berkeley DB version mismatch\n"
17246                                 "\theader: %s\n\tlibrary: %s\n",
17247                                 DB_VERSION_STRING, version);
17248                         return 1;
17249                 }
17250         }
17251 #endif
17252
17253 #if DB_VERSION_MAJOR > 2
17254         db_env_create( NULL, 0 );
17255 #elif DB_VERSION_MAJOR > 1
17256         db_appexit( NULL );
17257 #else
17258         (void) dbopen( NULL, 0, 0, 0, NULL);
17259 #endif
17260
17261 ; return 0; }
17262 EOF
17263 if { (eval echo configure:17264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17264   rm -rf conftest*
17265   ol_cv_db_db43=yes
17266 else
17267   echo "configure: failed program was:" >&5
17268   cat conftest.$ac_ext >&5
17269   rm -rf conftest*
17270   ol_cv_db_db43=no
17271 fi
17272 rm -f conftest*
17273
17274         LIBS="$ol_LIBS"
17275
17276 fi
17277
17278 echo "$ac_t""$ol_cv_db_db43" 1>&6
17279
17280         if test $ol_cv_db_db43 = yes ; then
17281                 ol_cv_lib_db=-ldb43
17282         fi
17283 fi
17284
17285 if test $ol_cv_lib_db = no ; then
17286         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17287 echo "configure:17288: checking for Berkeley DB link (-ldb-43)" >&5
17288 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17289   echo $ac_n "(cached) $ac_c" 1>&6
17290 else
17291   
17292         ol_DB_LIB=-ldb-43
17293         ol_LIBS=$LIBS
17294         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17295
17296         cat > conftest.$ac_ext <<EOF
17297 #line 17298 "configure"
17298 #include "confdefs.h"
17299
17300 #ifdef HAVE_DB_185_H
17301 # include <db_185.h>
17302 #else
17303 # include <db.h>
17304 #endif
17305
17306 #ifndef DB_VERSION_MAJOR
17307 # define DB_VERSION_MAJOR 1
17308 #endif
17309
17310 #ifndef NULL
17311 #define NULL ((void*)0)
17312 #endif
17313
17314 int main() {
17315
17316 #if DB_VERSION_MAJOR > 1
17317         {
17318                 char *version;
17319                 int major, minor, patch;
17320
17321                 version = db_version( &major, &minor, &patch );
17322
17323                 if( major != DB_VERSION_MAJOR ||
17324                         minor < DB_VERSION_MINOR )
17325                 {
17326                         printf("Berkeley DB version mismatch\n"
17327                                 "\theader: %s\n\tlibrary: %s\n",
17328                                 DB_VERSION_STRING, version);
17329                         return 1;
17330                 }
17331         }
17332 #endif
17333
17334 #if DB_VERSION_MAJOR > 2
17335         db_env_create( NULL, 0 );
17336 #elif DB_VERSION_MAJOR > 1
17337         db_appexit( NULL );
17338 #else
17339         (void) dbopen( NULL, 0, 0, 0, NULL);
17340 #endif
17341
17342 ; return 0; }
17343 EOF
17344 if { (eval echo configure:17345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17345   rm -rf conftest*
17346   ol_cv_db_db_43=yes
17347 else
17348   echo "configure: failed program was:" >&5
17349   cat conftest.$ac_ext >&5
17350   rm -rf conftest*
17351   ol_cv_db_db_43=no
17352 fi
17353 rm -f conftest*
17354
17355         LIBS="$ol_LIBS"
17356
17357 fi
17358
17359 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17360
17361         if test $ol_cv_db_db_43 = yes ; then
17362                 ol_cv_lib_db=-ldb-43
17363         fi
17364 fi
17365
17366 if test $ol_cv_lib_db = no ; then
17367         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17368 echo "configure:17369: checking for Berkeley DB link (-ldb-4.3)" >&5
17369 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17370   echo $ac_n "(cached) $ac_c" 1>&6
17371 else
17372   
17373         ol_DB_LIB=-ldb-4.3
17374         ol_LIBS=$LIBS
17375         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17376
17377         cat > conftest.$ac_ext <<EOF
17378 #line 17379 "configure"
17379 #include "confdefs.h"
17380
17381 #ifdef HAVE_DB_185_H
17382 # include <db_185.h>
17383 #else
17384 # include <db.h>
17385 #endif
17386
17387 #ifndef DB_VERSION_MAJOR
17388 # define DB_VERSION_MAJOR 1
17389 #endif
17390
17391 #ifndef NULL
17392 #define NULL ((void*)0)
17393 #endif
17394
17395 int main() {
17396
17397 #if DB_VERSION_MAJOR > 1
17398         {
17399                 char *version;
17400                 int major, minor, patch;
17401
17402                 version = db_version( &major, &minor, &patch );
17403
17404                 if( major != DB_VERSION_MAJOR ||
17405                         minor < DB_VERSION_MINOR )
17406                 {
17407                         printf("Berkeley DB version mismatch\n"
17408                                 "\theader: %s\n\tlibrary: %s\n",
17409                                 DB_VERSION_STRING, version);
17410                         return 1;
17411                 }
17412         }
17413 #endif
17414
17415 #if DB_VERSION_MAJOR > 2
17416         db_env_create( NULL, 0 );
17417 #elif DB_VERSION_MAJOR > 1
17418         db_appexit( NULL );
17419 #else
17420         (void) dbopen( NULL, 0, 0, 0, NULL);
17421 #endif
17422
17423 ; return 0; }
17424 EOF
17425 if { (eval echo configure:17426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17426   rm -rf conftest*
17427   ol_cv_db_db_4_dot_3=yes
17428 else
17429   echo "configure: failed program was:" >&5
17430   cat conftest.$ac_ext >&5
17431   rm -rf conftest*
17432   ol_cv_db_db_4_dot_3=no
17433 fi
17434 rm -f conftest*
17435
17436         LIBS="$ol_LIBS"
17437
17438 fi
17439
17440 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17441
17442         if test $ol_cv_db_db_4_dot_3 = yes ; then
17443                 ol_cv_lib_db=-ldb-4.3
17444         fi
17445 fi
17446
17447 if test $ol_cv_lib_db = no ; then
17448         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17449 echo "configure:17450: checking for Berkeley DB link (-ldb-4-3)" >&5
17450 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17451   echo $ac_n "(cached) $ac_c" 1>&6
17452 else
17453   
17454         ol_DB_LIB=-ldb-4-3
17455         ol_LIBS=$LIBS
17456         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17457
17458         cat > conftest.$ac_ext <<EOF
17459 #line 17460 "configure"
17460 #include "confdefs.h"
17461
17462 #ifdef HAVE_DB_185_H
17463 # include <db_185.h>
17464 #else
17465 # include <db.h>
17466 #endif
17467
17468 #ifndef DB_VERSION_MAJOR
17469 # define DB_VERSION_MAJOR 1
17470 #endif
17471
17472 #ifndef NULL
17473 #define NULL ((void*)0)
17474 #endif
17475
17476 int main() {
17477
17478 #if DB_VERSION_MAJOR > 1
17479         {
17480                 char *version;
17481                 int major, minor, patch;
17482
17483                 version = db_version( &major, &minor, &patch );
17484
17485                 if( major != DB_VERSION_MAJOR ||
17486                         minor < DB_VERSION_MINOR )
17487                 {
17488                         printf("Berkeley DB version mismatch\n"
17489                                 "\theader: %s\n\tlibrary: %s\n",
17490                                 DB_VERSION_STRING, version);
17491                         return 1;
17492                 }
17493         }
17494 #endif
17495
17496 #if DB_VERSION_MAJOR > 2
17497         db_env_create( NULL, 0 );
17498 #elif DB_VERSION_MAJOR > 1
17499         db_appexit( NULL );
17500 #else
17501         (void) dbopen( NULL, 0, 0, 0, NULL);
17502 #endif
17503
17504 ; return 0; }
17505 EOF
17506 if { (eval echo configure:17507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17507   rm -rf conftest*
17508   ol_cv_db_db_4_3=yes
17509 else
17510   echo "configure: failed program was:" >&5
17511   cat conftest.$ac_ext >&5
17512   rm -rf conftest*
17513   ol_cv_db_db_4_3=no
17514 fi
17515 rm -f conftest*
17516
17517         LIBS="$ol_LIBS"
17518
17519 fi
17520
17521 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17522
17523         if test $ol_cv_db_db_4_3 = yes ; then
17524                 ol_cv_lib_db=-ldb-4-3
17525         fi
17526 fi
17527
17528 if test $ol_cv_lib_db = no ; then
17529         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17530 echo "configure:17531: checking for Berkeley DB link (-ldb42)" >&5
17531 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17532   echo $ac_n "(cached) $ac_c" 1>&6
17533 else
17534   
17535         ol_DB_LIB=-ldb42
17536         ol_LIBS=$LIBS
17537         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17538
17539         cat > conftest.$ac_ext <<EOF
17540 #line 17541 "configure"
17541 #include "confdefs.h"
17542
17543 #ifdef HAVE_DB_185_H
17544 # include <db_185.h>
17545 #else
17546 # include <db.h>
17547 #endif
17548
17549 #ifndef DB_VERSION_MAJOR
17550 # define DB_VERSION_MAJOR 1
17551 #endif
17552
17553 #ifndef NULL
17554 #define NULL ((void*)0)
17555 #endif
17556
17557 int main() {
17558
17559 #if DB_VERSION_MAJOR > 1
17560         {
17561                 char *version;
17562                 int major, minor, patch;
17563
17564                 version = db_version( &major, &minor, &patch );
17565
17566                 if( major != DB_VERSION_MAJOR ||
17567                         minor < DB_VERSION_MINOR )
17568                 {
17569                         printf("Berkeley DB version mismatch\n"
17570                                 "\theader: %s\n\tlibrary: %s\n",
17571                                 DB_VERSION_STRING, version);
17572                         return 1;
17573                 }
17574         }
17575 #endif
17576
17577 #if DB_VERSION_MAJOR > 2
17578         db_env_create( NULL, 0 );
17579 #elif DB_VERSION_MAJOR > 1
17580         db_appexit( NULL );
17581 #else
17582         (void) dbopen( NULL, 0, 0, 0, NULL);
17583 #endif
17584
17585 ; return 0; }
17586 EOF
17587 if { (eval echo configure:17588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17588   rm -rf conftest*
17589   ol_cv_db_db42=yes
17590 else
17591   echo "configure: failed program was:" >&5
17592   cat conftest.$ac_ext >&5
17593   rm -rf conftest*
17594   ol_cv_db_db42=no
17595 fi
17596 rm -f conftest*
17597
17598         LIBS="$ol_LIBS"
17599
17600 fi
17601
17602 echo "$ac_t""$ol_cv_db_db42" 1>&6
17603
17604         if test $ol_cv_db_db42 = yes ; then
17605                 ol_cv_lib_db=-ldb42
17606         fi
17607 fi
17608
17609 if test $ol_cv_lib_db = no ; then
17610         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17611 echo "configure:17612: checking for Berkeley DB link (-ldb-42)" >&5
17612 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17613   echo $ac_n "(cached) $ac_c" 1>&6
17614 else
17615   
17616         ol_DB_LIB=-ldb-42
17617         ol_LIBS=$LIBS
17618         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17619
17620         cat > conftest.$ac_ext <<EOF
17621 #line 17622 "configure"
17622 #include "confdefs.h"
17623
17624 #ifdef HAVE_DB_185_H
17625 # include <db_185.h>
17626 #else
17627 # include <db.h>
17628 #endif
17629
17630 #ifndef DB_VERSION_MAJOR
17631 # define DB_VERSION_MAJOR 1
17632 #endif
17633
17634 #ifndef NULL
17635 #define NULL ((void*)0)
17636 #endif
17637
17638 int main() {
17639
17640 #if DB_VERSION_MAJOR > 1
17641         {
17642                 char *version;
17643                 int major, minor, patch;
17644
17645                 version = db_version( &major, &minor, &patch );
17646
17647                 if( major != DB_VERSION_MAJOR ||
17648                         minor < DB_VERSION_MINOR )
17649                 {
17650                         printf("Berkeley DB version mismatch\n"
17651                                 "\theader: %s\n\tlibrary: %s\n",
17652                                 DB_VERSION_STRING, version);
17653                         return 1;
17654                 }
17655         }
17656 #endif
17657
17658 #if DB_VERSION_MAJOR > 2
17659         db_env_create( NULL, 0 );
17660 #elif DB_VERSION_MAJOR > 1
17661         db_appexit( NULL );
17662 #else
17663         (void) dbopen( NULL, 0, 0, 0, NULL);
17664 #endif
17665
17666 ; return 0; }
17667 EOF
17668 if { (eval echo configure:17669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17669   rm -rf conftest*
17670   ol_cv_db_db_42=yes
17671 else
17672   echo "configure: failed program was:" >&5
17673   cat conftest.$ac_ext >&5
17674   rm -rf conftest*
17675   ol_cv_db_db_42=no
17676 fi
17677 rm -f conftest*
17678
17679         LIBS="$ol_LIBS"
17680
17681 fi
17682
17683 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17684
17685         if test $ol_cv_db_db_42 = yes ; then
17686                 ol_cv_lib_db=-ldb-42
17687         fi
17688 fi
17689
17690 if test $ol_cv_lib_db = no ; then
17691         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17692 echo "configure:17693: checking for Berkeley DB link (-ldb-4.2)" >&5
17693 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17694   echo $ac_n "(cached) $ac_c" 1>&6
17695 else
17696   
17697         ol_DB_LIB=-ldb-4.2
17698         ol_LIBS=$LIBS
17699         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17700
17701         cat > conftest.$ac_ext <<EOF
17702 #line 17703 "configure"
17703 #include "confdefs.h"
17704
17705 #ifdef HAVE_DB_185_H
17706 # include <db_185.h>
17707 #else
17708 # include <db.h>
17709 #endif
17710
17711 #ifndef DB_VERSION_MAJOR
17712 # define DB_VERSION_MAJOR 1
17713 #endif
17714
17715 #ifndef NULL
17716 #define NULL ((void*)0)
17717 #endif
17718
17719 int main() {
17720
17721 #if DB_VERSION_MAJOR > 1
17722         {
17723                 char *version;
17724                 int major, minor, patch;
17725
17726                 version = db_version( &major, &minor, &patch );
17727
17728                 if( major != DB_VERSION_MAJOR ||
17729                         minor < DB_VERSION_MINOR )
17730                 {
17731                         printf("Berkeley DB version mismatch\n"
17732                                 "\theader: %s\n\tlibrary: %s\n",
17733                                 DB_VERSION_STRING, version);
17734                         return 1;
17735                 }
17736         }
17737 #endif
17738
17739 #if DB_VERSION_MAJOR > 2
17740         db_env_create( NULL, 0 );
17741 #elif DB_VERSION_MAJOR > 1
17742         db_appexit( NULL );
17743 #else
17744         (void) dbopen( NULL, 0, 0, 0, NULL);
17745 #endif
17746
17747 ; return 0; }
17748 EOF
17749 if { (eval echo configure:17750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17750   rm -rf conftest*
17751   ol_cv_db_db_4_dot_2=yes
17752 else
17753   echo "configure: failed program was:" >&5
17754   cat conftest.$ac_ext >&5
17755   rm -rf conftest*
17756   ol_cv_db_db_4_dot_2=no
17757 fi
17758 rm -f conftest*
17759
17760         LIBS="$ol_LIBS"
17761
17762 fi
17763
17764 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17765
17766         if test $ol_cv_db_db_4_dot_2 = yes ; then
17767                 ol_cv_lib_db=-ldb-4.2
17768         fi
17769 fi
17770
17771 if test $ol_cv_lib_db = no ; then
17772         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17773 echo "configure:17774: checking for Berkeley DB link (-ldb-4-2)" >&5
17774 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17775   echo $ac_n "(cached) $ac_c" 1>&6
17776 else
17777   
17778         ol_DB_LIB=-ldb-4-2
17779         ol_LIBS=$LIBS
17780         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17781
17782         cat > conftest.$ac_ext <<EOF
17783 #line 17784 "configure"
17784 #include "confdefs.h"
17785
17786 #ifdef HAVE_DB_185_H
17787 # include <db_185.h>
17788 #else
17789 # include <db.h>
17790 #endif
17791
17792 #ifndef DB_VERSION_MAJOR
17793 # define DB_VERSION_MAJOR 1
17794 #endif
17795
17796 #ifndef NULL
17797 #define NULL ((void*)0)
17798 #endif
17799
17800 int main() {
17801
17802 #if DB_VERSION_MAJOR > 1
17803         {
17804                 char *version;
17805                 int major, minor, patch;
17806
17807                 version = db_version( &major, &minor, &patch );
17808
17809                 if( major != DB_VERSION_MAJOR ||
17810                         minor < DB_VERSION_MINOR )
17811                 {
17812                         printf("Berkeley DB version mismatch\n"
17813                                 "\theader: %s\n\tlibrary: %s\n",
17814                                 DB_VERSION_STRING, version);
17815                         return 1;
17816                 }
17817         }
17818 #endif
17819
17820 #if DB_VERSION_MAJOR > 2
17821         db_env_create( NULL, 0 );
17822 #elif DB_VERSION_MAJOR > 1
17823         db_appexit( NULL );
17824 #else
17825         (void) dbopen( NULL, 0, 0, 0, NULL);
17826 #endif
17827
17828 ; return 0; }
17829 EOF
17830 if { (eval echo configure:17831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17831   rm -rf conftest*
17832   ol_cv_db_db_4_2=yes
17833 else
17834   echo "configure: failed program was:" >&5
17835   cat conftest.$ac_ext >&5
17836   rm -rf conftest*
17837   ol_cv_db_db_4_2=no
17838 fi
17839 rm -f conftest*
17840
17841         LIBS="$ol_LIBS"
17842
17843 fi
17844
17845 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17846
17847         if test $ol_cv_db_db_4_2 = yes ; then
17848                 ol_cv_lib_db=-ldb-4-2
17849         fi
17850 fi
17851
17852 if test $ol_cv_lib_db = no ; then
17853         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17854 echo "configure:17855: checking for Berkeley DB link (-ldb-4)" >&5
17855 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17856   echo $ac_n "(cached) $ac_c" 1>&6
17857 else
17858   
17859         ol_DB_LIB=-ldb-4
17860         ol_LIBS=$LIBS
17861         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17862
17863         cat > conftest.$ac_ext <<EOF
17864 #line 17865 "configure"
17865 #include "confdefs.h"
17866
17867 #ifdef HAVE_DB_185_H
17868 # include <db_185.h>
17869 #else
17870 # include <db.h>
17871 #endif
17872
17873 #ifndef DB_VERSION_MAJOR
17874 # define DB_VERSION_MAJOR 1
17875 #endif
17876
17877 #ifndef NULL
17878 #define NULL ((void*)0)
17879 #endif
17880
17881 int main() {
17882
17883 #if DB_VERSION_MAJOR > 1
17884         {
17885                 char *version;
17886                 int major, minor, patch;
17887
17888                 version = db_version( &major, &minor, &patch );
17889
17890                 if( major != DB_VERSION_MAJOR ||
17891                         minor < DB_VERSION_MINOR )
17892                 {
17893                         printf("Berkeley DB version mismatch\n"
17894                                 "\theader: %s\n\tlibrary: %s\n",
17895                                 DB_VERSION_STRING, version);
17896                         return 1;
17897                 }
17898         }
17899 #endif
17900
17901 #if DB_VERSION_MAJOR > 2
17902         db_env_create( NULL, 0 );
17903 #elif DB_VERSION_MAJOR > 1
17904         db_appexit( NULL );
17905 #else
17906         (void) dbopen( NULL, 0, 0, 0, NULL);
17907 #endif
17908
17909 ; return 0; }
17910 EOF
17911 if { (eval echo configure:17912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17912   rm -rf conftest*
17913   ol_cv_db_db_4=yes
17914 else
17915   echo "configure: failed program was:" >&5
17916   cat conftest.$ac_ext >&5
17917   rm -rf conftest*
17918   ol_cv_db_db_4=no
17919 fi
17920 rm -f conftest*
17921
17922         LIBS="$ol_LIBS"
17923
17924 fi
17925
17926 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17927
17928         if test $ol_cv_db_db_4 = yes ; then
17929                 ol_cv_lib_db=-ldb-4
17930         fi
17931 fi
17932
17933 if test $ol_cv_lib_db = no ; then
17934         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17935 echo "configure:17936: checking for Berkeley DB link (-ldb4)" >&5
17936 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17937   echo $ac_n "(cached) $ac_c" 1>&6
17938 else
17939   
17940         ol_DB_LIB=-ldb4
17941         ol_LIBS=$LIBS
17942         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17943
17944         cat > conftest.$ac_ext <<EOF
17945 #line 17946 "configure"
17946 #include "confdefs.h"
17947
17948 #ifdef HAVE_DB_185_H
17949 # include <db_185.h>
17950 #else
17951 # include <db.h>
17952 #endif
17953
17954 #ifndef DB_VERSION_MAJOR
17955 # define DB_VERSION_MAJOR 1
17956 #endif
17957
17958 #ifndef NULL
17959 #define NULL ((void*)0)
17960 #endif
17961
17962 int main() {
17963
17964 #if DB_VERSION_MAJOR > 1
17965         {
17966                 char *version;
17967                 int major, minor, patch;
17968
17969                 version = db_version( &major, &minor, &patch );
17970
17971                 if( major != DB_VERSION_MAJOR ||
17972                         minor < DB_VERSION_MINOR )
17973                 {
17974                         printf("Berkeley DB version mismatch\n"
17975                                 "\theader: %s\n\tlibrary: %s\n",
17976                                 DB_VERSION_STRING, version);
17977                         return 1;
17978                 }
17979         }
17980 #endif
17981
17982 #if DB_VERSION_MAJOR > 2
17983         db_env_create( NULL, 0 );
17984 #elif DB_VERSION_MAJOR > 1
17985         db_appexit( NULL );
17986 #else
17987         (void) dbopen( NULL, 0, 0, 0, NULL);
17988 #endif
17989
17990 ; return 0; }
17991 EOF
17992 if { (eval echo configure:17993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17993   rm -rf conftest*
17994   ol_cv_db_db4=yes
17995 else
17996   echo "configure: failed program was:" >&5
17997   cat conftest.$ac_ext >&5
17998   rm -rf conftest*
17999   ol_cv_db_db4=no
18000 fi
18001 rm -f conftest*
18002
18003         LIBS="$ol_LIBS"
18004
18005 fi
18006
18007 echo "$ac_t""$ol_cv_db_db4" 1>&6
18008
18009         if test $ol_cv_db_db4 = yes ; then
18010                 ol_cv_lib_db=-ldb4
18011         fi
18012 fi
18013
18014 if test $ol_cv_lib_db = no ; then
18015         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18016 echo "configure:18017: checking for Berkeley DB link (-ldb)" >&5
18017 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18018   echo $ac_n "(cached) $ac_c" 1>&6
18019 else
18020   
18021         ol_DB_LIB=-ldb
18022         ol_LIBS=$LIBS
18023         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18024
18025         cat > conftest.$ac_ext <<EOF
18026 #line 18027 "configure"
18027 #include "confdefs.h"
18028
18029 #ifdef HAVE_DB_185_H
18030 # include <db_185.h>
18031 #else
18032 # include <db.h>
18033 #endif
18034
18035 #ifndef DB_VERSION_MAJOR
18036 # define DB_VERSION_MAJOR 1
18037 #endif
18038
18039 #ifndef NULL
18040 #define NULL ((void*)0)
18041 #endif
18042
18043 int main() {
18044
18045 #if DB_VERSION_MAJOR > 1
18046         {
18047                 char *version;
18048                 int major, minor, patch;
18049
18050                 version = db_version( &major, &minor, &patch );
18051
18052                 if( major != DB_VERSION_MAJOR ||
18053                         minor < DB_VERSION_MINOR )
18054                 {
18055                         printf("Berkeley DB version mismatch\n"
18056                                 "\theader: %s\n\tlibrary: %s\n",
18057                                 DB_VERSION_STRING, version);
18058                         return 1;
18059                 }
18060         }
18061 #endif
18062
18063 #if DB_VERSION_MAJOR > 2
18064         db_env_create( NULL, 0 );
18065 #elif DB_VERSION_MAJOR > 1
18066         db_appexit( NULL );
18067 #else
18068         (void) dbopen( NULL, 0, 0, 0, NULL);
18069 #endif
18070
18071 ; return 0; }
18072 EOF
18073 if { (eval echo configure:18074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18074   rm -rf conftest*
18075   ol_cv_db_db=yes
18076 else
18077   echo "configure: failed program was:" >&5
18078   cat conftest.$ac_ext >&5
18079   rm -rf conftest*
18080   ol_cv_db_db=no
18081 fi
18082 rm -f conftest*
18083
18084         LIBS="$ol_LIBS"
18085
18086 fi
18087
18088 echo "$ac_t""$ol_cv_db_db" 1>&6
18089
18090         if test $ol_cv_db_db = yes ; then
18091                 ol_cv_lib_db=-ldb
18092         fi
18093 fi
18094
18095 if test $ol_cv_lib_db = no ; then
18096         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18097 echo "configure:18098: checking for Berkeley DB link (-ldb41)" >&5
18098 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18099   echo $ac_n "(cached) $ac_c" 1>&6
18100 else
18101   
18102         ol_DB_LIB=-ldb41
18103         ol_LIBS=$LIBS
18104         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18105
18106         cat > conftest.$ac_ext <<EOF
18107 #line 18108 "configure"
18108 #include "confdefs.h"
18109
18110 #ifdef HAVE_DB_185_H
18111 # include <db_185.h>
18112 #else
18113 # include <db.h>
18114 #endif
18115
18116 #ifndef DB_VERSION_MAJOR
18117 # define DB_VERSION_MAJOR 1
18118 #endif
18119
18120 #ifndef NULL
18121 #define NULL ((void*)0)
18122 #endif
18123
18124 int main() {
18125
18126 #if DB_VERSION_MAJOR > 1
18127         {
18128                 char *version;
18129                 int major, minor, patch;
18130
18131                 version = db_version( &major, &minor, &patch );
18132
18133                 if( major != DB_VERSION_MAJOR ||
18134                         minor < DB_VERSION_MINOR )
18135                 {
18136                         printf("Berkeley DB version mismatch\n"
18137                                 "\theader: %s\n\tlibrary: %s\n",
18138                                 DB_VERSION_STRING, version);
18139                         return 1;
18140                 }
18141         }
18142 #endif
18143
18144 #if DB_VERSION_MAJOR > 2
18145         db_env_create( NULL, 0 );
18146 #elif DB_VERSION_MAJOR > 1
18147         db_appexit( NULL );
18148 #else
18149         (void) dbopen( NULL, 0, 0, 0, NULL);
18150 #endif
18151
18152 ; return 0; }
18153 EOF
18154 if { (eval echo configure:18155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18155   rm -rf conftest*
18156   ol_cv_db_db41=yes
18157 else
18158   echo "configure: failed program was:" >&5
18159   cat conftest.$ac_ext >&5
18160   rm -rf conftest*
18161   ol_cv_db_db41=no
18162 fi
18163 rm -f conftest*
18164
18165         LIBS="$ol_LIBS"
18166
18167 fi
18168
18169 echo "$ac_t""$ol_cv_db_db41" 1>&6
18170
18171         if test $ol_cv_db_db41 = yes ; then
18172                 ol_cv_lib_db=-ldb41
18173         fi
18174 fi
18175
18176 if test $ol_cv_lib_db = no ; then
18177         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18178 echo "configure:18179: checking for Berkeley DB link (-ldb-41)" >&5
18179 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18180   echo $ac_n "(cached) $ac_c" 1>&6
18181 else
18182   
18183         ol_DB_LIB=-ldb-41
18184         ol_LIBS=$LIBS
18185         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18186
18187         cat > conftest.$ac_ext <<EOF
18188 #line 18189 "configure"
18189 #include "confdefs.h"
18190
18191 #ifdef HAVE_DB_185_H
18192 # include <db_185.h>
18193 #else
18194 # include <db.h>
18195 #endif
18196
18197 #ifndef DB_VERSION_MAJOR
18198 # define DB_VERSION_MAJOR 1
18199 #endif
18200
18201 #ifndef NULL
18202 #define NULL ((void*)0)
18203 #endif
18204
18205 int main() {
18206
18207 #if DB_VERSION_MAJOR > 1
18208         {
18209                 char *version;
18210                 int major, minor, patch;
18211
18212                 version = db_version( &major, &minor, &patch );
18213
18214                 if( major != DB_VERSION_MAJOR ||
18215                         minor < DB_VERSION_MINOR )
18216                 {
18217                         printf("Berkeley DB version mismatch\n"
18218                                 "\theader: %s\n\tlibrary: %s\n",
18219                                 DB_VERSION_STRING, version);
18220                         return 1;
18221                 }
18222         }
18223 #endif
18224
18225 #if DB_VERSION_MAJOR > 2
18226         db_env_create( NULL, 0 );
18227 #elif DB_VERSION_MAJOR > 1
18228         db_appexit( NULL );
18229 #else
18230         (void) dbopen( NULL, 0, 0, 0, NULL);
18231 #endif
18232
18233 ; return 0; }
18234 EOF
18235 if { (eval echo configure:18236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18236   rm -rf conftest*
18237   ol_cv_db_db_41=yes
18238 else
18239   echo "configure: failed program was:" >&5
18240   cat conftest.$ac_ext >&5
18241   rm -rf conftest*
18242   ol_cv_db_db_41=no
18243 fi
18244 rm -f conftest*
18245
18246         LIBS="$ol_LIBS"
18247
18248 fi
18249
18250 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18251
18252         if test $ol_cv_db_db_41 = yes ; then
18253                 ol_cv_lib_db=-ldb-41
18254         fi
18255 fi
18256
18257 if test $ol_cv_lib_db = no ; then
18258         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18259 echo "configure:18260: checking for Berkeley DB link (-ldb-4.1)" >&5
18260 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18261   echo $ac_n "(cached) $ac_c" 1>&6
18262 else
18263   
18264         ol_DB_LIB=-ldb-4.1
18265         ol_LIBS=$LIBS
18266         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18267
18268         cat > conftest.$ac_ext <<EOF
18269 #line 18270 "configure"
18270 #include "confdefs.h"
18271
18272 #ifdef HAVE_DB_185_H
18273 # include <db_185.h>
18274 #else
18275 # include <db.h>
18276 #endif
18277
18278 #ifndef DB_VERSION_MAJOR
18279 # define DB_VERSION_MAJOR 1
18280 #endif
18281
18282 #ifndef NULL
18283 #define NULL ((void*)0)
18284 #endif
18285
18286 int main() {
18287
18288 #if DB_VERSION_MAJOR > 1
18289         {
18290                 char *version;
18291                 int major, minor, patch;
18292
18293                 version = db_version( &major, &minor, &patch );
18294
18295                 if( major != DB_VERSION_MAJOR ||
18296                         minor < DB_VERSION_MINOR )
18297                 {
18298                         printf("Berkeley DB version mismatch\n"
18299                                 "\theader: %s\n\tlibrary: %s\n",
18300                                 DB_VERSION_STRING, version);
18301                         return 1;
18302                 }
18303         }
18304 #endif
18305
18306 #if DB_VERSION_MAJOR > 2
18307         db_env_create( NULL, 0 );
18308 #elif DB_VERSION_MAJOR > 1
18309         db_appexit( NULL );
18310 #else
18311         (void) dbopen( NULL, 0, 0, 0, NULL);
18312 #endif
18313
18314 ; return 0; }
18315 EOF
18316 if { (eval echo configure:18317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18317   rm -rf conftest*
18318   ol_cv_db_db_4_dot_1=yes
18319 else
18320   echo "configure: failed program was:" >&5
18321   cat conftest.$ac_ext >&5
18322   rm -rf conftest*
18323   ol_cv_db_db_4_dot_1=no
18324 fi
18325 rm -f conftest*
18326
18327         LIBS="$ol_LIBS"
18328
18329 fi
18330
18331 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18332
18333         if test $ol_cv_db_db_4_dot_1 = yes ; then
18334                 ol_cv_lib_db=-ldb-4.1
18335         fi
18336 fi
18337
18338 if test $ol_cv_lib_db = no ; then
18339         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18340 echo "configure:18341: checking for Berkeley DB link (-ldb-4-1)" >&5
18341 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18342   echo $ac_n "(cached) $ac_c" 1>&6
18343 else
18344   
18345         ol_DB_LIB=-ldb-4-1
18346         ol_LIBS=$LIBS
18347         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18348
18349         cat > conftest.$ac_ext <<EOF
18350 #line 18351 "configure"
18351 #include "confdefs.h"
18352
18353 #ifdef HAVE_DB_185_H
18354 # include <db_185.h>
18355 #else
18356 # include <db.h>
18357 #endif
18358
18359 #ifndef DB_VERSION_MAJOR
18360 # define DB_VERSION_MAJOR 1
18361 #endif
18362
18363 #ifndef NULL
18364 #define NULL ((void*)0)
18365 #endif
18366
18367 int main() {
18368
18369 #if DB_VERSION_MAJOR > 1
18370         {
18371                 char *version;
18372                 int major, minor, patch;
18373
18374                 version = db_version( &major, &minor, &patch );
18375
18376                 if( major != DB_VERSION_MAJOR ||
18377                         minor < DB_VERSION_MINOR )
18378                 {
18379                         printf("Berkeley DB version mismatch\n"
18380                                 "\theader: %s\n\tlibrary: %s\n",
18381                                 DB_VERSION_STRING, version);
18382                         return 1;
18383                 }
18384         }
18385 #endif
18386
18387 #if DB_VERSION_MAJOR > 2
18388         db_env_create( NULL, 0 );
18389 #elif DB_VERSION_MAJOR > 1
18390         db_appexit( NULL );
18391 #else
18392         (void) dbopen( NULL, 0, 0, 0, NULL);
18393 #endif
18394
18395 ; return 0; }
18396 EOF
18397 if { (eval echo configure:18398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18398   rm -rf conftest*
18399   ol_cv_db_db_4_1=yes
18400 else
18401   echo "configure: failed program was:" >&5
18402   cat conftest.$ac_ext >&5
18403   rm -rf conftest*
18404   ol_cv_db_db_4_1=no
18405 fi
18406 rm -f conftest*
18407
18408         LIBS="$ol_LIBS"
18409
18410 fi
18411
18412 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18413
18414         if test $ol_cv_db_db_4_1 = yes ; then
18415                 ol_cv_lib_db=-ldb-4-1
18416         fi
18417 fi
18418
18419 if test $ol_cv_lib_db = no ; then
18420         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18421 echo "configure:18422: checking for Berkeley DB link (-ldb3)" >&5
18422 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18423   echo $ac_n "(cached) $ac_c" 1>&6
18424 else
18425   
18426         ol_DB_LIB=-ldb3
18427         ol_LIBS=$LIBS
18428         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18429
18430         cat > conftest.$ac_ext <<EOF
18431 #line 18432 "configure"
18432 #include "confdefs.h"
18433
18434 #ifdef HAVE_DB_185_H
18435 # include <db_185.h>
18436 #else
18437 # include <db.h>
18438 #endif
18439
18440 #ifndef DB_VERSION_MAJOR
18441 # define DB_VERSION_MAJOR 1
18442 #endif
18443
18444 #ifndef NULL
18445 #define NULL ((void*)0)
18446 #endif
18447
18448 int main() {
18449
18450 #if DB_VERSION_MAJOR > 1
18451         {
18452                 char *version;
18453                 int major, minor, patch;
18454
18455                 version = db_version( &major, &minor, &patch );
18456
18457                 if( major != DB_VERSION_MAJOR ||
18458                         minor < DB_VERSION_MINOR )
18459                 {
18460                         printf("Berkeley DB version mismatch\n"
18461                                 "\theader: %s\n\tlibrary: %s\n",
18462                                 DB_VERSION_STRING, version);
18463                         return 1;
18464                 }
18465         }
18466 #endif
18467
18468 #if DB_VERSION_MAJOR > 2
18469         db_env_create( NULL, 0 );
18470 #elif DB_VERSION_MAJOR > 1
18471         db_appexit( NULL );
18472 #else
18473         (void) dbopen( NULL, 0, 0, 0, NULL);
18474 #endif
18475
18476 ; return 0; }
18477 EOF
18478 if { (eval echo configure:18479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18479   rm -rf conftest*
18480   ol_cv_db_db3=yes
18481 else
18482   echo "configure: failed program was:" >&5
18483   cat conftest.$ac_ext >&5
18484   rm -rf conftest*
18485   ol_cv_db_db3=no
18486 fi
18487 rm -f conftest*
18488
18489         LIBS="$ol_LIBS"
18490
18491 fi
18492
18493 echo "$ac_t""$ol_cv_db_db3" 1>&6
18494
18495         if test $ol_cv_db_db3 = yes ; then
18496                 ol_cv_lib_db=-ldb3
18497         fi
18498 fi
18499
18500 if test $ol_cv_lib_db = no ; then
18501         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18502 echo "configure:18503: checking for Berkeley DB link (-ldb-3)" >&5
18503 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18504   echo $ac_n "(cached) $ac_c" 1>&6
18505 else
18506   
18507         ol_DB_LIB=-ldb-3
18508         ol_LIBS=$LIBS
18509         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18510
18511         cat > conftest.$ac_ext <<EOF
18512 #line 18513 "configure"
18513 #include "confdefs.h"
18514
18515 #ifdef HAVE_DB_185_H
18516 # include <db_185.h>
18517 #else
18518 # include <db.h>
18519 #endif
18520
18521 #ifndef DB_VERSION_MAJOR
18522 # define DB_VERSION_MAJOR 1
18523 #endif
18524
18525 #ifndef NULL
18526 #define NULL ((void*)0)
18527 #endif
18528
18529 int main() {
18530
18531 #if DB_VERSION_MAJOR > 1
18532         {
18533                 char *version;
18534                 int major, minor, patch;
18535
18536                 version = db_version( &major, &minor, &patch );
18537
18538                 if( major != DB_VERSION_MAJOR ||
18539                         minor < DB_VERSION_MINOR )
18540                 {
18541                         printf("Berkeley DB version mismatch\n"
18542                                 "\theader: %s\n\tlibrary: %s\n",
18543                                 DB_VERSION_STRING, version);
18544                         return 1;
18545                 }
18546         }
18547 #endif
18548
18549 #if DB_VERSION_MAJOR > 2
18550         db_env_create( NULL, 0 );
18551 #elif DB_VERSION_MAJOR > 1
18552         db_appexit( NULL );
18553 #else
18554         (void) dbopen( NULL, 0, 0, 0, NULL);
18555 #endif
18556
18557 ; return 0; }
18558 EOF
18559 if { (eval echo configure:18560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18560   rm -rf conftest*
18561   ol_cv_db_db_3=yes
18562 else
18563   echo "configure: failed program was:" >&5
18564   cat conftest.$ac_ext >&5
18565   rm -rf conftest*
18566   ol_cv_db_db_3=no
18567 fi
18568 rm -f conftest*
18569
18570         LIBS="$ol_LIBS"
18571
18572 fi
18573
18574 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18575
18576         if test $ol_cv_db_db_3 = yes ; then
18577                 ol_cv_lib_db=-ldb-3
18578         fi
18579 fi
18580
18581 if test $ol_cv_lib_db = no ; then
18582         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18583 echo "configure:18584: checking for Berkeley DB link (-ldb2)" >&5
18584 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18585   echo $ac_n "(cached) $ac_c" 1>&6
18586 else
18587   
18588         ol_DB_LIB=-ldb2
18589         ol_LIBS=$LIBS
18590         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18591
18592         cat > conftest.$ac_ext <<EOF
18593 #line 18594 "configure"
18594 #include "confdefs.h"
18595
18596 #ifdef HAVE_DB_185_H
18597 # include <db_185.h>
18598 #else
18599 # include <db.h>
18600 #endif
18601
18602 #ifndef DB_VERSION_MAJOR
18603 # define DB_VERSION_MAJOR 1
18604 #endif
18605
18606 #ifndef NULL
18607 #define NULL ((void*)0)
18608 #endif
18609
18610 int main() {
18611
18612 #if DB_VERSION_MAJOR > 1
18613         {
18614                 char *version;
18615                 int major, minor, patch;
18616
18617                 version = db_version( &major, &minor, &patch );
18618
18619                 if( major != DB_VERSION_MAJOR ||
18620                         minor < DB_VERSION_MINOR )
18621                 {
18622                         printf("Berkeley DB version mismatch\n"
18623                                 "\theader: %s\n\tlibrary: %s\n",
18624                                 DB_VERSION_STRING, version);
18625                         return 1;
18626                 }
18627         }
18628 #endif
18629
18630 #if DB_VERSION_MAJOR > 2
18631         db_env_create( NULL, 0 );
18632 #elif DB_VERSION_MAJOR > 1
18633         db_appexit( NULL );
18634 #else
18635         (void) dbopen( NULL, 0, 0, 0, NULL);
18636 #endif
18637
18638 ; return 0; }
18639 EOF
18640 if { (eval echo configure:18641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18641   rm -rf conftest*
18642   ol_cv_db_db2=yes
18643 else
18644   echo "configure: failed program was:" >&5
18645   cat conftest.$ac_ext >&5
18646   rm -rf conftest*
18647   ol_cv_db_db2=no
18648 fi
18649 rm -f conftest*
18650
18651         LIBS="$ol_LIBS"
18652
18653 fi
18654
18655 echo "$ac_t""$ol_cv_db_db2" 1>&6
18656
18657         if test $ol_cv_db_db2 = yes ; then
18658                 ol_cv_lib_db=-ldb2
18659         fi
18660 fi
18661
18662 if test $ol_cv_lib_db = no ; then
18663         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18664 echo "configure:18665: checking for Berkeley DB link (-ldb-2)" >&5
18665 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18666   echo $ac_n "(cached) $ac_c" 1>&6
18667 else
18668   
18669         ol_DB_LIB=-ldb-2
18670         ol_LIBS=$LIBS
18671         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18672
18673         cat > conftest.$ac_ext <<EOF
18674 #line 18675 "configure"
18675 #include "confdefs.h"
18676
18677 #ifdef HAVE_DB_185_H
18678 # include <db_185.h>
18679 #else
18680 # include <db.h>
18681 #endif
18682
18683 #ifndef DB_VERSION_MAJOR
18684 # define DB_VERSION_MAJOR 1
18685 #endif
18686
18687 #ifndef NULL
18688 #define NULL ((void*)0)
18689 #endif
18690
18691 int main() {
18692
18693 #if DB_VERSION_MAJOR > 1
18694         {
18695                 char *version;
18696                 int major, minor, patch;
18697
18698                 version = db_version( &major, &minor, &patch );
18699
18700                 if( major != DB_VERSION_MAJOR ||
18701                         minor < DB_VERSION_MINOR )
18702                 {
18703                         printf("Berkeley DB version mismatch\n"
18704                                 "\theader: %s\n\tlibrary: %s\n",
18705                                 DB_VERSION_STRING, version);
18706                         return 1;
18707                 }
18708         }
18709 #endif
18710
18711 #if DB_VERSION_MAJOR > 2
18712         db_env_create( NULL, 0 );
18713 #elif DB_VERSION_MAJOR > 1
18714         db_appexit( NULL );
18715 #else
18716         (void) dbopen( NULL, 0, 0, 0, NULL);
18717 #endif
18718
18719 ; return 0; }
18720 EOF
18721 if { (eval echo configure:18722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18722   rm -rf conftest*
18723   ol_cv_db_db_2=yes
18724 else
18725   echo "configure: failed program was:" >&5
18726   cat conftest.$ac_ext >&5
18727   rm -rf conftest*
18728   ol_cv_db_db_2=no
18729 fi
18730 rm -f conftest*
18731
18732         LIBS="$ol_LIBS"
18733
18734 fi
18735
18736 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18737
18738         if test $ol_cv_db_db_2 = yes ; then
18739                 ol_cv_lib_db=-ldb-2
18740         fi
18741 fi
18742
18743 if test $ol_cv_lib_db = no ; then
18744         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18745 echo "configure:18746: checking for Berkeley DB link (-ldb1)" >&5
18746 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18747   echo $ac_n "(cached) $ac_c" 1>&6
18748 else
18749   
18750         ol_DB_LIB=-ldb1
18751         ol_LIBS=$LIBS
18752         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18753
18754         cat > conftest.$ac_ext <<EOF
18755 #line 18756 "configure"
18756 #include "confdefs.h"
18757
18758 #ifdef HAVE_DB_185_H
18759 # include <db_185.h>
18760 #else
18761 # include <db.h>
18762 #endif
18763
18764 #ifndef DB_VERSION_MAJOR
18765 # define DB_VERSION_MAJOR 1
18766 #endif
18767
18768 #ifndef NULL
18769 #define NULL ((void*)0)
18770 #endif
18771
18772 int main() {
18773
18774 #if DB_VERSION_MAJOR > 1
18775         {
18776                 char *version;
18777                 int major, minor, patch;
18778
18779                 version = db_version( &major, &minor, &patch );
18780
18781                 if( major != DB_VERSION_MAJOR ||
18782                         minor < DB_VERSION_MINOR )
18783                 {
18784                         printf("Berkeley DB version mismatch\n"
18785                                 "\theader: %s\n\tlibrary: %s\n",
18786                                 DB_VERSION_STRING, version);
18787                         return 1;
18788                 }
18789         }
18790 #endif
18791
18792 #if DB_VERSION_MAJOR > 2
18793         db_env_create( NULL, 0 );
18794 #elif DB_VERSION_MAJOR > 1
18795         db_appexit( NULL );
18796 #else
18797         (void) dbopen( NULL, 0, 0, 0, NULL);
18798 #endif
18799
18800 ; return 0; }
18801 EOF
18802 if { (eval echo configure:18803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18803   rm -rf conftest*
18804   ol_cv_db_db1=yes
18805 else
18806   echo "configure: failed program was:" >&5
18807   cat conftest.$ac_ext >&5
18808   rm -rf conftest*
18809   ol_cv_db_db1=no
18810 fi
18811 rm -f conftest*
18812
18813         LIBS="$ol_LIBS"
18814
18815 fi
18816
18817 echo "$ac_t""$ol_cv_db_db1" 1>&6
18818
18819         if test $ol_cv_db_db1 = yes ; then
18820                 ol_cv_lib_db=-ldb1
18821         fi
18822 fi
18823
18824 if test $ol_cv_lib_db = no ; then
18825         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18826 echo "configure:18827: checking for Berkeley DB link (-ldb-1)" >&5
18827 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18828   echo $ac_n "(cached) $ac_c" 1>&6
18829 else
18830   
18831         ol_DB_LIB=-ldb-1
18832         ol_LIBS=$LIBS
18833         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18834
18835         cat > conftest.$ac_ext <<EOF
18836 #line 18837 "configure"
18837 #include "confdefs.h"
18838
18839 #ifdef HAVE_DB_185_H
18840 # include <db_185.h>
18841 #else
18842 # include <db.h>
18843 #endif
18844
18845 #ifndef DB_VERSION_MAJOR
18846 # define DB_VERSION_MAJOR 1
18847 #endif
18848
18849 #ifndef NULL
18850 #define NULL ((void*)0)
18851 #endif
18852
18853 int main() {
18854
18855 #if DB_VERSION_MAJOR > 1
18856         {
18857                 char *version;
18858                 int major, minor, patch;
18859
18860                 version = db_version( &major, &minor, &patch );
18861
18862                 if( major != DB_VERSION_MAJOR ||
18863                         minor < DB_VERSION_MINOR )
18864                 {
18865                         printf("Berkeley DB version mismatch\n"
18866                                 "\theader: %s\n\tlibrary: %s\n",
18867                                 DB_VERSION_STRING, version);
18868                         return 1;
18869                 }
18870         }
18871 #endif
18872
18873 #if DB_VERSION_MAJOR > 2
18874         db_env_create( NULL, 0 );
18875 #elif DB_VERSION_MAJOR > 1
18876         db_appexit( NULL );
18877 #else
18878         (void) dbopen( NULL, 0, 0, 0, NULL);
18879 #endif
18880
18881 ; return 0; }
18882 EOF
18883 if { (eval echo configure:18884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18884   rm -rf conftest*
18885   ol_cv_db_db_1=yes
18886 else
18887   echo "configure: failed program was:" >&5
18888   cat conftest.$ac_ext >&5
18889   rm -rf conftest*
18890   ol_cv_db_db_1=no
18891 fi
18892 rm -f conftest*
18893
18894         LIBS="$ol_LIBS"
18895
18896 fi
18897
18898 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18899
18900         if test $ol_cv_db_db_1 = yes ; then
18901                 ol_cv_lib_db=-ldb-1
18902         fi
18903 fi
18904
18905
18906                 if test "$ol_cv_lib_db" != no ; then
18907                         ol_cv_berkeley_db=yes
18908                 fi
18909         fi
18910 fi
18911
18912         else
18913                 ol_cv_berkeley_db=no
18914 for ac_hdr in db.h
18915 do
18916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18918 echo "configure:18919: checking for $ac_hdr" >&5
18919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18920   echo $ac_n "(cached) $ac_c" 1>&6
18921 else
18922   cat > conftest.$ac_ext <<EOF
18923 #line 18924 "configure"
18924 #include "confdefs.h"
18925 #include <$ac_hdr>
18926 EOF
18927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18928 { (eval echo configure:18929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18930 if test -z "$ac_err"; then
18931   rm -rf conftest*
18932   eval "ac_cv_header_$ac_safe=yes"
18933 else
18934   echo "$ac_err" >&5
18935   echo "configure: failed program was:" >&5
18936   cat conftest.$ac_ext >&5
18937   rm -rf conftest*
18938   eval "ac_cv_header_$ac_safe=no"
18939 fi
18940 rm -f conftest*
18941 fi
18942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18943   echo "$ac_t""yes" 1>&6
18944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18945   cat >> confdefs.h <<EOF
18946 #define $ac_tr_hdr 1
18947 EOF
18948  
18949 else
18950   echo "$ac_t""no" 1>&6
18951 fi
18952 done
18953
18954 if test $ac_cv_header_db_h = yes; then
18955         ol_cv_lib_db=no
18956 if test $ol_cv_lib_db = no ; then
18957         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18958 echo "configure:18959: checking for Berkeley DB link (default)" >&5
18959 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18960   echo $ac_n "(cached) $ac_c" 1>&6
18961 else
18962   
18963         ol_DB_LIB=
18964         ol_LIBS=$LIBS
18965         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18966
18967         cat > conftest.$ac_ext <<EOF
18968 #line 18969 "configure"
18969 #include "confdefs.h"
18970
18971 #ifdef HAVE_DB_185_H
18972 # include <db_185.h>
18973 #else
18974 # include <db.h>
18975 #endif
18976
18977 #ifndef DB_VERSION_MAJOR
18978 # define DB_VERSION_MAJOR 1
18979 #endif
18980
18981 #ifndef NULL
18982 #define NULL ((void*)0)
18983 #endif
18984
18985 int main() {
18986
18987 #if DB_VERSION_MAJOR > 1
18988         {
18989                 char *version;
18990                 int major, minor, patch;
18991
18992                 version = db_version( &major, &minor, &patch );
18993
18994                 if( major != DB_VERSION_MAJOR ||
18995                         minor < DB_VERSION_MINOR )
18996                 {
18997                         printf("Berkeley DB version mismatch\n"
18998                                 "\theader: %s\n\tlibrary: %s\n",
18999                                 DB_VERSION_STRING, version);
19000                         return 1;
19001                 }
19002         }
19003 #endif
19004
19005 #if DB_VERSION_MAJOR > 2
19006         db_env_create( NULL, 0 );
19007 #elif DB_VERSION_MAJOR > 1
19008         db_appexit( NULL );
19009 #else
19010         (void) dbopen( NULL, 0, 0, 0, NULL);
19011 #endif
19012
19013 ; return 0; }
19014 EOF
19015 if { (eval echo configure:19016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19016   rm -rf conftest*
19017   ol_cv_db_none=yes
19018 else
19019   echo "configure: failed program was:" >&5
19020   cat conftest.$ac_ext >&5
19021   rm -rf conftest*
19022   ol_cv_db_none=no
19023 fi
19024 rm -f conftest*
19025
19026         LIBS="$ol_LIBS"
19027
19028 fi
19029
19030 echo "$ac_t""$ol_cv_db_none" 1>&6
19031
19032         if test $ol_cv_db_none = yes ; then
19033                 ol_cv_lib_db=yes
19034         fi
19035 fi
19036
19037 if test $ol_cv_lib_db = no ; then
19038         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19039 echo "configure:19040: checking for Berkeley DB link (-ldb43)" >&5
19040 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19041   echo $ac_n "(cached) $ac_c" 1>&6
19042 else
19043   
19044         ol_DB_LIB=-ldb43
19045         ol_LIBS=$LIBS
19046         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19047
19048         cat > conftest.$ac_ext <<EOF
19049 #line 19050 "configure"
19050 #include "confdefs.h"
19051
19052 #ifdef HAVE_DB_185_H
19053 # include <db_185.h>
19054 #else
19055 # include <db.h>
19056 #endif
19057
19058 #ifndef DB_VERSION_MAJOR
19059 # define DB_VERSION_MAJOR 1
19060 #endif
19061
19062 #ifndef NULL
19063 #define NULL ((void*)0)
19064 #endif
19065
19066 int main() {
19067
19068 #if DB_VERSION_MAJOR > 1
19069         {
19070                 char *version;
19071                 int major, minor, patch;
19072
19073                 version = db_version( &major, &minor, &patch );
19074
19075                 if( major != DB_VERSION_MAJOR ||
19076                         minor < DB_VERSION_MINOR )
19077                 {
19078                         printf("Berkeley DB version mismatch\n"
19079                                 "\theader: %s\n\tlibrary: %s\n",
19080                                 DB_VERSION_STRING, version);
19081                         return 1;
19082                 }
19083         }
19084 #endif
19085
19086 #if DB_VERSION_MAJOR > 2
19087         db_env_create( NULL, 0 );
19088 #elif DB_VERSION_MAJOR > 1
19089         db_appexit( NULL );
19090 #else
19091         (void) dbopen( NULL, 0, 0, 0, NULL);
19092 #endif
19093
19094 ; return 0; }
19095 EOF
19096 if { (eval echo configure:19097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19097   rm -rf conftest*
19098   ol_cv_db_db43=yes
19099 else
19100   echo "configure: failed program was:" >&5
19101   cat conftest.$ac_ext >&5
19102   rm -rf conftest*
19103   ol_cv_db_db43=no
19104 fi
19105 rm -f conftest*
19106
19107         LIBS="$ol_LIBS"
19108
19109 fi
19110
19111 echo "$ac_t""$ol_cv_db_db43" 1>&6
19112
19113         if test $ol_cv_db_db43 = yes ; then
19114                 ol_cv_lib_db=-ldb43
19115         fi
19116 fi
19117
19118 if test $ol_cv_lib_db = no ; then
19119         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19120 echo "configure:19121: checking for Berkeley DB link (-ldb-43)" >&5
19121 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19122   echo $ac_n "(cached) $ac_c" 1>&6
19123 else
19124   
19125         ol_DB_LIB=-ldb-43
19126         ol_LIBS=$LIBS
19127         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19128
19129         cat > conftest.$ac_ext <<EOF
19130 #line 19131 "configure"
19131 #include "confdefs.h"
19132
19133 #ifdef HAVE_DB_185_H
19134 # include <db_185.h>
19135 #else
19136 # include <db.h>
19137 #endif
19138
19139 #ifndef DB_VERSION_MAJOR
19140 # define DB_VERSION_MAJOR 1
19141 #endif
19142
19143 #ifndef NULL
19144 #define NULL ((void*)0)
19145 #endif
19146
19147 int main() {
19148
19149 #if DB_VERSION_MAJOR > 1
19150         {
19151                 char *version;
19152                 int major, minor, patch;
19153
19154                 version = db_version( &major, &minor, &patch );
19155
19156                 if( major != DB_VERSION_MAJOR ||
19157                         minor < DB_VERSION_MINOR )
19158                 {
19159                         printf("Berkeley DB version mismatch\n"
19160                                 "\theader: %s\n\tlibrary: %s\n",
19161                                 DB_VERSION_STRING, version);
19162                         return 1;
19163                 }
19164         }
19165 #endif
19166
19167 #if DB_VERSION_MAJOR > 2
19168         db_env_create( NULL, 0 );
19169 #elif DB_VERSION_MAJOR > 1
19170         db_appexit( NULL );
19171 #else
19172         (void) dbopen( NULL, 0, 0, 0, NULL);
19173 #endif
19174
19175 ; return 0; }
19176 EOF
19177 if { (eval echo configure:19178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19178   rm -rf conftest*
19179   ol_cv_db_db_43=yes
19180 else
19181   echo "configure: failed program was:" >&5
19182   cat conftest.$ac_ext >&5
19183   rm -rf conftest*
19184   ol_cv_db_db_43=no
19185 fi
19186 rm -f conftest*
19187
19188         LIBS="$ol_LIBS"
19189
19190 fi
19191
19192 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19193
19194         if test $ol_cv_db_db_43 = yes ; then
19195                 ol_cv_lib_db=-ldb-43
19196         fi
19197 fi
19198
19199 if test $ol_cv_lib_db = no ; then
19200         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19201 echo "configure:19202: checking for Berkeley DB link (-ldb-4.3)" >&5
19202 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19203   echo $ac_n "(cached) $ac_c" 1>&6
19204 else
19205   
19206         ol_DB_LIB=-ldb-4.3
19207         ol_LIBS=$LIBS
19208         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19209
19210         cat > conftest.$ac_ext <<EOF
19211 #line 19212 "configure"
19212 #include "confdefs.h"
19213
19214 #ifdef HAVE_DB_185_H
19215 # include <db_185.h>
19216 #else
19217 # include <db.h>
19218 #endif
19219
19220 #ifndef DB_VERSION_MAJOR
19221 # define DB_VERSION_MAJOR 1
19222 #endif
19223
19224 #ifndef NULL
19225 #define NULL ((void*)0)
19226 #endif
19227
19228 int main() {
19229
19230 #if DB_VERSION_MAJOR > 1
19231         {
19232                 char *version;
19233                 int major, minor, patch;
19234
19235                 version = db_version( &major, &minor, &patch );
19236
19237                 if( major != DB_VERSION_MAJOR ||
19238                         minor < DB_VERSION_MINOR )
19239                 {
19240                         printf("Berkeley DB version mismatch\n"
19241                                 "\theader: %s\n\tlibrary: %s\n",
19242                                 DB_VERSION_STRING, version);
19243                         return 1;
19244                 }
19245         }
19246 #endif
19247
19248 #if DB_VERSION_MAJOR > 2
19249         db_env_create( NULL, 0 );
19250 #elif DB_VERSION_MAJOR > 1
19251         db_appexit( NULL );
19252 #else
19253         (void) dbopen( NULL, 0, 0, 0, NULL);
19254 #endif
19255
19256 ; return 0; }
19257 EOF
19258 if { (eval echo configure:19259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19259   rm -rf conftest*
19260   ol_cv_db_db_4_dot_3=yes
19261 else
19262   echo "configure: failed program was:" >&5
19263   cat conftest.$ac_ext >&5
19264   rm -rf conftest*
19265   ol_cv_db_db_4_dot_3=no
19266 fi
19267 rm -f conftest*
19268
19269         LIBS="$ol_LIBS"
19270
19271 fi
19272
19273 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19274
19275         if test $ol_cv_db_db_4_dot_3 = yes ; then
19276                 ol_cv_lib_db=-ldb-4.3
19277         fi
19278 fi
19279
19280 if test $ol_cv_lib_db = no ; then
19281         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19282 echo "configure:19283: checking for Berkeley DB link (-ldb-4-3)" >&5
19283 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19284   echo $ac_n "(cached) $ac_c" 1>&6
19285 else
19286   
19287         ol_DB_LIB=-ldb-4-3
19288         ol_LIBS=$LIBS
19289         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19290
19291         cat > conftest.$ac_ext <<EOF
19292 #line 19293 "configure"
19293 #include "confdefs.h"
19294
19295 #ifdef HAVE_DB_185_H
19296 # include <db_185.h>
19297 #else
19298 # include <db.h>
19299 #endif
19300
19301 #ifndef DB_VERSION_MAJOR
19302 # define DB_VERSION_MAJOR 1
19303 #endif
19304
19305 #ifndef NULL
19306 #define NULL ((void*)0)
19307 #endif
19308
19309 int main() {
19310
19311 #if DB_VERSION_MAJOR > 1
19312         {
19313                 char *version;
19314                 int major, minor, patch;
19315
19316                 version = db_version( &major, &minor, &patch );
19317
19318                 if( major != DB_VERSION_MAJOR ||
19319                         minor < DB_VERSION_MINOR )
19320                 {
19321                         printf("Berkeley DB version mismatch\n"
19322                                 "\theader: %s\n\tlibrary: %s\n",
19323                                 DB_VERSION_STRING, version);
19324                         return 1;
19325                 }
19326         }
19327 #endif
19328
19329 #if DB_VERSION_MAJOR > 2
19330         db_env_create( NULL, 0 );
19331 #elif DB_VERSION_MAJOR > 1
19332         db_appexit( NULL );
19333 #else
19334         (void) dbopen( NULL, 0, 0, 0, NULL);
19335 #endif
19336
19337 ; return 0; }
19338 EOF
19339 if { (eval echo configure:19340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19340   rm -rf conftest*
19341   ol_cv_db_db_4_3=yes
19342 else
19343   echo "configure: failed program was:" >&5
19344   cat conftest.$ac_ext >&5
19345   rm -rf conftest*
19346   ol_cv_db_db_4_3=no
19347 fi
19348 rm -f conftest*
19349
19350         LIBS="$ol_LIBS"
19351
19352 fi
19353
19354 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19355
19356         if test $ol_cv_db_db_4_3 = yes ; then
19357                 ol_cv_lib_db=-ldb-4-3
19358         fi
19359 fi
19360
19361 if test $ol_cv_lib_db = no ; then
19362         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19363 echo "configure:19364: checking for Berkeley DB link (-ldb42)" >&5
19364 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19365   echo $ac_n "(cached) $ac_c" 1>&6
19366 else
19367   
19368         ol_DB_LIB=-ldb42
19369         ol_LIBS=$LIBS
19370         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19371
19372         cat > conftest.$ac_ext <<EOF
19373 #line 19374 "configure"
19374 #include "confdefs.h"
19375
19376 #ifdef HAVE_DB_185_H
19377 # include <db_185.h>
19378 #else
19379 # include <db.h>
19380 #endif
19381
19382 #ifndef DB_VERSION_MAJOR
19383 # define DB_VERSION_MAJOR 1
19384 #endif
19385
19386 #ifndef NULL
19387 #define NULL ((void*)0)
19388 #endif
19389
19390 int main() {
19391
19392 #if DB_VERSION_MAJOR > 1
19393         {
19394                 char *version;
19395                 int major, minor, patch;
19396
19397                 version = db_version( &major, &minor, &patch );
19398
19399                 if( major != DB_VERSION_MAJOR ||
19400                         minor < DB_VERSION_MINOR )
19401                 {
19402                         printf("Berkeley DB version mismatch\n"
19403                                 "\theader: %s\n\tlibrary: %s\n",
19404                                 DB_VERSION_STRING, version);
19405                         return 1;
19406                 }
19407         }
19408 #endif
19409
19410 #if DB_VERSION_MAJOR > 2
19411         db_env_create( NULL, 0 );
19412 #elif DB_VERSION_MAJOR > 1
19413         db_appexit( NULL );
19414 #else
19415         (void) dbopen( NULL, 0, 0, 0, NULL);
19416 #endif
19417
19418 ; return 0; }
19419 EOF
19420 if { (eval echo configure:19421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19421   rm -rf conftest*
19422   ol_cv_db_db42=yes
19423 else
19424   echo "configure: failed program was:" >&5
19425   cat conftest.$ac_ext >&5
19426   rm -rf conftest*
19427   ol_cv_db_db42=no
19428 fi
19429 rm -f conftest*
19430
19431         LIBS="$ol_LIBS"
19432
19433 fi
19434
19435 echo "$ac_t""$ol_cv_db_db42" 1>&6
19436
19437         if test $ol_cv_db_db42 = yes ; then
19438                 ol_cv_lib_db=-ldb42
19439         fi
19440 fi
19441
19442 if test $ol_cv_lib_db = no ; then
19443         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19444 echo "configure:19445: checking for Berkeley DB link (-ldb-42)" >&5
19445 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19446   echo $ac_n "(cached) $ac_c" 1>&6
19447 else
19448   
19449         ol_DB_LIB=-ldb-42
19450         ol_LIBS=$LIBS
19451         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19452
19453         cat > conftest.$ac_ext <<EOF
19454 #line 19455 "configure"
19455 #include "confdefs.h"
19456
19457 #ifdef HAVE_DB_185_H
19458 # include <db_185.h>
19459 #else
19460 # include <db.h>
19461 #endif
19462
19463 #ifndef DB_VERSION_MAJOR
19464 # define DB_VERSION_MAJOR 1
19465 #endif
19466
19467 #ifndef NULL
19468 #define NULL ((void*)0)
19469 #endif
19470
19471 int main() {
19472
19473 #if DB_VERSION_MAJOR > 1
19474         {
19475                 char *version;
19476                 int major, minor, patch;
19477
19478                 version = db_version( &major, &minor, &patch );
19479
19480                 if( major != DB_VERSION_MAJOR ||
19481                         minor < DB_VERSION_MINOR )
19482                 {
19483                         printf("Berkeley DB version mismatch\n"
19484                                 "\theader: %s\n\tlibrary: %s\n",
19485                                 DB_VERSION_STRING, version);
19486                         return 1;
19487                 }
19488         }
19489 #endif
19490
19491 #if DB_VERSION_MAJOR > 2
19492         db_env_create( NULL, 0 );
19493 #elif DB_VERSION_MAJOR > 1
19494         db_appexit( NULL );
19495 #else
19496         (void) dbopen( NULL, 0, 0, 0, NULL);
19497 #endif
19498
19499 ; return 0; }
19500 EOF
19501 if { (eval echo configure:19502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19502   rm -rf conftest*
19503   ol_cv_db_db_42=yes
19504 else
19505   echo "configure: failed program was:" >&5
19506   cat conftest.$ac_ext >&5
19507   rm -rf conftest*
19508   ol_cv_db_db_42=no
19509 fi
19510 rm -f conftest*
19511
19512         LIBS="$ol_LIBS"
19513
19514 fi
19515
19516 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19517
19518         if test $ol_cv_db_db_42 = yes ; then
19519                 ol_cv_lib_db=-ldb-42
19520         fi
19521 fi
19522
19523 if test $ol_cv_lib_db = no ; then
19524         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19525 echo "configure:19526: checking for Berkeley DB link (-ldb-4.2)" >&5
19526 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19527   echo $ac_n "(cached) $ac_c" 1>&6
19528 else
19529   
19530         ol_DB_LIB=-ldb-4.2
19531         ol_LIBS=$LIBS
19532         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19533
19534         cat > conftest.$ac_ext <<EOF
19535 #line 19536 "configure"
19536 #include "confdefs.h"
19537
19538 #ifdef HAVE_DB_185_H
19539 # include <db_185.h>
19540 #else
19541 # include <db.h>
19542 #endif
19543
19544 #ifndef DB_VERSION_MAJOR
19545 # define DB_VERSION_MAJOR 1
19546 #endif
19547
19548 #ifndef NULL
19549 #define NULL ((void*)0)
19550 #endif
19551
19552 int main() {
19553
19554 #if DB_VERSION_MAJOR > 1
19555         {
19556                 char *version;
19557                 int major, minor, patch;
19558
19559                 version = db_version( &major, &minor, &patch );
19560
19561                 if( major != DB_VERSION_MAJOR ||
19562                         minor < DB_VERSION_MINOR )
19563                 {
19564                         printf("Berkeley DB version mismatch\n"
19565                                 "\theader: %s\n\tlibrary: %s\n",
19566                                 DB_VERSION_STRING, version);
19567                         return 1;
19568                 }
19569         }
19570 #endif
19571
19572 #if DB_VERSION_MAJOR > 2
19573         db_env_create( NULL, 0 );
19574 #elif DB_VERSION_MAJOR > 1
19575         db_appexit( NULL );
19576 #else
19577         (void) dbopen( NULL, 0, 0, 0, NULL);
19578 #endif
19579
19580 ; return 0; }
19581 EOF
19582 if { (eval echo configure:19583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19583   rm -rf conftest*
19584   ol_cv_db_db_4_dot_2=yes
19585 else
19586   echo "configure: failed program was:" >&5
19587   cat conftest.$ac_ext >&5
19588   rm -rf conftest*
19589   ol_cv_db_db_4_dot_2=no
19590 fi
19591 rm -f conftest*
19592
19593         LIBS="$ol_LIBS"
19594
19595 fi
19596
19597 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19598
19599         if test $ol_cv_db_db_4_dot_2 = yes ; then
19600                 ol_cv_lib_db=-ldb-4.2
19601         fi
19602 fi
19603
19604 if test $ol_cv_lib_db = no ; then
19605         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19606 echo "configure:19607: checking for Berkeley DB link (-ldb-4-2)" >&5
19607 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19608   echo $ac_n "(cached) $ac_c" 1>&6
19609 else
19610   
19611         ol_DB_LIB=-ldb-4-2
19612         ol_LIBS=$LIBS
19613         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19614
19615         cat > conftest.$ac_ext <<EOF
19616 #line 19617 "configure"
19617 #include "confdefs.h"
19618
19619 #ifdef HAVE_DB_185_H
19620 # include <db_185.h>
19621 #else
19622 # include <db.h>
19623 #endif
19624
19625 #ifndef DB_VERSION_MAJOR
19626 # define DB_VERSION_MAJOR 1
19627 #endif
19628
19629 #ifndef NULL
19630 #define NULL ((void*)0)
19631 #endif
19632
19633 int main() {
19634
19635 #if DB_VERSION_MAJOR > 1
19636         {
19637                 char *version;
19638                 int major, minor, patch;
19639
19640                 version = db_version( &major, &minor, &patch );
19641
19642                 if( major != DB_VERSION_MAJOR ||
19643                         minor < DB_VERSION_MINOR )
19644                 {
19645                         printf("Berkeley DB version mismatch\n"
19646                                 "\theader: %s\n\tlibrary: %s\n",
19647                                 DB_VERSION_STRING, version);
19648                         return 1;
19649                 }
19650         }
19651 #endif
19652
19653 #if DB_VERSION_MAJOR > 2
19654         db_env_create( NULL, 0 );
19655 #elif DB_VERSION_MAJOR > 1
19656         db_appexit( NULL );
19657 #else
19658         (void) dbopen( NULL, 0, 0, 0, NULL);
19659 #endif
19660
19661 ; return 0; }
19662 EOF
19663 if { (eval echo configure:19664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19664   rm -rf conftest*
19665   ol_cv_db_db_4_2=yes
19666 else
19667   echo "configure: failed program was:" >&5
19668   cat conftest.$ac_ext >&5
19669   rm -rf conftest*
19670   ol_cv_db_db_4_2=no
19671 fi
19672 rm -f conftest*
19673
19674         LIBS="$ol_LIBS"
19675
19676 fi
19677
19678 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19679
19680         if test $ol_cv_db_db_4_2 = yes ; then
19681                 ol_cv_lib_db=-ldb-4-2
19682         fi
19683 fi
19684
19685 if test $ol_cv_lib_db = no ; then
19686         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19687 echo "configure:19688: checking for Berkeley DB link (-ldb-4)" >&5
19688 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19689   echo $ac_n "(cached) $ac_c" 1>&6
19690 else
19691   
19692         ol_DB_LIB=-ldb-4
19693         ol_LIBS=$LIBS
19694         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19695
19696         cat > conftest.$ac_ext <<EOF
19697 #line 19698 "configure"
19698 #include "confdefs.h"
19699
19700 #ifdef HAVE_DB_185_H
19701 # include <db_185.h>
19702 #else
19703 # include <db.h>
19704 #endif
19705
19706 #ifndef DB_VERSION_MAJOR
19707 # define DB_VERSION_MAJOR 1
19708 #endif
19709
19710 #ifndef NULL
19711 #define NULL ((void*)0)
19712 #endif
19713
19714 int main() {
19715
19716 #if DB_VERSION_MAJOR > 1
19717         {
19718                 char *version;
19719                 int major, minor, patch;
19720
19721                 version = db_version( &major, &minor, &patch );
19722
19723                 if( major != DB_VERSION_MAJOR ||
19724                         minor < DB_VERSION_MINOR )
19725                 {
19726                         printf("Berkeley DB version mismatch\n"
19727                                 "\theader: %s\n\tlibrary: %s\n",
19728                                 DB_VERSION_STRING, version);
19729                         return 1;
19730                 }
19731         }
19732 #endif
19733
19734 #if DB_VERSION_MAJOR > 2
19735         db_env_create( NULL, 0 );
19736 #elif DB_VERSION_MAJOR > 1
19737         db_appexit( NULL );
19738 #else
19739         (void) dbopen( NULL, 0, 0, 0, NULL);
19740 #endif
19741
19742 ; return 0; }
19743 EOF
19744 if { (eval echo configure:19745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19745   rm -rf conftest*
19746   ol_cv_db_db_4=yes
19747 else
19748   echo "configure: failed program was:" >&5
19749   cat conftest.$ac_ext >&5
19750   rm -rf conftest*
19751   ol_cv_db_db_4=no
19752 fi
19753 rm -f conftest*
19754
19755         LIBS="$ol_LIBS"
19756
19757 fi
19758
19759 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19760
19761         if test $ol_cv_db_db_4 = yes ; then
19762                 ol_cv_lib_db=-ldb-4
19763         fi
19764 fi
19765
19766 if test $ol_cv_lib_db = no ; then
19767         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19768 echo "configure:19769: checking for Berkeley DB link (-ldb4)" >&5
19769 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19770   echo $ac_n "(cached) $ac_c" 1>&6
19771 else
19772   
19773         ol_DB_LIB=-ldb4
19774         ol_LIBS=$LIBS
19775         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19776
19777         cat > conftest.$ac_ext <<EOF
19778 #line 19779 "configure"
19779 #include "confdefs.h"
19780
19781 #ifdef HAVE_DB_185_H
19782 # include <db_185.h>
19783 #else
19784 # include <db.h>
19785 #endif
19786
19787 #ifndef DB_VERSION_MAJOR
19788 # define DB_VERSION_MAJOR 1
19789 #endif
19790
19791 #ifndef NULL
19792 #define NULL ((void*)0)
19793 #endif
19794
19795 int main() {
19796
19797 #if DB_VERSION_MAJOR > 1
19798         {
19799                 char *version;
19800                 int major, minor, patch;
19801
19802                 version = db_version( &major, &minor, &patch );
19803
19804                 if( major != DB_VERSION_MAJOR ||
19805                         minor < DB_VERSION_MINOR )
19806                 {
19807                         printf("Berkeley DB version mismatch\n"
19808                                 "\theader: %s\n\tlibrary: %s\n",
19809                                 DB_VERSION_STRING, version);
19810                         return 1;
19811                 }
19812         }
19813 #endif
19814
19815 #if DB_VERSION_MAJOR > 2
19816         db_env_create( NULL, 0 );
19817 #elif DB_VERSION_MAJOR > 1
19818         db_appexit( NULL );
19819 #else
19820         (void) dbopen( NULL, 0, 0, 0, NULL);
19821 #endif
19822
19823 ; return 0; }
19824 EOF
19825 if { (eval echo configure:19826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19826   rm -rf conftest*
19827   ol_cv_db_db4=yes
19828 else
19829   echo "configure: failed program was:" >&5
19830   cat conftest.$ac_ext >&5
19831   rm -rf conftest*
19832   ol_cv_db_db4=no
19833 fi
19834 rm -f conftest*
19835
19836         LIBS="$ol_LIBS"
19837
19838 fi
19839
19840 echo "$ac_t""$ol_cv_db_db4" 1>&6
19841
19842         if test $ol_cv_db_db4 = yes ; then
19843                 ol_cv_lib_db=-ldb4
19844         fi
19845 fi
19846
19847 if test $ol_cv_lib_db = no ; then
19848         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19849 echo "configure:19850: checking for Berkeley DB link (-ldb)" >&5
19850 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19851   echo $ac_n "(cached) $ac_c" 1>&6
19852 else
19853   
19854         ol_DB_LIB=-ldb
19855         ol_LIBS=$LIBS
19856         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19857
19858         cat > conftest.$ac_ext <<EOF
19859 #line 19860 "configure"
19860 #include "confdefs.h"
19861
19862 #ifdef HAVE_DB_185_H
19863 # include <db_185.h>
19864 #else
19865 # include <db.h>
19866 #endif
19867
19868 #ifndef DB_VERSION_MAJOR
19869 # define DB_VERSION_MAJOR 1
19870 #endif
19871
19872 #ifndef NULL
19873 #define NULL ((void*)0)
19874 #endif
19875
19876 int main() {
19877
19878 #if DB_VERSION_MAJOR > 1
19879         {
19880                 char *version;
19881                 int major, minor, patch;
19882
19883                 version = db_version( &major, &minor, &patch );
19884
19885                 if( major != DB_VERSION_MAJOR ||
19886                         minor < DB_VERSION_MINOR )
19887                 {
19888                         printf("Berkeley DB version mismatch\n"
19889                                 "\theader: %s\n\tlibrary: %s\n",
19890                                 DB_VERSION_STRING, version);
19891                         return 1;
19892                 }
19893         }
19894 #endif
19895
19896 #if DB_VERSION_MAJOR > 2
19897         db_env_create( NULL, 0 );
19898 #elif DB_VERSION_MAJOR > 1
19899         db_appexit( NULL );
19900 #else
19901         (void) dbopen( NULL, 0, 0, 0, NULL);
19902 #endif
19903
19904 ; return 0; }
19905 EOF
19906 if { (eval echo configure:19907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19907   rm -rf conftest*
19908   ol_cv_db_db=yes
19909 else
19910   echo "configure: failed program was:" >&5
19911   cat conftest.$ac_ext >&5
19912   rm -rf conftest*
19913   ol_cv_db_db=no
19914 fi
19915 rm -f conftest*
19916
19917         LIBS="$ol_LIBS"
19918
19919 fi
19920
19921 echo "$ac_t""$ol_cv_db_db" 1>&6
19922
19923         if test $ol_cv_db_db = yes ; then
19924                 ol_cv_lib_db=-ldb
19925         fi
19926 fi
19927
19928 if test $ol_cv_lib_db = no ; then
19929         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19930 echo "configure:19931: checking for Berkeley DB link (-ldb41)" >&5
19931 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19932   echo $ac_n "(cached) $ac_c" 1>&6
19933 else
19934   
19935         ol_DB_LIB=-ldb41
19936         ol_LIBS=$LIBS
19937         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19938
19939         cat > conftest.$ac_ext <<EOF
19940 #line 19941 "configure"
19941 #include "confdefs.h"
19942
19943 #ifdef HAVE_DB_185_H
19944 # include <db_185.h>
19945 #else
19946 # include <db.h>
19947 #endif
19948
19949 #ifndef DB_VERSION_MAJOR
19950 # define DB_VERSION_MAJOR 1
19951 #endif
19952
19953 #ifndef NULL
19954 #define NULL ((void*)0)
19955 #endif
19956
19957 int main() {
19958
19959 #if DB_VERSION_MAJOR > 1
19960         {
19961                 char *version;
19962                 int major, minor, patch;
19963
19964                 version = db_version( &major, &minor, &patch );
19965
19966                 if( major != DB_VERSION_MAJOR ||
19967                         minor < DB_VERSION_MINOR )
19968                 {
19969                         printf("Berkeley DB version mismatch\n"
19970                                 "\theader: %s\n\tlibrary: %s\n",
19971                                 DB_VERSION_STRING, version);
19972                         return 1;
19973                 }
19974         }
19975 #endif
19976
19977 #if DB_VERSION_MAJOR > 2
19978         db_env_create( NULL, 0 );
19979 #elif DB_VERSION_MAJOR > 1
19980         db_appexit( NULL );
19981 #else
19982         (void) dbopen( NULL, 0, 0, 0, NULL);
19983 #endif
19984
19985 ; return 0; }
19986 EOF
19987 if { (eval echo configure:19988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19988   rm -rf conftest*
19989   ol_cv_db_db41=yes
19990 else
19991   echo "configure: failed program was:" >&5
19992   cat conftest.$ac_ext >&5
19993   rm -rf conftest*
19994   ol_cv_db_db41=no
19995 fi
19996 rm -f conftest*
19997
19998         LIBS="$ol_LIBS"
19999
20000 fi
20001
20002 echo "$ac_t""$ol_cv_db_db41" 1>&6
20003
20004         if test $ol_cv_db_db41 = yes ; then
20005                 ol_cv_lib_db=-ldb41
20006         fi
20007 fi
20008
20009 if test $ol_cv_lib_db = no ; then
20010         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
20011 echo "configure:20012: checking for Berkeley DB link (-ldb-41)" >&5
20012 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
20013   echo $ac_n "(cached) $ac_c" 1>&6
20014 else
20015   
20016         ol_DB_LIB=-ldb-41
20017         ol_LIBS=$LIBS
20018         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20019
20020         cat > conftest.$ac_ext <<EOF
20021 #line 20022 "configure"
20022 #include "confdefs.h"
20023
20024 #ifdef HAVE_DB_185_H
20025 # include <db_185.h>
20026 #else
20027 # include <db.h>
20028 #endif
20029
20030 #ifndef DB_VERSION_MAJOR
20031 # define DB_VERSION_MAJOR 1
20032 #endif
20033
20034 #ifndef NULL
20035 #define NULL ((void*)0)
20036 #endif
20037
20038 int main() {
20039
20040 #if DB_VERSION_MAJOR > 1
20041         {
20042                 char *version;
20043                 int major, minor, patch;
20044
20045                 version = db_version( &major, &minor, &patch );
20046
20047                 if( major != DB_VERSION_MAJOR ||
20048                         minor < DB_VERSION_MINOR )
20049                 {
20050                         printf("Berkeley DB version mismatch\n"
20051                                 "\theader: %s\n\tlibrary: %s\n",
20052                                 DB_VERSION_STRING, version);
20053                         return 1;
20054                 }
20055         }
20056 #endif
20057
20058 #if DB_VERSION_MAJOR > 2
20059         db_env_create( NULL, 0 );
20060 #elif DB_VERSION_MAJOR > 1
20061         db_appexit( NULL );
20062 #else
20063         (void) dbopen( NULL, 0, 0, 0, NULL);
20064 #endif
20065
20066 ; return 0; }
20067 EOF
20068 if { (eval echo configure:20069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20069   rm -rf conftest*
20070   ol_cv_db_db_41=yes
20071 else
20072   echo "configure: failed program was:" >&5
20073   cat conftest.$ac_ext >&5
20074   rm -rf conftest*
20075   ol_cv_db_db_41=no
20076 fi
20077 rm -f conftest*
20078
20079         LIBS="$ol_LIBS"
20080
20081 fi
20082
20083 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20084
20085         if test $ol_cv_db_db_41 = yes ; then
20086                 ol_cv_lib_db=-ldb-41
20087         fi
20088 fi
20089
20090 if test $ol_cv_lib_db = no ; then
20091         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20092 echo "configure:20093: checking for Berkeley DB link (-ldb-4.1)" >&5
20093 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20094   echo $ac_n "(cached) $ac_c" 1>&6
20095 else
20096   
20097         ol_DB_LIB=-ldb-4.1
20098         ol_LIBS=$LIBS
20099         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20100
20101         cat > conftest.$ac_ext <<EOF
20102 #line 20103 "configure"
20103 #include "confdefs.h"
20104
20105 #ifdef HAVE_DB_185_H
20106 # include <db_185.h>
20107 #else
20108 # include <db.h>
20109 #endif
20110
20111 #ifndef DB_VERSION_MAJOR
20112 # define DB_VERSION_MAJOR 1
20113 #endif
20114
20115 #ifndef NULL
20116 #define NULL ((void*)0)
20117 #endif
20118
20119 int main() {
20120
20121 #if DB_VERSION_MAJOR > 1
20122         {
20123                 char *version;
20124                 int major, minor, patch;
20125
20126                 version = db_version( &major, &minor, &patch );
20127
20128                 if( major != DB_VERSION_MAJOR ||
20129                         minor < DB_VERSION_MINOR )
20130                 {
20131                         printf("Berkeley DB version mismatch\n"
20132                                 "\theader: %s\n\tlibrary: %s\n",
20133                                 DB_VERSION_STRING, version);
20134                         return 1;
20135                 }
20136         }
20137 #endif
20138
20139 #if DB_VERSION_MAJOR > 2
20140         db_env_create( NULL, 0 );
20141 #elif DB_VERSION_MAJOR > 1
20142         db_appexit( NULL );
20143 #else
20144         (void) dbopen( NULL, 0, 0, 0, NULL);
20145 #endif
20146
20147 ; return 0; }
20148 EOF
20149 if { (eval echo configure:20150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20150   rm -rf conftest*
20151   ol_cv_db_db_4_dot_1=yes
20152 else
20153   echo "configure: failed program was:" >&5
20154   cat conftest.$ac_ext >&5
20155   rm -rf conftest*
20156   ol_cv_db_db_4_dot_1=no
20157 fi
20158 rm -f conftest*
20159
20160         LIBS="$ol_LIBS"
20161
20162 fi
20163
20164 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20165
20166         if test $ol_cv_db_db_4_dot_1 = yes ; then
20167                 ol_cv_lib_db=-ldb-4.1
20168         fi
20169 fi
20170
20171 if test $ol_cv_lib_db = no ; then
20172         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20173 echo "configure:20174: checking for Berkeley DB link (-ldb-4-1)" >&5
20174 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20175   echo $ac_n "(cached) $ac_c" 1>&6
20176 else
20177   
20178         ol_DB_LIB=-ldb-4-1
20179         ol_LIBS=$LIBS
20180         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20181
20182         cat > conftest.$ac_ext <<EOF
20183 #line 20184 "configure"
20184 #include "confdefs.h"
20185
20186 #ifdef HAVE_DB_185_H
20187 # include <db_185.h>
20188 #else
20189 # include <db.h>
20190 #endif
20191
20192 #ifndef DB_VERSION_MAJOR
20193 # define DB_VERSION_MAJOR 1
20194 #endif
20195
20196 #ifndef NULL
20197 #define NULL ((void*)0)
20198 #endif
20199
20200 int main() {
20201
20202 #if DB_VERSION_MAJOR > 1
20203         {
20204                 char *version;
20205                 int major, minor, patch;
20206
20207                 version = db_version( &major, &minor, &patch );
20208
20209                 if( major != DB_VERSION_MAJOR ||
20210                         minor < DB_VERSION_MINOR )
20211                 {
20212                         printf("Berkeley DB version mismatch\n"
20213                                 "\theader: %s\n\tlibrary: %s\n",
20214                                 DB_VERSION_STRING, version);
20215                         return 1;
20216                 }
20217         }
20218 #endif
20219
20220 #if DB_VERSION_MAJOR > 2
20221         db_env_create( NULL, 0 );
20222 #elif DB_VERSION_MAJOR > 1
20223         db_appexit( NULL );
20224 #else
20225         (void) dbopen( NULL, 0, 0, 0, NULL);
20226 #endif
20227
20228 ; return 0; }
20229 EOF
20230 if { (eval echo configure:20231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20231   rm -rf conftest*
20232   ol_cv_db_db_4_1=yes
20233 else
20234   echo "configure: failed program was:" >&5
20235   cat conftest.$ac_ext >&5
20236   rm -rf conftest*
20237   ol_cv_db_db_4_1=no
20238 fi
20239 rm -f conftest*
20240
20241         LIBS="$ol_LIBS"
20242
20243 fi
20244
20245 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20246
20247         if test $ol_cv_db_db_4_1 = yes ; then
20248                 ol_cv_lib_db=-ldb-4-1
20249         fi
20250 fi
20251
20252 if test $ol_cv_lib_db = no ; then
20253         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20254 echo "configure:20255: checking for Berkeley DB link (-ldb3)" >&5
20255 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20256   echo $ac_n "(cached) $ac_c" 1>&6
20257 else
20258   
20259         ol_DB_LIB=-ldb3
20260         ol_LIBS=$LIBS
20261         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20262
20263         cat > conftest.$ac_ext <<EOF
20264 #line 20265 "configure"
20265 #include "confdefs.h"
20266
20267 #ifdef HAVE_DB_185_H
20268 # include <db_185.h>
20269 #else
20270 # include <db.h>
20271 #endif
20272
20273 #ifndef DB_VERSION_MAJOR
20274 # define DB_VERSION_MAJOR 1
20275 #endif
20276
20277 #ifndef NULL
20278 #define NULL ((void*)0)
20279 #endif
20280
20281 int main() {
20282
20283 #if DB_VERSION_MAJOR > 1
20284         {
20285                 char *version;
20286                 int major, minor, patch;
20287
20288                 version = db_version( &major, &minor, &patch );
20289
20290                 if( major != DB_VERSION_MAJOR ||
20291                         minor < DB_VERSION_MINOR )
20292                 {
20293                         printf("Berkeley DB version mismatch\n"
20294                                 "\theader: %s\n\tlibrary: %s\n",
20295                                 DB_VERSION_STRING, version);
20296                         return 1;
20297                 }
20298         }
20299 #endif
20300
20301 #if DB_VERSION_MAJOR > 2
20302         db_env_create( NULL, 0 );
20303 #elif DB_VERSION_MAJOR > 1
20304         db_appexit( NULL );
20305 #else
20306         (void) dbopen( NULL, 0, 0, 0, NULL);
20307 #endif
20308
20309 ; return 0; }
20310 EOF
20311 if { (eval echo configure:20312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20312   rm -rf conftest*
20313   ol_cv_db_db3=yes
20314 else
20315   echo "configure: failed program was:" >&5
20316   cat conftest.$ac_ext >&5
20317   rm -rf conftest*
20318   ol_cv_db_db3=no
20319 fi
20320 rm -f conftest*
20321
20322         LIBS="$ol_LIBS"
20323
20324 fi
20325
20326 echo "$ac_t""$ol_cv_db_db3" 1>&6
20327
20328         if test $ol_cv_db_db3 = yes ; then
20329                 ol_cv_lib_db=-ldb3
20330         fi
20331 fi
20332
20333 if test $ol_cv_lib_db = no ; then
20334         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20335 echo "configure:20336: checking for Berkeley DB link (-ldb-3)" >&5
20336 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20337   echo $ac_n "(cached) $ac_c" 1>&6
20338 else
20339   
20340         ol_DB_LIB=-ldb-3
20341         ol_LIBS=$LIBS
20342         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20343
20344         cat > conftest.$ac_ext <<EOF
20345 #line 20346 "configure"
20346 #include "confdefs.h"
20347
20348 #ifdef HAVE_DB_185_H
20349 # include <db_185.h>
20350 #else
20351 # include <db.h>
20352 #endif
20353
20354 #ifndef DB_VERSION_MAJOR
20355 # define DB_VERSION_MAJOR 1
20356 #endif
20357
20358 #ifndef NULL
20359 #define NULL ((void*)0)
20360 #endif
20361
20362 int main() {
20363
20364 #if DB_VERSION_MAJOR > 1
20365         {
20366                 char *version;
20367                 int major, minor, patch;
20368
20369                 version = db_version( &major, &minor, &patch );
20370
20371                 if( major != DB_VERSION_MAJOR ||
20372                         minor < DB_VERSION_MINOR )
20373                 {
20374                         printf("Berkeley DB version mismatch\n"
20375                                 "\theader: %s\n\tlibrary: %s\n",
20376                                 DB_VERSION_STRING, version);
20377                         return 1;
20378                 }
20379         }
20380 #endif
20381
20382 #if DB_VERSION_MAJOR > 2
20383         db_env_create( NULL, 0 );
20384 #elif DB_VERSION_MAJOR > 1
20385         db_appexit( NULL );
20386 #else
20387         (void) dbopen( NULL, 0, 0, 0, NULL);
20388 #endif
20389
20390 ; return 0; }
20391 EOF
20392 if { (eval echo configure:20393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20393   rm -rf conftest*
20394   ol_cv_db_db_3=yes
20395 else
20396   echo "configure: failed program was:" >&5
20397   cat conftest.$ac_ext >&5
20398   rm -rf conftest*
20399   ol_cv_db_db_3=no
20400 fi
20401 rm -f conftest*
20402
20403         LIBS="$ol_LIBS"
20404
20405 fi
20406
20407 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20408
20409         if test $ol_cv_db_db_3 = yes ; then
20410                 ol_cv_lib_db=-ldb-3
20411         fi
20412 fi
20413
20414 if test $ol_cv_lib_db = no ; then
20415         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20416 echo "configure:20417: checking for Berkeley DB link (-ldb2)" >&5
20417 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20418   echo $ac_n "(cached) $ac_c" 1>&6
20419 else
20420   
20421         ol_DB_LIB=-ldb2
20422         ol_LIBS=$LIBS
20423         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20424
20425         cat > conftest.$ac_ext <<EOF
20426 #line 20427 "configure"
20427 #include "confdefs.h"
20428
20429 #ifdef HAVE_DB_185_H
20430 # include <db_185.h>
20431 #else
20432 # include <db.h>
20433 #endif
20434
20435 #ifndef DB_VERSION_MAJOR
20436 # define DB_VERSION_MAJOR 1
20437 #endif
20438
20439 #ifndef NULL
20440 #define NULL ((void*)0)
20441 #endif
20442
20443 int main() {
20444
20445 #if DB_VERSION_MAJOR > 1
20446         {
20447                 char *version;
20448                 int major, minor, patch;
20449
20450                 version = db_version( &major, &minor, &patch );
20451
20452                 if( major != DB_VERSION_MAJOR ||
20453                         minor < DB_VERSION_MINOR )
20454                 {
20455                         printf("Berkeley DB version mismatch\n"
20456                                 "\theader: %s\n\tlibrary: %s\n",
20457                                 DB_VERSION_STRING, version);
20458                         return 1;
20459                 }
20460         }
20461 #endif
20462
20463 #if DB_VERSION_MAJOR > 2
20464         db_env_create( NULL, 0 );
20465 #elif DB_VERSION_MAJOR > 1
20466         db_appexit( NULL );
20467 #else
20468         (void) dbopen( NULL, 0, 0, 0, NULL);
20469 #endif
20470
20471 ; return 0; }
20472 EOF
20473 if { (eval echo configure:20474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20474   rm -rf conftest*
20475   ol_cv_db_db2=yes
20476 else
20477   echo "configure: failed program was:" >&5
20478   cat conftest.$ac_ext >&5
20479   rm -rf conftest*
20480   ol_cv_db_db2=no
20481 fi
20482 rm -f conftest*
20483
20484         LIBS="$ol_LIBS"
20485
20486 fi
20487
20488 echo "$ac_t""$ol_cv_db_db2" 1>&6
20489
20490         if test $ol_cv_db_db2 = yes ; then
20491                 ol_cv_lib_db=-ldb2
20492         fi
20493 fi
20494
20495 if test $ol_cv_lib_db = no ; then
20496         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20497 echo "configure:20498: checking for Berkeley DB link (-ldb-2)" >&5
20498 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20499   echo $ac_n "(cached) $ac_c" 1>&6
20500 else
20501   
20502         ol_DB_LIB=-ldb-2
20503         ol_LIBS=$LIBS
20504         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20505
20506         cat > conftest.$ac_ext <<EOF
20507 #line 20508 "configure"
20508 #include "confdefs.h"
20509
20510 #ifdef HAVE_DB_185_H
20511 # include <db_185.h>
20512 #else
20513 # include <db.h>
20514 #endif
20515
20516 #ifndef DB_VERSION_MAJOR
20517 # define DB_VERSION_MAJOR 1
20518 #endif
20519
20520 #ifndef NULL
20521 #define NULL ((void*)0)
20522 #endif
20523
20524 int main() {
20525
20526 #if DB_VERSION_MAJOR > 1
20527         {
20528                 char *version;
20529                 int major, minor, patch;
20530
20531                 version = db_version( &major, &minor, &patch );
20532
20533                 if( major != DB_VERSION_MAJOR ||
20534                         minor < DB_VERSION_MINOR )
20535                 {
20536                         printf("Berkeley DB version mismatch\n"
20537                                 "\theader: %s\n\tlibrary: %s\n",
20538                                 DB_VERSION_STRING, version);
20539                         return 1;
20540                 }
20541         }
20542 #endif
20543
20544 #if DB_VERSION_MAJOR > 2
20545         db_env_create( NULL, 0 );
20546 #elif DB_VERSION_MAJOR > 1
20547         db_appexit( NULL );
20548 #else
20549         (void) dbopen( NULL, 0, 0, 0, NULL);
20550 #endif
20551
20552 ; return 0; }
20553 EOF
20554 if { (eval echo configure:20555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20555   rm -rf conftest*
20556   ol_cv_db_db_2=yes
20557 else
20558   echo "configure: failed program was:" >&5
20559   cat conftest.$ac_ext >&5
20560   rm -rf conftest*
20561   ol_cv_db_db_2=no
20562 fi
20563 rm -f conftest*
20564
20565         LIBS="$ol_LIBS"
20566
20567 fi
20568
20569 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20570
20571         if test $ol_cv_db_db_2 = yes ; then
20572                 ol_cv_lib_db=-ldb-2
20573         fi
20574 fi
20575
20576 if test $ol_cv_lib_db = no ; then
20577         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20578 echo "configure:20579: checking for Berkeley DB link (-ldb1)" >&5
20579 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20580   echo $ac_n "(cached) $ac_c" 1>&6
20581 else
20582   
20583         ol_DB_LIB=-ldb1
20584         ol_LIBS=$LIBS
20585         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20586
20587         cat > conftest.$ac_ext <<EOF
20588 #line 20589 "configure"
20589 #include "confdefs.h"
20590
20591 #ifdef HAVE_DB_185_H
20592 # include <db_185.h>
20593 #else
20594 # include <db.h>
20595 #endif
20596
20597 #ifndef DB_VERSION_MAJOR
20598 # define DB_VERSION_MAJOR 1
20599 #endif
20600
20601 #ifndef NULL
20602 #define NULL ((void*)0)
20603 #endif
20604
20605 int main() {
20606
20607 #if DB_VERSION_MAJOR > 1
20608         {
20609                 char *version;
20610                 int major, minor, patch;
20611
20612                 version = db_version( &major, &minor, &patch );
20613
20614                 if( major != DB_VERSION_MAJOR ||
20615                         minor < DB_VERSION_MINOR )
20616                 {
20617                         printf("Berkeley DB version mismatch\n"
20618                                 "\theader: %s\n\tlibrary: %s\n",
20619                                 DB_VERSION_STRING, version);
20620                         return 1;
20621                 }
20622         }
20623 #endif
20624
20625 #if DB_VERSION_MAJOR > 2
20626         db_env_create( NULL, 0 );
20627 #elif DB_VERSION_MAJOR > 1
20628         db_appexit( NULL );
20629 #else
20630         (void) dbopen( NULL, 0, 0, 0, NULL);
20631 #endif
20632
20633 ; return 0; }
20634 EOF
20635 if { (eval echo configure:20636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20636   rm -rf conftest*
20637   ol_cv_db_db1=yes
20638 else
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   ol_cv_db_db1=no
20643 fi
20644 rm -f conftest*
20645
20646         LIBS="$ol_LIBS"
20647
20648 fi
20649
20650 echo "$ac_t""$ol_cv_db_db1" 1>&6
20651
20652         if test $ol_cv_db_db1 = yes ; then
20653                 ol_cv_lib_db=-ldb1
20654         fi
20655 fi
20656
20657 if test $ol_cv_lib_db = no ; then
20658         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20659 echo "configure:20660: checking for Berkeley DB link (-ldb-1)" >&5
20660 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20661   echo $ac_n "(cached) $ac_c" 1>&6
20662 else
20663   
20664         ol_DB_LIB=-ldb-1
20665         ol_LIBS=$LIBS
20666         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20667
20668         cat > conftest.$ac_ext <<EOF
20669 #line 20670 "configure"
20670 #include "confdefs.h"
20671
20672 #ifdef HAVE_DB_185_H
20673 # include <db_185.h>
20674 #else
20675 # include <db.h>
20676 #endif
20677
20678 #ifndef DB_VERSION_MAJOR
20679 # define DB_VERSION_MAJOR 1
20680 #endif
20681
20682 #ifndef NULL
20683 #define NULL ((void*)0)
20684 #endif
20685
20686 int main() {
20687
20688 #if DB_VERSION_MAJOR > 1
20689         {
20690                 char *version;
20691                 int major, minor, patch;
20692
20693                 version = db_version( &major, &minor, &patch );
20694
20695                 if( major != DB_VERSION_MAJOR ||
20696                         minor < DB_VERSION_MINOR )
20697                 {
20698                         printf("Berkeley DB version mismatch\n"
20699                                 "\theader: %s\n\tlibrary: %s\n",
20700                                 DB_VERSION_STRING, version);
20701                         return 1;
20702                 }
20703         }
20704 #endif
20705
20706 #if DB_VERSION_MAJOR > 2
20707         db_env_create( NULL, 0 );
20708 #elif DB_VERSION_MAJOR > 1
20709         db_appexit( NULL );
20710 #else
20711         (void) dbopen( NULL, 0, 0, 0, NULL);
20712 #endif
20713
20714 ; return 0; }
20715 EOF
20716 if { (eval echo configure:20717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20717   rm -rf conftest*
20718   ol_cv_db_db_1=yes
20719 else
20720   echo "configure: failed program was:" >&5
20721   cat conftest.$ac_ext >&5
20722   rm -rf conftest*
20723   ol_cv_db_db_1=no
20724 fi
20725 rm -f conftest*
20726
20727         LIBS="$ol_LIBS"
20728
20729 fi
20730
20731 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20732
20733         if test $ol_cv_db_db_1 = yes ; then
20734                 ol_cv_lib_db=-ldb-1
20735         fi
20736 fi
20737
20738
20739         if test "$ol_cv_lib_db" != no ; then
20740                 ol_cv_berkeley_db=yes
20741                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20742 echo "configure:20743: checking for Berkeley DB version match" >&5
20743 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20744   echo $ac_n "(cached) $ac_c" 1>&6
20745 else
20746   
20747         ol_LIBS="$LIBS"
20748         LIBS="$LTHREAD_LIBS $LIBS"
20749         if test $ol_cv_lib_db != yes ; then
20750                 LIBS="$ol_cv_lib_db $LIBS"
20751         fi
20752
20753         if test "$cross_compiling" = yes; then
20754   ol_cv_berkeley_db_version=cross
20755 else
20756   cat > conftest.$ac_ext <<EOF
20757 #line 20758 "configure"
20758 #include "confdefs.h"
20759
20760 #ifdef HAVE_DB_185_H
20761         choke me;
20762 #else
20763 #include <db.h>
20764 #endif
20765 #ifndef DB_VERSION_MAJOR
20766 # define DB_VERSION_MAJOR 1
20767 #endif
20768 #ifndef NULL
20769 #define NULL ((void *)0)
20770 #endif
20771 main()
20772 {
20773 #if DB_VERSION_MAJOR > 1
20774         char *version;
20775         int major, minor, patch;
20776
20777         version = db_version( &major, &minor, &patch );
20778
20779         if( major != DB_VERSION_MAJOR ||
20780                 minor != DB_VERSION_MINOR ||
20781                 patch != DB_VERSION_PATCH )
20782         {
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>&5
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>&5
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>&5
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>&5
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>&5
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>&5
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
24043 if test $ac_cv_func_memcmp_clean = no ; then
24044         cat >> confdefs.h <<\EOF
24045 #define NEED_MEMCMP_REPLACEMENT 1
24046 EOF
24047
24048 fi
24049
24050 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24051 echo "configure:24052: checking for strftime" >&5
24052 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24053   echo $ac_n "(cached) $ac_c" 1>&6
24054 else
24055   cat > conftest.$ac_ext <<EOF
24056 #line 24057 "configure"
24057 #include "confdefs.h"
24058 /* System header to define __stub macros and hopefully few prototypes,
24059     which can conflict with char strftime(); below.  */
24060 #include <assert.h>
24061 /* Override any gcc2 internal prototype to avoid an error.  */
24062 /* We use char because int might match the return type of a gcc2
24063     builtin and then its argument prototype would still apply.  */
24064 char strftime();
24065 char (*f)();
24066
24067 int main() {
24068
24069 /* The GNU C library defines this for functions which it implements
24070     to always fail with ENOSYS.  Some functions are actually named
24071     something starting with __ and the normal name is an alias.  */
24072 #if defined (__stub_strftime) || defined (__stub___strftime)
24073 choke me
24074 #else
24075 f = strftime;
24076 #endif
24077
24078 ; return 0; }
24079 EOF
24080 if { (eval echo configure:24081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24081   rm -rf conftest*
24082   eval "ac_cv_func_strftime=yes"
24083 else
24084   echo "configure: failed program was:" >&5
24085   cat conftest.$ac_ext >&5
24086   rm -rf conftest*
24087   eval "ac_cv_func_strftime=no"
24088 fi
24089 rm -f conftest*
24090 fi
24091
24092 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24093   echo "$ac_t""yes" 1>&6
24094   cat >> confdefs.h <<\EOF
24095 #define HAVE_STRFTIME 1
24096 EOF
24097
24098 else
24099   echo "$ac_t""no" 1>&6
24100 # strftime is in -lintl on SCO UNIX.
24101 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24102 echo "configure:24103: checking for strftime in -lintl" >&5
24103 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24105   echo $ac_n "(cached) $ac_c" 1>&6
24106 else
24107   ac_save_LIBS="$LIBS"
24108 LIBS="-lintl  $LIBS"
24109 cat > conftest.$ac_ext <<EOF
24110 #line 24111 "configure"
24111 #include "confdefs.h"
24112 /* Override any gcc2 internal prototype to avoid an error.  */
24113 /* We use char because int might match the return type of a gcc2
24114     builtin and then its argument prototype would still apply.  */
24115 char strftime();
24116
24117 int main() {
24118 strftime()
24119 ; return 0; }
24120 EOF
24121 if { (eval echo configure:24122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24122   rm -rf conftest*
24123   eval "ac_cv_lib_$ac_lib_var=yes"
24124 else
24125   echo "configure: failed program was:" >&5
24126   cat conftest.$ac_ext >&5
24127   rm -rf conftest*
24128   eval "ac_cv_lib_$ac_lib_var=no"
24129 fi
24130 rm -f conftest*
24131 LIBS="$ac_save_LIBS"
24132
24133 fi
24134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24135   echo "$ac_t""yes" 1>&6
24136   cat >> confdefs.h <<\EOF
24137 #define HAVE_STRFTIME 1
24138 EOF
24139
24140 LIBS="-lintl $LIBS"
24141 else
24142   echo "$ac_t""no" 1>&6
24143 fi
24144
24145 fi
24146
24147
24148 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24149 echo "configure:24150: checking for inet_aton()" >&5
24150 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24151   echo $ac_n "(cached) $ac_c" 1>&6
24152 else
24153   cat > conftest.$ac_ext <<EOF
24154 #line 24155 "configure"
24155 #include "confdefs.h"
24156
24157 #ifdef HAVE_SYS_TYPES_H
24158 #       include <sys/types.h>
24159 #endif
24160 #ifdef HAVE_SYS_SOCKET_H
24161 #       include <sys/socket.h>
24162 #       ifdef HAVE_SYS_SELECT_H
24163 #               include <sys/select.h>
24164 #       endif
24165 #       include <netinet/in.h>
24166 #       ifdef HAVE_ARPA_INET_H
24167 #               include <arpa/inet.h>
24168 #       endif
24169 #endif
24170
24171 int main() {
24172 struct in_addr in;
24173 int rc = inet_aton( "255.255.255.255", &in );
24174 ; return 0; }
24175 EOF
24176 if { (eval echo configure:24177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24177   rm -rf conftest*
24178   ol_cv_func_inet_aton=yes
24179 else
24180   echo "configure: failed program was:" >&5
24181   cat conftest.$ac_ext >&5
24182   rm -rf conftest*
24183   ol_cv_func_inet_aton=no
24184 fi
24185 rm -f conftest*
24186 fi
24187
24188 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24189   if test $ol_cv_func_inet_aton != no; then
24190     cat >> confdefs.h <<\EOF
24191 #define HAVE_INET_ATON 1
24192 EOF
24193
24194   fi
24195  
24196
24197 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24198 echo "configure:24199: checking for _spawnlp" >&5
24199 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24200   echo $ac_n "(cached) $ac_c" 1>&6
24201 else
24202   cat > conftest.$ac_ext <<EOF
24203 #line 24204 "configure"
24204 #include "confdefs.h"
24205 /* System header to define __stub macros and hopefully few prototypes,
24206     which can conflict with char _spawnlp(); below.  */
24207 #include <assert.h>
24208 /* Override any gcc2 internal prototype to avoid an error.  */
24209 /* We use char because int might match the return type of a gcc2
24210     builtin and then its argument prototype would still apply.  */
24211 char _spawnlp();
24212 char (*f)();
24213
24214 int main() {
24215
24216 /* The GNU C library defines this for functions which it implements
24217     to always fail with ENOSYS.  Some functions are actually named
24218     something starting with __ and the normal name is an alias.  */
24219 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24220 choke me
24221 #else
24222 f = _spawnlp;
24223 #endif
24224
24225 ; return 0; }
24226 EOF
24227 if { (eval echo configure:24228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24228   rm -rf conftest*
24229   eval "ac_cv_func__spawnlp=yes"
24230 else
24231   echo "configure: failed program was:" >&5
24232   cat conftest.$ac_ext >&5
24233   rm -rf conftest*
24234   eval "ac_cv_func__spawnlp=no"
24235 fi
24236 rm -f conftest*
24237 fi
24238
24239 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24240   echo "$ac_t""yes" 1>&6
24241   cat >> confdefs.h <<\EOF
24242 #define HAVE_SPAWNLP 1
24243 EOF
24244
24245 else
24246   echo "$ac_t""no" 1>&6
24247 fi
24248
24249
24250 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24251 echo "configure:24252: checking for _snprintf" >&5
24252 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24253   echo $ac_n "(cached) $ac_c" 1>&6
24254 else
24255   cat > conftest.$ac_ext <<EOF
24256 #line 24257 "configure"
24257 #include "confdefs.h"
24258 /* System header to define __stub macros and hopefully few prototypes,
24259     which can conflict with char _snprintf(); below.  */
24260 #include <assert.h>
24261 /* Override any gcc2 internal prototype to avoid an error.  */
24262 /* We use char because int might match the return type of a gcc2
24263     builtin and then its argument prototype would still apply.  */
24264 char _snprintf();
24265 char (*f)();
24266
24267 int main() {
24268
24269 /* The GNU C library defines this for functions which it implements
24270     to always fail with ENOSYS.  Some functions are actually named
24271     something starting with __ and the normal name is an alias.  */
24272 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24273 choke me
24274 #else
24275 f = _snprintf;
24276 #endif
24277
24278 ; return 0; }
24279 EOF
24280 if { (eval echo configure:24281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24281   rm -rf conftest*
24282   eval "ac_cv_func__snprintf=yes"
24283 else
24284   echo "configure: failed program was:" >&5
24285   cat conftest.$ac_ext >&5
24286   rm -rf conftest*
24287   eval "ac_cv_func__snprintf=no"
24288 fi
24289 rm -f conftest*
24290 fi
24291
24292 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24293   echo "$ac_t""yes" 1>&6
24294   ac_cv_func_snprintf=yes
24295         cat >> confdefs.h <<\EOF
24296 #define snprintf _snprintf
24297 EOF
24298
24299
24300 else
24301   echo "$ac_t""no" 1>&6
24302 fi
24303
24304
24305 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24306 echo "configure:24307: checking for _vsnprintf" >&5
24307 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24308   echo $ac_n "(cached) $ac_c" 1>&6
24309 else
24310   cat > conftest.$ac_ext <<EOF
24311 #line 24312 "configure"
24312 #include "confdefs.h"
24313 /* System header to define __stub macros and hopefully few prototypes,
24314     which can conflict with char _vsnprintf(); below.  */
24315 #include <assert.h>
24316 /* Override any gcc2 internal prototype to avoid an error.  */
24317 /* We use char because int might match the return type of a gcc2
24318     builtin and then its argument prototype would still apply.  */
24319 char _vsnprintf();
24320 char (*f)();
24321
24322 int main() {
24323
24324 /* The GNU C library defines this for functions which it implements
24325     to always fail with ENOSYS.  Some functions are actually named
24326     something starting with __ and the normal name is an alias.  */
24327 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24328 choke me
24329 #else
24330 f = _vsnprintf;
24331 #endif
24332
24333 ; return 0; }
24334 EOF
24335 if { (eval echo configure:24336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24336   rm -rf conftest*
24337   eval "ac_cv_func__vsnprintf=yes"
24338 else
24339   echo "configure: failed program was:" >&5
24340   cat conftest.$ac_ext >&5
24341   rm -rf conftest*
24342   eval "ac_cv_func__vsnprintf=no"
24343 fi
24344 rm -f conftest*
24345 fi
24346
24347 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24348   echo "$ac_t""yes" 1>&6
24349   ac_cv_func_vsnprintf=yes
24350         cat >> confdefs.h <<\EOF
24351 #define vsnprintf _vsnprintf
24352 EOF
24353
24354
24355 else
24356   echo "$ac_t""no" 1>&6
24357 fi
24358
24359
24360 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24361 echo "configure:24362: checking for vprintf" >&5
24362 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24363   echo $ac_n "(cached) $ac_c" 1>&6
24364 else
24365   cat > conftest.$ac_ext <<EOF
24366 #line 24367 "configure"
24367 #include "confdefs.h"
24368 /* System header to define __stub macros and hopefully few prototypes,
24369     which can conflict with char vprintf(); below.  */
24370 #include <assert.h>
24371 /* Override any gcc2 internal prototype to avoid an error.  */
24372 /* We use char because int might match the return type of a gcc2
24373     builtin and then its argument prototype would still apply.  */
24374 char vprintf();
24375 char (*f)();
24376
24377 int main() {
24378
24379 /* The GNU C library defines this for functions which it implements
24380     to always fail with ENOSYS.  Some functions are actually named
24381     something starting with __ and the normal name is an alias.  */
24382 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24383 choke me
24384 #else
24385 f = vprintf;
24386 #endif
24387
24388 ; return 0; }
24389 EOF
24390 if { (eval echo configure:24391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24391   rm -rf conftest*
24392   eval "ac_cv_func_vprintf=yes"
24393 else
24394   echo "configure: failed program was:" >&5
24395   cat conftest.$ac_ext >&5
24396   rm -rf conftest*
24397   eval "ac_cv_func_vprintf=no"
24398 fi
24399 rm -f conftest*
24400 fi
24401
24402 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24403   echo "$ac_t""yes" 1>&6
24404   cat >> confdefs.h <<\EOF
24405 #define HAVE_VPRINTF 1
24406 EOF
24407
24408 else
24409   echo "$ac_t""no" 1>&6
24410 fi
24411
24412 if test "$ac_cv_func_vprintf" != yes; then
24413 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24414 echo "configure:24415: checking for _doprnt" >&5
24415 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24416   echo $ac_n "(cached) $ac_c" 1>&6
24417 else
24418   cat > conftest.$ac_ext <<EOF
24419 #line 24420 "configure"
24420 #include "confdefs.h"
24421 /* System header to define __stub macros and hopefully few prototypes,
24422     which can conflict with char _doprnt(); below.  */
24423 #include <assert.h>
24424 /* Override any gcc2 internal prototype to avoid an error.  */
24425 /* We use char because int might match the return type of a gcc2
24426     builtin and then its argument prototype would still apply.  */
24427 char _doprnt();
24428 char (*f)();
24429
24430 int main() {
24431
24432 /* The GNU C library defines this for functions which it implements
24433     to always fail with ENOSYS.  Some functions are actually named
24434     something starting with __ and the normal name is an alias.  */
24435 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24436 choke me
24437 #else
24438 f = _doprnt;
24439 #endif
24440
24441 ; return 0; }
24442 EOF
24443 if { (eval echo configure:24444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24444   rm -rf conftest*
24445   eval "ac_cv_func__doprnt=yes"
24446 else
24447   echo "configure: failed program was:" >&5
24448   cat conftest.$ac_ext >&5
24449   rm -rf conftest*
24450   eval "ac_cv_func__doprnt=no"
24451 fi
24452 rm -f conftest*
24453 fi
24454
24455 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24456   echo "$ac_t""yes" 1>&6
24457   cat >> confdefs.h <<\EOF
24458 #define HAVE_DOPRNT 1
24459 EOF
24460
24461 else
24462   echo "$ac_t""no" 1>&6
24463 fi
24464
24465 fi
24466
24467
24468 if test $ac_cv_func_vprintf = yes ; then
24469                 for ac_func in snprintf vsnprintf
24470 do
24471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24472 echo "configure:24473: checking for $ac_func" >&5
24473 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24474   echo $ac_n "(cached) $ac_c" 1>&6
24475 else
24476   cat > conftest.$ac_ext <<EOF
24477 #line 24478 "configure"
24478 #include "confdefs.h"
24479 /* System header to define __stub macros and hopefully few prototypes,
24480     which can conflict with char $ac_func(); below.  */
24481 #include <assert.h>
24482 /* Override any gcc2 internal prototype to avoid an error.  */
24483 /* We use char because int might match the return type of a gcc2
24484     builtin and then its argument prototype would still apply.  */
24485 char $ac_func();
24486 char (*f)();
24487
24488 int main() {
24489
24490 /* The GNU C library defines this for functions which it implements
24491     to always fail with ENOSYS.  Some functions are actually named
24492     something starting with __ and the normal name is an alias.  */
24493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24494 choke me
24495 #else
24496 f = $ac_func;
24497 #endif
24498
24499 ; return 0; }
24500 EOF
24501 if { (eval echo configure:24502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24502   rm -rf conftest*
24503   eval "ac_cv_func_$ac_func=yes"
24504 else
24505   echo "configure: failed program was:" >&5
24506   cat conftest.$ac_ext >&5
24507   rm -rf conftest*
24508   eval "ac_cv_func_$ac_func=no"
24509 fi
24510 rm -f conftest*
24511 fi
24512
24513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24514   echo "$ac_t""yes" 1>&6
24515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24516   cat >> confdefs.h <<EOF
24517 #define $ac_tr_func 1
24518 EOF
24519  
24520 else
24521   echo "$ac_t""no" 1>&6
24522 fi
24523 done
24524
24525 fi
24526
24527 for ac_func in \
24528         bcopy                   \
24529         closesocket             \
24530         chroot                  \
24531         endgrent                \
24532         endpwent                \
24533         fcntl                   \
24534         flock                   \
24535         fstat                   \
24536         getdtablesize   \
24537         getgrgid                \
24538         gethostname             \
24539         getpass                 \
24540         getpassphrase   \
24541         getpwuid                \
24542         getpwnam                \
24543         getspnam                \
24544         gettimeofday    \
24545         initgroups              \
24546         lockf                   \
24547         memcpy                  \
24548         memmove                 \
24549         mkstemp                 \
24550         mktemp                  \
24551         pipe                    \
24552         read                    \
24553         recv                    \
24554         recvfrom                \
24555         setpwfile               \
24556         setgid                  \
24557         setegid                 \
24558         setsid                  \
24559         setuid                  \
24560         seteuid                 \
24561         signal                  \
24562         strdup                  \
24563         strpbrk                 \
24564         strrchr                 \
24565         strsep                  \
24566         strstr                  \
24567         strtol                  \
24568         strtoul                 \
24569         strtoq                  \
24570         strtouq                 \
24571         strtoll                 \
24572         strspn                  \
24573         sysconf                 \
24574         usleep                  \
24575         waitpid                 \
24576         wait4                   \
24577         write                   \
24578         send                    \
24579         sendmsg                 \
24580         sendto                  \
24581
24582 do
24583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24584 echo "configure:24585: checking for $ac_func" >&5
24585 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24586   echo $ac_n "(cached) $ac_c" 1>&6
24587 else
24588   cat > conftest.$ac_ext <<EOF
24589 #line 24590 "configure"
24590 #include "confdefs.h"
24591 /* System header to define __stub macros and hopefully few prototypes,
24592     which can conflict with char $ac_func(); below.  */
24593 #include <assert.h>
24594 /* Override any gcc2 internal prototype to avoid an error.  */
24595 /* We use char because int might match the return type of a gcc2
24596     builtin and then its argument prototype would still apply.  */
24597 char $ac_func();
24598 char (*f)();
24599
24600 int main() {
24601
24602 /* The GNU C library defines this for functions which it implements
24603     to always fail with ENOSYS.  Some functions are actually named
24604     something starting with __ and the normal name is an alias.  */
24605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24606 choke me
24607 #else
24608 f = $ac_func;
24609 #endif
24610
24611 ; return 0; }
24612 EOF
24613 if { (eval echo configure:24614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24614   rm -rf conftest*
24615   eval "ac_cv_func_$ac_func=yes"
24616 else
24617   echo "configure: failed program was:" >&5
24618   cat conftest.$ac_ext >&5
24619   rm -rf conftest*
24620   eval "ac_cv_func_$ac_func=no"
24621 fi
24622 rm -f conftest*
24623 fi
24624
24625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24626   echo "$ac_t""yes" 1>&6
24627     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24628   cat >> confdefs.h <<EOF
24629 #define $ac_tr_func 1
24630 EOF
24631  
24632 else
24633   echo "$ac_t""no" 1>&6
24634 fi
24635 done
24636
24637
24638 for ac_func in getopt getpeereid
24639 do
24640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24641 echo "configure:24642: checking for $ac_func" >&5
24642 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24643   echo $ac_n "(cached) $ac_c" 1>&6
24644 else
24645   cat > conftest.$ac_ext <<EOF
24646 #line 24647 "configure"
24647 #include "confdefs.h"
24648 /* System header to define __stub macros and hopefully few prototypes,
24649     which can conflict with char $ac_func(); below.  */
24650 #include <assert.h>
24651 /* Override any gcc2 internal prototype to avoid an error.  */
24652 /* We use char because int might match the return type of a gcc2
24653     builtin and then its argument prototype would still apply.  */
24654 char $ac_func();
24655 char (*f)();
24656
24657 int main() {
24658
24659 /* The GNU C library defines this for functions which it implements
24660     to always fail with ENOSYS.  Some functions are actually named
24661     something starting with __ and the normal name is an alias.  */
24662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24663 choke me
24664 #else
24665 f = $ac_func;
24666 #endif
24667
24668 ; return 0; }
24669 EOF
24670 if { (eval echo configure:24671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24671   rm -rf conftest*
24672   eval "ac_cv_func_$ac_func=yes"
24673 else
24674   echo "configure: failed program was:" >&5
24675   cat conftest.$ac_ext >&5
24676   rm -rf conftest*
24677   eval "ac_cv_func_$ac_func=no"
24678 fi
24679 rm -f conftest*
24680 fi
24681
24682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24683   echo "$ac_t""yes" 1>&6
24684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24685   cat >> confdefs.h <<EOF
24686 #define $ac_tr_func 1
24687 EOF
24688  
24689 else
24690   echo "$ac_t""no" 1>&6
24691 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24692 fi
24693 done
24694
24695
24696
24697 if test "$ac_cv_func_getopt" != yes; then
24698         LIBSRCS="$LIBSRCS getopt.c"
24699 fi
24700 if test "$ac_cv_func_getpeereid" != yes; then
24701         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24702 echo "configure:24703: checking for msg_accrights in msghdr" >&5
24703 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24704   echo $ac_n "(cached) $ac_c" 1>&6
24705 else
24706   cat > conftest.$ac_ext <<EOF
24707 #line 24708 "configure"
24708 #include "confdefs.h"
24709 #include <sys/socket.h>
24710 int main() {
24711 struct msghdr m; m.msg_accrightslen=0
24712 ; return 0; }
24713 EOF
24714 if { (eval echo configure:24715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24715   rm -rf conftest*
24716   ol_cv_msghdr_msg_accrights=yes
24717 else
24718   echo "configure: failed program was:" >&5
24719   cat conftest.$ac_ext >&5
24720   rm -rf conftest*
24721   ol_cv_msghdr_msg_accrights=no
24722 fi
24723 rm -f conftest*
24724         
24725 fi
24726
24727 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24728   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24729         cat >> confdefs.h <<\EOF
24730 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24731 EOF
24732
24733   fi
24734
24735         LIBSRCS="$LIBSRCS getpeereid.c"
24736 fi
24737 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24738         if test "$ac_cv_func_snprintf" != yes; then
24739                 cat >> confdefs.h <<\EOF
24740 #define snprintf ber_pvt_snprintf
24741 EOF
24742
24743         fi
24744         if test "$ac_cv_func_vsnprintf" != yes; then
24745                 cat >> confdefs.h <<\EOF
24746 #define vsnprintf ber_pvt_vsnprintf
24747 EOF
24748
24749         fi
24750 fi
24751
24752
24753 if test "$ol_enable_slapi" != no ; then
24754                         for ac_hdr in ltdl.h
24755 do
24756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24758 echo "configure:24759: checking for $ac_hdr" >&5
24759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24760   echo $ac_n "(cached) $ac_c" 1>&6
24761 else
24762   cat > conftest.$ac_ext <<EOF
24763 #line 24764 "configure"
24764 #include "confdefs.h"
24765 #include <$ac_hdr>
24766 EOF
24767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24768 { (eval echo configure:24769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24770 if test -z "$ac_err"; then
24771   rm -rf conftest*
24772   eval "ac_cv_header_$ac_safe=yes"
24773 else
24774   echo "$ac_err" >&5
24775   echo "configure: failed program was:" >&5
24776   cat conftest.$ac_ext >&5
24777   rm -rf conftest*
24778   eval "ac_cv_header_$ac_safe=no"
24779 fi
24780 rm -f conftest*
24781 fi
24782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24783   echo "$ac_t""yes" 1>&6
24784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24785   cat >> confdefs.h <<EOF
24786 #define $ac_tr_hdr 1
24787 EOF
24788  
24789 else
24790   echo "$ac_t""no" 1>&6
24791 fi
24792 done
24793
24794
24795         if test $ac_cv_header_ltdl_h != yes ; then
24796                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24797         fi
24798         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24799 echo "configure:24800: checking for lt_dlinit in -lltdl" >&5
24800 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24802   echo $ac_n "(cached) $ac_c" 1>&6
24803 else
24804   ac_save_LIBS="$LIBS"
24805 LIBS="-lltdl  $LIBS"
24806 cat > conftest.$ac_ext <<EOF
24807 #line 24808 "configure"
24808 #include "confdefs.h"
24809 /* Override any gcc2 internal prototype to avoid an error.  */
24810 /* We use char because int might match the return type of a gcc2
24811     builtin and then its argument prototype would still apply.  */
24812 char lt_dlinit();
24813
24814 int main() {
24815 lt_dlinit()
24816 ; return 0; }
24817 EOF
24818 if { (eval echo configure:24819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24819   rm -rf conftest*
24820   eval "ac_cv_lib_$ac_lib_var=yes"
24821 else
24822   echo "configure: failed program was:" >&5
24823   cat conftest.$ac_ext >&5
24824   rm -rf conftest*
24825   eval "ac_cv_lib_$ac_lib_var=no"
24826 fi
24827 rm -f conftest*
24828 LIBS="$ac_save_LIBS"
24829
24830 fi
24831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24832   echo "$ac_t""yes" 1>&6
24833   
24834                 SLAPI_LIBS=-lltdl
24835                 LIBSLAPI=libslapi.a
24836                 LIBSLAPITOOLS=../libslapi.a
24837                 cat >> confdefs.h <<\EOF
24838 #define HAVE_LIBLTDL 1
24839 EOF
24840
24841         
24842 else
24843   echo "$ac_t""no" 1>&6
24844 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24845 fi
24846
24847
24848         cat >> confdefs.h <<\EOF
24849 #define LDAP_SLAPI 1
24850 EOF
24851
24852 fi
24853
24854 if test "$ol_enable_debug" != no ; then
24855         cat >> confdefs.h <<\EOF
24856 #define LDAP_DEBUG 1
24857 EOF
24858
24859 fi
24860 if test "$ol_enable_syslog" = yes ; then
24861         cat >> confdefs.h <<\EOF
24862 #define LDAP_SYSLOG 1
24863 EOF
24864
24865 fi
24866 if test "$ol_link_kbind" != no ; then
24867         cat >> confdefs.h <<\EOF
24868 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24869 EOF
24870
24871 fi
24872 if test "$ol_enable_proctitle" != no ; then
24873         cat >> confdefs.h <<\EOF
24874 #define LDAP_PROCTITLE 1
24875 EOF
24876
24877 fi
24878 if test "$ol_enable_referrals" != no ; then
24879         cat >> confdefs.h <<\EOF
24880 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24881 EOF
24882
24883 fi
24884 if test "$ol_enable_local" != no; then
24885         cat >> confdefs.h <<\EOF
24886 #define LDAP_PF_LOCAL 1
24887 EOF
24888
24889 fi
24890 if test "$ol_link_ipv6" != no; then
24891         cat >> confdefs.h <<\EOF
24892 #define LDAP_PF_INET6 1
24893 EOF
24894
24895 fi
24896 if test "$ol_enable_cleartext" != no ; then
24897         cat >> confdefs.h <<\EOF
24898 #define SLAPD_CLEARTEXT 1
24899 EOF
24900
24901 fi
24902 if test "$ol_enable_crypt" != no ; then
24903         cat >> confdefs.h <<\EOF
24904 #define SLAPD_CRYPT 1
24905 EOF
24906
24907 fi
24908 if test "$ol_link_spasswd" != no ; then
24909         cat >> confdefs.h <<\EOF
24910 #define SLAPD_SPASSWD 1
24911 EOF
24912
24913 fi
24914 if test "$ol_enable_multimaster" != no ; then
24915         cat >> confdefs.h <<\EOF
24916 #define SLAPD_MULTIMASTER 1
24917 EOF
24918
24919 fi
24920 if test "$ol_enable_rlookups" != no ; then
24921         cat >> confdefs.h <<\EOF
24922 #define SLAPD_RLOOKUPS 1
24923 EOF
24924
24925 fi
24926 if test "$ol_enable_aci" != no ; then
24927         cat >> confdefs.h <<\EOF
24928 #define SLAPD_ACI_ENABLED 1
24929 EOF
24930
24931 fi
24932
24933 if test "$ol_link_modules" != no ; then
24934         cat >> confdefs.h <<\EOF
24935 #define SLAPD_MODULES 1
24936 EOF
24937
24938         BUILD_SLAPD=yes
24939         SLAPD_MODULES_LDFLAGS="-dlopen self"
24940 fi
24941
24942 cat >> confdefs.h <<\EOF
24943 #define SLAPD_MOD_STATIC 1
24944 EOF
24945
24946 cat >> confdefs.h <<\EOF
24947 #define SLAPD_MOD_DYNAMIC 2
24948 EOF
24949
24950
24951 if test "$ol_enable_bdb" != no ; then
24952         BUILD_SLAPD=yes
24953         BUILD_BDB=$ol_enable_bdb
24954         if test "$ol_enable_bdb" = mod ; then
24955                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24956                 MFLAG=SLAPD_MOD_DYNAMIC
24957         else
24958                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24959                 MFLAG=SLAPD_MOD_STATIC
24960         fi
24961         cat >> confdefs.h <<EOF
24962 #define SLAPD_BDB $MFLAG
24963 EOF
24964
24965 fi
24966
24967 if test "$ol_enable_dnssrv" != no ; then
24968         BUILD_SLAPD=yes
24969         BUILD_DNSSRV=$ol_enable_dnssrv
24970         if test "$ol_enable_dnssrv" = mod ; then
24971                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24972                 MFLAG=SLAPD_MOD_DYNAMIC
24973         else
24974                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24975                 MFLAG=SLAPD_MOD_STATIC
24976         fi
24977         cat >> confdefs.h <<EOF
24978 #define SLAPD_DNSSRV $MFLAG
24979 EOF
24980
24981 fi
24982
24983 if test "$ol_enable_hdb" != no ; then
24984         BUILD_SLAPD=yes
24985         BUILD_HDB=$ol_enable_hdb
24986         if test "$ol_enable_hdb" = mod ; then
24987                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24988                 MFLAG=SLAPD_MOD_DYNAMIC
24989         else
24990                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24991                 MFLAG=SLAPD_MOD_STATIC
24992         fi
24993         cat >> confdefs.h <<EOF
24994 #define SLAPD_HDB $MFLAG
24995 EOF
24996
24997 fi
24998
24999 if test "$ol_enable_ldap" != no ; then
25000         BUILD_SLAPD=yes
25001         BUILD_LDAP=$ol_enable_ldap
25002         if test "$ol_enable_ldap" = mod ; then
25003                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
25004                 MFLAG=SLAPD_MOD_DYNAMIC
25005         else
25006                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
25007                 MFLAG=SLAPD_MOD_STATIC
25008         fi
25009         cat >> confdefs.h <<EOF
25010 #define SLAPD_LDAP $MFLAG
25011 EOF
25012
25013 fi
25014
25015 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25016         BUILD_SLAPD=yes
25017         BUILD_LDBM=$ol_enable_ldbm
25018         if test "$ol_enable_ldbm" = mod ; then
25019                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25020                 MFLAG=SLAPD_MOD_DYNAMIC
25021         else
25022                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25023                 MFLAG=SLAPD_MOD_STATIC
25024         fi
25025         cat >> confdefs.h <<EOF
25026 #define SLAPD_LDBM $MFLAG
25027 EOF
25028
25029 fi
25030
25031 if test "$ol_enable_meta" != no ; then
25032         BUILD_SLAPD=yes
25033         BUILD_META=$ol_enable_meta
25034         BUILD_REWRITE=yes
25035         if test "$ol_enable_meta" = mod ; then
25036                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25037                 MFLAG=SLAPD_MOD_DYNAMIC
25038         else
25039                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25040                 MFLAG=SLAPD_MOD_STATIC
25041         fi
25042         cat >> confdefs.h <<EOF
25043 #define SLAPD_META $MFLAG
25044 EOF
25045
25046 fi
25047
25048 if test "$ol_enable_monitor" != no ; then
25049         BUILD_SLAPD=yes
25050         BUILD_MONITOR=$ol_enable_monitor
25051         if test "$ol_enable_monitor" = mod ; then
25052                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25053                 MFLAG=SLAPD_MOD_DYNAMIC
25054         else
25055                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25056                 MFLAG=SLAPD_MOD_STATIC
25057         fi
25058         cat >> confdefs.h <<EOF
25059 #define SLAPD_MONITOR $MFLAG
25060 EOF
25061
25062 fi
25063
25064 if test "$ol_enable_null" != no ; then
25065         BUILD_SLAPD=yes
25066         BUILD_NULL=$ol_enable_null
25067         if test "$ol_enable_null" = mod ; then
25068                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25069                 MFLAG=SLAPD_MOD_DYNAMIC
25070         else
25071                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25072                 MFLAG=SLAPD_MOD_STATIC
25073         fi
25074         cat >> confdefs.h <<EOF
25075 #define SLAPD_NULL $MFLAG
25076 EOF
25077
25078 fi
25079
25080 if test "$ol_enable_passwd" != no ; then
25081         BUILD_SLAPD=yes
25082         BUILD_PASSWD=$ol_enable_passwd
25083         if test "$ol_enable_passwd" = mod ; then
25084                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25085                 MFLAG=SLAPD_MOD_DYNAMIC
25086         else
25087                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25088                 MFLAG=SLAPD_MOD_STATIC
25089         fi
25090         cat >> confdefs.h <<EOF
25091 #define SLAPD_PASSWD $MFLAG
25092 EOF
25093
25094 fi
25095
25096 if test "$ol_link_perl" != no ; then
25097         BUILD_SLAPD=yes
25098         BUILD_PERL=$ol_enable_perl
25099         if test "$ol_enable_perl" = mod ; then
25100                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25101                 MFLAG=SLAPD_MOD_DYNAMIC
25102         else
25103                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25104                 MFLAG=SLAPD_MOD_STATIC
25105         fi
25106         cat >> confdefs.h <<EOF
25107 #define SLAPD_PERL $MFLAG
25108 EOF
25109
25110 fi
25111
25112 if test "$ol_enable_relay" != no ; then
25113         BUILD_SLAPD=yes
25114         BUILD_RELAY=$ol_enable_relay
25115         if test "$ol_enable_relay" = mod ; then
25116                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25117                 MFLAG=SLAPD_MOD_DYNAMIC
25118         else
25119                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25120                 MFLAG=SLAPD_MOD_STATIC
25121         fi
25122         cat >> confdefs.h <<EOF
25123 #define SLAPD_RELAY $MFLAG
25124 EOF
25125
25126 fi
25127
25128 if test "$ol_enable_shell" != no ; then
25129         if test "$ol_link_thread" != no ; then
25130                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25131         fi
25132         BUILD_SLAPD=yes
25133         BUILD_SHELL=$ol_enable_shell
25134         if test "$ol_enable_shell" = mod ; then
25135                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25136                 MFLAG=SLAPD_MOD_DYNAMIC
25137         else
25138                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25139                 MFLAG=SLAPD_MOD_STATIC
25140         fi
25141         cat >> confdefs.h <<EOF
25142 #define SLAPD_SHELL $MFLAG
25143 EOF
25144
25145 fi
25146
25147 if test "$ol_link_sql" != no ; then
25148         BUILD_SLAPD=yes
25149         BUILD_SQL=$ol_enable_sql
25150         if test "$ol_enable_sql" = mod; then
25151                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25152                 MFLAG=SLAPD_MOD_DYNAMIC
25153         else
25154                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25155                 MFLAG=SLAPD_MOD_STATIC
25156         fi
25157         cat >> confdefs.h <<EOF
25158 #define SLAPD_SQL $MFLAG
25159 EOF
25160
25161 fi
25162
25163 if test "$ol_enable_denyop" != no ; then
25164         BUILD_DENYOP=$ol_enable_denyop
25165         if test "$ol_enable_denyop" = mod ; then
25166                 MFLAG=SLAPD_MOD_DYNAMIC
25167                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25168         else
25169                 MFLAG=SLAPD_MOD_STATIC
25170         fi
25171         cat >> confdefs.h <<EOF
25172 #define SLAPD_OVER_DENYOP $MFLAG
25173 EOF
25174
25175 fi
25176
25177 if test "$ol_enable_dyngroup" != no ; then
25178         BUILD_DYNGROUP=$ol_enable_dyngroup
25179         if test "$ol_enable_dyngroup" = mod ; then
25180                 MFLAG=SLAPD_MOD_DYNAMIC
25181                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25182         else
25183                 MFLAG=SLAPD_MOD_STATIC
25184         fi
25185         cat >> confdefs.h <<EOF
25186 #define SLAPD_OVER_DYNGROUP $MFLAG
25187 EOF
25188
25189 fi
25190
25191 if test "$ol_enable_glue" != no ; then
25192         BUILD_GLUE=$ol_enable_glue
25193         if test "$ol_enable_glue" = mod ; then
25194                 MFLAG=SLAPD_MOD_DYNAMIC
25195                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25196         else
25197                 MFLAG=SLAPD_MOD_STATIC
25198         fi
25199         cat >> confdefs.h <<EOF
25200 #define SLAPD_OVER_GLUE $MFLAG
25201 EOF
25202
25203 fi
25204
25205 if test "$ol_enable_lastmod" != no ; then
25206         BUILD_LASTMOD=$ol_enable_lastmod
25207         if test "$ol_enable_lastmod" = mod ; then
25208                 MFLAG=SLAPD_MOD_DYNAMIC
25209                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25210         else
25211                 MFLAG=SLAPD_MOD_STATIC
25212         fi
25213         cat >> confdefs.h <<EOF
25214 #define SLAPD_OVER_LASTMOD $MFLAG
25215 EOF
25216
25217 fi
25218
25219 if test "$ol_enable_ppolicy" != no ; then
25220         BUILD_PPOLICY=$ol_enable_ppolicy
25221         if test "$ol_enable_ppolicy" = mod ; then
25222                 MFLAG=SLAPD_MOD_DYNAMIC
25223                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25224         else
25225                 MFLAG=SLAPD_MOD_STATIC
25226         fi
25227         cat >> confdefs.h <<EOF
25228 #define SLAPD_OVER_PPOLICY $MFLAG
25229 EOF
25230
25231 fi
25232
25233 if test "$ol_enable_proxycache" != no ; then
25234         BUILD_PROXYCACHE=$ol_enable_proxycache
25235         if test "$ol_enable_proxycache" = mod ; then
25236                 MFLAG=SLAPD_MOD_DYNAMIC
25237                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25238         else
25239                 MFLAG=SLAPD_MOD_STATIC
25240         fi
25241         cat >> confdefs.h <<EOF
25242 #define SLAPD_OVER_PROXYCACHE $MFLAG
25243 EOF
25244
25245 fi
25246
25247 if test "$ol_enable_refint" != no ; then
25248         BUILD_REFINT=$ol_enable_refint
25249         if test "$ol_enable_refint" = mod ; then
25250                 MFLAG=SLAPD_MOD_DYNAMIC
25251                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25252         else
25253                 MFLAG=SLAPD_MOD_STATIC
25254         fi
25255         cat >> confdefs.h <<EOF
25256 #define SLAPD_OVER_REFINT $MFLAG
25257 EOF
25258
25259 fi
25260
25261 if test "$ol_enable_rwm" != no ; then
25262         BUILD_REWRITE=yes
25263         BUILD_RWM=$ol_enable_rwm
25264         if test "$ol_enable_rwm" = mod ; then
25265                 MFLAG=SLAPD_MOD_DYNAMIC
25266                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25267         else
25268                 MFLAG=SLAPD_MOD_STATIC
25269         fi
25270         cat >> confdefs.h <<EOF
25271 #define SLAPD_OVER_RWM $MFLAG
25272 EOF
25273
25274 fi
25275
25276 if test "$ol_enable_syncprov" != no ; then
25277         BUILD_SYNCPROV=$ol_enable_syncprov
25278         if test "$ol_enable_syncprov" = mod ; then
25279                 MFLAG=SLAPD_MOD_DYNAMIC
25280                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25281         else
25282                 MFLAG=SLAPD_MOD_STATIC
25283         fi
25284         cat >> confdefs.h <<EOF
25285 #define SLAPD_OVER_SYNCPROV $MFLAG
25286 EOF
25287
25288 fi
25289
25290 if test "$ol_enable_translucent" != no ; then
25291         BUILD_TRANSLUCENT=$ol_enable_translucent
25292         if test "$ol_enable_translucent" = mod ; then
25293                 MFLAG=SLAPD_MOD_DYNAMIC
25294                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25295         else
25296                 MFLAG=SLAPD_MOD_STATIC
25297         fi
25298         cat >> confdefs.h <<EOF
25299 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25300 EOF
25301
25302 fi
25303
25304 if test "$ol_enable_unique" != no ; then
25305         BUILD_UNIQUE=$ol_enable_unique
25306         if test "$ol_enable_unique" = mod ; then
25307                 MFLAG=SLAPD_MOD_DYNAMIC
25308                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25309         else
25310                 MFLAG=SLAPD_MOD_STATIC
25311         fi
25312         cat >> confdefs.h <<EOF
25313 #define SLAPD_OVER_UNIQUE $MFLAG
25314 EOF
25315
25316 fi
25317
25318 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25319         $BUILD_SLAPD = yes ; then
25320         BUILD_SLURPD=yes
25321 fi
25322
25323 if test "$ol_enable_rewrite" != no ; then
25324         cat >> confdefs.h <<\EOF
25325 #define ENABLE_REWRITE 1
25326 EOF
25327
25328         BUILD_REWRITE=yes
25329 fi
25330
25331 if test "$ol_enable_slapi" != no ; then
25332         cat >> confdefs.h <<\EOF
25333 #define ENABLE_SLAPI 1
25334 EOF
25335
25336         BUILD_SLAPI=yes
25337         SLAPD_SLAPI_DEPEND=libslapi.a
25338 fi
25339
25340
25341
25342 if test "$ac_cv_mingw32" = yes ; then
25343         PLAT=NT
25344         SLAPD_MODULES_LDFLAGS=
25345 else
25346         PLAT=UNIX
25347 fi
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
25415
25416
25417
25418
25419
25420
25421
25422
25423 # Check whether --with-xxinstall or --without-xxinstall was given.
25424 if test "${with_xxinstall+set}" = set; then
25425   withval="$with_xxinstall"
25426   :
25427 fi
25428
25429
25430
25431 trap '' 1 2 15
25432
25433 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25434
25435 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25436 # Let make expand exec_prefix.
25437 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25438
25439 # Any assignment to VPATH causes Sun make to only execute
25440 # the first set of double-colon rules, so remove it if not needed.
25441 # If there is a colon in the path, we need to keep it.
25442 if test "x$srcdir" = x.; then
25443   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25444 fi
25445
25446 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25447
25448 DEFS=-DHAVE_CONFIG_H
25449
25450 # Without the "./", some shells look in PATH for config.status.
25451 : ${CONFIG_STATUS=./config.status}
25452
25453 echo creating $CONFIG_STATUS
25454 rm -f $CONFIG_STATUS
25455 cat > $CONFIG_STATUS <<EOF
25456 #! /bin/sh
25457 # Generated automatically by configure.
25458 # Run this file to recreate the current configuration.
25459 # This directory was configured as follows,
25460 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25461 #
25462 # $0 $ac_configure_args
25463 #
25464 # Compiler output produced by configure, useful for debugging
25465 # configure, is in ./config.log if it exists.
25466
25467 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25468 for ac_option
25469 do
25470   case "\$ac_option" in
25471   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25472     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25473     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25474   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25475     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25476     exit 0 ;;
25477   -help | --help | --hel | --he | --h)
25478     echo "\$ac_cs_usage"; exit 0 ;;
25479   *) echo "\$ac_cs_usage"; exit 1 ;;
25480   esac
25481 done
25482
25483 ac_given_srcdir=$srcdir
25484 ac_given_INSTALL="$INSTALL"
25485
25486 trap 'rm -fr `echo "\
25487 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25488 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25489 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25490 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25491 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25492 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25493 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25494 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25495 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25496 include/Makefile:build/top.mk:include/Makefile.in \
25497 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25498 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25499 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25500 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25501 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25502 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25503 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25504 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25505 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25506 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25507 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25508 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25509 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25510 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25511 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25512 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25513 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25514 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25515 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25516 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25517 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25518 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25519 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25520 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25521 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25522 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25523 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25524 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25525 tests/run \
25526 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25527  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25528 EOF
25529 cat >> $CONFIG_STATUS <<EOF
25530
25531 # Protect against being on the right side of a sed subst in config.status.
25532 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25533  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25534 $ac_vpsub
25535 $extrasub
25536 s%@SHELL@%$SHELL%g
25537 s%@CFLAGS@%$CFLAGS%g
25538 s%@CPPFLAGS@%$CPPFLAGS%g
25539 s%@CXXFLAGS@%$CXXFLAGS%g
25540 s%@FFLAGS@%$FFLAGS%g
25541 s%@DEFS@%$DEFS%g
25542 s%@LDFLAGS@%$LDFLAGS%g
25543 s%@LIBS@%$LIBS%g
25544 s%@exec_prefix@%$exec_prefix%g
25545 s%@prefix@%$prefix%g
25546 s%@program_transform_name@%$program_transform_name%g
25547 s%@bindir@%$bindir%g
25548 s%@sbindir@%$sbindir%g
25549 s%@libexecdir@%$libexecdir%g
25550 s%@datadir@%$datadir%g
25551 s%@sysconfdir@%$sysconfdir%g
25552 s%@sharedstatedir@%$sharedstatedir%g
25553 s%@localstatedir@%$localstatedir%g
25554 s%@libdir@%$libdir%g
25555 s%@includedir@%$includedir%g
25556 s%@oldincludedir@%$oldincludedir%g
25557 s%@infodir@%$infodir%g
25558 s%@mandir@%$mandir%g
25559 s%@host@%$host%g
25560 s%@host_alias@%$host_alias%g
25561 s%@host_cpu@%$host_cpu%g
25562 s%@host_vendor@%$host_vendor%g
25563 s%@host_os@%$host_os%g
25564 s%@target@%$target%g
25565 s%@target_alias@%$target_alias%g
25566 s%@target_cpu@%$target_cpu%g
25567 s%@target_vendor@%$target_vendor%g
25568 s%@target_os@%$target_os%g
25569 s%@build@%$build%g
25570 s%@build_alias@%$build_alias%g
25571 s%@build_cpu@%$build_cpu%g
25572 s%@build_vendor@%$build_vendor%g
25573 s%@build_os@%$build_os%g
25574 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25575 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25576 s%@INSTALL_DATA@%$INSTALL_DATA%g
25577 s%@PACKAGE@%$PACKAGE%g
25578 s%@VERSION@%$VERSION%g
25579 s%@ACLOCAL@%$ACLOCAL%g
25580 s%@AUTOCONF@%$AUTOCONF%g
25581 s%@AUTOMAKE@%$AUTOMAKE%g
25582 s%@AUTOHEADER@%$AUTOHEADER%g
25583 s%@MAKEINFO@%$MAKEINFO%g
25584 s%@install_sh@%$install_sh%g
25585 s%@AMTAR@%$AMTAR%g
25586 s%@AWK@%$AWK%g
25587 s%@AMTARFLAGS@%$AMTARFLAGS%g
25588 s%@SET_MAKE@%$SET_MAKE%g
25589 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25590 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25591 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25592 s%@top_builddir@%$top_builddir%g
25593 s%@ldap_subdir@%$ldap_subdir%g
25594 s%@CC@%$CC%g
25595 s%@AR@%$AR%g
25596 s%@LN_S@%$LN_S%g
25597 s%@OBJEXT@%$OBJEXT%g
25598 s%@EXEEXT@%$EXEEXT%g
25599 s%@ECHO@%$ECHO%g
25600 s%@RANLIB@%$RANLIB%g
25601 s%@STRIP@%$STRIP%g
25602 s%@DLLTOOL@%$DLLTOOL%g
25603 s%@AS@%$AS%g
25604 s%@OBJDUMP@%$OBJDUMP%g
25605 s%@CPP@%$CPP%g
25606 s%@LIBTOOL@%$LIBTOOL%g
25607 s%@PERLBIN@%$PERLBIN%g
25608 s%@OL_MKDEP@%$OL_MKDEP%g
25609 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25610 s%@LTSTATIC@%$LTSTATIC%g
25611 s%@LIBOBJS@%$LIBOBJS%g
25612 s%@LIBSRCS@%$LIBSRCS%g
25613 s%@PLAT@%$PLAT%g
25614 s%@WITH_SASL@%$WITH_SASL%g
25615 s%@WITH_TLS@%$WITH_TLS%g
25616 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25617 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25618 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25619 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25620 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25621 s%@BUILD_BDB@%$BUILD_BDB%g
25622 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25623 s%@BUILD_HDB@%$BUILD_HDB%g
25624 s%@BUILD_LDAP@%$BUILD_LDAP%g
25625 s%@BUILD_LDBM@%$BUILD_LDBM%g
25626 s%@BUILD_META@%$BUILD_META%g
25627 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25628 s%@BUILD_NULL@%$BUILD_NULL%g
25629 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25630 s%@BUILD_RELAY@%$BUILD_RELAY%g
25631 s%@BUILD_PERL@%$BUILD_PERL%g
25632 s%@BUILD_SHELL@%$BUILD_SHELL%g
25633 s%@BUILD_SQL@%$BUILD_SQL%g
25634 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25635 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25636 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25637 s%@BUILD_GLUE@%$BUILD_GLUE%g
25638 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25639 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25640 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25641 s%@BUILD_REFINT@%$BUILD_REFINT%g
25642 s%@BUILD_RWM@%$BUILD_RWM%g
25643 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25644 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25645 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25646 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25647 s%@LDAP_LIBS@%$LDAP_LIBS%g
25648 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25649 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25650 s%@LDBM_LIBS@%$LDBM_LIBS%g
25651 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25652 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25653 s%@WRAP_LIBS@%$WRAP_LIBS%g
25654 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25655 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25656 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25657 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25658 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25659 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25660 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25661 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25662 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25663 s%@KRB4_LIBS@%$KRB4_LIBS%g
25664 s%@KRB5_LIBS@%$KRB5_LIBS%g
25665 s%@SASL_LIBS@%$SASL_LIBS%g
25666 s%@TLS_LIBS@%$TLS_LIBS%g
25667 s%@MODULES_LIBS@%$MODULES_LIBS%g
25668 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25669 s%@LIBSLAPI@%$LIBSLAPI%g
25670 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25671 s%@AUTH_LIBS@%$AUTH_LIBS%g
25672 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25673 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25674 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25675 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25676 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25677
25678 CEOF
25679 EOF
25680
25681 cat >> $CONFIG_STATUS <<\EOF
25682
25683 # Split the substitutions into bite-sized pieces for seds with
25684 # small command number limits, like on Digital OSF/1 and HP-UX.
25685 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25686 ac_file=1 # Number of current file.
25687 ac_beg=1 # First line for current file.
25688 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25689 ac_more_lines=:
25690 ac_sed_cmds=""
25691 while $ac_more_lines; do
25692   if test $ac_beg -gt 1; then
25693     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25694   else
25695     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25696   fi
25697   if test ! -s conftest.s$ac_file; then
25698     ac_more_lines=false
25699     rm -f conftest.s$ac_file
25700   else
25701     if test -z "$ac_sed_cmds"; then
25702       ac_sed_cmds="sed -f conftest.s$ac_file"
25703     else
25704       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25705     fi
25706     ac_file=`expr $ac_file + 1`
25707     ac_beg=$ac_end
25708     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25709   fi
25710 done
25711 if test -z "$ac_sed_cmds"; then
25712   ac_sed_cmds=cat
25713 fi
25714 EOF
25715
25716 cat >> $CONFIG_STATUS <<EOF
25717
25718 CONFIG_FILES=\${CONFIG_FILES-"\
25719 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25720 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25721 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25722 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25723 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25724 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25725 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25726 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25727 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25728 include/Makefile:build/top.mk:include/Makefile.in \
25729 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25730 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25731 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25732 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25733 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25734 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25735 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25736 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25737 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25738 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25739 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25740 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25741 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25742 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25743 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25744 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25745 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25746 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25747 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25748 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25749 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25750 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25751 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25752 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25753 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25754 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25755 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25756 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25757 tests/run \
25758 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25759 "}
25760 EOF
25761 cat >> $CONFIG_STATUS <<\EOF
25762 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25763   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25764   case "$ac_file" in
25765   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25766        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25767   *) ac_file_in="${ac_file}.in" ;;
25768   esac
25769
25770   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25771
25772   # Remove last slash and all that follows it.  Not all systems have dirname.
25773   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25774   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25775     # The file is in a subdirectory.
25776     test ! -d "$ac_dir" && mkdir "$ac_dir"
25777     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25778     # A "../" for each directory in $ac_dir_suffix.
25779     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25780   else
25781     ac_dir_suffix= ac_dots=
25782   fi
25783
25784   case "$ac_given_srcdir" in
25785   .)  srcdir=.
25786       if test -z "$ac_dots"; then top_srcdir=.
25787       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25788   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25789   *) # Relative path.
25790     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25791     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25792   esac
25793
25794   case "$ac_given_INSTALL" in
25795   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25796   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25797   esac
25798
25799   echo creating "$ac_file"
25800   rm -f "$ac_file"
25801   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25802   case "$ac_file" in
25803   *[Mm]akefile*) ac_comsub="1i\\
25804 # $configure_input" ;;
25805   *) ac_comsub= ;;
25806   esac
25807
25808   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25809   sed -e "$ac_comsub
25810 s%@configure_input@%$configure_input%g
25811 s%@srcdir@%$srcdir%g
25812 s%@top_srcdir@%$top_srcdir%g
25813 s%@INSTALL@%$INSTALL%g
25814 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25815 fi; done
25816 rm -f conftest.s*
25817
25818 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25819 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25820 #
25821 # ac_d sets the value in "#define NAME VALUE" lines.
25822 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25823 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25824 ac_dC='\3'
25825 ac_dD='%g'
25826 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25827 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25828 ac_uB='\([      ]\)%\1#\2define\3'
25829 ac_uC=' '
25830 ac_uD='\4%g'
25831 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25832 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25833 ac_eB='$%\1#\2define\3'
25834 ac_eC=' '
25835 ac_eD='%g'
25836
25837 if test "${CONFIG_HEADERS+set}" != set; then
25838 EOF
25839 cat >> $CONFIG_STATUS <<EOF
25840   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25841 EOF
25842 cat >> $CONFIG_STATUS <<\EOF
25843 fi
25844 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25845   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25846   case "$ac_file" in
25847   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25848        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25849   *) ac_file_in="${ac_file}.in" ;;
25850   esac
25851
25852   echo creating $ac_file
25853
25854   rm -f conftest.frag conftest.in conftest.out
25855   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25856   cat $ac_file_inputs > conftest.in
25857
25858 EOF
25859
25860 # Transform confdefs.h into a sed script conftest.vals that substitutes
25861 # the proper values into config.h.in to produce config.h.  And first:
25862 # Protect against being on the right side of a sed subst in config.status.
25863 # Protect against being in an unquoted here document in config.status.
25864 rm -f conftest.vals
25865 cat > conftest.hdr <<\EOF
25866 s/[\\&%]/\\&/g
25867 s%[\\$`]%\\&%g
25868 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25869 s%ac_d%ac_u%gp
25870 s%ac_u%ac_e%gp
25871 EOF
25872 sed -n -f conftest.hdr confdefs.h > conftest.vals
25873 rm -f conftest.hdr
25874
25875 # This sed command replaces #undef with comments.  This is necessary, for
25876 # example, in the case of _POSIX_SOURCE, which is predefined and required
25877 # on some systems where configure will not decide to define it.
25878 cat >> conftest.vals <<\EOF
25879 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25880 EOF
25881
25882 # Break up conftest.vals because some shells have a limit on
25883 # the size of here documents, and old seds have small limits too.
25884
25885 rm -f conftest.tail
25886 while :
25887 do
25888   ac_lines=`grep -c . conftest.vals`
25889   # grep -c gives empty output for an empty file on some AIX systems.
25890   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25891   # Write a limited-size here document to conftest.frag.
25892   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25893   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25894   echo 'CEOF
25895   sed -f conftest.frag conftest.in > conftest.out
25896   rm -f conftest.in
25897   mv conftest.out conftest.in
25898 ' >> $CONFIG_STATUS
25899   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25900   rm -f conftest.vals
25901   mv conftest.tail conftest.vals
25902 done
25903 rm -f conftest.vals
25904
25905 cat >> $CONFIG_STATUS <<\EOF
25906   rm -f conftest.frag conftest.h
25907   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25908   cat conftest.in >> conftest.h
25909   rm -f conftest.in
25910   if cmp -s $ac_file conftest.h 2>/dev/null; then
25911     echo "$ac_file is unchanged"
25912     rm -f conftest.h
25913   else
25914     # Remove last slash and all that follows it.  Not all systems have dirname.
25915       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25916       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25917       # The file is in a subdirectory.
25918       test ! -d "$ac_dir" && mkdir "$ac_dir"
25919     fi
25920     rm -f $ac_file
25921     mv conftest.h $ac_file
25922   fi
25923 fi; done
25924
25925 EOF
25926 cat >> $CONFIG_STATUS <<EOF
25927 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25928 EOF
25929 cat >> $CONFIG_STATUS <<\EOF
25930
25931 chmod +x tests/run
25932 date > stamp-h
25933 BACKENDSC="servers/slapd/backends.c"
25934 echo "Making $BACKENDSC"
25935 rm -f $BACKENDSC
25936 cat > $BACKENDSC << ENDX
25937 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25938  *
25939  * Copyright 1998-2005 The OpenLDAP Foundation.
25940  * All rights reserved.
25941  *
25942  * Redistribution and use in source and binary forms, with or without
25943  * modification, are permitted only as authorized by the OpenLDAP
25944  * Public License.
25945  *
25946  * A copy of this license is available in the file LICENSE in the
25947  * top-level directory of the distribution or, alternatively, at
25948  * <http://www.OpenLDAP.org/license.html>.
25949  */
25950 /* This file is automatically generated by configure; please do not edit. */
25951
25952 #include "portable.h"
25953 #include "slap.h"
25954
25955 ENDX
25956 if test "${STATIC_BACKENDS}"; then
25957         for b in config ${STATIC_BACKENDS}; do
25958                 bb=`echo "${b}" | sed -e 's/back-//'`
25959                 cat >> $BACKENDSC << ENDX
25960 extern BI_init ${bb}_back_initialize;
25961 ENDX
25962         done
25963
25964         cat >> $BACKENDSC << ENDX
25965
25966 BackendInfo slap_binfo[] = {
25967 ENDX
25968
25969         for b in config ${STATIC_BACKENDS}; do
25970                 bb=`echo "${b}" | sed -e 's/back-//'`
25971                 echo "    Add ${bb} ..."
25972                 cat >> $BACKENDSC << ENDX
25973         { "${bb}", ${bb}_back_initialize },
25974 ENDX
25975         done
25976
25977         cat >> $BACKENDSC << ENDX
25978         { NULL, NULL },
25979 };
25980
25981 /* end of generated file */
25982 ENDX
25983 fi
25984
25985 echo Please run \"make depend\" to build dependencies
25986
25987 exit 0
25988 EOF
25989 chmod +x $CONFIG_STATUS
25990 rm -fr confdefs* $ac_clean_files
25991 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25992