]> git.sur5r.net Git - openldap/blob - configure
res_9_query
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.571 2005/03/17 05:47:53 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-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="yes"
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>/dev/null
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>/dev/null
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>/dev/null
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>/dev/null
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_9_query in -lresolv""... $ac_c" 1>&6
10501 echo "configure:10502: checking for res_9_query in -lresolv" >&5
10502 ac_lib_var=`echo resolv'_'res_9_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_9_query();
10515
10516 int main() {
10517 res_9_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_9_query
10548 fi
10549
10550 if test $ac_cv_func_res_query = no ; then 
10551         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10552 echo "configure:10553: checking for __res_query in -lresolv" >&5
10553 ac_lib_var=`echo resolv'_'__res_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_query();
10566
10567 int main() {
10568 __res_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_query
10599 fi
10600
10601 if test $ac_cv_func_res_query = no ; then 
10602         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10603 echo "configure:10604: checking for _res_9_query in -lresolv" >&5
10604 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   ac_save_LIBS="$LIBS"
10609 LIBS="-lresolv  $LIBS"
10610 cat > conftest.$ac_ext <<EOF
10611 #line 10612 "configure"
10612 #include "confdefs.h"
10613 /* Override any gcc2 internal prototype to avoid an error.  */
10614 /* We use char because int might match the return type of a gcc2
10615     builtin and then its argument prototype would still apply.  */
10616 char _res_9_query();
10617
10618 int main() {
10619 _res_9_query()
10620 ; return 0; }
10621 EOF
10622 if { (eval echo configure:10623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10623   rm -rf conftest*
10624   eval "ac_cv_lib_$ac_lib_var=yes"
10625 else
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -rf conftest*
10629   eval "ac_cv_lib_$ac_lib_var=no"
10630 fi
10631 rm -f conftest*
10632 LIBS="$ac_save_LIBS"
10633
10634 fi
10635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10636   echo "$ac_t""yes" 1>&6
10637     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10638     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10639   cat >> confdefs.h <<EOF
10640 #define $ac_tr_lib 1
10641 EOF
10642
10643   LIBS="-lresolv $LIBS"
10644
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648
10649         ac_cv_func_res_query=$ac_cv_lib_resolv__res_9_query
10650 fi
10651
10652 if test "$ac_cv_func_res_query" = yes ; then
10653         cat >> confdefs.h <<\EOF
10654 #define HAVE_RES_QUERY 1
10655 EOF
10656
10657
10658         if test $ol_enable_dnssrv != no ; then
10659                 ol_link_dnssrv=yes
10660         fi
10661 fi
10662
10663 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10664         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10665 fi
10666
10667 for ac_func in hstrerror 
10668 do
10669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10670 echo "configure:10671: checking for $ac_func" >&5
10671 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10672   echo $ac_n "(cached) $ac_c" 1>&6
10673 else
10674   cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677 /* System header to define __stub macros and hopefully few prototypes,
10678     which can conflict with char $ac_func(); below.  */
10679 #include <assert.h>
10680 /* Override any gcc2 internal prototype to avoid an error.  */
10681 /* We use char because int might match the return type of a gcc2
10682     builtin and then its argument prototype would still apply.  */
10683 char $ac_func();
10684 char (*f)();
10685
10686 int main() {
10687
10688 /* The GNU C library defines this for functions which it implements
10689     to always fail with ENOSYS.  Some functions are actually named
10690     something starting with __ and the normal name is an alias.  */
10691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10692 choke me
10693 #else
10694 f = $ac_func;
10695 #endif
10696
10697 ; return 0; }
10698 EOF
10699 if { (eval echo configure:10700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10700   rm -rf conftest*
10701   eval "ac_cv_func_$ac_func=yes"
10702 else
10703   echo "configure: failed program was:" >&5
10704   cat conftest.$ac_ext >&5
10705   rm -rf conftest*
10706   eval "ac_cv_func_$ac_func=no"
10707 fi
10708 rm -f conftest*
10709 fi
10710
10711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10714   cat >> confdefs.h <<EOF
10715 #define $ac_tr_func 1
10716 EOF
10717  
10718 else
10719   echo "$ac_t""no" 1>&6
10720 fi
10721 done
10722
10723
10724 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10725 do
10726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10727 echo "configure:10728: checking for $ac_func" >&5
10728 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10729   echo $ac_n "(cached) $ac_c" 1>&6
10730 else
10731   cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 /* System header to define __stub macros and hopefully few prototypes,
10735     which can conflict with char $ac_func(); below.  */
10736 #include <assert.h>
10737 /* Override any gcc2 internal prototype to avoid an error.  */
10738 /* We use char because int might match the return type of a gcc2
10739     builtin and then its argument prototype would still apply.  */
10740 char $ac_func();
10741 char (*f)();
10742
10743 int main() {
10744
10745 /* The GNU C library defines this for functions which it implements
10746     to always fail with ENOSYS.  Some functions are actually named
10747     something starting with __ and the normal name is an alias.  */
10748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10749 choke me
10750 #else
10751 f = $ac_func;
10752 #endif
10753
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10757   rm -rf conftest*
10758   eval "ac_cv_func_$ac_func=yes"
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   eval "ac_cv_func_$ac_func=no"
10764 fi
10765 rm -f conftest*
10766 fi
10767
10768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10769   echo "$ac_t""yes" 1>&6
10770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10771   cat >> confdefs.h <<EOF
10772 #define $ac_tr_func 1
10773 EOF
10774  
10775 else
10776   echo "$ac_t""no" 1>&6
10777 fi
10778 done
10779
10780
10781 ol_link_ipv6=no
10782 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10783         if test $ol_enable_ipv6 = yes ; then
10784                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10785         fi
10786 elif test $ol_enable_ipv6 != no ; then
10787         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10788 echo "configure:10789: checking INET6_ADDRSTRLEN" >&5
10789 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10790   echo $ac_n "(cached) $ac_c" 1>&6
10791 else
10792   
10793                 cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796
10797 #                       include <netinet/in.h>
10798 #                       ifdef INET6_ADDRSTRLEN
10799                                 __has_inet6_addrstrlen__;
10800 #                       endif
10801                 
10802 EOF
10803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10804   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10805   rm -rf conftest*
10806   ol_cv_inet6_addrstrlen=yes
10807 else
10808   rm -rf conftest*
10809   ol_cv_inet6_addrstrlen=no
10810 fi
10811 rm -f conftest*
10812
10813 fi
10814
10815 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10816
10817
10818         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10819 echo "configure:10820: checking struct sockaddr_storage" >&5
10820 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10821   echo $ac_n "(cached) $ac_c" 1>&6
10822 else
10823   
10824                 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827
10828 #include <sys/types.h>
10829 #include <sys/socket.h>
10830
10831 int main() {
10832
10833                         struct sockaddr_storage ss;
10834
10835 ; return 0; }
10836 EOF
10837 if { (eval echo configure:10838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10838   rm -rf conftest*
10839   ol_cv_struct_sockaddr_storage=yes
10840 else
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -rf conftest*
10844   ol_cv_struct_sockaddr_storage=no
10845 fi
10846 rm -f conftest*
10847 fi
10848
10849 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10850
10851         if test $ol_cv_inet6_addrstrlen = yes \
10852                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10853                 ol_link_ipv6=yes
10854         elif test $ol_enable_ipv6 = yes \
10855                         -a $ol_cv_inet6_addrstrlen = no ; then
10856                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10857         elif test $ol_enable_ipv6 = yes \
10858                         -a $ol_cv_struct_sockaddr_storage = no ; then
10859                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10860         fi
10861 fi
10862
10863 if test $ol_enable_local != no ; then
10864         for ac_hdr in sys/un.h 
10865 do
10866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10868 echo "configure:10869: checking for $ac_hdr" >&5
10869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875 #include <$ac_hdr>
10876 EOF
10877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10878 { (eval echo configure:10879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10880 if test -z "$ac_err"; then
10881   rm -rf conftest*
10882   eval "ac_cv_header_$ac_safe=yes"
10883 else
10884   echo "$ac_err" >&5
10885   echo "configure: failed program was:" >&5
10886   cat conftest.$ac_ext >&5
10887   rm -rf conftest*
10888   eval "ac_cv_header_$ac_safe=no"
10889 fi
10890 rm -f conftest*
10891 fi
10892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10893   echo "$ac_t""yes" 1>&6
10894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10895   cat >> confdefs.h <<EOF
10896 #define $ac_tr_hdr 1
10897 EOF
10898  
10899 else
10900   echo "$ac_t""no" 1>&6
10901 fi
10902 done
10903
10904
10905         if test $ol_enable_local = auto ; then
10906                 ol_enable_local=$ac_cv_header_sys_un_h
10907         elif test $ac_cv_header_sys_un_h = no ; then
10908                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10909         fi
10910 fi
10911
10912 ol_link_kbind=no
10913 ol_link_krb5=no
10914 ol_link_krb4=no
10915
10916 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10917         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10918         -o $ol_with_kerberos = k425 ; then
10919
10920         for ac_hdr in krb5.h
10921 do
10922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10924 echo "configure:10925: checking for $ac_hdr" >&5
10925 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 #include <$ac_hdr>
10932 EOF
10933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10934 { (eval echo configure:10935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10936 if test -z "$ac_err"; then
10937   rm -rf conftest*
10938   eval "ac_cv_header_$ac_safe=yes"
10939 else
10940   echo "$ac_err" >&5
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -rf conftest*
10944   eval "ac_cv_header_$ac_safe=no"
10945 fi
10946 rm -f conftest*
10947 fi
10948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10949   echo "$ac_t""yes" 1>&6
10950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10951   cat >> confdefs.h <<EOF
10952 #define $ac_tr_hdr 1
10953 EOF
10954  
10955 else
10956   echo "$ac_t""no" 1>&6
10957 fi
10958 done
10959
10960
10961         if test $ac_cv_header_krb5_h = yes ; then
10962                                 for ac_hdr in heim_err.h
10963 do
10964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10966 echo "configure:10967: checking for $ac_hdr" >&5
10967 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10968   echo $ac_n "(cached) $ac_c" 1>&6
10969 else
10970   cat > conftest.$ac_ext <<EOF
10971 #line 10972 "configure"
10972 #include "confdefs.h"
10973 #include <$ac_hdr>
10974 EOF
10975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10976 { (eval echo configure:10977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10978 if test -z "$ac_err"; then
10979   rm -rf conftest*
10980   eval "ac_cv_header_$ac_safe=yes"
10981 else
10982   echo "$ac_err" >&5
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -rf conftest*
10986   eval "ac_cv_header_$ac_safe=no"
10987 fi
10988 rm -f conftest*
10989 fi
10990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10991   echo "$ac_t""yes" 1>&6
10992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10993   cat >> confdefs.h <<EOF
10994 #define $ac_tr_hdr 1
10995 EOF
10996  
10997 else
10998   echo "$ac_t""no" 1>&6
10999 fi
11000 done
11001
11002                 if test $ac_cv_header_heim_err_h = yes ; then
11003                         krb5_impl=heimdal
11004                 else
11005                         krb5_impl=mit
11006                 fi
11007
11008                 if test $krb5_impl = mit; then
11009                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
11010 echo "configure:11011: checking for main in -lk5crypto" >&5
11011 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
11012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   ac_save_LIBS="$LIBS"
11016 LIBS="-lk5crypto  $LIBS"
11017 cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020
11021 int main() {
11022 main()
11023 ; return 0; }
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11026   rm -rf conftest*
11027   eval "ac_cv_lib_$ac_lib_var=yes"
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_lib_$ac_lib_var=no"
11033 fi
11034 rm -f conftest*
11035 LIBS="$ac_save_LIBS"
11036
11037 fi
11038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11039   echo "$ac_t""yes" 1>&6
11040   krb5crypto=k5crypto
11041 else
11042   echo "$ac_t""no" 1>&6
11043 krb5crypto=crypto
11044 fi
11045
11046
11047                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11048 echo "configure:11049: checking for main in -lkrb5" >&5
11049 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11051   echo $ac_n "(cached) $ac_c" 1>&6
11052 else
11053   ac_save_LIBS="$LIBS"
11054 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
11055 cat > conftest.$ac_ext <<EOF
11056 #line 11057 "configure"
11057 #include "confdefs.h"
11058
11059 int main() {
11060 main()
11061 ; return 0; }
11062 EOF
11063 if { (eval echo configure:11064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11064   rm -rf conftest*
11065   eval "ac_cv_lib_$ac_lib_var=yes"
11066 else
11067   echo "configure: failed program was:" >&5
11068   cat conftest.$ac_ext >&5
11069   rm -rf conftest*
11070   eval "ac_cv_lib_$ac_lib_var=no"
11071 fi
11072 rm -f conftest*
11073 LIBS="$ac_save_LIBS"
11074
11075 fi
11076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11077   echo "$ac_t""yes" 1>&6
11078   have_krb5=yes
11079                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
11080 else
11081   echo "$ac_t""no" 1>&6
11082 have_krb5=no
11083 fi
11084
11085
11086                 elif test $krb5_impl = heimdal; then
11087                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11088 echo "configure:11089: checking for main in -ldes" >&5
11089 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11091   echo $ac_n "(cached) $ac_c" 1>&6
11092 else
11093   ac_save_LIBS="$LIBS"
11094 LIBS="-ldes  $LIBS"
11095 cat > conftest.$ac_ext <<EOF
11096 #line 11097 "configure"
11097 #include "confdefs.h"
11098
11099 int main() {
11100 main()
11101 ; return 0; }
11102 EOF
11103 if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11104   rm -rf conftest*
11105   eval "ac_cv_lib_$ac_lib_var=yes"
11106 else
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_lib_$ac_lib_var=no"
11111 fi
11112 rm -f conftest*
11113 LIBS="$ac_save_LIBS"
11114
11115 fi
11116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11117   echo "$ac_t""yes" 1>&6
11118   krb5crypto=des
11119 else
11120   echo "$ac_t""no" 1>&6
11121 krb5crypto=crypto
11122 fi
11123
11124
11125                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11126 echo "configure:11127: checking for main in -lkrb5" >&5
11127 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   ac_save_LIBS="$LIBS"
11132 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136
11137 int main() {
11138 main()
11139 ; return 0; }
11140 EOF
11141 if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=yes"
11144 else
11145   echo "configure: failed program was:" >&5
11146   cat conftest.$ac_ext >&5
11147   rm -rf conftest*
11148   eval "ac_cv_lib_$ac_lib_var=no"
11149 fi
11150 rm -f conftest*
11151 LIBS="$ac_save_LIBS"
11152
11153 fi
11154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11155   echo "$ac_t""yes" 1>&6
11156   have_krb5=yes
11157                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11158 else
11159   echo "$ac_t""no" 1>&6
11160 have_krb5=no
11161 fi
11162
11163
11164                         cat >> confdefs.h <<\EOF
11165 #define HAVE_HEIMDAL_KERBEROS 1
11166 EOF
11167
11168
11169                 else
11170                         have_krb5=no
11171                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11172                 fi
11173
11174                 if test $have_krb5 = yes ; then
11175                         ol_link_krb5=yes
11176
11177                         cat >> confdefs.h <<\EOF
11178 #define HAVE_KRB5 1
11179 EOF
11180
11181
11182                         if test $ol_with_kerberos = k5only ; then
11183                                 ol_with_kerberos=found
11184                         fi
11185
11186                 elif test $ol_with_kerberos != auto ; then
11187                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11188                 fi
11189
11190         fi
11191 fi
11192
11193 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11194         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11195
11196         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11197 do
11198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11200 echo "configure:11201: checking for $ac_hdr" >&5
11201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11202   echo $ac_n "(cached) $ac_c" 1>&6
11203 else
11204   cat > conftest.$ac_ext <<EOF
11205 #line 11206 "configure"
11206 #include "confdefs.h"
11207 #include <$ac_hdr>
11208 EOF
11209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11210 { (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11212 if test -z "$ac_err"; then
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=yes"
11215 else
11216   echo "$ac_err" >&5
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=no"
11221 fi
11222 rm -f conftest*
11223 fi
11224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11225   echo "$ac_t""yes" 1>&6
11226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11227   cat >> confdefs.h <<EOF
11228 #define $ac_tr_hdr 1
11229 EOF
11230  
11231 else
11232   echo "$ac_t""no" 1>&6
11233 fi
11234 done
11235
11236
11237         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11238                 if test $krb5_impl = mit; then
11239                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11240 echo "configure:11241: checking for main in -lkrb4" >&5
11241 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11243   echo $ac_n "(cached) $ac_c" 1>&6
11244 else
11245   ac_save_LIBS="$LIBS"
11246 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11247 cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250
11251 int main() {
11252 main()
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_lib_$ac_lib_var=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_lib_$ac_lib_var=no"
11263 fi
11264 rm -f conftest*
11265 LIBS="$ac_save_LIBS"
11266
11267 fi
11268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11269   echo "$ac_t""yes" 1>&6
11270   have_k425=yes
11271                                 KRB4_LIBS="-lkrb4 -ldes425"
11272 else
11273   echo "$ac_t""no" 1>&6
11274 have_k425=no
11275 fi
11276
11277
11278                 elif test $krb5_impl = heimdal; then
11279                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11280 echo "configure:11281: checking for main in -lkrb4" >&5
11281 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   ac_save_LIBS="$LIBS"
11286 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11287 cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290
11291 int main() {
11292 main()
11293 ; return 0; }
11294 EOF
11295 if { (eval echo configure:11296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11296   rm -rf conftest*
11297   eval "ac_cv_lib_$ac_lib_var=yes"
11298 else
11299   echo "configure: failed program was:" >&5
11300   cat conftest.$ac_ext >&5
11301   rm -rf conftest*
11302   eval "ac_cv_lib_$ac_lib_var=no"
11303 fi
11304 rm -f conftest*
11305 LIBS="$ac_save_LIBS"
11306
11307 fi
11308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11309   echo "$ac_t""yes" 1>&6
11310   have_k425=yes
11311                                 KRB4_LIBS="-lkrb4"
11312 else
11313   echo "$ac_t""no" 1>&6
11314 have_k425=no
11315 fi
11316
11317
11318                 else
11319                         have_425=no
11320                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11321                 fi
11322
11323                 if test $have_k425 = yes ; then
11324                         ol_with_kerberos=found
11325                         ol_link_krb4=yes
11326
11327                         cat >> confdefs.h <<\EOF
11328 #define HAVE_KRB425 1
11329 EOF
11330
11331                         cat >> confdefs.h <<\EOF
11332 #define HAVE_KRB4 1
11333 EOF
11334
11335
11336                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11337 echo "configure:11338: checking for des_debug in Kerberos libraries" >&5
11338 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   
11342                                                                 save_LIBS="$LIBS"
11343                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11344                                 cat > conftest.$ac_ext <<EOF
11345 #line 11346 "configure"
11346 #include "confdefs.h"
11347
11348 #include <kerberosIV/krb.h>
11349 #include <kerberosIV/des.h>
11350 extern int des_debug;
11351
11352 int main() {
11353
11354 des_debug = 1;
11355
11356 ; return 0; }
11357 EOF
11358 if { (eval echo configure:11359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11359   rm -rf conftest*
11360   ol_cv_var_des_debug=yes
11361 else
11362   echo "configure: failed program was:" >&5
11363   cat conftest.$ac_ext >&5
11364   rm -rf conftest*
11365   ol_cv_var_des_debug=no
11366 fi
11367 rm -f conftest*
11368                                                                 LIBS="$save_LIBS"
11369                         
11370 fi
11371
11372 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11373
11374                         if test $ol_cv_var_des_debug = yes ; then
11375                                 cat >> confdefs.h <<\EOF
11376 #define HAVE_DES_DEBUG 1
11377 EOF
11378
11379                         fi
11380
11381                         LIBS="$save_LIBS"
11382                 fi
11383         fi
11384 fi
11385
11386 if test $ol_link_krb5 = yes ; then
11387         ol_with_kerberos=found
11388 fi
11389
11390 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11391         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11392
11393         for ac_hdr in krb.h des.h krb-archaeology.h 
11394 do
11395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11397 echo "configure:11398: checking for $ac_hdr" >&5
11398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11399   echo $ac_n "(cached) $ac_c" 1>&6
11400 else
11401   cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404 #include <$ac_hdr>
11405 EOF
11406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11407 { (eval echo configure:11408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11409 if test -z "$ac_err"; then
11410   rm -rf conftest*
11411   eval "ac_cv_header_$ac_safe=yes"
11412 else
11413   echo "$ac_err" >&5
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   eval "ac_cv_header_$ac_safe=no"
11418 fi
11419 rm -f conftest*
11420 fi
11421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11422   echo "$ac_t""yes" 1>&6
11423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11424   cat >> confdefs.h <<EOF
11425 #define $ac_tr_hdr 1
11426 EOF
11427  
11428 else
11429   echo "$ac_t""no" 1>&6
11430 fi
11431 done
11432
11433
11434         if test $ac_cv_header_krb_h = yes ; then
11435                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11436 echo "configure:11437: checking for main in -lkrb" >&5
11437 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11438 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11439   echo $ac_n "(cached) $ac_c" 1>&6
11440 else
11441   ac_save_LIBS="$LIBS"
11442 LIBS="-lkrb -ldes $LIBS"
11443 cat > conftest.$ac_ext <<EOF
11444 #line 11445 "configure"
11445 #include "confdefs.h"
11446
11447 int main() {
11448 main()
11449 ; return 0; }
11450 EOF
11451 if { (eval echo configure:11452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11452   rm -rf conftest*
11453   eval "ac_cv_lib_$ac_lib_var=yes"
11454 else
11455   echo "configure: failed program was:" >&5
11456   cat conftest.$ac_ext >&5
11457   rm -rf conftest*
11458   eval "ac_cv_lib_$ac_lib_var=no"
11459 fi
11460 rm -f conftest*
11461 LIBS="$ac_save_LIBS"
11462
11463 fi
11464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11465   echo "$ac_t""yes" 1>&6
11466   have_k4=yes
11467 else
11468   echo "$ac_t""no" 1>&6
11469 have_k4=no
11470 fi
11471
11472
11473                 if test $have_k4 = yes ; then
11474                         ol_with_kerberos=found
11475                         ol_link_krb4=yes
11476
11477                         cat >> confdefs.h <<\EOF
11478 #define HAVE_KRB4 1
11479 EOF
11480
11481
11482                         KRB4_LIBS="-lkrb -ldes"
11483
11484                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11485                                 cat >> confdefs.h <<\EOF
11486 #define HAVE_KTH_KERBEROS 1
11487 EOF
11488
11489                         fi
11490                 fi
11491         fi
11492 fi
11493
11494 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11495         ol_link_kbind=yes
11496
11497 elif test $ol_enable_kbind = yes ; then
11498         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11499 fi
11500
11501 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11502         cat >> confdefs.h <<\EOF
11503 #define HAVE_KERBEROS 1
11504 EOF
11505
11506
11507 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11508         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11509 fi
11510
11511         
11512 ol_link_tls=no
11513 if test $ol_with_tls != no ; then
11514         for ac_hdr in openssl/ssl.h ssl.h
11515 do
11516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11518 echo "configure:11519: checking for $ac_hdr" >&5
11519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11520   echo $ac_n "(cached) $ac_c" 1>&6
11521 else
11522   cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 #include <$ac_hdr>
11526 EOF
11527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11528 { (eval echo configure:11529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11530 if test -z "$ac_err"; then
11531   rm -rf conftest*
11532   eval "ac_cv_header_$ac_safe=yes"
11533 else
11534   echo "$ac_err" >&5
11535   echo "configure: failed program was:" >&5
11536   cat conftest.$ac_ext >&5
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=no"
11539 fi
11540 rm -f conftest*
11541 fi
11542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11543   echo "$ac_t""yes" 1>&6
11544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11545   cat >> confdefs.h <<EOF
11546 #define $ac_tr_hdr 1
11547 EOF
11548  
11549 else
11550   echo "$ac_t""no" 1>&6
11551 fi
11552 done
11553
11554
11555         if test $ac_cv_header_openssl_ssl_h = yes \
11556                 -o $ac_cv_header_ssl_h = yes ; then
11557                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11558 echo "configure:11559: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11559 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   ac_save_LIBS="$LIBS"
11564 LIBS="-lssl -lcrypto $LIBS"
11565 cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 /* Override any gcc2 internal prototype to avoid an error.  */
11569 /* We use char because int might match the return type of a gcc2
11570     builtin and then its argument prototype would still apply.  */
11571 char SSLeay_add_ssl_algorithms();
11572
11573 int main() {
11574 SSLeay_add_ssl_algorithms()
11575 ; return 0; }
11576 EOF
11577 if { (eval echo configure:11578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11578   rm -rf conftest*
11579   eval "ac_cv_lib_$ac_lib_var=yes"
11580 else
11581   echo "configure: failed program was:" >&5
11582   cat conftest.$ac_ext >&5
11583   rm -rf conftest*
11584   eval "ac_cv_lib_$ac_lib_var=no"
11585 fi
11586 rm -f conftest*
11587 LIBS="$ac_save_LIBS"
11588
11589 fi
11590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11591   echo "$ac_t""yes" 1>&6
11592   have_ssleay=yes
11593                         need_rsaref=no
11594 else
11595   echo "$ac_t""no" 1>&6
11596 have_ssleay=no
11597 fi
11598
11599                         
11600                 if test $have_ssleay = no ; then
11601                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11602 echo "configure:11603: checking for SSL_library_init in -lssl" >&5
11603 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11605   echo $ac_n "(cached) $ac_c" 1>&6
11606 else
11607   ac_save_LIBS="$LIBS"
11608 LIBS="-lssl -lcrypto $LIBS"
11609 cat > conftest.$ac_ext <<EOF
11610 #line 11611 "configure"
11611 #include "confdefs.h"
11612 /* Override any gcc2 internal prototype to avoid an error.  */
11613 /* We use char because int might match the return type of a gcc2
11614     builtin and then its argument prototype would still apply.  */
11615 char SSL_library_init();
11616
11617 int main() {
11618 SSL_library_init()
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   eval "ac_cv_lib_$ac_lib_var=yes"
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   eval "ac_cv_lib_$ac_lib_var=no"
11629 fi
11630 rm -f conftest*
11631 LIBS="$ac_save_LIBS"
11632
11633 fi
11634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11635   echo "$ac_t""yes" 1>&6
11636   have_ssleay=yes
11637                                 need_rsaref=no
11638 else
11639   echo "$ac_t""no" 1>&6
11640 have_ssleay=no
11641 fi
11642
11643                 fi
11644
11645                 if test $have_ssleay = no ; then
11646                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11647 echo "configure:11648: checking for ssl3_accept in -lssl" >&5
11648 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11650   echo $ac_n "(cached) $ac_c" 1>&6
11651 else
11652   ac_save_LIBS="$LIBS"
11653 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11654 cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 /* Override any gcc2 internal prototype to avoid an error.  */
11658 /* We use char because int might match the return type of a gcc2
11659     builtin and then its argument prototype would still apply.  */
11660 char ssl3_accept();
11661
11662 int main() {
11663 ssl3_accept()
11664 ; return 0; }
11665 EOF
11666 if { (eval echo configure:11667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11667   rm -rf conftest*
11668   eval "ac_cv_lib_$ac_lib_var=yes"
11669 else
11670   echo "configure: failed program was:" >&5
11671   cat conftest.$ac_ext >&5
11672   rm -rf conftest*
11673   eval "ac_cv_lib_$ac_lib_var=no"
11674 fi
11675 rm -f conftest*
11676 LIBS="$ac_save_LIBS"
11677
11678 fi
11679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11680   echo "$ac_t""yes" 1>&6
11681   have_ssleay=yes
11682                                 need_rsaref=yes
11683 else
11684   echo "$ac_t""no" 1>&6
11685 have_ssleay=no
11686 fi
11687
11688                 fi
11689
11690                 if test $have_ssleay = yes ; then
11691                         ol_with_tls=found
11692                         ol_link_tls=yes
11693
11694                         cat >> confdefs.h <<\EOF
11695 #define HAVE_SSLEAY 1
11696 EOF
11697
11698
11699                         if test $need_rsaref = yes; then
11700                                 cat >> confdefs.h <<\EOF
11701 #define HAVE_RSAREF 1
11702 EOF
11703
11704
11705                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11706                         else
11707                                 TLS_LIBS="-lssl -lcrypto"
11708                         fi
11709                 fi
11710                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11711 echo "configure:11712: checking OpenSSL library version (CRL checking capability)" >&5
11712 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11713   echo $ac_n "(cached) $ac_c" 1>&6
11714 else
11715   
11716         cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719
11720 #ifdef HAVE_OPENSSL_SSL_H
11721 #include <openssl/ssl.h>
11722 #else
11723 #include <ssl.h>
11724 #endif
11725
11726 /* Require 0.9.7d+ */
11727 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11728         char *__ssl_compat = "0.9.7d";
11729 #endif
11730         
11731 EOF
11732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11733   egrep "__ssl_compat" >/dev/null 2>&1; then
11734   rm -rf conftest*
11735   ol_cv_ssl_crl_compat=yes
11736 else
11737   rm -rf conftest*
11738   ol_cv_ssl_crl_compat=no
11739 fi
11740 rm -f conftest*
11741
11742 fi
11743
11744 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11745
11746                 if test $ol_cv_ssl_crl_compat = no ; then
11747                         ol_link_ssl=no
11748                 else 
11749                         cat >> confdefs.h <<\EOF
11750 #define HAVE_OPENSSL_CRL 1
11751 EOF
11752
11753                 fi
11754         fi
11755
11756 else
11757         echo "configure: warning: TLS data protection not supported!" 1>&2
11758 fi
11759
11760 WITH_TLS=no
11761 if test $ol_link_tls = yes ; then
11762         cat >> confdefs.h <<\EOF
11763 #define HAVE_TLS 1
11764 EOF
11765
11766         WITH_TLS=yes
11767
11768 elif test $ol_with_tls = auto ; then
11769         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11770         echo "configure: warning: TLS data protection not supported!" 1>&2
11771
11772 elif test $ol_with_tls != no ; then
11773         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11774 fi
11775
11776 if test $ol_enable_lmpasswd != no; then
11777         if test $ol_link_tls != yes ; then
11778                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11779         fi
11780
11781         cat >> confdefs.h <<\EOF
11782 #define SLAPD_LMHASH 1
11783 EOF
11784
11785 fi
11786
11787 ol_link_threads=no
11788
11789 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11790         -o $ol_with_threads = nt ; then
11791
11792         
11793         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11794 echo "configure:11795: checking for _beginthread" >&5
11795 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11796   echo $ac_n "(cached) $ac_c" 1>&6
11797 else
11798   cat > conftest.$ac_ext <<EOF
11799 #line 11800 "configure"
11800 #include "confdefs.h"
11801 /* System header to define __stub macros and hopefully few prototypes,
11802     which can conflict with char _beginthread(); below.  */
11803 #include <assert.h>
11804 /* Override any gcc2 internal prototype to avoid an error.  */
11805 /* We use char because int might match the return type of a gcc2
11806     builtin and then its argument prototype would still apply.  */
11807 char _beginthread();
11808 char (*f)();
11809
11810 int main() {
11811
11812 /* The GNU C library defines this for functions which it implements
11813     to always fail with ENOSYS.  Some functions are actually named
11814     something starting with __ and the normal name is an alias.  */
11815 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11816 choke me
11817 #else
11818 f = _beginthread;
11819 #endif
11820
11821 ; return 0; }
11822 EOF
11823 if { (eval echo configure:11824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11824   rm -rf conftest*
11825   eval "ac_cv_func__beginthread=yes"
11826 else
11827   echo "configure: failed program was:" >&5
11828   cat conftest.$ac_ext >&5
11829   rm -rf conftest*
11830   eval "ac_cv_func__beginthread=no"
11831 fi
11832 rm -f conftest*
11833 fi
11834
11835 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11836   echo "$ac_t""yes" 1>&6
11837   :
11838 else
11839   echo "$ac_t""no" 1>&6
11840 fi
11841
11842
11843         if test $ac_cv_func__beginthread = yes ; then
11844                 cat >> confdefs.h <<\EOF
11845 #define HAVE_NT_THREADS 1
11846 EOF
11847
11848                 ol_cv_nt_threads=yes
11849         fi
11850
11851
11852         if test "$ol_cv_nt_threads" = yes ; then
11853                 ol_link_threads=nt
11854                 ol_with_threads=found
11855                 ol_with_yielding_select=yes
11856
11857                 cat >> confdefs.h <<\EOF
11858 #define HAVE_NT_SERVICE_MANAGER 1
11859 EOF
11860
11861                 cat >> confdefs.h <<\EOF
11862 #define HAVE_NT_EVENT_LOG 1
11863 EOF
11864
11865         fi
11866
11867         if test $ol_with_threads = nt ; then
11868                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11869         fi
11870 fi
11871
11872 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11873         -o $ol_with_threads = posix ; then
11874
11875         for ac_hdr in pthread.h
11876 do
11877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11879 echo "configure:11880: checking for $ac_hdr" >&5
11880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11881   echo $ac_n "(cached) $ac_c" 1>&6
11882 else
11883   cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886 #include <$ac_hdr>
11887 EOF
11888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11889 { (eval echo configure:11890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11891 if test -z "$ac_err"; then
11892   rm -rf conftest*
11893   eval "ac_cv_header_$ac_safe=yes"
11894 else
11895   echo "$ac_err" >&5
11896   echo "configure: failed program was:" >&5
11897   cat conftest.$ac_ext >&5
11898   rm -rf conftest*
11899   eval "ac_cv_header_$ac_safe=no"
11900 fi
11901 rm -f conftest*
11902 fi
11903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11904   echo "$ac_t""yes" 1>&6
11905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11906   cat >> confdefs.h <<EOF
11907 #define $ac_tr_hdr 1
11908 EOF
11909  
11910 else
11911   echo "$ac_t""no" 1>&6
11912 fi
11913 done
11914
11915
11916         if test $ac_cv_header_pthread_h = yes ; then
11917                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11918 echo "configure:11919: checking POSIX thread version" >&5
11919 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11920   echo $ac_n "(cached) $ac_c" 1>&6
11921 else
11922   
11923         cat > conftest.$ac_ext <<EOF
11924 #line 11925 "configure"
11925 #include "confdefs.h"
11926
11927 #               include <pthread.h>
11928         
11929 int main() {
11930
11931                 int i = PTHREAD_CREATE_JOINABLE;
11932         
11933 ; return 0; }
11934 EOF
11935 if { (eval echo configure:11936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11936   rm -rf conftest*
11937   
11938         cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 #include <pthread.h>
11942 EOF
11943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11944   egrep "pthread_detach" >/dev/null 2>&1; then
11945   rm -rf conftest*
11946   ol_cv_pthread_version=10
11947 else
11948   rm -rf conftest*
11949   ol_cv_pthread_version=8
11950 fi
11951 rm -f conftest*
11952
11953 else
11954   echo "configure: failed program was:" >&5
11955   cat conftest.$ac_ext >&5
11956   rm -rf conftest*
11957   
11958         cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961
11962 #               include <pthread.h>
11963 #               ifdef PTHREAD_CREATE_UNDETACHED
11964                 draft7
11965 #               endif
11966         
11967 EOF
11968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11969   egrep "draft7" >/dev/null 2>&1; then
11970   rm -rf conftest*
11971   ol_cv_pthread_version=7
11972 else
11973   rm -rf conftest*
11974   
11975         cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978 #include <pthread.h>
11979 EOF
11980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11981   egrep "pthread_attr_init" >/dev/null 2>&1; then
11982   rm -rf conftest*
11983   ol_cv_pthread_version=6
11984 else
11985   rm -rf conftest*
11986   
11987         cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990
11991 #               include <pthread.h>
11992 #ifdef          PTHREAD_MUTEX_INITIALIZER
11993                 draft5
11994 #endif
11995         
11996 EOF
11997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11998   egrep "draft5" >/dev/null 2>&1; then
11999   rm -rf conftest*
12000   ol_cv_pthread_version=5
12001 else
12002   rm -rf conftest*
12003   ol_cv_pthread_version=4
12004 fi
12005 rm -f conftest*
12006  
12007 fi
12008 rm -f conftest*
12009  
12010 fi
12011 rm -f conftest*
12012  
12013 fi
12014 rm -f conftest*
12015
12016 fi
12017
12018 echo "$ac_t""$ol_cv_pthread_version" 1>&6
12019
12020
12021                 if test $ol_cv_pthread_version != 0 ; then
12022                         cat >> confdefs.h <<EOF
12023 #define HAVE_PTHREADS $ol_cv_pthread_version
12024 EOF
12025
12026                 else
12027                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
12028                 fi
12029
12030                 # consider threads found
12031                 ol_with_threads=found
12032
12033                 
12034         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
12035 echo "configure:12036: checking for LinuxThreads pthread.h" >&5
12036 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
12037   echo $ac_n "(cached) $ac_c" 1>&6
12038 else
12039   cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 #include <pthread.h>
12043 EOF
12044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12045   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
12046   rm -rf conftest*
12047   ol_cv_header_linux_threads=yes
12048 else
12049   rm -rf conftest*
12050   ol_cv_header_linux_threads=no
12051 fi
12052 rm -f conftest*
12053
12054                 
12055 fi
12056
12057 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12058         if test $ol_cv_header_linux_threads = yes; then
12059                 cat >> confdefs.h <<\EOF
12060 #define HAVE_LINUX_THREADS 1
12061 EOF
12062
12063         fi
12064
12065                 
12066         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
12067 echo "configure:12068: checking for GNU Pth pthread.h" >&5
12068 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
12069   echo $ac_n "(cached) $ac_c" 1>&6
12070 else
12071   cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 #include <pthread.h>
12075 #ifdef _POSIX_THREAD_IS_GNU_PTH
12076         __gnu_pth__;
12077 #endif
12078
12079 EOF
12080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12081   egrep "__gnu_pth__" >/dev/null 2>&1; then
12082   rm -rf conftest*
12083   ol_cv_header_gnu_pth_pthread_h=yes
12084 else
12085   rm -rf conftest*
12086   ol_cv_header_gnu_pth_pthread_h=no
12087 fi
12088 rm -f conftest*
12089
12090                 
12091 fi
12092
12093 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12094
12095
12096                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12097                         for ac_hdr in sched.h
12098 do
12099 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12100 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12101 echo "configure:12102: checking for $ac_hdr" >&5
12102 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12103   echo $ac_n "(cached) $ac_c" 1>&6
12104 else
12105   cat > conftest.$ac_ext <<EOF
12106 #line 12107 "configure"
12107 #include "confdefs.h"
12108 #include <$ac_hdr>
12109 EOF
12110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12111 { (eval echo configure:12112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12113 if test -z "$ac_err"; then
12114   rm -rf conftest*
12115   eval "ac_cv_header_$ac_safe=yes"
12116 else
12117   echo "$ac_err" >&5
12118   echo "configure: failed program was:" >&5
12119   cat conftest.$ac_ext >&5
12120   rm -rf conftest*
12121   eval "ac_cv_header_$ac_safe=no"
12122 fi
12123 rm -f conftest*
12124 fi
12125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12126   echo "$ac_t""yes" 1>&6
12127     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12128   cat >> confdefs.h <<EOF
12129 #define $ac_tr_hdr 1
12130 EOF
12131  
12132 else
12133   echo "$ac_t""no" 1>&6
12134 fi
12135 done
12136
12137                 fi
12138
12139                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12140                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12141 echo "configure:12142: checking for pthread_create in default libraries" >&5
12142 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12143   echo $ac_n "(cached) $ac_c" 1>&6
12144 else
12145   
12146                 if test "$cross_compiling" = yes; then
12147   cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150 /* pthread test headers */
12151 #include <pthread.h>
12152 #if HAVE_PTHREADS < 7
12153 #include <errno.h>
12154 #endif
12155 #ifndef NULL
12156 #define NULL (void*)0
12157 #endif
12158
12159 static void *task(p)
12160         void *p;
12161 {
12162         return (void *) (p == NULL);
12163 }
12164
12165 int main() {
12166
12167         /* pthread test function */
12168 #ifndef PTHREAD_CREATE_DETACHED
12169 #define PTHREAD_CREATE_DETACHED 1
12170 #endif
12171         pthread_t t;
12172         int status;
12173         int detach = PTHREAD_CREATE_DETACHED;
12174
12175 #if HAVE_PTHREADS > 4
12176         /* Final pthreads */
12177         pthread_attr_t attr;
12178
12179         status = pthread_attr_init(&attr);
12180         if( status ) return status;
12181
12182 #if HAVE_PTHREADS < 7
12183         status = pthread_attr_setdetachstate(&attr, &detach);
12184         if( status < 0 ) status = errno;
12185 #else
12186         status = pthread_attr_setdetachstate(&attr, detach);
12187 #endif
12188         if( status ) return status;
12189         status = pthread_create( &t, &attr, task, NULL );
12190 #if HAVE_PTHREADS < 7
12191         if( status < 0 ) status = errno;
12192 #endif
12193         if( status ) return status;
12194 #else
12195         /* Draft 4 pthreads */
12196         status = pthread_create( &t, pthread_attr_default, task, NULL );
12197         if( status ) return errno;
12198
12199         /* give thread a chance to complete */
12200         /* it should remain joinable and hence detachable */
12201         sleep( 1 );
12202
12203         status = pthread_detach( &t );
12204         if( status ) return errno;
12205 #endif
12206
12207 #ifdef HAVE_LINUX_THREADS
12208         pthread_kill_other_threads_np();
12209 #endif
12210
12211         return 0;
12212
12213 ; return 0; }
12214 EOF
12215 if { (eval echo configure:12216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12216   rm -rf conftest*
12217   ol_cv_pthread_create=yes
12218 else
12219   echo "configure: failed program was:" >&5
12220   cat conftest.$ac_ext >&5
12221   rm -rf conftest*
12222   ol_cv_pthread_create=no
12223 fi
12224 rm -f conftest*
12225 else
12226   cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229 /* pthread test headers */
12230 #include <pthread.h>
12231 #if HAVE_PTHREADS < 7
12232 #include <errno.h>
12233 #endif
12234 #ifndef NULL
12235 #define NULL (void*)0
12236 #endif
12237
12238 static void *task(p)
12239         void *p;
12240 {
12241         return (void *) (p == NULL);
12242 }
12243
12244
12245 int main(argc, argv)
12246         int argc;
12247         char **argv;
12248 {
12249
12250         /* pthread test function */
12251 #ifndef PTHREAD_CREATE_DETACHED
12252 #define PTHREAD_CREATE_DETACHED 1
12253 #endif
12254         pthread_t t;
12255         int status;
12256         int detach = PTHREAD_CREATE_DETACHED;
12257
12258 #if HAVE_PTHREADS > 4
12259         /* Final pthreads */
12260         pthread_attr_t attr;
12261
12262         status = pthread_attr_init(&attr);
12263         if( status ) return status;
12264
12265 #if HAVE_PTHREADS < 7
12266         status = pthread_attr_setdetachstate(&attr, &detach);
12267         if( status < 0 ) status = errno;
12268 #else
12269         status = pthread_attr_setdetachstate(&attr, detach);
12270 #endif
12271         if( status ) return status;
12272         status = pthread_create( &t, &attr, task, NULL );
12273 #if HAVE_PTHREADS < 7
12274         if( status < 0 ) status = errno;
12275 #endif
12276         if( status ) return status;
12277 #else
12278         /* Draft 4 pthreads */
12279         status = pthread_create( &t, pthread_attr_default, task, NULL );
12280         if( status ) return errno;
12281
12282         /* give thread a chance to complete */
12283         /* it should remain joinable and hence detachable */
12284         sleep( 1 );
12285
12286         status = pthread_detach( &t );
12287         if( status ) return errno;
12288 #endif
12289
12290 #ifdef HAVE_LINUX_THREADS
12291         pthread_kill_other_threads_np();
12292 #endif
12293
12294         return 0;
12295
12296 }
12297
12298 EOF
12299 if { (eval echo configure:12300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12300 then
12301   ol_cv_pthread_create=yes
12302 else
12303   echo "configure: failed program was:" >&5
12304   cat conftest.$ac_ext >&5
12305   rm -fr conftest*
12306   ol_cv_pthread_create=no
12307 fi
12308 rm -fr conftest*
12309 fi
12310
12311 fi
12312
12313 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12314
12315                 if test $ol_cv_pthread_create != no ; then
12316                         ol_link_threads=posix
12317                         ol_link_pthreads=""
12318                 fi
12319                 
12320                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12321 if test "$ol_link_threads" = no ; then
12322         # try -kthread
12323         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12324 echo "configure:12325: checking for pthread link with -kthread" >&5
12325 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12326   echo $ac_n "(cached) $ac_c" 1>&6
12327 else
12328   
12329                 # save the flags
12330                 ol_LIBS="$LIBS"
12331                 LIBS="-kthread $LIBS"
12332
12333                 if test "$cross_compiling" = yes; then
12334   cat > conftest.$ac_ext <<EOF
12335 #line 12336 "configure"
12336 #include "confdefs.h"
12337 /* pthread test headers */
12338 #include <pthread.h>
12339 #if HAVE_PTHREADS < 7
12340 #include <errno.h>
12341 #endif
12342 #ifndef NULL
12343 #define NULL (void*)0
12344 #endif
12345
12346 static void *task(p)
12347         void *p;
12348 {
12349         return (void *) (p == NULL);
12350 }
12351
12352 int main() {
12353
12354         /* pthread test function */
12355 #ifndef PTHREAD_CREATE_DETACHED
12356 #define PTHREAD_CREATE_DETACHED 1
12357 #endif
12358         pthread_t t;
12359         int status;
12360         int detach = PTHREAD_CREATE_DETACHED;
12361
12362 #if HAVE_PTHREADS > 4
12363         /* Final pthreads */
12364         pthread_attr_t attr;
12365
12366         status = pthread_attr_init(&attr);
12367         if( status ) return status;
12368
12369 #if HAVE_PTHREADS < 7
12370         status = pthread_attr_setdetachstate(&attr, &detach);
12371         if( status < 0 ) status = errno;
12372 #else
12373         status = pthread_attr_setdetachstate(&attr, detach);
12374 #endif
12375         if( status ) return status;
12376         status = pthread_create( &t, &attr, task, NULL );
12377 #if HAVE_PTHREADS < 7
12378         if( status < 0 ) status = errno;
12379 #endif
12380         if( status ) return status;
12381 #else
12382         /* Draft 4 pthreads */
12383         status = pthread_create( &t, pthread_attr_default, task, NULL );
12384         if( status ) return errno;
12385
12386         /* give thread a chance to complete */
12387         /* it should remain joinable and hence detachable */
12388         sleep( 1 );
12389
12390         status = pthread_detach( &t );
12391         if( status ) return errno;
12392 #endif
12393
12394 #ifdef HAVE_LINUX_THREADS
12395         pthread_kill_other_threads_np();
12396 #endif
12397
12398         return 0;
12399
12400 ; return 0; }
12401 EOF
12402 if { (eval echo configure:12403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12403   rm -rf conftest*
12404   ol_cv_pthread_kthread=yes
12405 else
12406   echo "configure: failed program was:" >&5
12407   cat conftest.$ac_ext >&5
12408   rm -rf conftest*
12409   ol_cv_pthread_kthread=no
12410 fi
12411 rm -f conftest*
12412 else
12413   cat > conftest.$ac_ext <<EOF
12414 #line 12415 "configure"
12415 #include "confdefs.h"
12416 /* pthread test headers */
12417 #include <pthread.h>
12418 #if HAVE_PTHREADS < 7
12419 #include <errno.h>
12420 #endif
12421 #ifndef NULL
12422 #define NULL (void*)0
12423 #endif
12424
12425 static void *task(p)
12426         void *p;
12427 {
12428         return (void *) (p == NULL);
12429 }
12430
12431
12432 int main(argc, argv)
12433         int argc;
12434         char **argv;
12435 {
12436
12437         /* pthread test function */
12438 #ifndef PTHREAD_CREATE_DETACHED
12439 #define PTHREAD_CREATE_DETACHED 1
12440 #endif
12441         pthread_t t;
12442         int status;
12443         int detach = PTHREAD_CREATE_DETACHED;
12444
12445 #if HAVE_PTHREADS > 4
12446         /* Final pthreads */
12447         pthread_attr_t attr;
12448
12449         status = pthread_attr_init(&attr);
12450         if( status ) return status;
12451
12452 #if HAVE_PTHREADS < 7
12453         status = pthread_attr_setdetachstate(&attr, &detach);
12454         if( status < 0 ) status = errno;
12455 #else
12456         status = pthread_attr_setdetachstate(&attr, detach);
12457 #endif
12458         if( status ) return status;
12459         status = pthread_create( &t, &attr, task, NULL );
12460 #if HAVE_PTHREADS < 7
12461         if( status < 0 ) status = errno;
12462 #endif
12463         if( status ) return status;
12464 #else
12465         /* Draft 4 pthreads */
12466         status = pthread_create( &t, pthread_attr_default, task, NULL );
12467         if( status ) return errno;
12468
12469         /* give thread a chance to complete */
12470         /* it should remain joinable and hence detachable */
12471         sleep( 1 );
12472
12473         status = pthread_detach( &t );
12474         if( status ) return errno;
12475 #endif
12476
12477 #ifdef HAVE_LINUX_THREADS
12478         pthread_kill_other_threads_np();
12479 #endif
12480
12481         return 0;
12482
12483 }
12484
12485 EOF
12486 if { (eval echo configure:12487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12487 then
12488   ol_cv_pthread_kthread=yes
12489 else
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -fr conftest*
12493   ol_cv_pthread_kthread=no
12494 fi
12495 rm -fr conftest*
12496 fi
12497
12498
12499                 # restore the LIBS
12500                 LIBS="$ol_LIBS"
12501         
12502 fi
12503
12504 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12505
12506         if test $ol_cv_pthread_kthread = yes ; then
12507                 ol_link_pthreads="-kthread"
12508                 ol_link_threads=posix
12509         fi
12510 fi
12511
12512                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12513 if test "$ol_link_threads" = no ; then
12514         # try -pthread
12515         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12516 echo "configure:12517: checking for pthread link with -pthread" >&5
12517 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12518   echo $ac_n "(cached) $ac_c" 1>&6
12519 else
12520   
12521                 # save the flags
12522                 ol_LIBS="$LIBS"
12523                 LIBS="-pthread $LIBS"
12524
12525                 if test "$cross_compiling" = yes; then
12526   cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 /* pthread test headers */
12530 #include <pthread.h>
12531 #if HAVE_PTHREADS < 7
12532 #include <errno.h>
12533 #endif
12534 #ifndef NULL
12535 #define NULL (void*)0
12536 #endif
12537
12538 static void *task(p)
12539         void *p;
12540 {
12541         return (void *) (p == NULL);
12542 }
12543
12544 int main() {
12545
12546         /* pthread test function */
12547 #ifndef PTHREAD_CREATE_DETACHED
12548 #define PTHREAD_CREATE_DETACHED 1
12549 #endif
12550         pthread_t t;
12551         int status;
12552         int detach = PTHREAD_CREATE_DETACHED;
12553
12554 #if HAVE_PTHREADS > 4
12555         /* Final pthreads */
12556         pthread_attr_t attr;
12557
12558         status = pthread_attr_init(&attr);
12559         if( status ) return status;
12560
12561 #if HAVE_PTHREADS < 7
12562         status = pthread_attr_setdetachstate(&attr, &detach);
12563         if( status < 0 ) status = errno;
12564 #else
12565         status = pthread_attr_setdetachstate(&attr, detach);
12566 #endif
12567         if( status ) return status;
12568         status = pthread_create( &t, &attr, task, NULL );
12569 #if HAVE_PTHREADS < 7
12570         if( status < 0 ) status = errno;
12571 #endif
12572         if( status ) return status;
12573 #else
12574         /* Draft 4 pthreads */
12575         status = pthread_create( &t, pthread_attr_default, task, NULL );
12576         if( status ) return errno;
12577
12578         /* give thread a chance to complete */
12579         /* it should remain joinable and hence detachable */
12580         sleep( 1 );
12581
12582         status = pthread_detach( &t );
12583         if( status ) return errno;
12584 #endif
12585
12586 #ifdef HAVE_LINUX_THREADS
12587         pthread_kill_other_threads_np();
12588 #endif
12589
12590         return 0;
12591
12592 ; return 0; }
12593 EOF
12594 if { (eval echo configure:12595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12595   rm -rf conftest*
12596   ol_cv_pthread_pthread=yes
12597 else
12598   echo "configure: failed program was:" >&5
12599   cat conftest.$ac_ext >&5
12600   rm -rf conftest*
12601   ol_cv_pthread_pthread=no
12602 fi
12603 rm -f conftest*
12604 else
12605   cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 /* pthread test headers */
12609 #include <pthread.h>
12610 #if HAVE_PTHREADS < 7
12611 #include <errno.h>
12612 #endif
12613 #ifndef NULL
12614 #define NULL (void*)0
12615 #endif
12616
12617 static void *task(p)
12618         void *p;
12619 {
12620         return (void *) (p == NULL);
12621 }
12622
12623
12624 int main(argc, argv)
12625         int argc;
12626         char **argv;
12627 {
12628
12629         /* pthread test function */
12630 #ifndef PTHREAD_CREATE_DETACHED
12631 #define PTHREAD_CREATE_DETACHED 1
12632 #endif
12633         pthread_t t;
12634         int status;
12635         int detach = PTHREAD_CREATE_DETACHED;
12636
12637 #if HAVE_PTHREADS > 4
12638         /* Final pthreads */
12639         pthread_attr_t attr;
12640
12641         status = pthread_attr_init(&attr);
12642         if( status ) return status;
12643
12644 #if HAVE_PTHREADS < 7
12645         status = pthread_attr_setdetachstate(&attr, &detach);
12646         if( status < 0 ) status = errno;
12647 #else
12648         status = pthread_attr_setdetachstate(&attr, detach);
12649 #endif
12650         if( status ) return status;
12651         status = pthread_create( &t, &attr, task, NULL );
12652 #if HAVE_PTHREADS < 7
12653         if( status < 0 ) status = errno;
12654 #endif
12655         if( status ) return status;
12656 #else
12657         /* Draft 4 pthreads */
12658         status = pthread_create( &t, pthread_attr_default, task, NULL );
12659         if( status ) return errno;
12660
12661         /* give thread a chance to complete */
12662         /* it should remain joinable and hence detachable */
12663         sleep( 1 );
12664
12665         status = pthread_detach( &t );
12666         if( status ) return errno;
12667 #endif
12668
12669 #ifdef HAVE_LINUX_THREADS
12670         pthread_kill_other_threads_np();
12671 #endif
12672
12673         return 0;
12674
12675 }
12676
12677 EOF
12678 if { (eval echo configure:12679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12679 then
12680   ol_cv_pthread_pthread=yes
12681 else
12682   echo "configure: failed program was:" >&5
12683   cat conftest.$ac_ext >&5
12684   rm -fr conftest*
12685   ol_cv_pthread_pthread=no
12686 fi
12687 rm -fr conftest*
12688 fi
12689
12690
12691                 # restore the LIBS
12692                 LIBS="$ol_LIBS"
12693         
12694 fi
12695
12696 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12697
12698         if test $ol_cv_pthread_pthread = yes ; then
12699                 ol_link_pthreads="-pthread"
12700                 ol_link_threads=posix
12701         fi
12702 fi
12703
12704                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12705 if test "$ol_link_threads" = no ; then
12706         # try -pthreads
12707         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12708 echo "configure:12709: checking for pthread link with -pthreads" >&5
12709 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12710   echo $ac_n "(cached) $ac_c" 1>&6
12711 else
12712   
12713                 # save the flags
12714                 ol_LIBS="$LIBS"
12715                 LIBS="-pthreads $LIBS"
12716
12717                 if test "$cross_compiling" = yes; then
12718   cat > conftest.$ac_ext <<EOF
12719 #line 12720 "configure"
12720 #include "confdefs.h"
12721 /* pthread test headers */
12722 #include <pthread.h>
12723 #if HAVE_PTHREADS < 7
12724 #include <errno.h>
12725 #endif
12726 #ifndef NULL
12727 #define NULL (void*)0
12728 #endif
12729
12730 static void *task(p)
12731         void *p;
12732 {
12733         return (void *) (p == NULL);
12734 }
12735
12736 int main() {
12737
12738         /* pthread test function */
12739 #ifndef PTHREAD_CREATE_DETACHED
12740 #define PTHREAD_CREATE_DETACHED 1
12741 #endif
12742         pthread_t t;
12743         int status;
12744         int detach = PTHREAD_CREATE_DETACHED;
12745
12746 #if HAVE_PTHREADS > 4
12747         /* Final pthreads */
12748         pthread_attr_t attr;
12749
12750         status = pthread_attr_init(&attr);
12751         if( status ) return status;
12752
12753 #if HAVE_PTHREADS < 7
12754         status = pthread_attr_setdetachstate(&attr, &detach);
12755         if( status < 0 ) status = errno;
12756 #else
12757         status = pthread_attr_setdetachstate(&attr, detach);
12758 #endif
12759         if( status ) return status;
12760         status = pthread_create( &t, &attr, task, NULL );
12761 #if HAVE_PTHREADS < 7
12762         if( status < 0 ) status = errno;
12763 #endif
12764         if( status ) return status;
12765 #else
12766         /* Draft 4 pthreads */
12767         status = pthread_create( &t, pthread_attr_default, task, NULL );
12768         if( status ) return errno;
12769
12770         /* give thread a chance to complete */
12771         /* it should remain joinable and hence detachable */
12772         sleep( 1 );
12773
12774         status = pthread_detach( &t );
12775         if( status ) return errno;
12776 #endif
12777
12778 #ifdef HAVE_LINUX_THREADS
12779         pthread_kill_other_threads_np();
12780 #endif
12781
12782         return 0;
12783
12784 ; return 0; }
12785 EOF
12786 if { (eval echo configure:12787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12787   rm -rf conftest*
12788   ol_cv_pthread_pthreads=yes
12789 else
12790   echo "configure: failed program was:" >&5
12791   cat conftest.$ac_ext >&5
12792   rm -rf conftest*
12793   ol_cv_pthread_pthreads=no
12794 fi
12795 rm -f conftest*
12796 else
12797   cat > conftest.$ac_ext <<EOF
12798 #line 12799 "configure"
12799 #include "confdefs.h"
12800 /* pthread test headers */
12801 #include <pthread.h>
12802 #if HAVE_PTHREADS < 7
12803 #include <errno.h>
12804 #endif
12805 #ifndef NULL
12806 #define NULL (void*)0
12807 #endif
12808
12809 static void *task(p)
12810         void *p;
12811 {
12812         return (void *) (p == NULL);
12813 }
12814
12815
12816 int main(argc, argv)
12817         int argc;
12818         char **argv;
12819 {
12820
12821         /* pthread test function */
12822 #ifndef PTHREAD_CREATE_DETACHED
12823 #define PTHREAD_CREATE_DETACHED 1
12824 #endif
12825         pthread_t t;
12826         int status;
12827         int detach = PTHREAD_CREATE_DETACHED;
12828
12829 #if HAVE_PTHREADS > 4
12830         /* Final pthreads */
12831         pthread_attr_t attr;
12832
12833         status = pthread_attr_init(&attr);
12834         if( status ) return status;
12835
12836 #if HAVE_PTHREADS < 7
12837         status = pthread_attr_setdetachstate(&attr, &detach);
12838         if( status < 0 ) status = errno;
12839 #else
12840         status = pthread_attr_setdetachstate(&attr, detach);
12841 #endif
12842         if( status ) return status;
12843         status = pthread_create( &t, &attr, task, NULL );
12844 #if HAVE_PTHREADS < 7
12845         if( status < 0 ) status = errno;
12846 #endif
12847         if( status ) return status;
12848 #else
12849         /* Draft 4 pthreads */
12850         status = pthread_create( &t, pthread_attr_default, task, NULL );
12851         if( status ) return errno;
12852
12853         /* give thread a chance to complete */
12854         /* it should remain joinable and hence detachable */
12855         sleep( 1 );
12856
12857         status = pthread_detach( &t );
12858         if( status ) return errno;
12859 #endif
12860
12861 #ifdef HAVE_LINUX_THREADS
12862         pthread_kill_other_threads_np();
12863 #endif
12864
12865         return 0;
12866
12867 }
12868
12869 EOF
12870 if { (eval echo configure:12871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12871 then
12872   ol_cv_pthread_pthreads=yes
12873 else
12874   echo "configure: failed program was:" >&5
12875   cat conftest.$ac_ext >&5
12876   rm -fr conftest*
12877   ol_cv_pthread_pthreads=no
12878 fi
12879 rm -fr conftest*
12880 fi
12881
12882
12883                 # restore the LIBS
12884                 LIBS="$ol_LIBS"
12885         
12886 fi
12887
12888 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12889
12890         if test $ol_cv_pthread_pthreads = yes ; then
12891                 ol_link_pthreads="-pthreads"
12892                 ol_link_threads=posix
12893         fi
12894 fi
12895
12896                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12897 if test "$ol_link_threads" = no ; then
12898         # try -mthreads
12899         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12900 echo "configure:12901: checking for pthread link with -mthreads" >&5
12901 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12902   echo $ac_n "(cached) $ac_c" 1>&6
12903 else
12904   
12905                 # save the flags
12906                 ol_LIBS="$LIBS"
12907                 LIBS="-mthreads $LIBS"
12908
12909                 if test "$cross_compiling" = yes; then
12910   cat > conftest.$ac_ext <<EOF
12911 #line 12912 "configure"
12912 #include "confdefs.h"
12913 /* pthread test headers */
12914 #include <pthread.h>
12915 #if HAVE_PTHREADS < 7
12916 #include <errno.h>
12917 #endif
12918 #ifndef NULL
12919 #define NULL (void*)0
12920 #endif
12921
12922 static void *task(p)
12923         void *p;
12924 {
12925         return (void *) (p == NULL);
12926 }
12927
12928 int main() {
12929
12930         /* pthread test function */
12931 #ifndef PTHREAD_CREATE_DETACHED
12932 #define PTHREAD_CREATE_DETACHED 1
12933 #endif
12934         pthread_t t;
12935         int status;
12936         int detach = PTHREAD_CREATE_DETACHED;
12937
12938 #if HAVE_PTHREADS > 4
12939         /* Final pthreads */
12940         pthread_attr_t attr;
12941
12942         status = pthread_attr_init(&attr);
12943         if( status ) return status;
12944
12945 #if HAVE_PTHREADS < 7
12946         status = pthread_attr_setdetachstate(&attr, &detach);
12947         if( status < 0 ) status = errno;
12948 #else
12949         status = pthread_attr_setdetachstate(&attr, detach);
12950 #endif
12951         if( status ) return status;
12952         status = pthread_create( &t, &attr, task, NULL );
12953 #if HAVE_PTHREADS < 7
12954         if( status < 0 ) status = errno;
12955 #endif
12956         if( status ) return status;
12957 #else
12958         /* Draft 4 pthreads */
12959         status = pthread_create( &t, pthread_attr_default, task, NULL );
12960         if( status ) return errno;
12961
12962         /* give thread a chance to complete */
12963         /* it should remain joinable and hence detachable */
12964         sleep( 1 );
12965
12966         status = pthread_detach( &t );
12967         if( status ) return errno;
12968 #endif
12969
12970 #ifdef HAVE_LINUX_THREADS
12971         pthread_kill_other_threads_np();
12972 #endif
12973
12974         return 0;
12975
12976 ; return 0; }
12977 EOF
12978 if { (eval echo configure:12979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12979   rm -rf conftest*
12980   ol_cv_pthread_mthreads=yes
12981 else
12982   echo "configure: failed program was:" >&5
12983   cat conftest.$ac_ext >&5
12984   rm -rf conftest*
12985   ol_cv_pthread_mthreads=no
12986 fi
12987 rm -f conftest*
12988 else
12989   cat > conftest.$ac_ext <<EOF
12990 #line 12991 "configure"
12991 #include "confdefs.h"
12992 /* pthread test headers */
12993 #include <pthread.h>
12994 #if HAVE_PTHREADS < 7
12995 #include <errno.h>
12996 #endif
12997 #ifndef NULL
12998 #define NULL (void*)0
12999 #endif
13000
13001 static void *task(p)
13002         void *p;
13003 {
13004         return (void *) (p == NULL);
13005 }
13006
13007
13008 int main(argc, argv)
13009         int argc;
13010         char **argv;
13011 {
13012
13013         /* pthread test function */
13014 #ifndef PTHREAD_CREATE_DETACHED
13015 #define PTHREAD_CREATE_DETACHED 1
13016 #endif
13017         pthread_t t;
13018         int status;
13019         int detach = PTHREAD_CREATE_DETACHED;
13020
13021 #if HAVE_PTHREADS > 4
13022         /* Final pthreads */
13023         pthread_attr_t attr;
13024
13025         status = pthread_attr_init(&attr);
13026         if( status ) return status;
13027
13028 #if HAVE_PTHREADS < 7
13029         status = pthread_attr_setdetachstate(&attr, &detach);
13030         if( status < 0 ) status = errno;
13031 #else
13032         status = pthread_attr_setdetachstate(&attr, detach);
13033 #endif
13034         if( status ) return status;
13035         status = pthread_create( &t, &attr, task, NULL );
13036 #if HAVE_PTHREADS < 7
13037         if( status < 0 ) status = errno;
13038 #endif
13039         if( status ) return status;
13040 #else
13041         /* Draft 4 pthreads */
13042         status = pthread_create( &t, pthread_attr_default, task, NULL );
13043         if( status ) return errno;
13044
13045         /* give thread a chance to complete */
13046         /* it should remain joinable and hence detachable */
13047         sleep( 1 );
13048
13049         status = pthread_detach( &t );
13050         if( status ) return errno;
13051 #endif
13052
13053 #ifdef HAVE_LINUX_THREADS
13054         pthread_kill_other_threads_np();
13055 #endif
13056
13057         return 0;
13058
13059 }
13060
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13063 then
13064   ol_cv_pthread_mthreads=yes
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -fr conftest*
13069   ol_cv_pthread_mthreads=no
13070 fi
13071 rm -fr conftest*
13072 fi
13073
13074
13075                 # restore the LIBS
13076                 LIBS="$ol_LIBS"
13077         
13078 fi
13079
13080 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13081
13082         if test $ol_cv_pthread_mthreads = yes ; then
13083                 ol_link_pthreads="-mthreads"
13084                 ol_link_threads=posix
13085         fi
13086 fi
13087
13088                 # Pthread try link: -thread (ol_cv_pthread_thread)
13089 if test "$ol_link_threads" = no ; then
13090         # try -thread
13091         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13092 echo "configure:13093: checking for pthread link with -thread" >&5
13093 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13094   echo $ac_n "(cached) $ac_c" 1>&6
13095 else
13096   
13097                 # save the flags
13098                 ol_LIBS="$LIBS"
13099                 LIBS="-thread $LIBS"
13100
13101                 if test "$cross_compiling" = yes; then
13102   cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 /* pthread test headers */
13106 #include <pthread.h>
13107 #if HAVE_PTHREADS < 7
13108 #include <errno.h>
13109 #endif
13110 #ifndef NULL
13111 #define NULL (void*)0
13112 #endif
13113
13114 static void *task(p)
13115         void *p;
13116 {
13117         return (void *) (p == NULL);
13118 }
13119
13120 int main() {
13121
13122         /* pthread test function */
13123 #ifndef PTHREAD_CREATE_DETACHED
13124 #define PTHREAD_CREATE_DETACHED 1
13125 #endif
13126         pthread_t t;
13127         int status;
13128         int detach = PTHREAD_CREATE_DETACHED;
13129
13130 #if HAVE_PTHREADS > 4
13131         /* Final pthreads */
13132         pthread_attr_t attr;
13133
13134         status = pthread_attr_init(&attr);
13135         if( status ) return status;
13136
13137 #if HAVE_PTHREADS < 7
13138         status = pthread_attr_setdetachstate(&attr, &detach);
13139         if( status < 0 ) status = errno;
13140 #else
13141         status = pthread_attr_setdetachstate(&attr, detach);
13142 #endif
13143         if( status ) return status;
13144         status = pthread_create( &t, &attr, task, NULL );
13145 #if HAVE_PTHREADS < 7
13146         if( status < 0 ) status = errno;
13147 #endif
13148         if( status ) return status;
13149 #else
13150         /* Draft 4 pthreads */
13151         status = pthread_create( &t, pthread_attr_default, task, NULL );
13152         if( status ) return errno;
13153
13154         /* give thread a chance to complete */
13155         /* it should remain joinable and hence detachable */
13156         sleep( 1 );
13157
13158         status = pthread_detach( &t );
13159         if( status ) return errno;
13160 #endif
13161
13162 #ifdef HAVE_LINUX_THREADS
13163         pthread_kill_other_threads_np();
13164 #endif
13165
13166         return 0;
13167
13168 ; return 0; }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13171   rm -rf conftest*
13172   ol_cv_pthread_thread=yes
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -rf conftest*
13177   ol_cv_pthread_thread=no
13178 fi
13179 rm -f conftest*
13180 else
13181   cat > conftest.$ac_ext <<EOF
13182 #line 13183 "configure"
13183 #include "confdefs.h"
13184 /* pthread test headers */
13185 #include <pthread.h>
13186 #if HAVE_PTHREADS < 7
13187 #include <errno.h>
13188 #endif
13189 #ifndef NULL
13190 #define NULL (void*)0
13191 #endif
13192
13193 static void *task(p)
13194         void *p;
13195 {
13196         return (void *) (p == NULL);
13197 }
13198
13199
13200 int main(argc, argv)
13201         int argc;
13202         char **argv;
13203 {
13204
13205         /* pthread test function */
13206 #ifndef PTHREAD_CREATE_DETACHED
13207 #define PTHREAD_CREATE_DETACHED 1
13208 #endif
13209         pthread_t t;
13210         int status;
13211         int detach = PTHREAD_CREATE_DETACHED;
13212
13213 #if HAVE_PTHREADS > 4
13214         /* Final pthreads */
13215         pthread_attr_t attr;
13216
13217         status = pthread_attr_init(&attr);
13218         if( status ) return status;
13219
13220 #if HAVE_PTHREADS < 7
13221         status = pthread_attr_setdetachstate(&attr, &detach);
13222         if( status < 0 ) status = errno;
13223 #else
13224         status = pthread_attr_setdetachstate(&attr, detach);
13225 #endif
13226         if( status ) return status;
13227         status = pthread_create( &t, &attr, task, NULL );
13228 #if HAVE_PTHREADS < 7
13229         if( status < 0 ) status = errno;
13230 #endif
13231         if( status ) return status;
13232 #else
13233         /* Draft 4 pthreads */
13234         status = pthread_create( &t, pthread_attr_default, task, NULL );
13235         if( status ) return errno;
13236
13237         /* give thread a chance to complete */
13238         /* it should remain joinable and hence detachable */
13239         sleep( 1 );
13240
13241         status = pthread_detach( &t );
13242         if( status ) return errno;
13243 #endif
13244
13245 #ifdef HAVE_LINUX_THREADS
13246         pthread_kill_other_threads_np();
13247 #endif
13248
13249         return 0;
13250
13251 }
13252
13253 EOF
13254 if { (eval echo configure:13255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13255 then
13256   ol_cv_pthread_thread=yes
13257 else
13258   echo "configure: failed program was:" >&5
13259   cat conftest.$ac_ext >&5
13260   rm -fr conftest*
13261   ol_cv_pthread_thread=no
13262 fi
13263 rm -fr conftest*
13264 fi
13265
13266
13267                 # restore the LIBS
13268                 LIBS="$ol_LIBS"
13269         
13270 fi
13271
13272 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13273
13274         if test $ol_cv_pthread_thread = yes ; then
13275                 ol_link_pthreads="-thread"
13276                 ol_link_threads=posix
13277         fi
13278 fi
13279
13280
13281                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13282 if test "$ol_link_threads" = no ; then
13283         # try -lpthread -lmach -lexc -lc_r
13284         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13285 echo "configure:13286: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13286 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13287   echo $ac_n "(cached) $ac_c" 1>&6
13288 else
13289   
13290                 # save the flags
13291                 ol_LIBS="$LIBS"
13292                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13293
13294                 if test "$cross_compiling" = yes; then
13295   cat > conftest.$ac_ext <<EOF
13296 #line 13297 "configure"
13297 #include "confdefs.h"
13298 /* pthread test headers */
13299 #include <pthread.h>
13300 #if HAVE_PTHREADS < 7
13301 #include <errno.h>
13302 #endif
13303 #ifndef NULL
13304 #define NULL (void*)0
13305 #endif
13306
13307 static void *task(p)
13308         void *p;
13309 {
13310         return (void *) (p == NULL);
13311 }
13312
13313 int main() {
13314
13315         /* pthread test function */
13316 #ifndef PTHREAD_CREATE_DETACHED
13317 #define PTHREAD_CREATE_DETACHED 1
13318 #endif
13319         pthread_t t;
13320         int status;
13321         int detach = PTHREAD_CREATE_DETACHED;
13322
13323 #if HAVE_PTHREADS > 4
13324         /* Final pthreads */
13325         pthread_attr_t attr;
13326
13327         status = pthread_attr_init(&attr);
13328         if( status ) return status;
13329
13330 #if HAVE_PTHREADS < 7
13331         status = pthread_attr_setdetachstate(&attr, &detach);
13332         if( status < 0 ) status = errno;
13333 #else
13334         status = pthread_attr_setdetachstate(&attr, detach);
13335 #endif
13336         if( status ) return status;
13337         status = pthread_create( &t, &attr, task, NULL );
13338 #if HAVE_PTHREADS < 7
13339         if( status < 0 ) status = errno;
13340 #endif
13341         if( status ) return status;
13342 #else
13343         /* Draft 4 pthreads */
13344         status = pthread_create( &t, pthread_attr_default, task, NULL );
13345         if( status ) return errno;
13346
13347         /* give thread a chance to complete */
13348         /* it should remain joinable and hence detachable */
13349         sleep( 1 );
13350
13351         status = pthread_detach( &t );
13352         if( status ) return errno;
13353 #endif
13354
13355 #ifdef HAVE_LINUX_THREADS
13356         pthread_kill_other_threads_np();
13357 #endif
13358
13359         return 0;
13360
13361 ; return 0; }
13362 EOF
13363 if { (eval echo configure:13364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13364   rm -rf conftest*
13365   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13366 else
13367   echo "configure: failed program was:" >&5
13368   cat conftest.$ac_ext >&5
13369   rm -rf conftest*
13370   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13371 fi
13372 rm -f conftest*
13373 else
13374   cat > conftest.$ac_ext <<EOF
13375 #line 13376 "configure"
13376 #include "confdefs.h"
13377 /* pthread test headers */
13378 #include <pthread.h>
13379 #if HAVE_PTHREADS < 7
13380 #include <errno.h>
13381 #endif
13382 #ifndef NULL
13383 #define NULL (void*)0
13384 #endif
13385
13386 static void *task(p)
13387         void *p;
13388 {
13389         return (void *) (p == NULL);
13390 }
13391
13392
13393 int main(argc, argv)
13394         int argc;
13395         char **argv;
13396 {
13397
13398         /* pthread test function */
13399 #ifndef PTHREAD_CREATE_DETACHED
13400 #define PTHREAD_CREATE_DETACHED 1
13401 #endif
13402         pthread_t t;
13403         int status;
13404         int detach = PTHREAD_CREATE_DETACHED;
13405
13406 #if HAVE_PTHREADS > 4
13407         /* Final pthreads */
13408         pthread_attr_t attr;
13409
13410         status = pthread_attr_init(&attr);
13411         if( status ) return status;
13412
13413 #if HAVE_PTHREADS < 7
13414         status = pthread_attr_setdetachstate(&attr, &detach);
13415         if( status < 0 ) status = errno;
13416 #else
13417         status = pthread_attr_setdetachstate(&attr, detach);
13418 #endif
13419         if( status ) return status;
13420         status = pthread_create( &t, &attr, task, NULL );
13421 #if HAVE_PTHREADS < 7
13422         if( status < 0 ) status = errno;
13423 #endif
13424         if( status ) return status;
13425 #else
13426         /* Draft 4 pthreads */
13427         status = pthread_create( &t, pthread_attr_default, task, NULL );
13428         if( status ) return errno;
13429
13430         /* give thread a chance to complete */
13431         /* it should remain joinable and hence detachable */
13432         sleep( 1 );
13433
13434         status = pthread_detach( &t );
13435         if( status ) return errno;
13436 #endif
13437
13438 #ifdef HAVE_LINUX_THREADS
13439         pthread_kill_other_threads_np();
13440 #endif
13441
13442         return 0;
13443
13444 }
13445
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13448 then
13449   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -fr conftest*
13454   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13455 fi
13456 rm -fr conftest*
13457 fi
13458
13459
13460                 # restore the LIBS
13461                 LIBS="$ol_LIBS"
13462         
13463 fi
13464
13465 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13466
13467         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13468                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13469                 ol_link_threads=posix
13470         fi
13471 fi
13472
13473                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13474 if test "$ol_link_threads" = no ; then
13475         # try -lpthread -lmach -lexc
13476         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13477 echo "configure:13478: checking for pthread link with -lpthread -lmach -lexc" >&5
13478 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13479   echo $ac_n "(cached) $ac_c" 1>&6
13480 else
13481   
13482                 # save the flags
13483                 ol_LIBS="$LIBS"
13484                 LIBS="-lpthread -lmach -lexc $LIBS"
13485
13486                 if test "$cross_compiling" = yes; then
13487   cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 /* pthread test headers */
13491 #include <pthread.h>
13492 #if HAVE_PTHREADS < 7
13493 #include <errno.h>
13494 #endif
13495 #ifndef NULL
13496 #define NULL (void*)0
13497 #endif
13498
13499 static void *task(p)
13500         void *p;
13501 {
13502         return (void *) (p == NULL);
13503 }
13504
13505 int main() {
13506
13507         /* pthread test function */
13508 #ifndef PTHREAD_CREATE_DETACHED
13509 #define PTHREAD_CREATE_DETACHED 1
13510 #endif
13511         pthread_t t;
13512         int status;
13513         int detach = PTHREAD_CREATE_DETACHED;
13514
13515 #if HAVE_PTHREADS > 4
13516         /* Final pthreads */
13517         pthread_attr_t attr;
13518
13519         status = pthread_attr_init(&attr);
13520         if( status ) return status;
13521
13522 #if HAVE_PTHREADS < 7
13523         status = pthread_attr_setdetachstate(&attr, &detach);
13524         if( status < 0 ) status = errno;
13525 #else
13526         status = pthread_attr_setdetachstate(&attr, detach);
13527 #endif
13528         if( status ) return status;
13529         status = pthread_create( &t, &attr, task, NULL );
13530 #if HAVE_PTHREADS < 7
13531         if( status < 0 ) status = errno;
13532 #endif
13533         if( status ) return status;
13534 #else
13535         /* Draft 4 pthreads */
13536         status = pthread_create( &t, pthread_attr_default, task, NULL );
13537         if( status ) return errno;
13538
13539         /* give thread a chance to complete */
13540         /* it should remain joinable and hence detachable */
13541         sleep( 1 );
13542
13543         status = pthread_detach( &t );
13544         if( status ) return errno;
13545 #endif
13546
13547 #ifdef HAVE_LINUX_THREADS
13548         pthread_kill_other_threads_np();
13549 #endif
13550
13551         return 0;
13552
13553 ; return 0; }
13554 EOF
13555 if { (eval echo configure:13556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13556   rm -rf conftest*
13557   ol_cv_pthread_lpthread_lmach_lexc=yes
13558 else
13559   echo "configure: failed program was:" >&5
13560   cat conftest.$ac_ext >&5
13561   rm -rf conftest*
13562   ol_cv_pthread_lpthread_lmach_lexc=no
13563 fi
13564 rm -f conftest*
13565 else
13566   cat > conftest.$ac_ext <<EOF
13567 #line 13568 "configure"
13568 #include "confdefs.h"
13569 /* pthread test headers */
13570 #include <pthread.h>
13571 #if HAVE_PTHREADS < 7
13572 #include <errno.h>
13573 #endif
13574 #ifndef NULL
13575 #define NULL (void*)0
13576 #endif
13577
13578 static void *task(p)
13579         void *p;
13580 {
13581         return (void *) (p == NULL);
13582 }
13583
13584
13585 int main(argc, argv)
13586         int argc;
13587         char **argv;
13588 {
13589
13590         /* pthread test function */
13591 #ifndef PTHREAD_CREATE_DETACHED
13592 #define PTHREAD_CREATE_DETACHED 1
13593 #endif
13594         pthread_t t;
13595         int status;
13596         int detach = PTHREAD_CREATE_DETACHED;
13597
13598 #if HAVE_PTHREADS > 4
13599         /* Final pthreads */
13600         pthread_attr_t attr;
13601
13602         status = pthread_attr_init(&attr);
13603         if( status ) return status;
13604
13605 #if HAVE_PTHREADS < 7
13606         status = pthread_attr_setdetachstate(&attr, &detach);
13607         if( status < 0 ) status = errno;
13608 #else
13609         status = pthread_attr_setdetachstate(&attr, detach);
13610 #endif
13611         if( status ) return status;
13612         status = pthread_create( &t, &attr, task, NULL );
13613 #if HAVE_PTHREADS < 7
13614         if( status < 0 ) status = errno;
13615 #endif
13616         if( status ) return status;
13617 #else
13618         /* Draft 4 pthreads */
13619         status = pthread_create( &t, pthread_attr_default, task, NULL );
13620         if( status ) return errno;
13621
13622         /* give thread a chance to complete */
13623         /* it should remain joinable and hence detachable */
13624         sleep( 1 );
13625
13626         status = pthread_detach( &t );
13627         if( status ) return errno;
13628 #endif
13629
13630 #ifdef HAVE_LINUX_THREADS
13631         pthread_kill_other_threads_np();
13632 #endif
13633
13634         return 0;
13635
13636 }
13637
13638 EOF
13639 if { (eval echo configure:13640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13640 then
13641   ol_cv_pthread_lpthread_lmach_lexc=yes
13642 else
13643   echo "configure: failed program was:" >&5
13644   cat conftest.$ac_ext >&5
13645   rm -fr conftest*
13646   ol_cv_pthread_lpthread_lmach_lexc=no
13647 fi
13648 rm -fr conftest*
13649 fi
13650
13651
13652                 # restore the LIBS
13653                 LIBS="$ol_LIBS"
13654         
13655 fi
13656
13657 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13658
13659         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13660                 ol_link_pthreads="-lpthread -lmach -lexc"
13661                 ol_link_threads=posix
13662         fi
13663 fi
13664
13665
13666                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13667 if test "$ol_link_threads" = no ; then
13668         # try -lpthread -Wl,-woff,85
13669         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13670 echo "configure:13671: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13671 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13672   echo $ac_n "(cached) $ac_c" 1>&6
13673 else
13674   
13675                 # save the flags
13676                 ol_LIBS="$LIBS"
13677                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13678
13679                 if test "$cross_compiling" = yes; then
13680   cat > conftest.$ac_ext <<EOF
13681 #line 13682 "configure"
13682 #include "confdefs.h"
13683 /* pthread test headers */
13684 #include <pthread.h>
13685 #if HAVE_PTHREADS < 7
13686 #include <errno.h>
13687 #endif
13688 #ifndef NULL
13689 #define NULL (void*)0
13690 #endif
13691
13692 static void *task(p)
13693         void *p;
13694 {
13695         return (void *) (p == NULL);
13696 }
13697
13698 int main() {
13699
13700         /* pthread test function */
13701 #ifndef PTHREAD_CREATE_DETACHED
13702 #define PTHREAD_CREATE_DETACHED 1
13703 #endif
13704         pthread_t t;
13705         int status;
13706         int detach = PTHREAD_CREATE_DETACHED;
13707
13708 #if HAVE_PTHREADS > 4
13709         /* Final pthreads */
13710         pthread_attr_t attr;
13711
13712         status = pthread_attr_init(&attr);
13713         if( status ) return status;
13714
13715 #if HAVE_PTHREADS < 7
13716         status = pthread_attr_setdetachstate(&attr, &detach);
13717         if( status < 0 ) status = errno;
13718 #else
13719         status = pthread_attr_setdetachstate(&attr, detach);
13720 #endif
13721         if( status ) return status;
13722         status = pthread_create( &t, &attr, task, NULL );
13723 #if HAVE_PTHREADS < 7
13724         if( status < 0 ) status = errno;
13725 #endif
13726         if( status ) return status;
13727 #else
13728         /* Draft 4 pthreads */
13729         status = pthread_create( &t, pthread_attr_default, task, NULL );
13730         if( status ) return errno;
13731
13732         /* give thread a chance to complete */
13733         /* it should remain joinable and hence detachable */
13734         sleep( 1 );
13735
13736         status = pthread_detach( &t );
13737         if( status ) return errno;
13738 #endif
13739
13740 #ifdef HAVE_LINUX_THREADS
13741         pthread_kill_other_threads_np();
13742 #endif
13743
13744         return 0;
13745
13746 ; return 0; }
13747 EOF
13748 if { (eval echo configure:13749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13749   rm -rf conftest*
13750   ol_cv_pthread_lib_lpthread_woff=yes
13751 else
13752   echo "configure: failed program was:" >&5
13753   cat conftest.$ac_ext >&5
13754   rm -rf conftest*
13755   ol_cv_pthread_lib_lpthread_woff=no
13756 fi
13757 rm -f conftest*
13758 else
13759   cat > conftest.$ac_ext <<EOF
13760 #line 13761 "configure"
13761 #include "confdefs.h"
13762 /* pthread test headers */
13763 #include <pthread.h>
13764 #if HAVE_PTHREADS < 7
13765 #include <errno.h>
13766 #endif
13767 #ifndef NULL
13768 #define NULL (void*)0
13769 #endif
13770
13771 static void *task(p)
13772         void *p;
13773 {
13774         return (void *) (p == NULL);
13775 }
13776
13777
13778 int main(argc, argv)
13779         int argc;
13780         char **argv;
13781 {
13782
13783         /* pthread test function */
13784 #ifndef PTHREAD_CREATE_DETACHED
13785 #define PTHREAD_CREATE_DETACHED 1
13786 #endif
13787         pthread_t t;
13788         int status;
13789         int detach = PTHREAD_CREATE_DETACHED;
13790
13791 #if HAVE_PTHREADS > 4
13792         /* Final pthreads */
13793         pthread_attr_t attr;
13794
13795         status = pthread_attr_init(&attr);
13796         if( status ) return status;
13797
13798 #if HAVE_PTHREADS < 7
13799         status = pthread_attr_setdetachstate(&attr, &detach);
13800         if( status < 0 ) status = errno;
13801 #else
13802         status = pthread_attr_setdetachstate(&attr, detach);
13803 #endif
13804         if( status ) return status;
13805         status = pthread_create( &t, &attr, task, NULL );
13806 #if HAVE_PTHREADS < 7
13807         if( status < 0 ) status = errno;
13808 #endif
13809         if( status ) return status;
13810 #else
13811         /* Draft 4 pthreads */
13812         status = pthread_create( &t, pthread_attr_default, task, NULL );
13813         if( status ) return errno;
13814
13815         /* give thread a chance to complete */
13816         /* it should remain joinable and hence detachable */
13817         sleep( 1 );
13818
13819         status = pthread_detach( &t );
13820         if( status ) return errno;
13821 #endif
13822
13823 #ifdef HAVE_LINUX_THREADS
13824         pthread_kill_other_threads_np();
13825 #endif
13826
13827         return 0;
13828
13829 }
13830
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13833 then
13834   ol_cv_pthread_lib_lpthread_woff=yes
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -fr conftest*
13839   ol_cv_pthread_lib_lpthread_woff=no
13840 fi
13841 rm -fr conftest*
13842 fi
13843
13844
13845                 # restore the LIBS
13846                 LIBS="$ol_LIBS"
13847         
13848 fi
13849
13850 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13851
13852         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13853                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13854                 ol_link_threads=posix
13855         fi
13856 fi
13857
13858
13859                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13860 if test "$ol_link_threads" = no ; then
13861         # try -lpthread
13862         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13863 echo "configure:13864: checking for pthread link with -lpthread" >&5
13864 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13865   echo $ac_n "(cached) $ac_c" 1>&6
13866 else
13867   
13868                 # save the flags
13869                 ol_LIBS="$LIBS"
13870                 LIBS="-lpthread $LIBS"
13871
13872                 if test "$cross_compiling" = yes; then
13873   cat > conftest.$ac_ext <<EOF
13874 #line 13875 "configure"
13875 #include "confdefs.h"
13876 /* pthread test headers */
13877 #include <pthread.h>
13878 #if HAVE_PTHREADS < 7
13879 #include <errno.h>
13880 #endif
13881 #ifndef NULL
13882 #define NULL (void*)0
13883 #endif
13884
13885 static void *task(p)
13886         void *p;
13887 {
13888         return (void *) (p == NULL);
13889 }
13890
13891 int main() {
13892
13893         /* pthread test function */
13894 #ifndef PTHREAD_CREATE_DETACHED
13895 #define PTHREAD_CREATE_DETACHED 1
13896 #endif
13897         pthread_t t;
13898         int status;
13899         int detach = PTHREAD_CREATE_DETACHED;
13900
13901 #if HAVE_PTHREADS > 4
13902         /* Final pthreads */
13903         pthread_attr_t attr;
13904
13905         status = pthread_attr_init(&attr);
13906         if( status ) return status;
13907
13908 #if HAVE_PTHREADS < 7
13909         status = pthread_attr_setdetachstate(&attr, &detach);
13910         if( status < 0 ) status = errno;
13911 #else
13912         status = pthread_attr_setdetachstate(&attr, detach);
13913 #endif
13914         if( status ) return status;
13915         status = pthread_create( &t, &attr, task, NULL );
13916 #if HAVE_PTHREADS < 7
13917         if( status < 0 ) status = errno;
13918 #endif
13919         if( status ) return status;
13920 #else
13921         /* Draft 4 pthreads */
13922         status = pthread_create( &t, pthread_attr_default, task, NULL );
13923         if( status ) return errno;
13924
13925         /* give thread a chance to complete */
13926         /* it should remain joinable and hence detachable */
13927         sleep( 1 );
13928
13929         status = pthread_detach( &t );
13930         if( status ) return errno;
13931 #endif
13932
13933 #ifdef HAVE_LINUX_THREADS
13934         pthread_kill_other_threads_np();
13935 #endif
13936
13937         return 0;
13938
13939 ; return 0; }
13940 EOF
13941 if { (eval echo configure:13942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13942   rm -rf conftest*
13943   ol_cv_pthread_lpthread=yes
13944 else
13945   echo "configure: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947   rm -rf conftest*
13948   ol_cv_pthread_lpthread=no
13949 fi
13950 rm -f conftest*
13951 else
13952   cat > conftest.$ac_ext <<EOF
13953 #line 13954 "configure"
13954 #include "confdefs.h"
13955 /* pthread test headers */
13956 #include <pthread.h>
13957 #if HAVE_PTHREADS < 7
13958 #include <errno.h>
13959 #endif
13960 #ifndef NULL
13961 #define NULL (void*)0
13962 #endif
13963
13964 static void *task(p)
13965         void *p;
13966 {
13967         return (void *) (p == NULL);
13968 }
13969
13970
13971 int main(argc, argv)
13972         int argc;
13973         char **argv;
13974 {
13975
13976         /* pthread test function */
13977 #ifndef PTHREAD_CREATE_DETACHED
13978 #define PTHREAD_CREATE_DETACHED 1
13979 #endif
13980         pthread_t t;
13981         int status;
13982         int detach = PTHREAD_CREATE_DETACHED;
13983
13984 #if HAVE_PTHREADS > 4
13985         /* Final pthreads */
13986         pthread_attr_t attr;
13987
13988         status = pthread_attr_init(&attr);
13989         if( status ) return status;
13990
13991 #if HAVE_PTHREADS < 7
13992         status = pthread_attr_setdetachstate(&attr, &detach);
13993         if( status < 0 ) status = errno;
13994 #else
13995         status = pthread_attr_setdetachstate(&attr, detach);
13996 #endif
13997         if( status ) return status;
13998         status = pthread_create( &t, &attr, task, NULL );
13999 #if HAVE_PTHREADS < 7
14000         if( status < 0 ) status = errno;
14001 #endif
14002         if( status ) return status;
14003 #else
14004         /* Draft 4 pthreads */
14005         status = pthread_create( &t, pthread_attr_default, task, NULL );
14006         if( status ) return errno;
14007
14008         /* give thread a chance to complete */
14009         /* it should remain joinable and hence detachable */
14010         sleep( 1 );
14011
14012         status = pthread_detach( &t );
14013         if( status ) return errno;
14014 #endif
14015
14016 #ifdef HAVE_LINUX_THREADS
14017         pthread_kill_other_threads_np();
14018 #endif
14019
14020         return 0;
14021
14022 }
14023
14024 EOF
14025 if { (eval echo configure:14026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14026 then
14027   ol_cv_pthread_lpthread=yes
14028 else
14029   echo "configure: failed program was:" >&5
14030   cat conftest.$ac_ext >&5
14031   rm -fr conftest*
14032   ol_cv_pthread_lpthread=no
14033 fi
14034 rm -fr conftest*
14035 fi
14036
14037
14038                 # restore the LIBS
14039                 LIBS="$ol_LIBS"
14040         
14041 fi
14042
14043 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14044
14045         if test $ol_cv_pthread_lpthread = yes ; then
14046                 ol_link_pthreads="-lpthread"
14047                 ol_link_threads=posix
14048         fi
14049 fi
14050
14051                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14052 if test "$ol_link_threads" = no ; then
14053         # try -lc_r
14054         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14055 echo "configure:14056: checking for pthread link with -lc_r" >&5
14056 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14057   echo $ac_n "(cached) $ac_c" 1>&6
14058 else
14059   
14060                 # save the flags
14061                 ol_LIBS="$LIBS"
14062                 LIBS="-lc_r $LIBS"
14063
14064                 if test "$cross_compiling" = yes; then
14065   cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 /* pthread test headers */
14069 #include <pthread.h>
14070 #if HAVE_PTHREADS < 7
14071 #include <errno.h>
14072 #endif
14073 #ifndef NULL
14074 #define NULL (void*)0
14075 #endif
14076
14077 static void *task(p)
14078         void *p;
14079 {
14080         return (void *) (p == NULL);
14081 }
14082
14083 int main() {
14084
14085         /* pthread test function */
14086 #ifndef PTHREAD_CREATE_DETACHED
14087 #define PTHREAD_CREATE_DETACHED 1
14088 #endif
14089         pthread_t t;
14090         int status;
14091         int detach = PTHREAD_CREATE_DETACHED;
14092
14093 #if HAVE_PTHREADS > 4
14094         /* Final pthreads */
14095         pthread_attr_t attr;
14096
14097         status = pthread_attr_init(&attr);
14098         if( status ) return status;
14099
14100 #if HAVE_PTHREADS < 7
14101         status = pthread_attr_setdetachstate(&attr, &detach);
14102         if( status < 0 ) status = errno;
14103 #else
14104         status = pthread_attr_setdetachstate(&attr, detach);
14105 #endif
14106         if( status ) return status;
14107         status = pthread_create( &t, &attr, task, NULL );
14108 #if HAVE_PTHREADS < 7
14109         if( status < 0 ) status = errno;
14110 #endif
14111         if( status ) return status;
14112 #else
14113         /* Draft 4 pthreads */
14114         status = pthread_create( &t, pthread_attr_default, task, NULL );
14115         if( status ) return errno;
14116
14117         /* give thread a chance to complete */
14118         /* it should remain joinable and hence detachable */
14119         sleep( 1 );
14120
14121         status = pthread_detach( &t );
14122         if( status ) return errno;
14123 #endif
14124
14125 #ifdef HAVE_LINUX_THREADS
14126         pthread_kill_other_threads_np();
14127 #endif
14128
14129         return 0;
14130
14131 ; return 0; }
14132 EOF
14133 if { (eval echo configure:14134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14134   rm -rf conftest*
14135   ol_cv_pthread_lc_r=yes
14136 else
14137   echo "configure: failed program was:" >&5
14138   cat conftest.$ac_ext >&5
14139   rm -rf conftest*
14140   ol_cv_pthread_lc_r=no
14141 fi
14142 rm -f conftest*
14143 else
14144   cat > conftest.$ac_ext <<EOF
14145 #line 14146 "configure"
14146 #include "confdefs.h"
14147 /* pthread test headers */
14148 #include <pthread.h>
14149 #if HAVE_PTHREADS < 7
14150 #include <errno.h>
14151 #endif
14152 #ifndef NULL
14153 #define NULL (void*)0
14154 #endif
14155
14156 static void *task(p)
14157         void *p;
14158 {
14159         return (void *) (p == NULL);
14160 }
14161
14162
14163 int main(argc, argv)
14164         int argc;
14165         char **argv;
14166 {
14167
14168         /* pthread test function */
14169 #ifndef PTHREAD_CREATE_DETACHED
14170 #define PTHREAD_CREATE_DETACHED 1
14171 #endif
14172         pthread_t t;
14173         int status;
14174         int detach = PTHREAD_CREATE_DETACHED;
14175
14176 #if HAVE_PTHREADS > 4
14177         /* Final pthreads */
14178         pthread_attr_t attr;
14179
14180         status = pthread_attr_init(&attr);
14181         if( status ) return status;
14182
14183 #if HAVE_PTHREADS < 7
14184         status = pthread_attr_setdetachstate(&attr, &detach);
14185         if( status < 0 ) status = errno;
14186 #else
14187         status = pthread_attr_setdetachstate(&attr, detach);
14188 #endif
14189         if( status ) return status;
14190         status = pthread_create( &t, &attr, task, NULL );
14191 #if HAVE_PTHREADS < 7
14192         if( status < 0 ) status = errno;
14193 #endif
14194         if( status ) return status;
14195 #else
14196         /* Draft 4 pthreads */
14197         status = pthread_create( &t, pthread_attr_default, task, NULL );
14198         if( status ) return errno;
14199
14200         /* give thread a chance to complete */
14201         /* it should remain joinable and hence detachable */
14202         sleep( 1 );
14203
14204         status = pthread_detach( &t );
14205         if( status ) return errno;
14206 #endif
14207
14208 #ifdef HAVE_LINUX_THREADS
14209         pthread_kill_other_threads_np();
14210 #endif
14211
14212         return 0;
14213
14214 }
14215
14216 EOF
14217 if { (eval echo configure:14218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14218 then
14219   ol_cv_pthread_lc_r=yes
14220 else
14221   echo "configure: failed program was:" >&5
14222   cat conftest.$ac_ext >&5
14223   rm -fr conftest*
14224   ol_cv_pthread_lc_r=no
14225 fi
14226 rm -fr conftest*
14227 fi
14228
14229
14230                 # restore the LIBS
14231                 LIBS="$ol_LIBS"
14232         
14233 fi
14234
14235 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14236
14237         if test $ol_cv_pthread_lc_r = yes ; then
14238                 ol_link_pthreads="-lc_r"
14239                 ol_link_threads=posix
14240         fi
14241 fi
14242
14243
14244                 # Pthread try link: -threads (ol_cv_pthread_threads)
14245 if test "$ol_link_threads" = no ; then
14246         # try -threads
14247         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14248 echo "configure:14249: checking for pthread link with -threads" >&5
14249 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   
14253                 # save the flags
14254                 ol_LIBS="$LIBS"
14255                 LIBS="-threads $LIBS"
14256
14257                 if test "$cross_compiling" = yes; then
14258   cat > conftest.$ac_ext <<EOF
14259 #line 14260 "configure"
14260 #include "confdefs.h"
14261 /* pthread test headers */
14262 #include <pthread.h>
14263 #if HAVE_PTHREADS < 7
14264 #include <errno.h>
14265 #endif
14266 #ifndef NULL
14267 #define NULL (void*)0
14268 #endif
14269
14270 static void *task(p)
14271         void *p;
14272 {
14273         return (void *) (p == NULL);
14274 }
14275
14276 int main() {
14277
14278         /* pthread test function */
14279 #ifndef PTHREAD_CREATE_DETACHED
14280 #define PTHREAD_CREATE_DETACHED 1
14281 #endif
14282         pthread_t t;
14283         int status;
14284         int detach = PTHREAD_CREATE_DETACHED;
14285
14286 #if HAVE_PTHREADS > 4
14287         /* Final pthreads */
14288         pthread_attr_t attr;
14289
14290         status = pthread_attr_init(&attr);
14291         if( status ) return status;
14292
14293 #if HAVE_PTHREADS < 7
14294         status = pthread_attr_setdetachstate(&attr, &detach);
14295         if( status < 0 ) status = errno;
14296 #else
14297         status = pthread_attr_setdetachstate(&attr, detach);
14298 #endif
14299         if( status ) return status;
14300         status = pthread_create( &t, &attr, task, NULL );
14301 #if HAVE_PTHREADS < 7
14302         if( status < 0 ) status = errno;
14303 #endif
14304         if( status ) return status;
14305 #else
14306         /* Draft 4 pthreads */
14307         status = pthread_create( &t, pthread_attr_default, task, NULL );
14308         if( status ) return errno;
14309
14310         /* give thread a chance to complete */
14311         /* it should remain joinable and hence detachable */
14312         sleep( 1 );
14313
14314         status = pthread_detach( &t );
14315         if( status ) return errno;
14316 #endif
14317
14318 #ifdef HAVE_LINUX_THREADS
14319         pthread_kill_other_threads_np();
14320 #endif
14321
14322         return 0;
14323
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14327   rm -rf conftest*
14328   ol_cv_pthread_threads=yes
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   ol_cv_pthread_threads=no
14334 fi
14335 rm -f conftest*
14336 else
14337   cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340 /* pthread test headers */
14341 #include <pthread.h>
14342 #if HAVE_PTHREADS < 7
14343 #include <errno.h>
14344 #endif
14345 #ifndef NULL
14346 #define NULL (void*)0
14347 #endif
14348
14349 static void *task(p)
14350         void *p;
14351 {
14352         return (void *) (p == NULL);
14353 }
14354
14355
14356 int main(argc, argv)
14357         int argc;
14358         char **argv;
14359 {
14360
14361         /* pthread test function */
14362 #ifndef PTHREAD_CREATE_DETACHED
14363 #define PTHREAD_CREATE_DETACHED 1
14364 #endif
14365         pthread_t t;
14366         int status;
14367         int detach = PTHREAD_CREATE_DETACHED;
14368
14369 #if HAVE_PTHREADS > 4
14370         /* Final pthreads */
14371         pthread_attr_t attr;
14372
14373         status = pthread_attr_init(&attr);
14374         if( status ) return status;
14375
14376 #if HAVE_PTHREADS < 7
14377         status = pthread_attr_setdetachstate(&attr, &detach);
14378         if( status < 0 ) status = errno;
14379 #else
14380         status = pthread_attr_setdetachstate(&attr, detach);
14381 #endif
14382         if( status ) return status;
14383         status = pthread_create( &t, &attr, task, NULL );
14384 #if HAVE_PTHREADS < 7
14385         if( status < 0 ) status = errno;
14386 #endif
14387         if( status ) return status;
14388 #else
14389         /* Draft 4 pthreads */
14390         status = pthread_create( &t, pthread_attr_default, task, NULL );
14391         if( status ) return errno;
14392
14393         /* give thread a chance to complete */
14394         /* it should remain joinable and hence detachable */
14395         sleep( 1 );
14396
14397         status = pthread_detach( &t );
14398         if( status ) return errno;
14399 #endif
14400
14401 #ifdef HAVE_LINUX_THREADS
14402         pthread_kill_other_threads_np();
14403 #endif
14404
14405         return 0;
14406
14407 }
14408
14409 EOF
14410 if { (eval echo configure:14411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14411 then
14412   ol_cv_pthread_threads=yes
14413 else
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -fr conftest*
14417   ol_cv_pthread_threads=no
14418 fi
14419 rm -fr conftest*
14420 fi
14421
14422
14423                 # restore the LIBS
14424                 LIBS="$ol_LIBS"
14425         
14426 fi
14427
14428 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14429
14430         if test $ol_cv_pthread_threads = yes ; then
14431                 ol_link_pthreads="-threads"
14432                 ol_link_threads=posix
14433         fi
14434 fi
14435
14436
14437                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14438 if test "$ol_link_threads" = no ; then
14439         # try -lpthreads -lmach -lexc -lc_r
14440         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14441 echo "configure:14442: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14442 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14443   echo $ac_n "(cached) $ac_c" 1>&6
14444 else
14445   
14446                 # save the flags
14447                 ol_LIBS="$LIBS"
14448                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14449
14450                 if test "$cross_compiling" = yes; then
14451   cat > conftest.$ac_ext <<EOF
14452 #line 14453 "configure"
14453 #include "confdefs.h"
14454 /* pthread test headers */
14455 #include <pthread.h>
14456 #if HAVE_PTHREADS < 7
14457 #include <errno.h>
14458 #endif
14459 #ifndef NULL
14460 #define NULL (void*)0
14461 #endif
14462
14463 static void *task(p)
14464         void *p;
14465 {
14466         return (void *) (p == NULL);
14467 }
14468
14469 int main() {
14470
14471         /* pthread test function */
14472 #ifndef PTHREAD_CREATE_DETACHED
14473 #define PTHREAD_CREATE_DETACHED 1
14474 #endif
14475         pthread_t t;
14476         int status;
14477         int detach = PTHREAD_CREATE_DETACHED;
14478
14479 #if HAVE_PTHREADS > 4
14480         /* Final pthreads */
14481         pthread_attr_t attr;
14482
14483         status = pthread_attr_init(&attr);
14484         if( status ) return status;
14485
14486 #if HAVE_PTHREADS < 7
14487         status = pthread_attr_setdetachstate(&attr, &detach);
14488         if( status < 0 ) status = errno;
14489 #else
14490         status = pthread_attr_setdetachstate(&attr, detach);
14491 #endif
14492         if( status ) return status;
14493         status = pthread_create( &t, &attr, task, NULL );
14494 #if HAVE_PTHREADS < 7
14495         if( status < 0 ) status = errno;
14496 #endif
14497         if( status ) return status;
14498 #else
14499         /* Draft 4 pthreads */
14500         status = pthread_create( &t, pthread_attr_default, task, NULL );
14501         if( status ) return errno;
14502
14503         /* give thread a chance to complete */
14504         /* it should remain joinable and hence detachable */
14505         sleep( 1 );
14506
14507         status = pthread_detach( &t );
14508         if( status ) return errno;
14509 #endif
14510
14511 #ifdef HAVE_LINUX_THREADS
14512         pthread_kill_other_threads_np();
14513 #endif
14514
14515         return 0;
14516
14517 ; return 0; }
14518 EOF
14519 if { (eval echo configure:14520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14520   rm -rf conftest*
14521   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14522 else
14523   echo "configure: failed program was:" >&5
14524   cat conftest.$ac_ext >&5
14525   rm -rf conftest*
14526   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14527 fi
14528 rm -f conftest*
14529 else
14530   cat > conftest.$ac_ext <<EOF
14531 #line 14532 "configure"
14532 #include "confdefs.h"
14533 /* pthread test headers */
14534 #include <pthread.h>
14535 #if HAVE_PTHREADS < 7
14536 #include <errno.h>
14537 #endif
14538 #ifndef NULL
14539 #define NULL (void*)0
14540 #endif
14541
14542 static void *task(p)
14543         void *p;
14544 {
14545         return (void *) (p == NULL);
14546 }
14547
14548
14549 int main(argc, argv)
14550         int argc;
14551         char **argv;
14552 {
14553
14554         /* pthread test function */
14555 #ifndef PTHREAD_CREATE_DETACHED
14556 #define PTHREAD_CREATE_DETACHED 1
14557 #endif
14558         pthread_t t;
14559         int status;
14560         int detach = PTHREAD_CREATE_DETACHED;
14561
14562 #if HAVE_PTHREADS > 4
14563         /* Final pthreads */
14564         pthread_attr_t attr;
14565
14566         status = pthread_attr_init(&attr);
14567         if( status ) return status;
14568
14569 #if HAVE_PTHREADS < 7
14570         status = pthread_attr_setdetachstate(&attr, &detach);
14571         if( status < 0 ) status = errno;
14572 #else
14573         status = pthread_attr_setdetachstate(&attr, detach);
14574 #endif
14575         if( status ) return status;
14576         status = pthread_create( &t, &attr, task, NULL );
14577 #if HAVE_PTHREADS < 7
14578         if( status < 0 ) status = errno;
14579 #endif
14580         if( status ) return status;
14581 #else
14582         /* Draft 4 pthreads */
14583         status = pthread_create( &t, pthread_attr_default, task, NULL );
14584         if( status ) return errno;
14585
14586         /* give thread a chance to complete */
14587         /* it should remain joinable and hence detachable */
14588         sleep( 1 );
14589
14590         status = pthread_detach( &t );
14591         if( status ) return errno;
14592 #endif
14593
14594 #ifdef HAVE_LINUX_THREADS
14595         pthread_kill_other_threads_np();
14596 #endif
14597
14598         return 0;
14599
14600 }
14601
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14604 then
14605   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -fr conftest*
14610   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14611 fi
14612 rm -fr conftest*
14613 fi
14614
14615
14616                 # restore the LIBS
14617                 LIBS="$ol_LIBS"
14618         
14619 fi
14620
14621 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14622
14623         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14624                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14625                 ol_link_threads=posix
14626         fi
14627 fi
14628
14629                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14630 if test "$ol_link_threads" = no ; then
14631         # try -lpthreads -lmach -lexc
14632         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14633 echo "configure:14634: checking for pthread link with -lpthreads -lmach -lexc" >&5
14634 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14635   echo $ac_n "(cached) $ac_c" 1>&6
14636 else
14637   
14638                 # save the flags
14639                 ol_LIBS="$LIBS"
14640                 LIBS="-lpthreads -lmach -lexc $LIBS"
14641
14642                 if test "$cross_compiling" = yes; then
14643   cat > conftest.$ac_ext <<EOF
14644 #line 14645 "configure"
14645 #include "confdefs.h"
14646 /* pthread test headers */
14647 #include <pthread.h>
14648 #if HAVE_PTHREADS < 7
14649 #include <errno.h>
14650 #endif
14651 #ifndef NULL
14652 #define NULL (void*)0
14653 #endif
14654
14655 static void *task(p)
14656         void *p;
14657 {
14658         return (void *) (p == NULL);
14659 }
14660
14661 int main() {
14662
14663         /* pthread test function */
14664 #ifndef PTHREAD_CREATE_DETACHED
14665 #define PTHREAD_CREATE_DETACHED 1
14666 #endif
14667         pthread_t t;
14668         int status;
14669         int detach = PTHREAD_CREATE_DETACHED;
14670
14671 #if HAVE_PTHREADS > 4
14672         /* Final pthreads */
14673         pthread_attr_t attr;
14674
14675         status = pthread_attr_init(&attr);
14676         if( status ) return status;
14677
14678 #if HAVE_PTHREADS < 7
14679         status = pthread_attr_setdetachstate(&attr, &detach);
14680         if( status < 0 ) status = errno;
14681 #else
14682         status = pthread_attr_setdetachstate(&attr, detach);
14683 #endif
14684         if( status ) return status;
14685         status = pthread_create( &t, &attr, task, NULL );
14686 #if HAVE_PTHREADS < 7
14687         if( status < 0 ) status = errno;
14688 #endif
14689         if( status ) return status;
14690 #else
14691         /* Draft 4 pthreads */
14692         status = pthread_create( &t, pthread_attr_default, task, NULL );
14693         if( status ) return errno;
14694
14695         /* give thread a chance to complete */
14696         /* it should remain joinable and hence detachable */
14697         sleep( 1 );
14698
14699         status = pthread_detach( &t );
14700         if( status ) return errno;
14701 #endif
14702
14703 #ifdef HAVE_LINUX_THREADS
14704         pthread_kill_other_threads_np();
14705 #endif
14706
14707         return 0;
14708
14709 ; return 0; }
14710 EOF
14711 if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14712   rm -rf conftest*
14713   ol_cv_pthread_lpthreads_lmach_lexc=yes
14714 else
14715   echo "configure: failed program was:" >&5
14716   cat conftest.$ac_ext >&5
14717   rm -rf conftest*
14718   ol_cv_pthread_lpthreads_lmach_lexc=no
14719 fi
14720 rm -f conftest*
14721 else
14722   cat > conftest.$ac_ext <<EOF
14723 #line 14724 "configure"
14724 #include "confdefs.h"
14725 /* pthread test headers */
14726 #include <pthread.h>
14727 #if HAVE_PTHREADS < 7
14728 #include <errno.h>
14729 #endif
14730 #ifndef NULL
14731 #define NULL (void*)0
14732 #endif
14733
14734 static void *task(p)
14735         void *p;
14736 {
14737         return (void *) (p == NULL);
14738 }
14739
14740
14741 int main(argc, argv)
14742         int argc;
14743         char **argv;
14744 {
14745
14746         /* pthread test function */
14747 #ifndef PTHREAD_CREATE_DETACHED
14748 #define PTHREAD_CREATE_DETACHED 1
14749 #endif
14750         pthread_t t;
14751         int status;
14752         int detach = PTHREAD_CREATE_DETACHED;
14753
14754 #if HAVE_PTHREADS > 4
14755         /* Final pthreads */
14756         pthread_attr_t attr;
14757
14758         status = pthread_attr_init(&attr);
14759         if( status ) return status;
14760
14761 #if HAVE_PTHREADS < 7
14762         status = pthread_attr_setdetachstate(&attr, &detach);
14763         if( status < 0 ) status = errno;
14764 #else
14765         status = pthread_attr_setdetachstate(&attr, detach);
14766 #endif
14767         if( status ) return status;
14768         status = pthread_create( &t, &attr, task, NULL );
14769 #if HAVE_PTHREADS < 7
14770         if( status < 0 ) status = errno;
14771 #endif
14772         if( status ) return status;
14773 #else
14774         /* Draft 4 pthreads */
14775         status = pthread_create( &t, pthread_attr_default, task, NULL );
14776         if( status ) return errno;
14777
14778         /* give thread a chance to complete */
14779         /* it should remain joinable and hence detachable */
14780         sleep( 1 );
14781
14782         status = pthread_detach( &t );
14783         if( status ) return errno;
14784 #endif
14785
14786 #ifdef HAVE_LINUX_THREADS
14787         pthread_kill_other_threads_np();
14788 #endif
14789
14790         return 0;
14791
14792 }
14793
14794 EOF
14795 if { (eval echo configure:14796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14796 then
14797   ol_cv_pthread_lpthreads_lmach_lexc=yes
14798 else
14799   echo "configure: failed program was:" >&5
14800   cat conftest.$ac_ext >&5
14801   rm -fr conftest*
14802   ol_cv_pthread_lpthreads_lmach_lexc=no
14803 fi
14804 rm -fr conftest*
14805 fi
14806
14807
14808                 # restore the LIBS
14809                 LIBS="$ol_LIBS"
14810         
14811 fi
14812
14813 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14814
14815         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14816                 ol_link_pthreads="-lpthreads -lmach -lexc"
14817                 ol_link_threads=posix
14818         fi
14819 fi
14820
14821                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14822 if test "$ol_link_threads" = no ; then
14823         # try -lpthreads -lexc
14824         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14825 echo "configure:14826: checking for pthread link with -lpthreads -lexc" >&5
14826 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14827   echo $ac_n "(cached) $ac_c" 1>&6
14828 else
14829   
14830                 # save the flags
14831                 ol_LIBS="$LIBS"
14832                 LIBS="-lpthreads -lexc $LIBS"
14833
14834                 if test "$cross_compiling" = yes; then
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* pthread test headers */
14839 #include <pthread.h>
14840 #if HAVE_PTHREADS < 7
14841 #include <errno.h>
14842 #endif
14843 #ifndef NULL
14844 #define NULL (void*)0
14845 #endif
14846
14847 static void *task(p)
14848         void *p;
14849 {
14850         return (void *) (p == NULL);
14851 }
14852
14853 int main() {
14854
14855         /* pthread test function */
14856 #ifndef PTHREAD_CREATE_DETACHED
14857 #define PTHREAD_CREATE_DETACHED 1
14858 #endif
14859         pthread_t t;
14860         int status;
14861         int detach = PTHREAD_CREATE_DETACHED;
14862
14863 #if HAVE_PTHREADS > 4
14864         /* Final pthreads */
14865         pthread_attr_t attr;
14866
14867         status = pthread_attr_init(&attr);
14868         if( status ) return status;
14869
14870 #if HAVE_PTHREADS < 7
14871         status = pthread_attr_setdetachstate(&attr, &detach);
14872         if( status < 0 ) status = errno;
14873 #else
14874         status = pthread_attr_setdetachstate(&attr, detach);
14875 #endif
14876         if( status ) return status;
14877         status = pthread_create( &t, &attr, task, NULL );
14878 #if HAVE_PTHREADS < 7
14879         if( status < 0 ) status = errno;
14880 #endif
14881         if( status ) return status;
14882 #else
14883         /* Draft 4 pthreads */
14884         status = pthread_create( &t, pthread_attr_default, task, NULL );
14885         if( status ) return errno;
14886
14887         /* give thread a chance to complete */
14888         /* it should remain joinable and hence detachable */
14889         sleep( 1 );
14890
14891         status = pthread_detach( &t );
14892         if( status ) return errno;
14893 #endif
14894
14895 #ifdef HAVE_LINUX_THREADS
14896         pthread_kill_other_threads_np();
14897 #endif
14898
14899         return 0;
14900
14901 ; return 0; }
14902 EOF
14903 if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14904   rm -rf conftest*
14905   ol_cv_pthread_lpthreads_lexc=yes
14906 else
14907   echo "configure: failed program was:" >&5
14908   cat conftest.$ac_ext >&5
14909   rm -rf conftest*
14910   ol_cv_pthread_lpthreads_lexc=no
14911 fi
14912 rm -f conftest*
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 /* pthread test headers */
14918 #include <pthread.h>
14919 #if HAVE_PTHREADS < 7
14920 #include <errno.h>
14921 #endif
14922 #ifndef NULL
14923 #define NULL (void*)0
14924 #endif
14925
14926 static void *task(p)
14927         void *p;
14928 {
14929         return (void *) (p == NULL);
14930 }
14931
14932
14933 int main(argc, argv)
14934         int argc;
14935         char **argv;
14936 {
14937
14938         /* pthread test function */
14939 #ifndef PTHREAD_CREATE_DETACHED
14940 #define PTHREAD_CREATE_DETACHED 1
14941 #endif
14942         pthread_t t;
14943         int status;
14944         int detach = PTHREAD_CREATE_DETACHED;
14945
14946 #if HAVE_PTHREADS > 4
14947         /* Final pthreads */
14948         pthread_attr_t attr;
14949
14950         status = pthread_attr_init(&attr);
14951         if( status ) return status;
14952
14953 #if HAVE_PTHREADS < 7
14954         status = pthread_attr_setdetachstate(&attr, &detach);
14955         if( status < 0 ) status = errno;
14956 #else
14957         status = pthread_attr_setdetachstate(&attr, detach);
14958 #endif
14959         if( status ) return status;
14960         status = pthread_create( &t, &attr, task, NULL );
14961 #if HAVE_PTHREADS < 7
14962         if( status < 0 ) status = errno;
14963 #endif
14964         if( status ) return status;
14965 #else
14966         /* Draft 4 pthreads */
14967         status = pthread_create( &t, pthread_attr_default, task, NULL );
14968         if( status ) return errno;
14969
14970         /* give thread a chance to complete */
14971         /* it should remain joinable and hence detachable */
14972         sleep( 1 );
14973
14974         status = pthread_detach( &t );
14975         if( status ) return errno;
14976 #endif
14977
14978 #ifdef HAVE_LINUX_THREADS
14979         pthread_kill_other_threads_np();
14980 #endif
14981
14982         return 0;
14983
14984 }
14985
14986 EOF
14987 if { (eval echo configure:14988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14988 then
14989   ol_cv_pthread_lpthreads_lexc=yes
14990 else
14991   echo "configure: failed program was:" >&5
14992   cat conftest.$ac_ext >&5
14993   rm -fr conftest*
14994   ol_cv_pthread_lpthreads_lexc=no
14995 fi
14996 rm -fr conftest*
14997 fi
14998
14999
15000                 # restore the LIBS
15001                 LIBS="$ol_LIBS"
15002         
15003 fi
15004
15005 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15006
15007         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15008                 ol_link_pthreads="-lpthreads -lexc"
15009                 ol_link_threads=posix
15010         fi
15011 fi
15012
15013
15014                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15015 if test "$ol_link_threads" = no ; then
15016         # try -lpthreads
15017         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15018 echo "configure:15019: checking for pthread link with -lpthreads" >&5
15019 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15020   echo $ac_n "(cached) $ac_c" 1>&6
15021 else
15022   
15023                 # save the flags
15024                 ol_LIBS="$LIBS"
15025                 LIBS="-lpthreads $LIBS"
15026
15027                 if test "$cross_compiling" = yes; then
15028   cat > conftest.$ac_ext <<EOF
15029 #line 15030 "configure"
15030 #include "confdefs.h"
15031 /* pthread test headers */
15032 #include <pthread.h>
15033 #if HAVE_PTHREADS < 7
15034 #include <errno.h>
15035 #endif
15036 #ifndef NULL
15037 #define NULL (void*)0
15038 #endif
15039
15040 static void *task(p)
15041         void *p;
15042 {
15043         return (void *) (p == NULL);
15044 }
15045
15046 int main() {
15047
15048         /* pthread test function */
15049 #ifndef PTHREAD_CREATE_DETACHED
15050 #define PTHREAD_CREATE_DETACHED 1
15051 #endif
15052         pthread_t t;
15053         int status;
15054         int detach = PTHREAD_CREATE_DETACHED;
15055
15056 #if HAVE_PTHREADS > 4
15057         /* Final pthreads */
15058         pthread_attr_t attr;
15059
15060         status = pthread_attr_init(&attr);
15061         if( status ) return status;
15062
15063 #if HAVE_PTHREADS < 7
15064         status = pthread_attr_setdetachstate(&attr, &detach);
15065         if( status < 0 ) status = errno;
15066 #else
15067         status = pthread_attr_setdetachstate(&attr, detach);
15068 #endif
15069         if( status ) return status;
15070         status = pthread_create( &t, &attr, task, NULL );
15071 #if HAVE_PTHREADS < 7
15072         if( status < 0 ) status = errno;
15073 #endif
15074         if( status ) return status;
15075 #else
15076         /* Draft 4 pthreads */
15077         status = pthread_create( &t, pthread_attr_default, task, NULL );
15078         if( status ) return errno;
15079
15080         /* give thread a chance to complete */
15081         /* it should remain joinable and hence detachable */
15082         sleep( 1 );
15083
15084         status = pthread_detach( &t );
15085         if( status ) return errno;
15086 #endif
15087
15088 #ifdef HAVE_LINUX_THREADS
15089         pthread_kill_other_threads_np();
15090 #endif
15091
15092         return 0;
15093
15094 ; return 0; }
15095 EOF
15096 if { (eval echo configure:15097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15097   rm -rf conftest*
15098   ol_cv_pthread_lib_lpthreads=yes
15099 else
15100   echo "configure: failed program was:" >&5
15101   cat conftest.$ac_ext >&5
15102   rm -rf conftest*
15103   ol_cv_pthread_lib_lpthreads=no
15104 fi
15105 rm -f conftest*
15106 else
15107   cat > conftest.$ac_ext <<EOF
15108 #line 15109 "configure"
15109 #include "confdefs.h"
15110 /* pthread test headers */
15111 #include <pthread.h>
15112 #if HAVE_PTHREADS < 7
15113 #include <errno.h>
15114 #endif
15115 #ifndef NULL
15116 #define NULL (void*)0
15117 #endif
15118
15119 static void *task(p)
15120         void *p;
15121 {
15122         return (void *) (p == NULL);
15123 }
15124
15125
15126 int main(argc, argv)
15127         int argc;
15128         char **argv;
15129 {
15130
15131         /* pthread test function */
15132 #ifndef PTHREAD_CREATE_DETACHED
15133 #define PTHREAD_CREATE_DETACHED 1
15134 #endif
15135         pthread_t t;
15136         int status;
15137         int detach = PTHREAD_CREATE_DETACHED;
15138
15139 #if HAVE_PTHREADS > 4
15140         /* Final pthreads */
15141         pthread_attr_t attr;
15142
15143         status = pthread_attr_init(&attr);
15144         if( status ) return status;
15145
15146 #if HAVE_PTHREADS < 7
15147         status = pthread_attr_setdetachstate(&attr, &detach);
15148         if( status < 0 ) status = errno;
15149 #else
15150         status = pthread_attr_setdetachstate(&attr, detach);
15151 #endif
15152         if( status ) return status;
15153         status = pthread_create( &t, &attr, task, NULL );
15154 #if HAVE_PTHREADS < 7
15155         if( status < 0 ) status = errno;
15156 #endif
15157         if( status ) return status;
15158 #else
15159         /* Draft 4 pthreads */
15160         status = pthread_create( &t, pthread_attr_default, task, NULL );
15161         if( status ) return errno;
15162
15163         /* give thread a chance to complete */
15164         /* it should remain joinable and hence detachable */
15165         sleep( 1 );
15166
15167         status = pthread_detach( &t );
15168         if( status ) return errno;
15169 #endif
15170
15171 #ifdef HAVE_LINUX_THREADS
15172         pthread_kill_other_threads_np();
15173 #endif
15174
15175         return 0;
15176
15177 }
15178
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15181 then
15182   ol_cv_pthread_lib_lpthreads=yes
15183 else
15184   echo "configure: failed program was:" >&5
15185   cat conftest.$ac_ext >&5
15186   rm -fr conftest*
15187   ol_cv_pthread_lib_lpthreads=no
15188 fi
15189 rm -fr conftest*
15190 fi
15191
15192
15193                 # restore the LIBS
15194                 LIBS="$ol_LIBS"
15195         
15196 fi
15197
15198 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15199
15200         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15201                 ol_link_pthreads="-lpthreads"
15202                 ol_link_threads=posix
15203         fi
15204 fi
15205
15206
15207                 if test $ol_link_threads != no ; then
15208                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15209
15210                                                 save_CPPFLAGS="$CPPFLAGS"
15211                         save_LIBS="$LIBS"
15212                         LIBS="$LTHREAD_LIBS $LIBS"
15213
15214                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15215 do
15216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15217 echo "configure:15218: checking for $ac_func" >&5
15218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15219   echo $ac_n "(cached) $ac_c" 1>&6
15220 else
15221   cat > conftest.$ac_ext <<EOF
15222 #line 15223 "configure"
15223 #include "confdefs.h"
15224 /* System header to define __stub macros and hopefully few prototypes,
15225     which can conflict with char $ac_func(); below.  */
15226 #include <assert.h>
15227 /* Override any gcc2 internal prototype to avoid an error.  */
15228 /* We use char because int might match the return type of a gcc2
15229     builtin and then its argument prototype would still apply.  */
15230 char $ac_func();
15231 char (*f)();
15232
15233 int main() {
15234
15235 /* The GNU C library defines this for functions which it implements
15236     to always fail with ENOSYS.  Some functions are actually named
15237     something starting with __ and the normal name is an alias.  */
15238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15239 choke me
15240 #else
15241 f = $ac_func;
15242 #endif
15243
15244 ; return 0; }
15245 EOF
15246 if { (eval echo configure:15247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15247   rm -rf conftest*
15248   eval "ac_cv_func_$ac_func=yes"
15249 else
15250   echo "configure: failed program was:" >&5
15251   cat conftest.$ac_ext >&5
15252   rm -rf conftest*
15253   eval "ac_cv_func_$ac_func=no"
15254 fi
15255 rm -f conftest*
15256 fi
15257
15258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15259   echo "$ac_t""yes" 1>&6
15260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15261   cat >> confdefs.h <<EOF
15262 #define $ac_tr_func 1
15263 EOF
15264  
15265 else
15266   echo "$ac_t""no" 1>&6
15267 fi
15268 done
15269
15270
15271                         if test $ac_cv_func_sched_yield = no -a \
15272                                 $ac_cv_func_pthread_yield = no -a \
15273                                 $ac_cv_func_thr_yield = no ; then
15274                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15275 echo "configure:15276: checking for sched_yield in -lrt" >&5
15276 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   ac_save_LIBS="$LIBS"
15281 LIBS="-lrt  $LIBS"
15282 cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285 /* Override any gcc2 internal prototype to avoid an error.  */
15286 /* We use char because int might match the return type of a gcc2
15287     builtin and then its argument prototype would still apply.  */
15288 char sched_yield();
15289
15290 int main() {
15291 sched_yield()
15292 ; return 0; }
15293 EOF
15294 if { (eval echo configure:15295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15295   rm -rf conftest*
15296   eval "ac_cv_lib_$ac_lib_var=yes"
15297 else
15298   echo "configure: failed program was:" >&5
15299   cat conftest.$ac_ext >&5
15300   rm -rf conftest*
15301   eval "ac_cv_lib_$ac_lib_var=no"
15302 fi
15303 rm -f conftest*
15304 LIBS="$ac_save_LIBS"
15305
15306 fi
15307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15308   echo "$ac_t""yes" 1>&6
15309   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15310                                         cat >> confdefs.h <<\EOF
15311 #define HAVE_SCHED_YIELD 1
15312 EOF
15313
15314                                         ac_cv_func_sched_yield=yes
15315 else
15316   echo "$ac_t""no" 1>&6
15317 ac_cv_func_sched_yield=no
15318 fi
15319
15320                         fi
15321                         if test $ac_cv_func_sched_yield = no -a \
15322                                 $ac_cv_func_pthread_yield = no -a \
15323                                 "$ac_cv_func_thr_yield" = no ; then
15324                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15325                         fi
15326
15327                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15328 do
15329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15330 echo "configure:15331: checking for $ac_func" >&5
15331 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15332   echo $ac_n "(cached) $ac_c" 1>&6
15333 else
15334   cat > conftest.$ac_ext <<EOF
15335 #line 15336 "configure"
15336 #include "confdefs.h"
15337 /* System header to define __stub macros and hopefully few prototypes,
15338     which can conflict with char $ac_func(); below.  */
15339 #include <assert.h>
15340 /* Override any gcc2 internal prototype to avoid an error.  */
15341 /* We use char because int might match the return type of a gcc2
15342     builtin and then its argument prototype would still apply.  */
15343 char $ac_func();
15344 char (*f)();
15345
15346 int main() {
15347
15348 /* The GNU C library defines this for functions which it implements
15349     to always fail with ENOSYS.  Some functions are actually named
15350     something starting with __ and the normal name is an alias.  */
15351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15352 choke me
15353 #else
15354 f = $ac_func;
15355 #endif
15356
15357 ; return 0; }
15358 EOF
15359 if { (eval echo configure:15360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15360   rm -rf conftest*
15361   eval "ac_cv_func_$ac_func=yes"
15362 else
15363   echo "configure: failed program was:" >&5
15364   cat conftest.$ac_ext >&5
15365   rm -rf conftest*
15366   eval "ac_cv_func_$ac_func=no"
15367 fi
15368 rm -f conftest*
15369 fi
15370
15371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15372   echo "$ac_t""yes" 1>&6
15373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15374   cat >> confdefs.h <<EOF
15375 #define $ac_tr_func 1
15376 EOF
15377  
15378 else
15379   echo "$ac_t""no" 1>&6
15380 fi
15381 done
15382
15383
15384                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15385 echo "configure:15386: checking for pthread_detach with <pthread.h>" >&5
15386 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15387   echo $ac_n "(cached) $ac_c" 1>&6
15388 else
15389   
15390                                                                 cat > conftest.$ac_ext <<EOF
15391 #line 15392 "configure"
15392 #include "confdefs.h"
15393
15394 #include <pthread.h>
15395 #ifndef NULL
15396 #define NULL (void*)0
15397 #endif
15398
15399 int main() {
15400 pthread_detach(NULL);
15401 ; return 0; }
15402 EOF
15403 if { (eval echo configure:15404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15404   rm -rf conftest*
15405   ol_cv_func_pthread_detach=yes
15406 else
15407   echo "configure: failed program was:" >&5
15408   cat conftest.$ac_ext >&5
15409   rm -rf conftest*
15410   ol_cv_func_pthread_detach=no
15411 fi
15412 rm -f conftest*
15413                         
15414 fi
15415
15416 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15417
15418                         if test $ol_cv_func_pthread_detach = no ; then
15419                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15420                         fi
15421
15422                         cat >> confdefs.h <<\EOF
15423 #define HAVE_PTHREAD_DETACH 1
15424 EOF
15425
15426
15427                                                 for ac_func in \
15428                                 pthread_setconcurrency \
15429                                 pthread_getconcurrency \
15430                                 thr_setconcurrency \
15431                                 thr_getconcurrency \
15432                         
15433 do
15434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15435 echo "configure:15436: checking for $ac_func" >&5
15436 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15437   echo $ac_n "(cached) $ac_c" 1>&6
15438 else
15439   cat > conftest.$ac_ext <<EOF
15440 #line 15441 "configure"
15441 #include "confdefs.h"
15442 /* System header to define __stub macros and hopefully few prototypes,
15443     which can conflict with char $ac_func(); below.  */
15444 #include <assert.h>
15445 /* Override any gcc2 internal prototype to avoid an error.  */
15446 /* We use char because int might match the return type of a gcc2
15447     builtin and then its argument prototype would still apply.  */
15448 char $ac_func();
15449 char (*f)();
15450
15451 int main() {
15452
15453 /* The GNU C library defines this for functions which it implements
15454     to always fail with ENOSYS.  Some functions are actually named
15455     something starting with __ and the normal name is an alias.  */
15456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15457 choke me
15458 #else
15459 f = $ac_func;
15460 #endif
15461
15462 ; return 0; }
15463 EOF
15464 if { (eval echo configure:15465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15465   rm -rf conftest*
15466   eval "ac_cv_func_$ac_func=yes"
15467 else
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   eval "ac_cv_func_$ac_func=no"
15472 fi
15473 rm -f conftest*
15474 fi
15475
15476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15479   cat >> confdefs.h <<EOF
15480 #define $ac_tr_func 1
15481 EOF
15482  
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486 done
15487
15488
15489                         
15490         for ac_func in pthread_kill_other_threads_np
15491 do
15492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15493 echo "configure:15494: checking for $ac_func" >&5
15494 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15495   echo $ac_n "(cached) $ac_c" 1>&6
15496 else
15497   cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500 /* System header to define __stub macros and hopefully few prototypes,
15501     which can conflict with char $ac_func(); below.  */
15502 #include <assert.h>
15503 /* Override any gcc2 internal prototype to avoid an error.  */
15504 /* We use char because int might match the return type of a gcc2
15505     builtin and then its argument prototype would still apply.  */
15506 char $ac_func();
15507 char (*f)();
15508
15509 int main() {
15510
15511 /* The GNU C library defines this for functions which it implements
15512     to always fail with ENOSYS.  Some functions are actually named
15513     something starting with __ and the normal name is an alias.  */
15514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15515 choke me
15516 #else
15517 f = $ac_func;
15518 #endif
15519
15520 ; return 0; }
15521 EOF
15522 if { (eval echo configure:15523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15523   rm -rf conftest*
15524   eval "ac_cv_func_$ac_func=yes"
15525 else
15526   echo "configure: failed program was:" >&5
15527   cat conftest.$ac_ext >&5
15528   rm -rf conftest*
15529   eval "ac_cv_func_$ac_func=no"
15530 fi
15531 rm -f conftest*
15532 fi
15533
15534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15535   echo "$ac_t""yes" 1>&6
15536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15537   cat >> confdefs.h <<EOF
15538 #define $ac_tr_func 1
15539 EOF
15540  
15541 else
15542   echo "$ac_t""no" 1>&6
15543 fi
15544 done
15545
15546         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15547 echo "configure:15548: checking for LinuxThreads implementation" >&5
15548 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15549   echo $ac_n "(cached) $ac_c" 1>&6
15550 else
15551   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15552 fi
15553
15554 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15555
15556                         
15557         
15558         
15559         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15560 echo "configure:15561: checking for LinuxThreads consistency" >&5
15561 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   
15565                 if test $ol_cv_header_linux_threads = yes -a \
15566                         $ol_cv_sys_linux_threads = yes; then
15567                         ol_cv_linux_threads=yes
15568                 elif test $ol_cv_header_linux_threads = no -a \
15569                         $ol_cv_sys_linux_threads = no; then
15570                         ol_cv_linux_threads=no
15571                 else
15572                         ol_cv_linux_threads=error
15573                 fi
15574         
15575 fi
15576
15577 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15578
15579
15580                         if test $ol_cv_linux_threads = error; then
15581                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15582                         fi
15583
15584                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15585 echo "configure:15586: checking if pthread_create() works" >&5
15586 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15587   echo $ac_n "(cached) $ac_c" 1>&6
15588 else
15589   
15590                         if test "$cross_compiling" = yes; then
15591                                 ol_cv_pthread_create_works=yes
15592 else
15593   cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 /* pthread test headers */
15597 #include <pthread.h>
15598 #if HAVE_PTHREADS < 7
15599 #include <errno.h>
15600 #endif
15601 #ifndef NULL
15602 #define NULL (void*)0
15603 #endif
15604
15605 static void *task(p)
15606         void *p;
15607 {
15608         return (void *) (p == NULL);
15609 }
15610
15611
15612 int main(argc, argv)
15613         int argc;
15614         char **argv;
15615 {
15616
15617         /* pthread test function */
15618 #ifndef PTHREAD_CREATE_DETACHED
15619 #define PTHREAD_CREATE_DETACHED 1
15620 #endif
15621         pthread_t t;
15622         int status;
15623         int detach = PTHREAD_CREATE_DETACHED;
15624
15625 #if HAVE_PTHREADS > 4
15626         /* Final pthreads */
15627         pthread_attr_t attr;
15628
15629         status = pthread_attr_init(&attr);
15630         if( status ) return status;
15631
15632 #if HAVE_PTHREADS < 7
15633         status = pthread_attr_setdetachstate(&attr, &detach);
15634         if( status < 0 ) status = errno;
15635 #else
15636         status = pthread_attr_setdetachstate(&attr, detach);
15637 #endif
15638         if( status ) return status;
15639         status = pthread_create( &t, &attr, task, NULL );
15640 #if HAVE_PTHREADS < 7
15641         if( status < 0 ) status = errno;
15642 #endif
15643         if( status ) return status;
15644 #else
15645         /* Draft 4 pthreads */
15646         status = pthread_create( &t, pthread_attr_default, task, NULL );
15647         if( status ) return errno;
15648
15649         /* give thread a chance to complete */
15650         /* it should remain joinable and hence detachable */
15651         sleep( 1 );
15652
15653         status = pthread_detach( &t );
15654         if( status ) return errno;
15655 #endif
15656
15657 #ifdef HAVE_LINUX_THREADS
15658         pthread_kill_other_threads_np();
15659 #endif
15660
15661         return 0;
15662
15663 }
15664
15665 EOF
15666 if { (eval echo configure:15667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15667 then
15668   ol_cv_pthread_create_works=yes
15669 else
15670   echo "configure: failed program was:" >&5
15671   cat conftest.$ac_ext >&5
15672   rm -fr conftest*
15673   ol_cv_pthread_create_works=no
15674 fi
15675 rm -fr conftest*
15676 fi
15677
15678 fi
15679
15680 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15681
15682                         if test $ol_cv_pthread_create_works = no ; then
15683                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15684                         fi
15685
15686                                                 if test $ol_with_yielding_select = auto ; then
15687                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15688 echo "configure:15689: checking if select yields when using pthreads" >&5
15689 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15690   echo $ac_n "(cached) $ac_c" 1>&6
15691 else
15692   
15693                                 if test "$cross_compiling" = yes; then
15694   ol_cv_pthread_select_yields=cross
15695 else
15696   cat > conftest.$ac_ext <<EOF
15697 #line 15698 "configure"
15698 #include "confdefs.h"
15699
15700 #include <sys/types.h>
15701 #include <sys/time.h>
15702 #include <unistd.h>
15703 #include <pthread.h>
15704 #ifndef NULL
15705 #define NULL (void*) 0
15706 #endif
15707
15708 static int fildes[2];
15709
15710 static void *task(p)
15711         void *p;
15712 {
15713         int i;
15714         struct timeval tv;
15715
15716         fd_set rfds;
15717
15718         tv.tv_sec=10;
15719         tv.tv_usec=0;
15720
15721         FD_ZERO(&rfds);
15722         FD_SET(fildes[0], &rfds);
15723
15724         /* we're not interested in any fds */
15725         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15726
15727         if(i < 0) {
15728                 perror("select");
15729                 exit(10);
15730         }
15731
15732         exit(0); /* if we exit here, the select blocked the whole process */
15733 }
15734
15735 int main(argc, argv)
15736         int argc;
15737         char **argv;
15738 {
15739         pthread_t t;
15740
15741         /* create a pipe to select */
15742         if(pipe(&fildes[0])) {
15743                 perror("select");
15744                 exit(1);
15745         }
15746
15747 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15748         (void) pthread_setconcurrency(2);
15749 #else
15750 #ifdef HAVE_THR_SETCONCURRENCY
15751         /* Set Solaris LWP concurrency to 2 */
15752         thr_setconcurrency(2);
15753 #endif
15754 #endif
15755
15756 #if HAVE_PTHREADS < 6
15757         pthread_create(&t, pthread_attr_default, task, NULL);
15758 #else
15759         pthread_create(&t, NULL, task, NULL);
15760 #endif
15761
15762         /* make sure task runs first */
15763 #if HAVE_THR_YIELD
15764         thr_yield();
15765 #elif defined( HAVE_SCHED_YIELD )
15766         sched_yield();
15767 #elif defined( HAVE_PTHREAD_YIELD )
15768         pthread_yield();
15769 #endif
15770
15771         exit(2);
15772 }
15773 EOF
15774 if { (eval echo configure:15775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15775 then
15776   ol_cv_pthread_select_yields=no
15777 else
15778   echo "configure: failed program was:" >&5
15779   cat conftest.$ac_ext >&5
15780   rm -fr conftest*
15781   ol_cv_pthread_select_yields=yes
15782 fi
15783 rm -fr conftest*
15784 fi
15785
15786 fi
15787
15788 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15789
15790                                 if test $ol_cv_pthread_select_yields = cross ; then
15791                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15792                                 fi
15793
15794                                 if test $ol_cv_pthread_select_yields = yes ; then
15795                                         ol_with_yielding_select=yes
15796                                 fi
15797                         fi
15798
15799                                                 CPPFLAGS="$save_CPPFLAGS"
15800                         LIBS="$save_LIBS"
15801                 else
15802                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15803                 fi
15804         fi
15805
15806         if test $ol_with_threads = posix ; then
15807                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15808         fi
15809 fi
15810
15811 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15812         -o $ol_with_threads = mach ; then
15813
15814                 for ac_hdr in mach/cthreads.h cthreads.h
15815 do
15816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15818 echo "configure:15819: checking for $ac_hdr" >&5
15819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15820   echo $ac_n "(cached) $ac_c" 1>&6
15821 else
15822   cat > conftest.$ac_ext <<EOF
15823 #line 15824 "configure"
15824 #include "confdefs.h"
15825 #include <$ac_hdr>
15826 EOF
15827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15828 { (eval echo configure:15829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15830 if test -z "$ac_err"; then
15831   rm -rf conftest*
15832   eval "ac_cv_header_$ac_safe=yes"
15833 else
15834   echo "$ac_err" >&5
15835   echo "configure: failed program was:" >&5
15836   cat conftest.$ac_ext >&5
15837   rm -rf conftest*
15838   eval "ac_cv_header_$ac_safe=no"
15839 fi
15840 rm -f conftest*
15841 fi
15842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15843   echo "$ac_t""yes" 1>&6
15844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15845   cat >> confdefs.h <<EOF
15846 #define $ac_tr_hdr 1
15847 EOF
15848  
15849 else
15850   echo "$ac_t""no" 1>&6
15851 fi
15852 done
15853
15854         if test $ac_cv_header_mach_cthreads_h = yes ; then
15855                 ol_with_threads=found
15856
15857                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15858 echo "configure:15859: checking for cthread_fork" >&5
15859 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15860   echo $ac_n "(cached) $ac_c" 1>&6
15861 else
15862   cat > conftest.$ac_ext <<EOF
15863 #line 15864 "configure"
15864 #include "confdefs.h"
15865 /* System header to define __stub macros and hopefully few prototypes,
15866     which can conflict with char cthread_fork(); below.  */
15867 #include <assert.h>
15868 /* Override any gcc2 internal prototype to avoid an error.  */
15869 /* We use char because int might match the return type of a gcc2
15870     builtin and then its argument prototype would still apply.  */
15871 char cthread_fork();
15872 char (*f)();
15873
15874 int main() {
15875
15876 /* The GNU C library defines this for functions which it implements
15877     to always fail with ENOSYS.  Some functions are actually named
15878     something starting with __ and the normal name is an alias.  */
15879 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15880 choke me
15881 #else
15882 f = cthread_fork;
15883 #endif
15884
15885 ; return 0; }
15886 EOF
15887 if { (eval echo configure:15888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15888   rm -rf conftest*
15889   eval "ac_cv_func_cthread_fork=yes"
15890 else
15891   echo "configure: failed program was:" >&5
15892   cat conftest.$ac_ext >&5
15893   rm -rf conftest*
15894   eval "ac_cv_func_cthread_fork=no"
15895 fi
15896 rm -f conftest*
15897 fi
15898
15899 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15900   echo "$ac_t""yes" 1>&6
15901   ol_link_threads=yes
15902 else
15903   echo "$ac_t""no" 1>&6
15904 fi
15905
15906
15907                 if test $ol_link_threads = no ; then
15908                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15909 echo "configure:15910: checking for cthread_fork with -all_load" >&5
15910 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15911   echo $ac_n "(cached) $ac_c" 1>&6
15912 else
15913   
15914                                                                 save_LIBS="$LIBS"
15915                                 LIBS="-all_load $LIBS"
15916                                 cat > conftest.$ac_ext <<EOF
15917 #line 15918 "configure"
15918 #include "confdefs.h"
15919 #include <mach/cthreads.h>
15920 int main() {
15921
15922                                         cthread_fork((void *)0, (void *)0);
15923                                         
15924 ; return 0; }
15925 EOF
15926 if { (eval echo configure:15927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15927   rm -rf conftest*
15928   ol_cv_cthread_all_load=yes
15929 else
15930   echo "configure: failed program was:" >&5
15931   cat conftest.$ac_ext >&5
15932   rm -rf conftest*
15933   ol_cv_cthread_all_load=no
15934 fi
15935 rm -f conftest*
15936                                                                 LIBS="$save_LIBS"
15937                         
15938 fi
15939
15940 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15941
15942                         if test $ol_cv_cthread_all_load = yes ; then
15943                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15944                                 ol_link_threads=mach
15945                                 ol_with_threads=found
15946                         fi
15947                 fi
15948
15949         elif test $ac_cv_header_cthreads_h = yes ; then
15950                                 
15951                 ol_with_threads=found
15952  
15953                                 save_LIBS="$LIBS"
15954                 LIBS="$LIBS -lthreads"
15955                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15956 echo "configure:15957: checking for cthread_fork" >&5
15957 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15958   echo $ac_n "(cached) $ac_c" 1>&6
15959 else
15960   cat > conftest.$ac_ext <<EOF
15961 #line 15962 "configure"
15962 #include "confdefs.h"
15963 /* System header to define __stub macros and hopefully few prototypes,
15964     which can conflict with char cthread_fork(); below.  */
15965 #include <assert.h>
15966 /* Override any gcc2 internal prototype to avoid an error.  */
15967 /* We use char because int might match the return type of a gcc2
15968     builtin and then its argument prototype would still apply.  */
15969 char cthread_fork();
15970 char (*f)();
15971
15972 int main() {
15973
15974 /* The GNU C library defines this for functions which it implements
15975     to always fail with ENOSYS.  Some functions are actually named
15976     something starting with __ and the normal name is an alias.  */
15977 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15978 choke me
15979 #else
15980 f = cthread_fork;
15981 #endif
15982
15983 ; return 0; }
15984 EOF
15985 if { (eval echo configure:15986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15986   rm -rf conftest*
15987   eval "ac_cv_func_cthread_fork=yes"
15988 else
15989   echo "configure: failed program was:" >&5
15990   cat conftest.$ac_ext >&5
15991   rm -rf conftest*
15992   eval "ac_cv_func_cthread_fork=no"
15993 fi
15994 rm -f conftest*
15995 fi
15996
15997 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15998   echo "$ac_t""yes" 1>&6
15999   ol_link_threads=yes
16000 else
16001   echo "$ac_t""no" 1>&6
16002 fi
16003
16004                 LIBS="$save_LIBS"
16005
16006                 if test $ol_link_threads = yes ; then
16007                         LTHREAD_LIBS="-lthreads"
16008                         ol_link_threads=mach
16009                         ol_with_threads=found
16010                 else
16011                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16012                 fi
16013
16014         elif test $ol_with_threads = mach ; then
16015                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16016         fi
16017
16018         if test $ol_link_threads = mach ; then
16019                 cat >> confdefs.h <<\EOF
16020 #define HAVE_MACH_CTHREADS 1
16021 EOF
16022
16023         elif test $ol_with_threads = found ; then
16024                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16025         fi
16026 fi
16027
16028 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16029         -o $ol_with_threads = pth ; then
16030
16031         for ac_hdr in pth.h
16032 do
16033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16035 echo "configure:16036: checking for $ac_hdr" >&5
16036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <$ac_hdr>
16043 EOF
16044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16045 { (eval echo configure:16046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16047 if test -z "$ac_err"; then
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=yes"
16050 else
16051   echo "$ac_err" >&5
16052   echo "configure: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   rm -rf conftest*
16055   eval "ac_cv_header_$ac_safe=no"
16056 fi
16057 rm -f conftest*
16058 fi
16059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16060   echo "$ac_t""yes" 1>&6
16061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16062   cat >> confdefs.h <<EOF
16063 #define $ac_tr_hdr 1
16064 EOF
16065  
16066 else
16067   echo "$ac_t""no" 1>&6
16068 fi
16069 done
16070
16071
16072         if test $ac_cv_header_pth_h = yes ; then
16073                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16074 echo "configure:16075: checking for pth_version in -lpth" >&5
16075 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16077   echo $ac_n "(cached) $ac_c" 1>&6
16078 else
16079   ac_save_LIBS="$LIBS"
16080 LIBS="-lpth  $LIBS"
16081 cat > conftest.$ac_ext <<EOF
16082 #line 16083 "configure"
16083 #include "confdefs.h"
16084 /* Override any gcc2 internal prototype to avoid an error.  */
16085 /* We use char because int might match the return type of a gcc2
16086     builtin and then its argument prototype would still apply.  */
16087 char pth_version();
16088
16089 int main() {
16090 pth_version()
16091 ; return 0; }
16092 EOF
16093 if { (eval echo configure:16094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16094   rm -rf conftest*
16095   eval "ac_cv_lib_$ac_lib_var=yes"
16096 else
16097   echo "configure: failed program was:" >&5
16098   cat conftest.$ac_ext >&5
16099   rm -rf conftest*
16100   eval "ac_cv_lib_$ac_lib_var=no"
16101 fi
16102 rm -f conftest*
16103 LIBS="$ac_save_LIBS"
16104
16105 fi
16106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16107   echo "$ac_t""yes" 1>&6
16108   have_pth=yes
16109 else
16110   echo "$ac_t""no" 1>&6
16111 have_pth=no
16112 fi
16113
16114
16115                 if test $have_pth = yes ; then
16116                         cat >> confdefs.h <<\EOF
16117 #define HAVE_GNU_PTH 1
16118 EOF
16119
16120                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16121                         ol_link_threads=pth
16122                         ol_with_threads=found
16123
16124                         if test $ol_with_yielding_select = auto ; then
16125                                 ol_with_yielding_select=yes
16126                         fi
16127                 fi
16128         fi
16129 fi
16130
16131 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16132         -o $ol_with_threads = lwp ; then
16133
16134                 for ac_hdr in thread.h synch.h
16135 do
16136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16138 echo "configure:16139: checking for $ac_hdr" >&5
16139 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16140   echo $ac_n "(cached) $ac_c" 1>&6
16141 else
16142   cat > conftest.$ac_ext <<EOF
16143 #line 16144 "configure"
16144 #include "confdefs.h"
16145 #include <$ac_hdr>
16146 EOF
16147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16148 { (eval echo configure:16149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16150 if test -z "$ac_err"; then
16151   rm -rf conftest*
16152   eval "ac_cv_header_$ac_safe=yes"
16153 else
16154   echo "$ac_err" >&5
16155   echo "configure: failed program was:" >&5
16156   cat conftest.$ac_ext >&5
16157   rm -rf conftest*
16158   eval "ac_cv_header_$ac_safe=no"
16159 fi
16160 rm -f conftest*
16161 fi
16162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16163   echo "$ac_t""yes" 1>&6
16164     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16165   cat >> confdefs.h <<EOF
16166 #define $ac_tr_hdr 1
16167 EOF
16168  
16169 else
16170   echo "$ac_t""no" 1>&6
16171 fi
16172 done
16173
16174         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16175                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16176 echo "configure:16177: checking for thr_create in -lthread" >&5
16177 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16179   echo $ac_n "(cached) $ac_c" 1>&6
16180 else
16181   ac_save_LIBS="$LIBS"
16182 LIBS="-lthread  $LIBS"
16183 cat > conftest.$ac_ext <<EOF
16184 #line 16185 "configure"
16185 #include "confdefs.h"
16186 /* Override any gcc2 internal prototype to avoid an error.  */
16187 /* We use char because int might match the return type of a gcc2
16188     builtin and then its argument prototype would still apply.  */
16189 char thr_create();
16190
16191 int main() {
16192 thr_create()
16193 ; return 0; }
16194 EOF
16195 if { (eval echo configure:16196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16196   rm -rf conftest*
16197   eval "ac_cv_lib_$ac_lib_var=yes"
16198 else
16199   echo "configure: failed program was:" >&5
16200   cat conftest.$ac_ext >&5
16201   rm -rf conftest*
16202   eval "ac_cv_lib_$ac_lib_var=no"
16203 fi
16204 rm -f conftest*
16205 LIBS="$ac_save_LIBS"
16206
16207 fi
16208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16209   echo "$ac_t""yes" 1>&6
16210   have_thr=yes
16211 else
16212   echo "$ac_t""no" 1>&6
16213 have_thr=no
16214 fi
16215
16216
16217                 if test $have_thr = yes ; then
16218                         cat >> confdefs.h <<\EOF
16219 #define HAVE_THR 1
16220 EOF
16221
16222                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16223                         ol_link_threads=thr
16224
16225                         if test $ol_with_yielding_select = auto ; then
16226                                 ol_with_yielding_select=yes
16227                         fi
16228
16229                                                 for ac_func in \
16230                                 thr_setconcurrency \
16231                                 thr_getconcurrency \
16232                         
16233 do
16234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16235 echo "configure:16236: checking for $ac_func" >&5
16236 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16237   echo $ac_n "(cached) $ac_c" 1>&6
16238 else
16239   cat > conftest.$ac_ext <<EOF
16240 #line 16241 "configure"
16241 #include "confdefs.h"
16242 /* System header to define __stub macros and hopefully few prototypes,
16243     which can conflict with char $ac_func(); below.  */
16244 #include <assert.h>
16245 /* Override any gcc2 internal prototype to avoid an error.  */
16246 /* We use char because int might match the return type of a gcc2
16247     builtin and then its argument prototype would still apply.  */
16248 char $ac_func();
16249 char (*f)();
16250
16251 int main() {
16252
16253 /* The GNU C library defines this for functions which it implements
16254     to always fail with ENOSYS.  Some functions are actually named
16255     something starting with __ and the normal name is an alias.  */
16256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16257 choke me
16258 #else
16259 f = $ac_func;
16260 #endif
16261
16262 ; return 0; }
16263 EOF
16264 if { (eval echo configure:16265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16265   rm -rf conftest*
16266   eval "ac_cv_func_$ac_func=yes"
16267 else
16268   echo "configure: failed program was:" >&5
16269   cat conftest.$ac_ext >&5
16270   rm -rf conftest*
16271   eval "ac_cv_func_$ac_func=no"
16272 fi
16273 rm -f conftest*
16274 fi
16275
16276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16277   echo "$ac_t""yes" 1>&6
16278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16279   cat >> confdefs.h <<EOF
16280 #define $ac_tr_func 1
16281 EOF
16282  
16283 else
16284   echo "$ac_t""no" 1>&6
16285 fi
16286 done
16287
16288                 fi
16289         fi
16290
16291                 for ac_hdr in lwp/lwp.h
16292 do
16293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16294 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16295 echo "configure:16296: checking for $ac_hdr" >&5
16296 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16297   echo $ac_n "(cached) $ac_c" 1>&6
16298 else
16299   cat > conftest.$ac_ext <<EOF
16300 #line 16301 "configure"
16301 #include "confdefs.h"
16302 #include <$ac_hdr>
16303 EOF
16304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16305 { (eval echo configure:16306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16307 if test -z "$ac_err"; then
16308   rm -rf conftest*
16309   eval "ac_cv_header_$ac_safe=yes"
16310 else
16311   echo "$ac_err" >&5
16312   echo "configure: failed program was:" >&5
16313   cat conftest.$ac_ext >&5
16314   rm -rf conftest*
16315   eval "ac_cv_header_$ac_safe=no"
16316 fi
16317 rm -f conftest*
16318 fi
16319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16320   echo "$ac_t""yes" 1>&6
16321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16322   cat >> confdefs.h <<EOF
16323 #define $ac_tr_hdr 1
16324 EOF
16325  
16326 else
16327   echo "$ac_t""no" 1>&6
16328 fi
16329 done
16330
16331         if test $ac_cv_header_lwp_lwp_h = yes ; then
16332                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16333 echo "configure:16334: checking for lwp_create in -llwp" >&5
16334 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16336   echo $ac_n "(cached) $ac_c" 1>&6
16337 else
16338   ac_save_LIBS="$LIBS"
16339 LIBS="-llwp  $LIBS"
16340 cat > conftest.$ac_ext <<EOF
16341 #line 16342 "configure"
16342 #include "confdefs.h"
16343 /* Override any gcc2 internal prototype to avoid an error.  */
16344 /* We use char because int might match the return type of a gcc2
16345     builtin and then its argument prototype would still apply.  */
16346 char lwp_create();
16347
16348 int main() {
16349 lwp_create()
16350 ; return 0; }
16351 EOF
16352 if { (eval echo configure:16353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16353   rm -rf conftest*
16354   eval "ac_cv_lib_$ac_lib_var=yes"
16355 else
16356   echo "configure: failed program was:" >&5
16357   cat conftest.$ac_ext >&5
16358   rm -rf conftest*
16359   eval "ac_cv_lib_$ac_lib_var=no"
16360 fi
16361 rm -f conftest*
16362 LIBS="$ac_save_LIBS"
16363
16364 fi
16365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16366   echo "$ac_t""yes" 1>&6
16367   have_lwp=yes
16368 else
16369   echo "$ac_t""no" 1>&6
16370 have_lwp=no
16371 fi
16372
16373
16374                 if test $have_lwp = yes ; then
16375                         cat >> confdefs.h <<\EOF
16376 #define HAVE_LWP 1
16377 EOF
16378
16379                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16380                         ol_link_threads=lwp
16381
16382                         if test $ol_with_yielding_select = auto ; then
16383                                 ol_with_yielding_select=no
16384                         fi
16385                 fi
16386         fi
16387 fi
16388
16389 if test $ol_with_yielding_select = yes ; then
16390         cat >> confdefs.h <<\EOF
16391 #define HAVE_YIELDING_SELECT 1
16392 EOF
16393
16394 fi
16395
16396 if test $ol_with_threads = manual ; then
16397                 ol_link_threads=yes
16398
16399         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16400
16401         for ac_hdr in pthread.h sched.h
16402 do
16403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16405 echo "configure:16406: checking for $ac_hdr" >&5
16406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16407   echo $ac_n "(cached) $ac_c" 1>&6
16408 else
16409   cat > conftest.$ac_ext <<EOF
16410 #line 16411 "configure"
16411 #include "confdefs.h"
16412 #include <$ac_hdr>
16413 EOF
16414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16415 { (eval echo configure:16416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16417 if test -z "$ac_err"; then
16418   rm -rf conftest*
16419   eval "ac_cv_header_$ac_safe=yes"
16420 else
16421   echo "$ac_err" >&5
16422   echo "configure: failed program was:" >&5
16423   cat conftest.$ac_ext >&5
16424   rm -rf conftest*
16425   eval "ac_cv_header_$ac_safe=no"
16426 fi
16427 rm -f conftest*
16428 fi
16429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16430   echo "$ac_t""yes" 1>&6
16431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16432   cat >> confdefs.h <<EOF
16433 #define $ac_tr_hdr 1
16434 EOF
16435  
16436 else
16437   echo "$ac_t""no" 1>&6
16438 fi
16439 done
16440
16441         for ac_func in sched_yield pthread_yield
16442 do
16443 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16444 echo "configure:16445: checking for $ac_func" >&5
16445 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16446   echo $ac_n "(cached) $ac_c" 1>&6
16447 else
16448   cat > conftest.$ac_ext <<EOF
16449 #line 16450 "configure"
16450 #include "confdefs.h"
16451 /* System header to define __stub macros and hopefully few prototypes,
16452     which can conflict with char $ac_func(); below.  */
16453 #include <assert.h>
16454 /* Override any gcc2 internal prototype to avoid an error.  */
16455 /* We use char because int might match the return type of a gcc2
16456     builtin and then its argument prototype would still apply.  */
16457 char $ac_func();
16458 char (*f)();
16459
16460 int main() {
16461
16462 /* The GNU C library defines this for functions which it implements
16463     to always fail with ENOSYS.  Some functions are actually named
16464     something starting with __ and the normal name is an alias.  */
16465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16466 choke me
16467 #else
16468 f = $ac_func;
16469 #endif
16470
16471 ; return 0; }
16472 EOF
16473 if { (eval echo configure:16474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16474   rm -rf conftest*
16475   eval "ac_cv_func_$ac_func=yes"
16476 else
16477   echo "configure: failed program was:" >&5
16478   cat conftest.$ac_ext >&5
16479   rm -rf conftest*
16480   eval "ac_cv_func_$ac_func=no"
16481 fi
16482 rm -f conftest*
16483 fi
16484
16485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16486   echo "$ac_t""yes" 1>&6
16487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16488   cat >> confdefs.h <<EOF
16489 #define $ac_tr_func 1
16490 EOF
16491  
16492 else
16493   echo "$ac_t""no" 1>&6
16494 fi
16495 done
16496
16497         
16498         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16499 echo "configure:16500: checking for LinuxThreads pthread.h" >&5
16500 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16501   echo $ac_n "(cached) $ac_c" 1>&6
16502 else
16503   cat > conftest.$ac_ext <<EOF
16504 #line 16505 "configure"
16505 #include "confdefs.h"
16506 #include <pthread.h>
16507 EOF
16508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16509   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16510   rm -rf conftest*
16511   ol_cv_header_linux_threads=yes
16512 else
16513   rm -rf conftest*
16514   ol_cv_header_linux_threads=no
16515 fi
16516 rm -f conftest*
16517
16518                 
16519 fi
16520
16521 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16522         if test $ol_cv_header_linux_threads = yes; then
16523                 cat >> confdefs.h <<\EOF
16524 #define HAVE_LINUX_THREADS 1
16525 EOF
16526
16527         fi
16528
16529
16530         for ac_hdr in mach/cthreads.h
16531 do
16532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16534 echo "configure:16535: checking for $ac_hdr" >&5
16535 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16536   echo $ac_n "(cached) $ac_c" 1>&6
16537 else
16538   cat > conftest.$ac_ext <<EOF
16539 #line 16540 "configure"
16540 #include "confdefs.h"
16541 #include <$ac_hdr>
16542 EOF
16543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16544 { (eval echo configure:16545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16546 if test -z "$ac_err"; then
16547   rm -rf conftest*
16548   eval "ac_cv_header_$ac_safe=yes"
16549 else
16550   echo "$ac_err" >&5
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   eval "ac_cv_header_$ac_safe=no"
16555 fi
16556 rm -f conftest*
16557 fi
16558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16559   echo "$ac_t""yes" 1>&6
16560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16561   cat >> confdefs.h <<EOF
16562 #define $ac_tr_hdr 1
16563 EOF
16564  
16565 else
16566   echo "$ac_t""no" 1>&6
16567 fi
16568 done
16569
16570         for ac_hdr in lwp/lwp.h
16571 do
16572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16574 echo "configure:16575: checking for $ac_hdr" >&5
16575 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16576   echo $ac_n "(cached) $ac_c" 1>&6
16577 else
16578   cat > conftest.$ac_ext <<EOF
16579 #line 16580 "configure"
16580 #include "confdefs.h"
16581 #include <$ac_hdr>
16582 EOF
16583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16584 { (eval echo configure:16585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16586 if test -z "$ac_err"; then
16587   rm -rf conftest*
16588   eval "ac_cv_header_$ac_safe=yes"
16589 else
16590   echo "$ac_err" >&5
16591   echo "configure: failed program was:" >&5
16592   cat conftest.$ac_ext >&5
16593   rm -rf conftest*
16594   eval "ac_cv_header_$ac_safe=no"
16595 fi
16596 rm -f conftest*
16597 fi
16598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16599   echo "$ac_t""yes" 1>&6
16600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16601   cat >> confdefs.h <<EOF
16602 #define $ac_tr_hdr 1
16603 EOF
16604  
16605 else
16606   echo "$ac_t""no" 1>&6
16607 fi
16608 done
16609
16610         for ac_hdr in thread.h synch.h
16611 do
16612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16614 echo "configure:16615: checking for $ac_hdr" >&5
16615 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16616   echo $ac_n "(cached) $ac_c" 1>&6
16617 else
16618   cat > conftest.$ac_ext <<EOF
16619 #line 16620 "configure"
16620 #include "confdefs.h"
16621 #include <$ac_hdr>
16622 EOF
16623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16624 { (eval echo configure:16625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16626 if test -z "$ac_err"; then
16627   rm -rf conftest*
16628   eval "ac_cv_header_$ac_safe=yes"
16629 else
16630   echo "$ac_err" >&5
16631   echo "configure: failed program was:" >&5
16632   cat conftest.$ac_ext >&5
16633   rm -rf conftest*
16634   eval "ac_cv_header_$ac_safe=no"
16635 fi
16636 rm -f conftest*
16637 fi
16638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16639   echo "$ac_t""yes" 1>&6
16640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16641   cat >> confdefs.h <<EOF
16642 #define $ac_tr_hdr 1
16643 EOF
16644  
16645 else
16646   echo "$ac_t""no" 1>&6
16647 fi
16648 done
16649
16650 fi
16651
16652 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16653                         cat >> confdefs.h <<\EOF
16654 #define REENTRANT 1
16655 EOF
16656
16657         cat >> confdefs.h <<\EOF
16658 #define _REENTRANT 1
16659 EOF
16660
16661         cat >> confdefs.h <<\EOF
16662 #define THREAD_SAFE 1
16663 EOF
16664
16665         cat >> confdefs.h <<\EOF
16666 #define _THREAD_SAFE 1
16667 EOF
16668
16669         cat >> confdefs.h <<\EOF
16670 #define THREADSAFE 1
16671 EOF
16672
16673         cat >> confdefs.h <<\EOF
16674 #define _THREADSAFE 1
16675 EOF
16676
16677         cat >> confdefs.h <<\EOF
16678 #define _SGI_MP_SOURCE 1
16679 EOF
16680
16681
16682                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16683 echo "configure:16684: checking for thread specific errno" >&5
16684 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16685   echo $ac_n "(cached) $ac_c" 1>&6
16686 else
16687   
16688                 cat > conftest.$ac_ext <<EOF
16689 #line 16690 "configure"
16690 #include "confdefs.h"
16691 #include <errno.h>
16692 int main() {
16693 errno = 0;
16694 ; return 0; }
16695 EOF
16696 if { (eval echo configure:16697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16697   rm -rf conftest*
16698   ol_cv_errno_thread_specific=yes
16699 else
16700   echo "configure: failed program was:" >&5
16701   cat conftest.$ac_ext >&5
16702   rm -rf conftest*
16703   ol_cv_errno_thread_specific=no
16704 fi
16705 rm -f conftest*
16706         
16707 fi
16708
16709 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16710
16711                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16712 echo "configure:16713: checking for thread specific h_errno" >&5
16713 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16714   echo $ac_n "(cached) $ac_c" 1>&6
16715 else
16716   
16717                 cat > conftest.$ac_ext <<EOF
16718 #line 16719 "configure"
16719 #include "confdefs.h"
16720 #include <netdb.h>
16721 int main() {
16722 h_errno = 0;
16723 ; return 0; }
16724 EOF
16725 if { (eval echo configure:16726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16726   rm -rf conftest*
16727   ol_cv_h_errno_thread_specific=yes
16728 else
16729   echo "configure: failed program was:" >&5
16730   cat conftest.$ac_ext >&5
16731   rm -rf conftest*
16732   ol_cv_h_errno_thread_specific=no
16733 fi
16734 rm -f conftest*
16735         
16736 fi
16737
16738 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16739
16740         if test $ol_cv_errno_thread_specific != yes \
16741                 -o $ol_cv_h_errno_thread_specific != yes ; then
16742                 LIBS="$LTHREAD_LIBS $LIBS"
16743                 LTHREAD_LIBS=""
16744         fi
16745
16746 fi  
16747
16748 if test $ol_link_threads = no ; then
16749         if test $ol_with_threads = yes ; then
16750                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16751         fi
16752
16753         if test $ol_with_threads = auto ; then
16754                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16755                 ol_with_threads=no
16756         fi
16757
16758         cat >> confdefs.h <<\EOF
16759 #define NO_THREADS 1
16760 EOF
16761
16762         LTHREAD_LIBS=""
16763 fi
16764
16765 if test $ol_link_threads != no ; then
16766         cat >> confdefs.h <<\EOF
16767 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16768 EOF
16769
16770 fi
16771
16772 for ac_func in \
16773         ctime_r                 \
16774         gethostbyname_r gethostbyaddr_r \
16775
16776 do
16777 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16778 echo "configure:16779: checking for $ac_func" >&5
16779 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16780   echo $ac_n "(cached) $ac_c" 1>&6
16781 else
16782   cat > conftest.$ac_ext <<EOF
16783 #line 16784 "configure"
16784 #include "confdefs.h"
16785 /* System header to define __stub macros and hopefully few prototypes,
16786     which can conflict with char $ac_func(); below.  */
16787 #include <assert.h>
16788 /* Override any gcc2 internal prototype to avoid an error.  */
16789 /* We use char because int might match the return type of a gcc2
16790     builtin and then its argument prototype would still apply.  */
16791 char $ac_func();
16792 char (*f)();
16793
16794 int main() {
16795
16796 /* The GNU C library defines this for functions which it implements
16797     to always fail with ENOSYS.  Some functions are actually named
16798     something starting with __ and the normal name is an alias.  */
16799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16800 choke me
16801 #else
16802 f = $ac_func;
16803 #endif
16804
16805 ; return 0; }
16806 EOF
16807 if { (eval echo configure:16808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16808   rm -rf conftest*
16809   eval "ac_cv_func_$ac_func=yes"
16810 else
16811   echo "configure: failed program was:" >&5
16812   cat conftest.$ac_ext >&5
16813   rm -rf conftest*
16814   eval "ac_cv_func_$ac_func=no"
16815 fi
16816 rm -f conftest*
16817 fi
16818
16819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16820   echo "$ac_t""yes" 1>&6
16821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16822   cat >> confdefs.h <<EOF
16823 #define $ac_tr_func 1
16824 EOF
16825  
16826 else
16827   echo "$ac_t""no" 1>&6
16828 fi
16829 done
16830
16831
16832 if test "$ac_cv_func_ctime_r" = no ; then
16833         ol_cv_func_ctime_r_nargs=0
16834 else
16835         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16836 echo "configure:16837: checking number of arguments of ctime_r" >&5
16837 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16838   echo $ac_n "(cached) $ac_c" 1>&6
16839 else
16840   cat > conftest.$ac_ext <<EOF
16841 #line 16842 "configure"
16842 #include "confdefs.h"
16843 #include <time.h>
16844 int main() {
16845 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16846 ; return 0; }
16847 EOF
16848 if { (eval echo configure:16849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16849   rm -rf conftest*
16850   ol_cv_func_ctime_r_nargs3=yes
16851 else
16852   echo "configure: failed program was:" >&5
16853   cat conftest.$ac_ext >&5
16854   rm -rf conftest*
16855   ol_cv_func_ctime_r_nargs3=no
16856 fi
16857 rm -f conftest*
16858
16859         cat > conftest.$ac_ext <<EOF
16860 #line 16861 "configure"
16861 #include "confdefs.h"
16862 #include <time.h>
16863 int main() {
16864 time_t ti; char *buffer; ctime_r(&ti,buffer);
16865 ; return 0; }
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16868   rm -rf conftest*
16869   ol_cv_func_ctime_r_nargs2=yes
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873   rm -rf conftest*
16874   ol_cv_func_ctime_r_nargs2=no
16875 fi
16876 rm -f conftest*
16877
16878         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16879                 $ol_cv_func_ctime_r_nargs2 = no ; then
16880
16881                 ol_cv_func_ctime_r_nargs=3
16882
16883         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16884                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16885
16886                 ol_cv_func_ctime_r_nargs=2
16887
16888         else
16889                 ol_cv_func_ctime_r_nargs=0
16890         fi
16891   
16892 fi
16893
16894 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16895
16896   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16897         cat >> confdefs.h <<EOF
16898 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16899 EOF
16900
16901   fi
16902
16903 fi
16904
16905 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16906         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16907 echo "configure:16908: checking number of arguments of gethostbyname_r" >&5
16908 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16909   echo $ac_n "(cached) $ac_c" 1>&6
16910 else
16911   cat > conftest.$ac_ext <<EOF
16912 #line 16913 "configure"
16913 #include "confdefs.h"
16914 #include <sys/types.h>
16915 #include <sys/socket.h>
16916 #include <netinet/in.h>
16917 #include <netdb.h>
16918 #define BUFSIZE (sizeof(struct hostent)+10)
16919 int main() {
16920 struct hostent hent; char buffer[BUFSIZE];
16921                 int bufsize=BUFSIZE;int h_errno;
16922                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16923                         buffer, bufsize, &h_errno);
16924 ; return 0; }
16925 EOF
16926 if { (eval echo configure:16927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16927   rm -rf conftest*
16928   ol_cv_func_gethostbyname_r_nargs5=yes
16929 else
16930   echo "configure: failed program was:" >&5
16931   cat conftest.$ac_ext >&5
16932   rm -rf conftest*
16933   ol_cv_func_gethostbyname_r_nargs5=no
16934 fi
16935 rm -f conftest*
16936
16937         cat > conftest.$ac_ext <<EOF
16938 #line 16939 "configure"
16939 #include "confdefs.h"
16940 #include <sys/types.h>
16941 #include <sys/socket.h>
16942 #include <netinet/in.h>
16943 #include <netdb.h>
16944 #define BUFSIZE (sizeof(struct hostent)+10)
16945 int main() {
16946 struct hostent hent;struct hostent *rhent;
16947                 char buffer[BUFSIZE];
16948                 int bufsize=BUFSIZE;int h_errno;
16949                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16950                         &rhent, &h_errno);
16951 ; return 0; }
16952 EOF
16953 if { (eval echo configure:16954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16954   rm -rf conftest*
16955   ol_cv_func_gethostbyname_r_nargs6=yes
16956 else
16957   echo "configure: failed program was:" >&5
16958   cat conftest.$ac_ext >&5
16959   rm -rf conftest*
16960   ol_cv_func_gethostbyname_r_nargs6=no
16961 fi
16962 rm -f conftest*
16963
16964         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16965                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16966
16967                 ol_cv_func_gethostbyname_r_nargs=5
16968
16969         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16970                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16971
16972                 ol_cv_func_gethostbyname_r_nargs=6
16973
16974         else
16975                 ol_cv_func_gethostbyname_r_nargs=0
16976         fi
16977   
16978 fi
16979
16980 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16981   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16982         cat >> confdefs.h <<EOF
16983 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16984 EOF
16985
16986   fi
16987
16988 else
16989         ol_cv_func_gethostbyname_r_nargs=0
16990 fi
16991  
16992 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16993         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16994 echo "configure:16995: checking number of arguments of gethostbyaddr_r" >&5
16995 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16996   echo $ac_n "(cached) $ac_c" 1>&6
16997 else
16998   cat > conftest.$ac_ext <<EOF
16999 #line 17000 "configure"
17000 #include "confdefs.h"
17001 #include <sys/types.h>
17002 #include <sys/socket.h>
17003 #include <netinet/in.h>
17004 #include <netdb.h>
17005 #define BUFSIZE (sizeof(struct hostent)+10)
17006 int main() {
17007 struct hostent hent; char buffer[BUFSIZE]; 
17008             struct in_addr add;
17009             size_t alen=sizeof(struct in_addr);
17010             int bufsize=BUFSIZE;int h_errno;
17011                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
17012                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
17013 ; return 0; }
17014 EOF
17015 if { (eval echo configure:17016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17016   rm -rf conftest*
17017   ol_cv_func_gethostbyaddr_r_nargs7=yes
17018 else
17019   echo "configure: failed program was:" >&5
17020   cat conftest.$ac_ext >&5
17021   rm -rf conftest*
17022   ol_cv_func_gethostbyaddr_r_nargs7=no
17023 fi
17024 rm -f conftest*
17025
17026         cat > conftest.$ac_ext <<EOF
17027 #line 17028 "configure"
17028 #include "confdefs.h"
17029 #include <sys/types.h>
17030 #include <sys/socket.h>
17031 #include <netinet/in.h>
17032 #include <netdb.h>
17033 #define BUFSIZE (sizeof(struct hostent)+10)
17034 int main() {
17035 struct hostent hent;
17036                 struct hostent *rhent; char buffer[BUFSIZE]; 
17037                 struct in_addr add;
17038                 size_t alen=sizeof(struct in_addr);
17039                 int bufsize=BUFSIZE;int h_errno;
17040                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
17041                         alen, AF_INET, &hent, buffer, bufsize, 
17042                         &rhent, &h_errno);
17043 ; return 0; }
17044 EOF
17045 if { (eval echo configure:17046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17046   rm -rf conftest*
17047   ol_cv_func_gethostbyaddr_r_nargs8=yes
17048 else
17049   echo "configure: failed program was:" >&5
17050   cat conftest.$ac_ext >&5
17051   rm -rf conftest*
17052   ol_cv_func_gethostbyaddr_r_nargs8=no
17053 fi
17054 rm -f conftest*
17055
17056         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
17057                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
17058
17059                 ol_cv_func_gethostbyaddr_r_nargs=7
17060
17061         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
17062                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
17063
17064                 ol_cv_func_gethostbyaddr_r_nargs=8
17065
17066         else
17067                 ol_cv_func_gethostbyaddr_r_nargs=0
17068         fi
17069   
17070 fi
17071
17072 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
17073   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
17074     cat >> confdefs.h <<EOF
17075 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
17076 EOF
17077
17078   fi
17079
17080 else
17081         ol_cv_func_gethostbyaddr_r_nargs=0
17082 fi
17083
17084 ol_link_ldbm=no 
17085
17086 if test $ol_with_ldbm_api = auto \
17087         -o $ol_with_ldbm_api = berkeley \
17088         -o $ol_with_ldbm_api = bcompat ; then
17089
17090         if test $ol_with_ldbm_api = bcompat; then \
17091                 for ac_hdr in db_185.h db.h
17092 do
17093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17095 echo "configure:17096: checking for $ac_hdr" >&5
17096 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17097   echo $ac_n "(cached) $ac_c" 1>&6
17098 else
17099   cat > conftest.$ac_ext <<EOF
17100 #line 17101 "configure"
17101 #include "confdefs.h"
17102 #include <$ac_hdr>
17103 EOF
17104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17105 { (eval echo configure:17106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17107 if test -z "$ac_err"; then
17108   rm -rf conftest*
17109   eval "ac_cv_header_$ac_safe=yes"
17110 else
17111   echo "$ac_err" >&5
17112   echo "configure: failed program was:" >&5
17113   cat conftest.$ac_ext >&5
17114   rm -rf conftest*
17115   eval "ac_cv_header_$ac_safe=no"
17116 fi
17117 rm -f conftest*
17118 fi
17119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17120   echo "$ac_t""yes" 1>&6
17121     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17122   cat >> confdefs.h <<EOF
17123 #define $ac_tr_hdr 1
17124 EOF
17125  
17126 else
17127   echo "$ac_t""no" 1>&6
17128 fi
17129 done
17130
17131 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17132         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17133 echo "configure:17134: checking if Berkeley DB header compatibility" >&5
17134 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17135   echo $ac_n "(cached) $ac_c" 1>&6
17136 else
17137   
17138                 cat > conftest.$ac_ext <<EOF
17139 #line 17140 "configure"
17140 #include "confdefs.h"
17141
17142 #if HAVE_DB_185_H
17143 #       include <db_185.h>
17144 #else
17145 #       include <db.h>
17146 #endif
17147
17148  /* this check could be improved */
17149 #ifndef DB_VERSION_MAJOR
17150 #       define DB_VERSION_MAJOR 1
17151 #endif
17152
17153 #if DB_VERSION_MAJOR == 1 
17154         __db_version_1
17155 #endif
17156
17157 EOF
17158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17159   egrep "__db_version_1" >/dev/null 2>&1; then
17160   rm -rf conftest*
17161   ol_cv_header_db1=yes
17162 else
17163   rm -rf conftest*
17164   ol_cv_header_db1=no
17165 fi
17166 rm -f conftest*
17167
17168 fi
17169
17170 echo "$ac_t""$ol_cv_header_db1" 1>&6
17171
17172         if test $ol_cv_header_db1 = yes ; then
17173                 ol_cv_lib_db=no
17174 if test $ol_cv_lib_db = no ; then
17175         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17176 echo "configure:17177: checking for Berkeley DB link (default)" >&5
17177 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17178   echo $ac_n "(cached) $ac_c" 1>&6
17179 else
17180   
17181         ol_DB_LIB=
17182         ol_LIBS=$LIBS
17183         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17184
17185         cat > conftest.$ac_ext <<EOF
17186 #line 17187 "configure"
17187 #include "confdefs.h"
17188
17189 #ifdef HAVE_DB_185_H
17190 # include <db_185.h>
17191 #else
17192 # include <db.h>
17193 #endif
17194
17195 #ifndef DB_VERSION_MAJOR
17196 # define DB_VERSION_MAJOR 1
17197 #endif
17198
17199 #ifndef NULL
17200 #define NULL ((void*)0)
17201 #endif
17202
17203 int main() {
17204
17205 #if DB_VERSION_MAJOR > 1
17206         {
17207                 char *version;
17208                 int major, minor, patch;
17209
17210                 version = db_version( &major, &minor, &patch );
17211
17212                 if( major != DB_VERSION_MAJOR ||
17213                         minor < DB_VERSION_MINOR )
17214                 {
17215                         printf("Berkeley DB version mismatch\n"
17216                                 "\theader: %s\n\tlibrary: %s\n",
17217                                 DB_VERSION_STRING, version);
17218                         return 1;
17219                 }
17220         }
17221 #endif
17222
17223 #if DB_VERSION_MAJOR > 2
17224         db_env_create( NULL, 0 );
17225 #elif DB_VERSION_MAJOR > 1
17226         db_appexit( NULL );
17227 #else
17228         (void) dbopen( NULL, 0, 0, 0, NULL);
17229 #endif
17230
17231 ; return 0; }
17232 EOF
17233 if { (eval echo configure:17234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17234   rm -rf conftest*
17235   ol_cv_db_none=yes
17236 else
17237   echo "configure: failed program was:" >&5
17238   cat conftest.$ac_ext >&5
17239   rm -rf conftest*
17240   ol_cv_db_none=no
17241 fi
17242 rm -f conftest*
17243
17244         LIBS="$ol_LIBS"
17245
17246 fi
17247
17248 echo "$ac_t""$ol_cv_db_none" 1>&6
17249
17250         if test $ol_cv_db_none = yes ; then
17251                 ol_cv_lib_db=yes
17252         fi
17253 fi
17254
17255 if test $ol_cv_lib_db = no ; then
17256         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17257 echo "configure:17258: checking for Berkeley DB link (-ldb43)" >&5
17258 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17259   echo $ac_n "(cached) $ac_c" 1>&6
17260 else
17261   
17262         ol_DB_LIB=-ldb43
17263         ol_LIBS=$LIBS
17264         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17265
17266         cat > conftest.$ac_ext <<EOF
17267 #line 17268 "configure"
17268 #include "confdefs.h"
17269
17270 #ifdef HAVE_DB_185_H
17271 # include <db_185.h>
17272 #else
17273 # include <db.h>
17274 #endif
17275
17276 #ifndef DB_VERSION_MAJOR
17277 # define DB_VERSION_MAJOR 1
17278 #endif
17279
17280 #ifndef NULL
17281 #define NULL ((void*)0)
17282 #endif
17283
17284 int main() {
17285
17286 #if DB_VERSION_MAJOR > 1
17287         {
17288                 char *version;
17289                 int major, minor, patch;
17290
17291                 version = db_version( &major, &minor, &patch );
17292
17293                 if( major != DB_VERSION_MAJOR ||
17294                         minor < DB_VERSION_MINOR )
17295                 {
17296                         printf("Berkeley DB version mismatch\n"
17297                                 "\theader: %s\n\tlibrary: %s\n",
17298                                 DB_VERSION_STRING, version);
17299                         return 1;
17300                 }
17301         }
17302 #endif
17303
17304 #if DB_VERSION_MAJOR > 2
17305         db_env_create( NULL, 0 );
17306 #elif DB_VERSION_MAJOR > 1
17307         db_appexit( NULL );
17308 #else
17309         (void) dbopen( NULL, 0, 0, 0, NULL);
17310 #endif
17311
17312 ; return 0; }
17313 EOF
17314 if { (eval echo configure:17315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17315   rm -rf conftest*
17316   ol_cv_db_db43=yes
17317 else
17318   echo "configure: failed program was:" >&5
17319   cat conftest.$ac_ext >&5
17320   rm -rf conftest*
17321   ol_cv_db_db43=no
17322 fi
17323 rm -f conftest*
17324
17325         LIBS="$ol_LIBS"
17326
17327 fi
17328
17329 echo "$ac_t""$ol_cv_db_db43" 1>&6
17330
17331         if test $ol_cv_db_db43 = yes ; then
17332                 ol_cv_lib_db=-ldb43
17333         fi
17334 fi
17335
17336 if test $ol_cv_lib_db = no ; then
17337         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17338 echo "configure:17339: checking for Berkeley DB link (-ldb-43)" >&5
17339 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17340   echo $ac_n "(cached) $ac_c" 1>&6
17341 else
17342   
17343         ol_DB_LIB=-ldb-43
17344         ol_LIBS=$LIBS
17345         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17346
17347         cat > conftest.$ac_ext <<EOF
17348 #line 17349 "configure"
17349 #include "confdefs.h"
17350
17351 #ifdef HAVE_DB_185_H
17352 # include <db_185.h>
17353 #else
17354 # include <db.h>
17355 #endif
17356
17357 #ifndef DB_VERSION_MAJOR
17358 # define DB_VERSION_MAJOR 1
17359 #endif
17360
17361 #ifndef NULL
17362 #define NULL ((void*)0)
17363 #endif
17364
17365 int main() {
17366
17367 #if DB_VERSION_MAJOR > 1
17368         {
17369                 char *version;
17370                 int major, minor, patch;
17371
17372                 version = db_version( &major, &minor, &patch );
17373
17374                 if( major != DB_VERSION_MAJOR ||
17375                         minor < DB_VERSION_MINOR )
17376                 {
17377                         printf("Berkeley DB version mismatch\n"
17378                                 "\theader: %s\n\tlibrary: %s\n",
17379                                 DB_VERSION_STRING, version);
17380                         return 1;
17381                 }
17382         }
17383 #endif
17384
17385 #if DB_VERSION_MAJOR > 2
17386         db_env_create( NULL, 0 );
17387 #elif DB_VERSION_MAJOR > 1
17388         db_appexit( NULL );
17389 #else
17390         (void) dbopen( NULL, 0, 0, 0, NULL);
17391 #endif
17392
17393 ; return 0; }
17394 EOF
17395 if { (eval echo configure:17396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17396   rm -rf conftest*
17397   ol_cv_db_db_43=yes
17398 else
17399   echo "configure: failed program was:" >&5
17400   cat conftest.$ac_ext >&5
17401   rm -rf conftest*
17402   ol_cv_db_db_43=no
17403 fi
17404 rm -f conftest*
17405
17406         LIBS="$ol_LIBS"
17407
17408 fi
17409
17410 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17411
17412         if test $ol_cv_db_db_43 = yes ; then
17413                 ol_cv_lib_db=-ldb-43
17414         fi
17415 fi
17416
17417 if test $ol_cv_lib_db = no ; then
17418         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17419 echo "configure:17420: checking for Berkeley DB link (-ldb-4.3)" >&5
17420 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17421   echo $ac_n "(cached) $ac_c" 1>&6
17422 else
17423   
17424         ol_DB_LIB=-ldb-4.3
17425         ol_LIBS=$LIBS
17426         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17427
17428         cat > conftest.$ac_ext <<EOF
17429 #line 17430 "configure"
17430 #include "confdefs.h"
17431
17432 #ifdef HAVE_DB_185_H
17433 # include <db_185.h>
17434 #else
17435 # include <db.h>
17436 #endif
17437
17438 #ifndef DB_VERSION_MAJOR
17439 # define DB_VERSION_MAJOR 1
17440 #endif
17441
17442 #ifndef NULL
17443 #define NULL ((void*)0)
17444 #endif
17445
17446 int main() {
17447
17448 #if DB_VERSION_MAJOR > 1
17449         {
17450                 char *version;
17451                 int major, minor, patch;
17452
17453                 version = db_version( &major, &minor, &patch );
17454
17455                 if( major != DB_VERSION_MAJOR ||
17456                         minor < DB_VERSION_MINOR )
17457                 {
17458                         printf("Berkeley DB version mismatch\n"
17459                                 "\theader: %s\n\tlibrary: %s\n",
17460                                 DB_VERSION_STRING, version);
17461                         return 1;
17462                 }
17463         }
17464 #endif
17465
17466 #if DB_VERSION_MAJOR > 2
17467         db_env_create( NULL, 0 );
17468 #elif DB_VERSION_MAJOR > 1
17469         db_appexit( NULL );
17470 #else
17471         (void) dbopen( NULL, 0, 0, 0, NULL);
17472 #endif
17473
17474 ; return 0; }
17475 EOF
17476 if { (eval echo configure:17477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17477   rm -rf conftest*
17478   ol_cv_db_db_4_dot_3=yes
17479 else
17480   echo "configure: failed program was:" >&5
17481   cat conftest.$ac_ext >&5
17482   rm -rf conftest*
17483   ol_cv_db_db_4_dot_3=no
17484 fi
17485 rm -f conftest*
17486
17487         LIBS="$ol_LIBS"
17488
17489 fi
17490
17491 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17492
17493         if test $ol_cv_db_db_4_dot_3 = yes ; then
17494                 ol_cv_lib_db=-ldb-4.3
17495         fi
17496 fi
17497
17498 if test $ol_cv_lib_db = no ; then
17499         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17500 echo "configure:17501: checking for Berkeley DB link (-ldb-4-3)" >&5
17501 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17502   echo $ac_n "(cached) $ac_c" 1>&6
17503 else
17504   
17505         ol_DB_LIB=-ldb-4-3
17506         ol_LIBS=$LIBS
17507         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17508
17509         cat > conftest.$ac_ext <<EOF
17510 #line 17511 "configure"
17511 #include "confdefs.h"
17512
17513 #ifdef HAVE_DB_185_H
17514 # include <db_185.h>
17515 #else
17516 # include <db.h>
17517 #endif
17518
17519 #ifndef DB_VERSION_MAJOR
17520 # define DB_VERSION_MAJOR 1
17521 #endif
17522
17523 #ifndef NULL
17524 #define NULL ((void*)0)
17525 #endif
17526
17527 int main() {
17528
17529 #if DB_VERSION_MAJOR > 1
17530         {
17531                 char *version;
17532                 int major, minor, patch;
17533
17534                 version = db_version( &major, &minor, &patch );
17535
17536                 if( major != DB_VERSION_MAJOR ||
17537                         minor < DB_VERSION_MINOR )
17538                 {
17539                         printf("Berkeley DB version mismatch\n"
17540                                 "\theader: %s\n\tlibrary: %s\n",
17541                                 DB_VERSION_STRING, version);
17542                         return 1;
17543                 }
17544         }
17545 #endif
17546
17547 #if DB_VERSION_MAJOR > 2
17548         db_env_create( NULL, 0 );
17549 #elif DB_VERSION_MAJOR > 1
17550         db_appexit( NULL );
17551 #else
17552         (void) dbopen( NULL, 0, 0, 0, NULL);
17553 #endif
17554
17555 ; return 0; }
17556 EOF
17557 if { (eval echo configure:17558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17558   rm -rf conftest*
17559   ol_cv_db_db_4_3=yes
17560 else
17561   echo "configure: failed program was:" >&5
17562   cat conftest.$ac_ext >&5
17563   rm -rf conftest*
17564   ol_cv_db_db_4_3=no
17565 fi
17566 rm -f conftest*
17567
17568         LIBS="$ol_LIBS"
17569
17570 fi
17571
17572 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17573
17574         if test $ol_cv_db_db_4_3 = yes ; then
17575                 ol_cv_lib_db=-ldb-4-3
17576         fi
17577 fi
17578
17579 if test $ol_cv_lib_db = no ; then
17580         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17581 echo "configure:17582: checking for Berkeley DB link (-ldb42)" >&5
17582 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17583   echo $ac_n "(cached) $ac_c" 1>&6
17584 else
17585   
17586         ol_DB_LIB=-ldb42
17587         ol_LIBS=$LIBS
17588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17589
17590         cat > conftest.$ac_ext <<EOF
17591 #line 17592 "configure"
17592 #include "confdefs.h"
17593
17594 #ifdef HAVE_DB_185_H
17595 # include <db_185.h>
17596 #else
17597 # include <db.h>
17598 #endif
17599
17600 #ifndef DB_VERSION_MAJOR
17601 # define DB_VERSION_MAJOR 1
17602 #endif
17603
17604 #ifndef NULL
17605 #define NULL ((void*)0)
17606 #endif
17607
17608 int main() {
17609
17610 #if DB_VERSION_MAJOR > 1
17611         {
17612                 char *version;
17613                 int major, minor, patch;
17614
17615                 version = db_version( &major, &minor, &patch );
17616
17617                 if( major != DB_VERSION_MAJOR ||
17618                         minor < DB_VERSION_MINOR )
17619                 {
17620                         printf("Berkeley DB version mismatch\n"
17621                                 "\theader: %s\n\tlibrary: %s\n",
17622                                 DB_VERSION_STRING, version);
17623                         return 1;
17624                 }
17625         }
17626 #endif
17627
17628 #if DB_VERSION_MAJOR > 2
17629         db_env_create( NULL, 0 );
17630 #elif DB_VERSION_MAJOR > 1
17631         db_appexit( NULL );
17632 #else
17633         (void) dbopen( NULL, 0, 0, 0, NULL);
17634 #endif
17635
17636 ; return 0; }
17637 EOF
17638 if { (eval echo configure:17639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17639   rm -rf conftest*
17640   ol_cv_db_db42=yes
17641 else
17642   echo "configure: failed program was:" >&5
17643   cat conftest.$ac_ext >&5
17644   rm -rf conftest*
17645   ol_cv_db_db42=no
17646 fi
17647 rm -f conftest*
17648
17649         LIBS="$ol_LIBS"
17650
17651 fi
17652
17653 echo "$ac_t""$ol_cv_db_db42" 1>&6
17654
17655         if test $ol_cv_db_db42 = yes ; then
17656                 ol_cv_lib_db=-ldb42
17657         fi
17658 fi
17659
17660 if test $ol_cv_lib_db = no ; then
17661         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17662 echo "configure:17663: checking for Berkeley DB link (-ldb-42)" >&5
17663 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17664   echo $ac_n "(cached) $ac_c" 1>&6
17665 else
17666   
17667         ol_DB_LIB=-ldb-42
17668         ol_LIBS=$LIBS
17669         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17670
17671         cat > conftest.$ac_ext <<EOF
17672 #line 17673 "configure"
17673 #include "confdefs.h"
17674
17675 #ifdef HAVE_DB_185_H
17676 # include <db_185.h>
17677 #else
17678 # include <db.h>
17679 #endif
17680
17681 #ifndef DB_VERSION_MAJOR
17682 # define DB_VERSION_MAJOR 1
17683 #endif
17684
17685 #ifndef NULL
17686 #define NULL ((void*)0)
17687 #endif
17688
17689 int main() {
17690
17691 #if DB_VERSION_MAJOR > 1
17692         {
17693                 char *version;
17694                 int major, minor, patch;
17695
17696                 version = db_version( &major, &minor, &patch );
17697
17698                 if( major != DB_VERSION_MAJOR ||
17699                         minor < DB_VERSION_MINOR )
17700                 {
17701                         printf("Berkeley DB version mismatch\n"
17702                                 "\theader: %s\n\tlibrary: %s\n",
17703                                 DB_VERSION_STRING, version);
17704                         return 1;
17705                 }
17706         }
17707 #endif
17708
17709 #if DB_VERSION_MAJOR > 2
17710         db_env_create( NULL, 0 );
17711 #elif DB_VERSION_MAJOR > 1
17712         db_appexit( NULL );
17713 #else
17714         (void) dbopen( NULL, 0, 0, 0, NULL);
17715 #endif
17716
17717 ; return 0; }
17718 EOF
17719 if { (eval echo configure:17720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17720   rm -rf conftest*
17721   ol_cv_db_db_42=yes
17722 else
17723   echo "configure: failed program was:" >&5
17724   cat conftest.$ac_ext >&5
17725   rm -rf conftest*
17726   ol_cv_db_db_42=no
17727 fi
17728 rm -f conftest*
17729
17730         LIBS="$ol_LIBS"
17731
17732 fi
17733
17734 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17735
17736         if test $ol_cv_db_db_42 = yes ; then
17737                 ol_cv_lib_db=-ldb-42
17738         fi
17739 fi
17740
17741 if test $ol_cv_lib_db = no ; then
17742         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17743 echo "configure:17744: checking for Berkeley DB link (-ldb-4.2)" >&5
17744 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17745   echo $ac_n "(cached) $ac_c" 1>&6
17746 else
17747   
17748         ol_DB_LIB=-ldb-4.2
17749         ol_LIBS=$LIBS
17750         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17751
17752         cat > conftest.$ac_ext <<EOF
17753 #line 17754 "configure"
17754 #include "confdefs.h"
17755
17756 #ifdef HAVE_DB_185_H
17757 # include <db_185.h>
17758 #else
17759 # include <db.h>
17760 #endif
17761
17762 #ifndef DB_VERSION_MAJOR
17763 # define DB_VERSION_MAJOR 1
17764 #endif
17765
17766 #ifndef NULL
17767 #define NULL ((void*)0)
17768 #endif
17769
17770 int main() {
17771
17772 #if DB_VERSION_MAJOR > 1
17773         {
17774                 char *version;
17775                 int major, minor, patch;
17776
17777                 version = db_version( &major, &minor, &patch );
17778
17779                 if( major != DB_VERSION_MAJOR ||
17780                         minor < DB_VERSION_MINOR )
17781                 {
17782                         printf("Berkeley DB version mismatch\n"
17783                                 "\theader: %s\n\tlibrary: %s\n",
17784                                 DB_VERSION_STRING, version);
17785                         return 1;
17786                 }
17787         }
17788 #endif
17789
17790 #if DB_VERSION_MAJOR > 2
17791         db_env_create( NULL, 0 );
17792 #elif DB_VERSION_MAJOR > 1
17793         db_appexit( NULL );
17794 #else
17795         (void) dbopen( NULL, 0, 0, 0, NULL);
17796 #endif
17797
17798 ; return 0; }
17799 EOF
17800 if { (eval echo configure:17801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17801   rm -rf conftest*
17802   ol_cv_db_db_4_dot_2=yes
17803 else
17804   echo "configure: failed program was:" >&5
17805   cat conftest.$ac_ext >&5
17806   rm -rf conftest*
17807   ol_cv_db_db_4_dot_2=no
17808 fi
17809 rm -f conftest*
17810
17811         LIBS="$ol_LIBS"
17812
17813 fi
17814
17815 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17816
17817         if test $ol_cv_db_db_4_dot_2 = yes ; then
17818                 ol_cv_lib_db=-ldb-4.2
17819         fi
17820 fi
17821
17822 if test $ol_cv_lib_db = no ; then
17823         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17824 echo "configure:17825: checking for Berkeley DB link (-ldb-4-2)" >&5
17825 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17826   echo $ac_n "(cached) $ac_c" 1>&6
17827 else
17828   
17829         ol_DB_LIB=-ldb-4-2
17830         ol_LIBS=$LIBS
17831         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17832
17833         cat > conftest.$ac_ext <<EOF
17834 #line 17835 "configure"
17835 #include "confdefs.h"
17836
17837 #ifdef HAVE_DB_185_H
17838 # include <db_185.h>
17839 #else
17840 # include <db.h>
17841 #endif
17842
17843 #ifndef DB_VERSION_MAJOR
17844 # define DB_VERSION_MAJOR 1
17845 #endif
17846
17847 #ifndef NULL
17848 #define NULL ((void*)0)
17849 #endif
17850
17851 int main() {
17852
17853 #if DB_VERSION_MAJOR > 1
17854         {
17855                 char *version;
17856                 int major, minor, patch;
17857
17858                 version = db_version( &major, &minor, &patch );
17859
17860                 if( major != DB_VERSION_MAJOR ||
17861                         minor < DB_VERSION_MINOR )
17862                 {
17863                         printf("Berkeley DB version mismatch\n"
17864                                 "\theader: %s\n\tlibrary: %s\n",
17865                                 DB_VERSION_STRING, version);
17866                         return 1;
17867                 }
17868         }
17869 #endif
17870
17871 #if DB_VERSION_MAJOR > 2
17872         db_env_create( NULL, 0 );
17873 #elif DB_VERSION_MAJOR > 1
17874         db_appexit( NULL );
17875 #else
17876         (void) dbopen( NULL, 0, 0, 0, NULL);
17877 #endif
17878
17879 ; return 0; }
17880 EOF
17881 if { (eval echo configure:17882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17882   rm -rf conftest*
17883   ol_cv_db_db_4_2=yes
17884 else
17885   echo "configure: failed program was:" >&5
17886   cat conftest.$ac_ext >&5
17887   rm -rf conftest*
17888   ol_cv_db_db_4_2=no
17889 fi
17890 rm -f conftest*
17891
17892         LIBS="$ol_LIBS"
17893
17894 fi
17895
17896 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17897
17898         if test $ol_cv_db_db_4_2 = yes ; then
17899                 ol_cv_lib_db=-ldb-4-2
17900         fi
17901 fi
17902
17903 if test $ol_cv_lib_db = no ; then
17904         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17905 echo "configure:17906: checking for Berkeley DB link (-ldb-4)" >&5
17906 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17907   echo $ac_n "(cached) $ac_c" 1>&6
17908 else
17909   
17910         ol_DB_LIB=-ldb-4
17911         ol_LIBS=$LIBS
17912         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17913
17914         cat > conftest.$ac_ext <<EOF
17915 #line 17916 "configure"
17916 #include "confdefs.h"
17917
17918 #ifdef HAVE_DB_185_H
17919 # include <db_185.h>
17920 #else
17921 # include <db.h>
17922 #endif
17923
17924 #ifndef DB_VERSION_MAJOR
17925 # define DB_VERSION_MAJOR 1
17926 #endif
17927
17928 #ifndef NULL
17929 #define NULL ((void*)0)
17930 #endif
17931
17932 int main() {
17933
17934 #if DB_VERSION_MAJOR > 1
17935         {
17936                 char *version;
17937                 int major, minor, patch;
17938
17939                 version = db_version( &major, &minor, &patch );
17940
17941                 if( major != DB_VERSION_MAJOR ||
17942                         minor < DB_VERSION_MINOR )
17943                 {
17944                         printf("Berkeley DB version mismatch\n"
17945                                 "\theader: %s\n\tlibrary: %s\n",
17946                                 DB_VERSION_STRING, version);
17947                         return 1;
17948                 }
17949         }
17950 #endif
17951
17952 #if DB_VERSION_MAJOR > 2
17953         db_env_create( NULL, 0 );
17954 #elif DB_VERSION_MAJOR > 1
17955         db_appexit( NULL );
17956 #else
17957         (void) dbopen( NULL, 0, 0, 0, NULL);
17958 #endif
17959
17960 ; return 0; }
17961 EOF
17962 if { (eval echo configure:17963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17963   rm -rf conftest*
17964   ol_cv_db_db_4=yes
17965 else
17966   echo "configure: failed program was:" >&5
17967   cat conftest.$ac_ext >&5
17968   rm -rf conftest*
17969   ol_cv_db_db_4=no
17970 fi
17971 rm -f conftest*
17972
17973         LIBS="$ol_LIBS"
17974
17975 fi
17976
17977 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17978
17979         if test $ol_cv_db_db_4 = yes ; then
17980                 ol_cv_lib_db=-ldb-4
17981         fi
17982 fi
17983
17984 if test $ol_cv_lib_db = no ; then
17985         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17986 echo "configure:17987: checking for Berkeley DB link (-ldb4)" >&5
17987 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17988   echo $ac_n "(cached) $ac_c" 1>&6
17989 else
17990   
17991         ol_DB_LIB=-ldb4
17992         ol_LIBS=$LIBS
17993         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17994
17995         cat > conftest.$ac_ext <<EOF
17996 #line 17997 "configure"
17997 #include "confdefs.h"
17998
17999 #ifdef HAVE_DB_185_H
18000 # include <db_185.h>
18001 #else
18002 # include <db.h>
18003 #endif
18004
18005 #ifndef DB_VERSION_MAJOR
18006 # define DB_VERSION_MAJOR 1
18007 #endif
18008
18009 #ifndef NULL
18010 #define NULL ((void*)0)
18011 #endif
18012
18013 int main() {
18014
18015 #if DB_VERSION_MAJOR > 1
18016         {
18017                 char *version;
18018                 int major, minor, patch;
18019
18020                 version = db_version( &major, &minor, &patch );
18021
18022                 if( major != DB_VERSION_MAJOR ||
18023                         minor < DB_VERSION_MINOR )
18024                 {
18025                         printf("Berkeley DB version mismatch\n"
18026                                 "\theader: %s\n\tlibrary: %s\n",
18027                                 DB_VERSION_STRING, version);
18028                         return 1;
18029                 }
18030         }
18031 #endif
18032
18033 #if DB_VERSION_MAJOR > 2
18034         db_env_create( NULL, 0 );
18035 #elif DB_VERSION_MAJOR > 1
18036         db_appexit( NULL );
18037 #else
18038         (void) dbopen( NULL, 0, 0, 0, NULL);
18039 #endif
18040
18041 ; return 0; }
18042 EOF
18043 if { (eval echo configure:18044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18044   rm -rf conftest*
18045   ol_cv_db_db4=yes
18046 else
18047   echo "configure: failed program was:" >&5
18048   cat conftest.$ac_ext >&5
18049   rm -rf conftest*
18050   ol_cv_db_db4=no
18051 fi
18052 rm -f conftest*
18053
18054         LIBS="$ol_LIBS"
18055
18056 fi
18057
18058 echo "$ac_t""$ol_cv_db_db4" 1>&6
18059
18060         if test $ol_cv_db_db4 = yes ; then
18061                 ol_cv_lib_db=-ldb4
18062         fi
18063 fi
18064
18065 if test $ol_cv_lib_db = no ; then
18066         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18067 echo "configure:18068: checking for Berkeley DB link (-ldb)" >&5
18068 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18069   echo $ac_n "(cached) $ac_c" 1>&6
18070 else
18071   
18072         ol_DB_LIB=-ldb
18073         ol_LIBS=$LIBS
18074         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18075
18076         cat > conftest.$ac_ext <<EOF
18077 #line 18078 "configure"
18078 #include "confdefs.h"
18079
18080 #ifdef HAVE_DB_185_H
18081 # include <db_185.h>
18082 #else
18083 # include <db.h>
18084 #endif
18085
18086 #ifndef DB_VERSION_MAJOR
18087 # define DB_VERSION_MAJOR 1
18088 #endif
18089
18090 #ifndef NULL
18091 #define NULL ((void*)0)
18092 #endif
18093
18094 int main() {
18095
18096 #if DB_VERSION_MAJOR > 1
18097         {
18098                 char *version;
18099                 int major, minor, patch;
18100
18101                 version = db_version( &major, &minor, &patch );
18102
18103                 if( major != DB_VERSION_MAJOR ||
18104                         minor < DB_VERSION_MINOR )
18105                 {
18106                         printf("Berkeley DB version mismatch\n"
18107                                 "\theader: %s\n\tlibrary: %s\n",
18108                                 DB_VERSION_STRING, version);
18109                         return 1;
18110                 }
18111         }
18112 #endif
18113
18114 #if DB_VERSION_MAJOR > 2
18115         db_env_create( NULL, 0 );
18116 #elif DB_VERSION_MAJOR > 1
18117         db_appexit( NULL );
18118 #else
18119         (void) dbopen( NULL, 0, 0, 0, NULL);
18120 #endif
18121
18122 ; return 0; }
18123 EOF
18124 if { (eval echo configure:18125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18125   rm -rf conftest*
18126   ol_cv_db_db=yes
18127 else
18128   echo "configure: failed program was:" >&5
18129   cat conftest.$ac_ext >&5
18130   rm -rf conftest*
18131   ol_cv_db_db=no
18132 fi
18133 rm -f conftest*
18134
18135         LIBS="$ol_LIBS"
18136
18137 fi
18138
18139 echo "$ac_t""$ol_cv_db_db" 1>&6
18140
18141         if test $ol_cv_db_db = yes ; then
18142                 ol_cv_lib_db=-ldb
18143         fi
18144 fi
18145
18146 if test $ol_cv_lib_db = no ; then
18147         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18148 echo "configure:18149: checking for Berkeley DB link (-ldb41)" >&5
18149 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18150   echo $ac_n "(cached) $ac_c" 1>&6
18151 else
18152   
18153         ol_DB_LIB=-ldb41
18154         ol_LIBS=$LIBS
18155         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18156
18157         cat > conftest.$ac_ext <<EOF
18158 #line 18159 "configure"
18159 #include "confdefs.h"
18160
18161 #ifdef HAVE_DB_185_H
18162 # include <db_185.h>
18163 #else
18164 # include <db.h>
18165 #endif
18166
18167 #ifndef DB_VERSION_MAJOR
18168 # define DB_VERSION_MAJOR 1
18169 #endif
18170
18171 #ifndef NULL
18172 #define NULL ((void*)0)
18173 #endif
18174
18175 int main() {
18176
18177 #if DB_VERSION_MAJOR > 1
18178         {
18179                 char *version;
18180                 int major, minor, patch;
18181
18182                 version = db_version( &major, &minor, &patch );
18183
18184                 if( major != DB_VERSION_MAJOR ||
18185                         minor < DB_VERSION_MINOR )
18186                 {
18187                         printf("Berkeley DB version mismatch\n"
18188                                 "\theader: %s\n\tlibrary: %s\n",
18189                                 DB_VERSION_STRING, version);
18190                         return 1;
18191                 }
18192         }
18193 #endif
18194
18195 #if DB_VERSION_MAJOR > 2
18196         db_env_create( NULL, 0 );
18197 #elif DB_VERSION_MAJOR > 1
18198         db_appexit( NULL );
18199 #else
18200         (void) dbopen( NULL, 0, 0, 0, NULL);
18201 #endif
18202
18203 ; return 0; }
18204 EOF
18205 if { (eval echo configure:18206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18206   rm -rf conftest*
18207   ol_cv_db_db41=yes
18208 else
18209   echo "configure: failed program was:" >&5
18210   cat conftest.$ac_ext >&5
18211   rm -rf conftest*
18212   ol_cv_db_db41=no
18213 fi
18214 rm -f conftest*
18215
18216         LIBS="$ol_LIBS"
18217
18218 fi
18219
18220 echo "$ac_t""$ol_cv_db_db41" 1>&6
18221
18222         if test $ol_cv_db_db41 = yes ; then
18223                 ol_cv_lib_db=-ldb41
18224         fi
18225 fi
18226
18227 if test $ol_cv_lib_db = no ; then
18228         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18229 echo "configure:18230: checking for Berkeley DB link (-ldb-41)" >&5
18230 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18231   echo $ac_n "(cached) $ac_c" 1>&6
18232 else
18233   
18234         ol_DB_LIB=-ldb-41
18235         ol_LIBS=$LIBS
18236         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18237
18238         cat > conftest.$ac_ext <<EOF
18239 #line 18240 "configure"
18240 #include "confdefs.h"
18241
18242 #ifdef HAVE_DB_185_H
18243 # include <db_185.h>
18244 #else
18245 # include <db.h>
18246 #endif
18247
18248 #ifndef DB_VERSION_MAJOR
18249 # define DB_VERSION_MAJOR 1
18250 #endif
18251
18252 #ifndef NULL
18253 #define NULL ((void*)0)
18254 #endif
18255
18256 int main() {
18257
18258 #if DB_VERSION_MAJOR > 1
18259         {
18260                 char *version;
18261                 int major, minor, patch;
18262
18263                 version = db_version( &major, &minor, &patch );
18264
18265                 if( major != DB_VERSION_MAJOR ||
18266                         minor < DB_VERSION_MINOR )
18267                 {
18268                         printf("Berkeley DB version mismatch\n"
18269                                 "\theader: %s\n\tlibrary: %s\n",
18270                                 DB_VERSION_STRING, version);
18271                         return 1;
18272                 }
18273         }
18274 #endif
18275
18276 #if DB_VERSION_MAJOR > 2
18277         db_env_create( NULL, 0 );
18278 #elif DB_VERSION_MAJOR > 1
18279         db_appexit( NULL );
18280 #else
18281         (void) dbopen( NULL, 0, 0, 0, NULL);
18282 #endif
18283
18284 ; return 0; }
18285 EOF
18286 if { (eval echo configure:18287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18287   rm -rf conftest*
18288   ol_cv_db_db_41=yes
18289 else
18290   echo "configure: failed program was:" >&5
18291   cat conftest.$ac_ext >&5
18292   rm -rf conftest*
18293   ol_cv_db_db_41=no
18294 fi
18295 rm -f conftest*
18296
18297         LIBS="$ol_LIBS"
18298
18299 fi
18300
18301 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18302
18303         if test $ol_cv_db_db_41 = yes ; then
18304                 ol_cv_lib_db=-ldb-41
18305         fi
18306 fi
18307
18308 if test $ol_cv_lib_db = no ; then
18309         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18310 echo "configure:18311: checking for Berkeley DB link (-ldb-4.1)" >&5
18311 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18312   echo $ac_n "(cached) $ac_c" 1>&6
18313 else
18314   
18315         ol_DB_LIB=-ldb-4.1
18316         ol_LIBS=$LIBS
18317         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18318
18319         cat > conftest.$ac_ext <<EOF
18320 #line 18321 "configure"
18321 #include "confdefs.h"
18322
18323 #ifdef HAVE_DB_185_H
18324 # include <db_185.h>
18325 #else
18326 # include <db.h>
18327 #endif
18328
18329 #ifndef DB_VERSION_MAJOR
18330 # define DB_VERSION_MAJOR 1
18331 #endif
18332
18333 #ifndef NULL
18334 #define NULL ((void*)0)
18335 #endif
18336
18337 int main() {
18338
18339 #if DB_VERSION_MAJOR > 1
18340         {
18341                 char *version;
18342                 int major, minor, patch;
18343
18344                 version = db_version( &major, &minor, &patch );
18345
18346                 if( major != DB_VERSION_MAJOR ||
18347                         minor < DB_VERSION_MINOR )
18348                 {
18349                         printf("Berkeley DB version mismatch\n"
18350                                 "\theader: %s\n\tlibrary: %s\n",
18351                                 DB_VERSION_STRING, version);
18352                         return 1;
18353                 }
18354         }
18355 #endif
18356
18357 #if DB_VERSION_MAJOR > 2
18358         db_env_create( NULL, 0 );
18359 #elif DB_VERSION_MAJOR > 1
18360         db_appexit( NULL );
18361 #else
18362         (void) dbopen( NULL, 0, 0, 0, NULL);
18363 #endif
18364
18365 ; return 0; }
18366 EOF
18367 if { (eval echo configure:18368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18368   rm -rf conftest*
18369   ol_cv_db_db_4_dot_1=yes
18370 else
18371   echo "configure: failed program was:" >&5
18372   cat conftest.$ac_ext >&5
18373   rm -rf conftest*
18374   ol_cv_db_db_4_dot_1=no
18375 fi
18376 rm -f conftest*
18377
18378         LIBS="$ol_LIBS"
18379
18380 fi
18381
18382 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18383
18384         if test $ol_cv_db_db_4_dot_1 = yes ; then
18385                 ol_cv_lib_db=-ldb-4.1
18386         fi
18387 fi
18388
18389 if test $ol_cv_lib_db = no ; then
18390         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18391 echo "configure:18392: checking for Berkeley DB link (-ldb-4-1)" >&5
18392 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18393   echo $ac_n "(cached) $ac_c" 1>&6
18394 else
18395   
18396         ol_DB_LIB=-ldb-4-1
18397         ol_LIBS=$LIBS
18398         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18399
18400         cat > conftest.$ac_ext <<EOF
18401 #line 18402 "configure"
18402 #include "confdefs.h"
18403
18404 #ifdef HAVE_DB_185_H
18405 # include <db_185.h>
18406 #else
18407 # include <db.h>
18408 #endif
18409
18410 #ifndef DB_VERSION_MAJOR
18411 # define DB_VERSION_MAJOR 1
18412 #endif
18413
18414 #ifndef NULL
18415 #define NULL ((void*)0)
18416 #endif
18417
18418 int main() {
18419
18420 #if DB_VERSION_MAJOR > 1
18421         {
18422                 char *version;
18423                 int major, minor, patch;
18424
18425                 version = db_version( &major, &minor, &patch );
18426
18427                 if( major != DB_VERSION_MAJOR ||
18428                         minor < DB_VERSION_MINOR )
18429                 {
18430                         printf("Berkeley DB version mismatch\n"
18431                                 "\theader: %s\n\tlibrary: %s\n",
18432                                 DB_VERSION_STRING, version);
18433                         return 1;
18434                 }
18435         }
18436 #endif
18437
18438 #if DB_VERSION_MAJOR > 2
18439         db_env_create( NULL, 0 );
18440 #elif DB_VERSION_MAJOR > 1
18441         db_appexit( NULL );
18442 #else
18443         (void) dbopen( NULL, 0, 0, 0, NULL);
18444 #endif
18445
18446 ; return 0; }
18447 EOF
18448 if { (eval echo configure:18449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18449   rm -rf conftest*
18450   ol_cv_db_db_4_1=yes
18451 else
18452   echo "configure: failed program was:" >&5
18453   cat conftest.$ac_ext >&5
18454   rm -rf conftest*
18455   ol_cv_db_db_4_1=no
18456 fi
18457 rm -f conftest*
18458
18459         LIBS="$ol_LIBS"
18460
18461 fi
18462
18463 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18464
18465         if test $ol_cv_db_db_4_1 = yes ; then
18466                 ol_cv_lib_db=-ldb-4-1
18467         fi
18468 fi
18469
18470 if test $ol_cv_lib_db = no ; then
18471         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18472 echo "configure:18473: checking for Berkeley DB link (-ldb3)" >&5
18473 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18474   echo $ac_n "(cached) $ac_c" 1>&6
18475 else
18476   
18477         ol_DB_LIB=-ldb3
18478         ol_LIBS=$LIBS
18479         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18480
18481         cat > conftest.$ac_ext <<EOF
18482 #line 18483 "configure"
18483 #include "confdefs.h"
18484
18485 #ifdef HAVE_DB_185_H
18486 # include <db_185.h>
18487 #else
18488 # include <db.h>
18489 #endif
18490
18491 #ifndef DB_VERSION_MAJOR
18492 # define DB_VERSION_MAJOR 1
18493 #endif
18494
18495 #ifndef NULL
18496 #define NULL ((void*)0)
18497 #endif
18498
18499 int main() {
18500
18501 #if DB_VERSION_MAJOR > 1
18502         {
18503                 char *version;
18504                 int major, minor, patch;
18505
18506                 version = db_version( &major, &minor, &patch );
18507
18508                 if( major != DB_VERSION_MAJOR ||
18509                         minor < DB_VERSION_MINOR )
18510                 {
18511                         printf("Berkeley DB version mismatch\n"
18512                                 "\theader: %s\n\tlibrary: %s\n",
18513                                 DB_VERSION_STRING, version);
18514                         return 1;
18515                 }
18516         }
18517 #endif
18518
18519 #if DB_VERSION_MAJOR > 2
18520         db_env_create( NULL, 0 );
18521 #elif DB_VERSION_MAJOR > 1
18522         db_appexit( NULL );
18523 #else
18524         (void) dbopen( NULL, 0, 0, 0, NULL);
18525 #endif
18526
18527 ; return 0; }
18528 EOF
18529 if { (eval echo configure:18530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18530   rm -rf conftest*
18531   ol_cv_db_db3=yes
18532 else
18533   echo "configure: failed program was:" >&5
18534   cat conftest.$ac_ext >&5
18535   rm -rf conftest*
18536   ol_cv_db_db3=no
18537 fi
18538 rm -f conftest*
18539
18540         LIBS="$ol_LIBS"
18541
18542 fi
18543
18544 echo "$ac_t""$ol_cv_db_db3" 1>&6
18545
18546         if test $ol_cv_db_db3 = yes ; then
18547                 ol_cv_lib_db=-ldb3
18548         fi
18549 fi
18550
18551 if test $ol_cv_lib_db = no ; then
18552         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18553 echo "configure:18554: checking for Berkeley DB link (-ldb-3)" >&5
18554 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18555   echo $ac_n "(cached) $ac_c" 1>&6
18556 else
18557   
18558         ol_DB_LIB=-ldb-3
18559         ol_LIBS=$LIBS
18560         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18561
18562         cat > conftest.$ac_ext <<EOF
18563 #line 18564 "configure"
18564 #include "confdefs.h"
18565
18566 #ifdef HAVE_DB_185_H
18567 # include <db_185.h>
18568 #else
18569 # include <db.h>
18570 #endif
18571
18572 #ifndef DB_VERSION_MAJOR
18573 # define DB_VERSION_MAJOR 1
18574 #endif
18575
18576 #ifndef NULL
18577 #define NULL ((void*)0)
18578 #endif
18579
18580 int main() {
18581
18582 #if DB_VERSION_MAJOR > 1
18583         {
18584                 char *version;
18585                 int major, minor, patch;
18586
18587                 version = db_version( &major, &minor, &patch );
18588
18589                 if( major != DB_VERSION_MAJOR ||
18590                         minor < DB_VERSION_MINOR )
18591                 {
18592                         printf("Berkeley DB version mismatch\n"
18593                                 "\theader: %s\n\tlibrary: %s\n",
18594                                 DB_VERSION_STRING, version);
18595                         return 1;
18596                 }
18597         }
18598 #endif
18599
18600 #if DB_VERSION_MAJOR > 2
18601         db_env_create( NULL, 0 );
18602 #elif DB_VERSION_MAJOR > 1
18603         db_appexit( NULL );
18604 #else
18605         (void) dbopen( NULL, 0, 0, 0, NULL);
18606 #endif
18607
18608 ; return 0; }
18609 EOF
18610 if { (eval echo configure:18611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18611   rm -rf conftest*
18612   ol_cv_db_db_3=yes
18613 else
18614   echo "configure: failed program was:" >&5
18615   cat conftest.$ac_ext >&5
18616   rm -rf conftest*
18617   ol_cv_db_db_3=no
18618 fi
18619 rm -f conftest*
18620
18621         LIBS="$ol_LIBS"
18622
18623 fi
18624
18625 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18626
18627         if test $ol_cv_db_db_3 = yes ; then
18628                 ol_cv_lib_db=-ldb-3
18629         fi
18630 fi
18631
18632 if test $ol_cv_lib_db = no ; then
18633         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18634 echo "configure:18635: checking for Berkeley DB link (-ldb2)" >&5
18635 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18636   echo $ac_n "(cached) $ac_c" 1>&6
18637 else
18638   
18639         ol_DB_LIB=-ldb2
18640         ol_LIBS=$LIBS
18641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18642
18643         cat > conftest.$ac_ext <<EOF
18644 #line 18645 "configure"
18645 #include "confdefs.h"
18646
18647 #ifdef HAVE_DB_185_H
18648 # include <db_185.h>
18649 #else
18650 # include <db.h>
18651 #endif
18652
18653 #ifndef DB_VERSION_MAJOR
18654 # define DB_VERSION_MAJOR 1
18655 #endif
18656
18657 #ifndef NULL
18658 #define NULL ((void*)0)
18659 #endif
18660
18661 int main() {
18662
18663 #if DB_VERSION_MAJOR > 1
18664         {
18665                 char *version;
18666                 int major, minor, patch;
18667
18668                 version = db_version( &major, &minor, &patch );
18669
18670                 if( major != DB_VERSION_MAJOR ||
18671                         minor < DB_VERSION_MINOR )
18672                 {
18673                         printf("Berkeley DB version mismatch\n"
18674                                 "\theader: %s\n\tlibrary: %s\n",
18675                                 DB_VERSION_STRING, version);
18676                         return 1;
18677                 }
18678         }
18679 #endif
18680
18681 #if DB_VERSION_MAJOR > 2
18682         db_env_create( NULL, 0 );
18683 #elif DB_VERSION_MAJOR > 1
18684         db_appexit( NULL );
18685 #else
18686         (void) dbopen( NULL, 0, 0, 0, NULL);
18687 #endif
18688
18689 ; return 0; }
18690 EOF
18691 if { (eval echo configure:18692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18692   rm -rf conftest*
18693   ol_cv_db_db2=yes
18694 else
18695   echo "configure: failed program was:" >&5
18696   cat conftest.$ac_ext >&5
18697   rm -rf conftest*
18698   ol_cv_db_db2=no
18699 fi
18700 rm -f conftest*
18701
18702         LIBS="$ol_LIBS"
18703
18704 fi
18705
18706 echo "$ac_t""$ol_cv_db_db2" 1>&6
18707
18708         if test $ol_cv_db_db2 = yes ; then
18709                 ol_cv_lib_db=-ldb2
18710         fi
18711 fi
18712
18713 if test $ol_cv_lib_db = no ; then
18714         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18715 echo "configure:18716: checking for Berkeley DB link (-ldb-2)" >&5
18716 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18717   echo $ac_n "(cached) $ac_c" 1>&6
18718 else
18719   
18720         ol_DB_LIB=-ldb-2
18721         ol_LIBS=$LIBS
18722         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18723
18724         cat > conftest.$ac_ext <<EOF
18725 #line 18726 "configure"
18726 #include "confdefs.h"
18727
18728 #ifdef HAVE_DB_185_H
18729 # include <db_185.h>
18730 #else
18731 # include <db.h>
18732 #endif
18733
18734 #ifndef DB_VERSION_MAJOR
18735 # define DB_VERSION_MAJOR 1
18736 #endif
18737
18738 #ifndef NULL
18739 #define NULL ((void*)0)
18740 #endif
18741
18742 int main() {
18743
18744 #if DB_VERSION_MAJOR > 1
18745         {
18746                 char *version;
18747                 int major, minor, patch;
18748
18749                 version = db_version( &major, &minor, &patch );
18750
18751                 if( major != DB_VERSION_MAJOR ||
18752                         minor < DB_VERSION_MINOR )
18753                 {
18754                         printf("Berkeley DB version mismatch\n"
18755                                 "\theader: %s\n\tlibrary: %s\n",
18756                                 DB_VERSION_STRING, version);
18757                         return 1;
18758                 }
18759         }
18760 #endif
18761
18762 #if DB_VERSION_MAJOR > 2
18763         db_env_create( NULL, 0 );
18764 #elif DB_VERSION_MAJOR > 1
18765         db_appexit( NULL );
18766 #else
18767         (void) dbopen( NULL, 0, 0, 0, NULL);
18768 #endif
18769
18770 ; return 0; }
18771 EOF
18772 if { (eval echo configure:18773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18773   rm -rf conftest*
18774   ol_cv_db_db_2=yes
18775 else
18776   echo "configure: failed program was:" >&5
18777   cat conftest.$ac_ext >&5
18778   rm -rf conftest*
18779   ol_cv_db_db_2=no
18780 fi
18781 rm -f conftest*
18782
18783         LIBS="$ol_LIBS"
18784
18785 fi
18786
18787 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18788
18789         if test $ol_cv_db_db_2 = yes ; then
18790                 ol_cv_lib_db=-ldb-2
18791         fi
18792 fi
18793
18794 if test $ol_cv_lib_db = no ; then
18795         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18796 echo "configure:18797: checking for Berkeley DB link (-ldb1)" >&5
18797 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18798   echo $ac_n "(cached) $ac_c" 1>&6
18799 else
18800   
18801         ol_DB_LIB=-ldb1
18802         ol_LIBS=$LIBS
18803         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18804
18805         cat > conftest.$ac_ext <<EOF
18806 #line 18807 "configure"
18807 #include "confdefs.h"
18808
18809 #ifdef HAVE_DB_185_H
18810 # include <db_185.h>
18811 #else
18812 # include <db.h>
18813 #endif
18814
18815 #ifndef DB_VERSION_MAJOR
18816 # define DB_VERSION_MAJOR 1
18817 #endif
18818
18819 #ifndef NULL
18820 #define NULL ((void*)0)
18821 #endif
18822
18823 int main() {
18824
18825 #if DB_VERSION_MAJOR > 1
18826         {
18827                 char *version;
18828                 int major, minor, patch;
18829
18830                 version = db_version( &major, &minor, &patch );
18831
18832                 if( major != DB_VERSION_MAJOR ||
18833                         minor < DB_VERSION_MINOR )
18834                 {
18835                         printf("Berkeley DB version mismatch\n"
18836                                 "\theader: %s\n\tlibrary: %s\n",
18837                                 DB_VERSION_STRING, version);
18838                         return 1;
18839                 }
18840         }
18841 #endif
18842
18843 #if DB_VERSION_MAJOR > 2
18844         db_env_create( NULL, 0 );
18845 #elif DB_VERSION_MAJOR > 1
18846         db_appexit( NULL );
18847 #else
18848         (void) dbopen( NULL, 0, 0, 0, NULL);
18849 #endif
18850
18851 ; return 0; }
18852 EOF
18853 if { (eval echo configure:18854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18854   rm -rf conftest*
18855   ol_cv_db_db1=yes
18856 else
18857   echo "configure: failed program was:" >&5
18858   cat conftest.$ac_ext >&5
18859   rm -rf conftest*
18860   ol_cv_db_db1=no
18861 fi
18862 rm -f conftest*
18863
18864         LIBS="$ol_LIBS"
18865
18866 fi
18867
18868 echo "$ac_t""$ol_cv_db_db1" 1>&6
18869
18870         if test $ol_cv_db_db1 = yes ; then
18871                 ol_cv_lib_db=-ldb1
18872         fi
18873 fi
18874
18875 if test $ol_cv_lib_db = no ; then
18876         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18877 echo "configure:18878: checking for Berkeley DB link (-ldb-1)" >&5
18878 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18879   echo $ac_n "(cached) $ac_c" 1>&6
18880 else
18881   
18882         ol_DB_LIB=-ldb-1
18883         ol_LIBS=$LIBS
18884         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18885
18886         cat > conftest.$ac_ext <<EOF
18887 #line 18888 "configure"
18888 #include "confdefs.h"
18889
18890 #ifdef HAVE_DB_185_H
18891 # include <db_185.h>
18892 #else
18893 # include <db.h>
18894 #endif
18895
18896 #ifndef DB_VERSION_MAJOR
18897 # define DB_VERSION_MAJOR 1
18898 #endif
18899
18900 #ifndef NULL
18901 #define NULL ((void*)0)
18902 #endif
18903
18904 int main() {
18905
18906 #if DB_VERSION_MAJOR > 1
18907         {
18908                 char *version;
18909                 int major, minor, patch;
18910
18911                 version = db_version( &major, &minor, &patch );
18912
18913                 if( major != DB_VERSION_MAJOR ||
18914                         minor < DB_VERSION_MINOR )
18915                 {
18916                         printf("Berkeley DB version mismatch\n"
18917                                 "\theader: %s\n\tlibrary: %s\n",
18918                                 DB_VERSION_STRING, version);
18919                         return 1;
18920                 }
18921         }
18922 #endif
18923
18924 #if DB_VERSION_MAJOR > 2
18925         db_env_create( NULL, 0 );
18926 #elif DB_VERSION_MAJOR > 1
18927         db_appexit( NULL );
18928 #else
18929         (void) dbopen( NULL, 0, 0, 0, NULL);
18930 #endif
18931
18932 ; return 0; }
18933 EOF
18934 if { (eval echo configure:18935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18935   rm -rf conftest*
18936   ol_cv_db_db_1=yes
18937 else
18938   echo "configure: failed program was:" >&5
18939   cat conftest.$ac_ext >&5
18940   rm -rf conftest*
18941   ol_cv_db_db_1=no
18942 fi
18943 rm -f conftest*
18944
18945         LIBS="$ol_LIBS"
18946
18947 fi
18948
18949 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18950
18951         if test $ol_cv_db_db_1 = yes ; then
18952                 ol_cv_lib_db=-ldb-1
18953         fi
18954 fi
18955
18956
18957                 if test "$ol_cv_lib_db" != no ; then
18958                         ol_cv_berkeley_db=yes
18959                 fi
18960         fi
18961 fi
18962
18963         else
18964                 ol_cv_berkeley_db=no
18965 for ac_hdr in db.h
18966 do
18967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18969 echo "configure:18970: checking for $ac_hdr" >&5
18970 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18971   echo $ac_n "(cached) $ac_c" 1>&6
18972 else
18973   cat > conftest.$ac_ext <<EOF
18974 #line 18975 "configure"
18975 #include "confdefs.h"
18976 #include <$ac_hdr>
18977 EOF
18978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18979 { (eval echo configure:18980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18981 if test -z "$ac_err"; then
18982   rm -rf conftest*
18983   eval "ac_cv_header_$ac_safe=yes"
18984 else
18985   echo "$ac_err" >&5
18986   echo "configure: failed program was:" >&5
18987   cat conftest.$ac_ext >&5
18988   rm -rf conftest*
18989   eval "ac_cv_header_$ac_safe=no"
18990 fi
18991 rm -f conftest*
18992 fi
18993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18994   echo "$ac_t""yes" 1>&6
18995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18996   cat >> confdefs.h <<EOF
18997 #define $ac_tr_hdr 1
18998 EOF
18999  
19000 else
19001   echo "$ac_t""no" 1>&6
19002 fi
19003 done
19004
19005 if test $ac_cv_header_db_h = yes; then
19006         ol_cv_lib_db=no
19007 if test $ol_cv_lib_db = no ; then
19008         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
19009 echo "configure:19010: checking for Berkeley DB link (default)" >&5
19010 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
19011   echo $ac_n "(cached) $ac_c" 1>&6
19012 else
19013   
19014         ol_DB_LIB=
19015         ol_LIBS=$LIBS
19016         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19017
19018         cat > conftest.$ac_ext <<EOF
19019 #line 19020 "configure"
19020 #include "confdefs.h"
19021
19022 #ifdef HAVE_DB_185_H
19023 # include <db_185.h>
19024 #else
19025 # include <db.h>
19026 #endif
19027
19028 #ifndef DB_VERSION_MAJOR
19029 # define DB_VERSION_MAJOR 1
19030 #endif
19031
19032 #ifndef NULL
19033 #define NULL ((void*)0)
19034 #endif
19035
19036 int main() {
19037
19038 #if DB_VERSION_MAJOR > 1
19039         {
19040                 char *version;
19041                 int major, minor, patch;
19042
19043                 version = db_version( &major, &minor, &patch );
19044
19045                 if( major != DB_VERSION_MAJOR ||
19046                         minor < DB_VERSION_MINOR )
19047                 {
19048                         printf("Berkeley DB version mismatch\n"
19049                                 "\theader: %s\n\tlibrary: %s\n",
19050                                 DB_VERSION_STRING, version);
19051                         return 1;
19052                 }
19053         }
19054 #endif
19055
19056 #if DB_VERSION_MAJOR > 2
19057         db_env_create( NULL, 0 );
19058 #elif DB_VERSION_MAJOR > 1
19059         db_appexit( NULL );
19060 #else
19061         (void) dbopen( NULL, 0, 0, 0, NULL);
19062 #endif
19063
19064 ; return 0; }
19065 EOF
19066 if { (eval echo configure:19067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19067   rm -rf conftest*
19068   ol_cv_db_none=yes
19069 else
19070   echo "configure: failed program was:" >&5
19071   cat conftest.$ac_ext >&5
19072   rm -rf conftest*
19073   ol_cv_db_none=no
19074 fi
19075 rm -f conftest*
19076
19077         LIBS="$ol_LIBS"
19078
19079 fi
19080
19081 echo "$ac_t""$ol_cv_db_none" 1>&6
19082
19083         if test $ol_cv_db_none = yes ; then
19084                 ol_cv_lib_db=yes
19085         fi
19086 fi
19087
19088 if test $ol_cv_lib_db = no ; then
19089         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19090 echo "configure:19091: checking for Berkeley DB link (-ldb43)" >&5
19091 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19092   echo $ac_n "(cached) $ac_c" 1>&6
19093 else
19094   
19095         ol_DB_LIB=-ldb43
19096         ol_LIBS=$LIBS
19097         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19098
19099         cat > conftest.$ac_ext <<EOF
19100 #line 19101 "configure"
19101 #include "confdefs.h"
19102
19103 #ifdef HAVE_DB_185_H
19104 # include <db_185.h>
19105 #else
19106 # include <db.h>
19107 #endif
19108
19109 #ifndef DB_VERSION_MAJOR
19110 # define DB_VERSION_MAJOR 1
19111 #endif
19112
19113 #ifndef NULL
19114 #define NULL ((void*)0)
19115 #endif
19116
19117 int main() {
19118
19119 #if DB_VERSION_MAJOR > 1
19120         {
19121                 char *version;
19122                 int major, minor, patch;
19123
19124                 version = db_version( &major, &minor, &patch );
19125
19126                 if( major != DB_VERSION_MAJOR ||
19127                         minor < DB_VERSION_MINOR )
19128                 {
19129                         printf("Berkeley DB version mismatch\n"
19130                                 "\theader: %s\n\tlibrary: %s\n",
19131                                 DB_VERSION_STRING, version);
19132                         return 1;
19133                 }
19134         }
19135 #endif
19136
19137 #if DB_VERSION_MAJOR > 2
19138         db_env_create( NULL, 0 );
19139 #elif DB_VERSION_MAJOR > 1
19140         db_appexit( NULL );
19141 #else
19142         (void) dbopen( NULL, 0, 0, 0, NULL);
19143 #endif
19144
19145 ; return 0; }
19146 EOF
19147 if { (eval echo configure:19148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19148   rm -rf conftest*
19149   ol_cv_db_db43=yes
19150 else
19151   echo "configure: failed program was:" >&5
19152   cat conftest.$ac_ext >&5
19153   rm -rf conftest*
19154   ol_cv_db_db43=no
19155 fi
19156 rm -f conftest*
19157
19158         LIBS="$ol_LIBS"
19159
19160 fi
19161
19162 echo "$ac_t""$ol_cv_db_db43" 1>&6
19163
19164         if test $ol_cv_db_db43 = yes ; then
19165                 ol_cv_lib_db=-ldb43
19166         fi
19167 fi
19168
19169 if test $ol_cv_lib_db = no ; then
19170         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19171 echo "configure:19172: checking for Berkeley DB link (-ldb-43)" >&5
19172 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19173   echo $ac_n "(cached) $ac_c" 1>&6
19174 else
19175   
19176         ol_DB_LIB=-ldb-43
19177         ol_LIBS=$LIBS
19178         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19179
19180         cat > conftest.$ac_ext <<EOF
19181 #line 19182 "configure"
19182 #include "confdefs.h"
19183
19184 #ifdef HAVE_DB_185_H
19185 # include <db_185.h>
19186 #else
19187 # include <db.h>
19188 #endif
19189
19190 #ifndef DB_VERSION_MAJOR
19191 # define DB_VERSION_MAJOR 1
19192 #endif
19193
19194 #ifndef NULL
19195 #define NULL ((void*)0)
19196 #endif
19197
19198 int main() {
19199
19200 #if DB_VERSION_MAJOR > 1
19201         {
19202                 char *version;
19203                 int major, minor, patch;
19204
19205                 version = db_version( &major, &minor, &patch );
19206
19207                 if( major != DB_VERSION_MAJOR ||
19208                         minor < DB_VERSION_MINOR )
19209                 {
19210                         printf("Berkeley DB version mismatch\n"
19211                                 "\theader: %s\n\tlibrary: %s\n",
19212                                 DB_VERSION_STRING, version);
19213                         return 1;
19214                 }
19215         }
19216 #endif
19217
19218 #if DB_VERSION_MAJOR > 2
19219         db_env_create( NULL, 0 );
19220 #elif DB_VERSION_MAJOR > 1
19221         db_appexit( NULL );
19222 #else
19223         (void) dbopen( NULL, 0, 0, 0, NULL);
19224 #endif
19225
19226 ; return 0; }
19227 EOF
19228 if { (eval echo configure:19229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19229   rm -rf conftest*
19230   ol_cv_db_db_43=yes
19231 else
19232   echo "configure: failed program was:" >&5
19233   cat conftest.$ac_ext >&5
19234   rm -rf conftest*
19235   ol_cv_db_db_43=no
19236 fi
19237 rm -f conftest*
19238
19239         LIBS="$ol_LIBS"
19240
19241 fi
19242
19243 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19244
19245         if test $ol_cv_db_db_43 = yes ; then
19246                 ol_cv_lib_db=-ldb-43
19247         fi
19248 fi
19249
19250 if test $ol_cv_lib_db = no ; then
19251         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19252 echo "configure:19253: checking for Berkeley DB link (-ldb-4.3)" >&5
19253 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19254   echo $ac_n "(cached) $ac_c" 1>&6
19255 else
19256   
19257         ol_DB_LIB=-ldb-4.3
19258         ol_LIBS=$LIBS
19259         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19260
19261         cat > conftest.$ac_ext <<EOF
19262 #line 19263 "configure"
19263 #include "confdefs.h"
19264
19265 #ifdef HAVE_DB_185_H
19266 # include <db_185.h>
19267 #else
19268 # include <db.h>
19269 #endif
19270
19271 #ifndef DB_VERSION_MAJOR
19272 # define DB_VERSION_MAJOR 1
19273 #endif
19274
19275 #ifndef NULL
19276 #define NULL ((void*)0)
19277 #endif
19278
19279 int main() {
19280
19281 #if DB_VERSION_MAJOR > 1
19282         {
19283                 char *version;
19284                 int major, minor, patch;
19285
19286                 version = db_version( &major, &minor, &patch );
19287
19288                 if( major != DB_VERSION_MAJOR ||
19289                         minor < DB_VERSION_MINOR )
19290                 {
19291                         printf("Berkeley DB version mismatch\n"
19292                                 "\theader: %s\n\tlibrary: %s\n",
19293                                 DB_VERSION_STRING, version);
19294                         return 1;
19295                 }
19296         }
19297 #endif
19298
19299 #if DB_VERSION_MAJOR > 2
19300         db_env_create( NULL, 0 );
19301 #elif DB_VERSION_MAJOR > 1
19302         db_appexit( NULL );
19303 #else
19304         (void) dbopen( NULL, 0, 0, 0, NULL);
19305 #endif
19306
19307 ; return 0; }
19308 EOF
19309 if { (eval echo configure:19310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19310   rm -rf conftest*
19311   ol_cv_db_db_4_dot_3=yes
19312 else
19313   echo "configure: failed program was:" >&5
19314   cat conftest.$ac_ext >&5
19315   rm -rf conftest*
19316   ol_cv_db_db_4_dot_3=no
19317 fi
19318 rm -f conftest*
19319
19320         LIBS="$ol_LIBS"
19321
19322 fi
19323
19324 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19325
19326         if test $ol_cv_db_db_4_dot_3 = yes ; then
19327                 ol_cv_lib_db=-ldb-4.3
19328         fi
19329 fi
19330
19331 if test $ol_cv_lib_db = no ; then
19332         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19333 echo "configure:19334: checking for Berkeley DB link (-ldb-4-3)" >&5
19334 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19335   echo $ac_n "(cached) $ac_c" 1>&6
19336 else
19337   
19338         ol_DB_LIB=-ldb-4-3
19339         ol_LIBS=$LIBS
19340         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19341
19342         cat > conftest.$ac_ext <<EOF
19343 #line 19344 "configure"
19344 #include "confdefs.h"
19345
19346 #ifdef HAVE_DB_185_H
19347 # include <db_185.h>
19348 #else
19349 # include <db.h>
19350 #endif
19351
19352 #ifndef DB_VERSION_MAJOR
19353 # define DB_VERSION_MAJOR 1
19354 #endif
19355
19356 #ifndef NULL
19357 #define NULL ((void*)0)
19358 #endif
19359
19360 int main() {
19361
19362 #if DB_VERSION_MAJOR > 1
19363         {
19364                 char *version;
19365                 int major, minor, patch;
19366
19367                 version = db_version( &major, &minor, &patch );
19368
19369                 if( major != DB_VERSION_MAJOR ||
19370                         minor < DB_VERSION_MINOR )
19371                 {
19372                         printf("Berkeley DB version mismatch\n"
19373                                 "\theader: %s\n\tlibrary: %s\n",
19374                                 DB_VERSION_STRING, version);
19375                         return 1;
19376                 }
19377         }
19378 #endif
19379
19380 #if DB_VERSION_MAJOR > 2
19381         db_env_create( NULL, 0 );
19382 #elif DB_VERSION_MAJOR > 1
19383         db_appexit( NULL );
19384 #else
19385         (void) dbopen( NULL, 0, 0, 0, NULL);
19386 #endif
19387
19388 ; return 0; }
19389 EOF
19390 if { (eval echo configure:19391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19391   rm -rf conftest*
19392   ol_cv_db_db_4_3=yes
19393 else
19394   echo "configure: failed program was:" >&5
19395   cat conftest.$ac_ext >&5
19396   rm -rf conftest*
19397   ol_cv_db_db_4_3=no
19398 fi
19399 rm -f conftest*
19400
19401         LIBS="$ol_LIBS"
19402
19403 fi
19404
19405 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19406
19407         if test $ol_cv_db_db_4_3 = yes ; then
19408                 ol_cv_lib_db=-ldb-4-3
19409         fi
19410 fi
19411
19412 if test $ol_cv_lib_db = no ; then
19413         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19414 echo "configure:19415: checking for Berkeley DB link (-ldb42)" >&5
19415 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19416   echo $ac_n "(cached) $ac_c" 1>&6
19417 else
19418   
19419         ol_DB_LIB=-ldb42
19420         ol_LIBS=$LIBS
19421         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19422
19423         cat > conftest.$ac_ext <<EOF
19424 #line 19425 "configure"
19425 #include "confdefs.h"
19426
19427 #ifdef HAVE_DB_185_H
19428 # include <db_185.h>
19429 #else
19430 # include <db.h>
19431 #endif
19432
19433 #ifndef DB_VERSION_MAJOR
19434 # define DB_VERSION_MAJOR 1
19435 #endif
19436
19437 #ifndef NULL
19438 #define NULL ((void*)0)
19439 #endif
19440
19441 int main() {
19442
19443 #if DB_VERSION_MAJOR > 1
19444         {
19445                 char *version;
19446                 int major, minor, patch;
19447
19448                 version = db_version( &major, &minor, &patch );
19449
19450                 if( major != DB_VERSION_MAJOR ||
19451                         minor < DB_VERSION_MINOR )
19452                 {
19453                         printf("Berkeley DB version mismatch\n"
19454                                 "\theader: %s\n\tlibrary: %s\n",
19455                                 DB_VERSION_STRING, version);
19456                         return 1;
19457                 }
19458         }
19459 #endif
19460
19461 #if DB_VERSION_MAJOR > 2
19462         db_env_create( NULL, 0 );
19463 #elif DB_VERSION_MAJOR > 1
19464         db_appexit( NULL );
19465 #else
19466         (void) dbopen( NULL, 0, 0, 0, NULL);
19467 #endif
19468
19469 ; return 0; }
19470 EOF
19471 if { (eval echo configure:19472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19472   rm -rf conftest*
19473   ol_cv_db_db42=yes
19474 else
19475   echo "configure: failed program was:" >&5
19476   cat conftest.$ac_ext >&5
19477   rm -rf conftest*
19478   ol_cv_db_db42=no
19479 fi
19480 rm -f conftest*
19481
19482         LIBS="$ol_LIBS"
19483
19484 fi
19485
19486 echo "$ac_t""$ol_cv_db_db42" 1>&6
19487
19488         if test $ol_cv_db_db42 = yes ; then
19489                 ol_cv_lib_db=-ldb42
19490         fi
19491 fi
19492
19493 if test $ol_cv_lib_db = no ; then
19494         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19495 echo "configure:19496: checking for Berkeley DB link (-ldb-42)" >&5
19496 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19497   echo $ac_n "(cached) $ac_c" 1>&6
19498 else
19499   
19500         ol_DB_LIB=-ldb-42
19501         ol_LIBS=$LIBS
19502         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19503
19504         cat > conftest.$ac_ext <<EOF
19505 #line 19506 "configure"
19506 #include "confdefs.h"
19507
19508 #ifdef HAVE_DB_185_H
19509 # include <db_185.h>
19510 #else
19511 # include <db.h>
19512 #endif
19513
19514 #ifndef DB_VERSION_MAJOR
19515 # define DB_VERSION_MAJOR 1
19516 #endif
19517
19518 #ifndef NULL
19519 #define NULL ((void*)0)
19520 #endif
19521
19522 int main() {
19523
19524 #if DB_VERSION_MAJOR > 1
19525         {
19526                 char *version;
19527                 int major, minor, patch;
19528
19529                 version = db_version( &major, &minor, &patch );
19530
19531                 if( major != DB_VERSION_MAJOR ||
19532                         minor < DB_VERSION_MINOR )
19533                 {
19534                         printf("Berkeley DB version mismatch\n"
19535                                 "\theader: %s\n\tlibrary: %s\n",
19536                                 DB_VERSION_STRING, version);
19537                         return 1;
19538                 }
19539         }
19540 #endif
19541
19542 #if DB_VERSION_MAJOR > 2
19543         db_env_create( NULL, 0 );
19544 #elif DB_VERSION_MAJOR > 1
19545         db_appexit( NULL );
19546 #else
19547         (void) dbopen( NULL, 0, 0, 0, NULL);
19548 #endif
19549
19550 ; return 0; }
19551 EOF
19552 if { (eval echo configure:19553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19553   rm -rf conftest*
19554   ol_cv_db_db_42=yes
19555 else
19556   echo "configure: failed program was:" >&5
19557   cat conftest.$ac_ext >&5
19558   rm -rf conftest*
19559   ol_cv_db_db_42=no
19560 fi
19561 rm -f conftest*
19562
19563         LIBS="$ol_LIBS"
19564
19565 fi
19566
19567 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19568
19569         if test $ol_cv_db_db_42 = yes ; then
19570                 ol_cv_lib_db=-ldb-42
19571         fi
19572 fi
19573
19574 if test $ol_cv_lib_db = no ; then
19575         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19576 echo "configure:19577: checking for Berkeley DB link (-ldb-4.2)" >&5
19577 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19578   echo $ac_n "(cached) $ac_c" 1>&6
19579 else
19580   
19581         ol_DB_LIB=-ldb-4.2
19582         ol_LIBS=$LIBS
19583         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19584
19585         cat > conftest.$ac_ext <<EOF
19586 #line 19587 "configure"
19587 #include "confdefs.h"
19588
19589 #ifdef HAVE_DB_185_H
19590 # include <db_185.h>
19591 #else
19592 # include <db.h>
19593 #endif
19594
19595 #ifndef DB_VERSION_MAJOR
19596 # define DB_VERSION_MAJOR 1
19597 #endif
19598
19599 #ifndef NULL
19600 #define NULL ((void*)0)
19601 #endif
19602
19603 int main() {
19604
19605 #if DB_VERSION_MAJOR > 1
19606         {
19607                 char *version;
19608                 int major, minor, patch;
19609
19610                 version = db_version( &major, &minor, &patch );
19611
19612                 if( major != DB_VERSION_MAJOR ||
19613                         minor < DB_VERSION_MINOR )
19614                 {
19615                         printf("Berkeley DB version mismatch\n"
19616                                 "\theader: %s\n\tlibrary: %s\n",
19617                                 DB_VERSION_STRING, version);
19618                         return 1;
19619                 }
19620         }
19621 #endif
19622
19623 #if DB_VERSION_MAJOR > 2
19624         db_env_create( NULL, 0 );
19625 #elif DB_VERSION_MAJOR > 1
19626         db_appexit( NULL );
19627 #else
19628         (void) dbopen( NULL, 0, 0, 0, NULL);
19629 #endif
19630
19631 ; return 0; }
19632 EOF
19633 if { (eval echo configure:19634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19634   rm -rf conftest*
19635   ol_cv_db_db_4_dot_2=yes
19636 else
19637   echo "configure: failed program was:" >&5
19638   cat conftest.$ac_ext >&5
19639   rm -rf conftest*
19640   ol_cv_db_db_4_dot_2=no
19641 fi
19642 rm -f conftest*
19643
19644         LIBS="$ol_LIBS"
19645
19646 fi
19647
19648 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19649
19650         if test $ol_cv_db_db_4_dot_2 = yes ; then
19651                 ol_cv_lib_db=-ldb-4.2
19652         fi
19653 fi
19654
19655 if test $ol_cv_lib_db = no ; then
19656         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19657 echo "configure:19658: checking for Berkeley DB link (-ldb-4-2)" >&5
19658 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19659   echo $ac_n "(cached) $ac_c" 1>&6
19660 else
19661   
19662         ol_DB_LIB=-ldb-4-2
19663         ol_LIBS=$LIBS
19664         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19665
19666         cat > conftest.$ac_ext <<EOF
19667 #line 19668 "configure"
19668 #include "confdefs.h"
19669
19670 #ifdef HAVE_DB_185_H
19671 # include <db_185.h>
19672 #else
19673 # include <db.h>
19674 #endif
19675
19676 #ifndef DB_VERSION_MAJOR
19677 # define DB_VERSION_MAJOR 1
19678 #endif
19679
19680 #ifndef NULL
19681 #define NULL ((void*)0)
19682 #endif
19683
19684 int main() {
19685
19686 #if DB_VERSION_MAJOR > 1
19687         {
19688                 char *version;
19689                 int major, minor, patch;
19690
19691                 version = db_version( &major, &minor, &patch );
19692
19693                 if( major != DB_VERSION_MAJOR ||
19694                         minor < DB_VERSION_MINOR )
19695                 {
19696                         printf("Berkeley DB version mismatch\n"
19697                                 "\theader: %s\n\tlibrary: %s\n",
19698                                 DB_VERSION_STRING, version);
19699                         return 1;
19700                 }
19701         }
19702 #endif
19703
19704 #if DB_VERSION_MAJOR > 2
19705         db_env_create( NULL, 0 );
19706 #elif DB_VERSION_MAJOR > 1
19707         db_appexit( NULL );
19708 #else
19709         (void) dbopen( NULL, 0, 0, 0, NULL);
19710 #endif
19711
19712 ; return 0; }
19713 EOF
19714 if { (eval echo configure:19715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19715   rm -rf conftest*
19716   ol_cv_db_db_4_2=yes
19717 else
19718   echo "configure: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   rm -rf conftest*
19721   ol_cv_db_db_4_2=no
19722 fi
19723 rm -f conftest*
19724
19725         LIBS="$ol_LIBS"
19726
19727 fi
19728
19729 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19730
19731         if test $ol_cv_db_db_4_2 = yes ; then
19732                 ol_cv_lib_db=-ldb-4-2
19733         fi
19734 fi
19735
19736 if test $ol_cv_lib_db = no ; then
19737         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19738 echo "configure:19739: checking for Berkeley DB link (-ldb-4)" >&5
19739 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19740   echo $ac_n "(cached) $ac_c" 1>&6
19741 else
19742   
19743         ol_DB_LIB=-ldb-4
19744         ol_LIBS=$LIBS
19745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19746
19747         cat > conftest.$ac_ext <<EOF
19748 #line 19749 "configure"
19749 #include "confdefs.h"
19750
19751 #ifdef HAVE_DB_185_H
19752 # include <db_185.h>
19753 #else
19754 # include <db.h>
19755 #endif
19756
19757 #ifndef DB_VERSION_MAJOR
19758 # define DB_VERSION_MAJOR 1
19759 #endif
19760
19761 #ifndef NULL
19762 #define NULL ((void*)0)
19763 #endif
19764
19765 int main() {
19766
19767 #if DB_VERSION_MAJOR > 1
19768         {
19769                 char *version;
19770                 int major, minor, patch;
19771
19772                 version = db_version( &major, &minor, &patch );
19773
19774                 if( major != DB_VERSION_MAJOR ||
19775                         minor < DB_VERSION_MINOR )
19776                 {
19777                         printf("Berkeley DB version mismatch\n"
19778                                 "\theader: %s\n\tlibrary: %s\n",
19779                                 DB_VERSION_STRING, version);
19780                         return 1;
19781                 }
19782         }
19783 #endif
19784
19785 #if DB_VERSION_MAJOR > 2
19786         db_env_create( NULL, 0 );
19787 #elif DB_VERSION_MAJOR > 1
19788         db_appexit( NULL );
19789 #else
19790         (void) dbopen( NULL, 0, 0, 0, NULL);
19791 #endif
19792
19793 ; return 0; }
19794 EOF
19795 if { (eval echo configure:19796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19796   rm -rf conftest*
19797   ol_cv_db_db_4=yes
19798 else
19799   echo "configure: failed program was:" >&5
19800   cat conftest.$ac_ext >&5
19801   rm -rf conftest*
19802   ol_cv_db_db_4=no
19803 fi
19804 rm -f conftest*
19805
19806         LIBS="$ol_LIBS"
19807
19808 fi
19809
19810 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19811
19812         if test $ol_cv_db_db_4 = yes ; then
19813                 ol_cv_lib_db=-ldb-4
19814         fi
19815 fi
19816
19817 if test $ol_cv_lib_db = no ; then
19818         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19819 echo "configure:19820: checking for Berkeley DB link (-ldb4)" >&5
19820 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19821   echo $ac_n "(cached) $ac_c" 1>&6
19822 else
19823   
19824         ol_DB_LIB=-ldb4
19825         ol_LIBS=$LIBS
19826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19827
19828         cat > conftest.$ac_ext <<EOF
19829 #line 19830 "configure"
19830 #include "confdefs.h"
19831
19832 #ifdef HAVE_DB_185_H
19833 # include <db_185.h>
19834 #else
19835 # include <db.h>
19836 #endif
19837
19838 #ifndef DB_VERSION_MAJOR
19839 # define DB_VERSION_MAJOR 1
19840 #endif
19841
19842 #ifndef NULL
19843 #define NULL ((void*)0)
19844 #endif
19845
19846 int main() {
19847
19848 #if DB_VERSION_MAJOR > 1
19849         {
19850                 char *version;
19851                 int major, minor, patch;
19852
19853                 version = db_version( &major, &minor, &patch );
19854
19855                 if( major != DB_VERSION_MAJOR ||
19856                         minor < DB_VERSION_MINOR )
19857                 {
19858                         printf("Berkeley DB version mismatch\n"
19859                                 "\theader: %s\n\tlibrary: %s\n",
19860                                 DB_VERSION_STRING, version);
19861                         return 1;
19862                 }
19863         }
19864 #endif
19865
19866 #if DB_VERSION_MAJOR > 2
19867         db_env_create( NULL, 0 );
19868 #elif DB_VERSION_MAJOR > 1
19869         db_appexit( NULL );
19870 #else
19871         (void) dbopen( NULL, 0, 0, 0, NULL);
19872 #endif
19873
19874 ; return 0; }
19875 EOF
19876 if { (eval echo configure:19877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19877   rm -rf conftest*
19878   ol_cv_db_db4=yes
19879 else
19880   echo "configure: failed program was:" >&5
19881   cat conftest.$ac_ext >&5
19882   rm -rf conftest*
19883   ol_cv_db_db4=no
19884 fi
19885 rm -f conftest*
19886
19887         LIBS="$ol_LIBS"
19888
19889 fi
19890
19891 echo "$ac_t""$ol_cv_db_db4" 1>&6
19892
19893         if test $ol_cv_db_db4 = yes ; then
19894                 ol_cv_lib_db=-ldb4
19895         fi
19896 fi
19897
19898 if test $ol_cv_lib_db = no ; then
19899         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19900 echo "configure:19901: checking for Berkeley DB link (-ldb)" >&5
19901 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19902   echo $ac_n "(cached) $ac_c" 1>&6
19903 else
19904   
19905         ol_DB_LIB=-ldb
19906         ol_LIBS=$LIBS
19907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19908
19909         cat > conftest.$ac_ext <<EOF
19910 #line 19911 "configure"
19911 #include "confdefs.h"
19912
19913 #ifdef HAVE_DB_185_H
19914 # include <db_185.h>
19915 #else
19916 # include <db.h>
19917 #endif
19918
19919 #ifndef DB_VERSION_MAJOR
19920 # define DB_VERSION_MAJOR 1
19921 #endif
19922
19923 #ifndef NULL
19924 #define NULL ((void*)0)
19925 #endif
19926
19927 int main() {
19928
19929 #if DB_VERSION_MAJOR > 1
19930         {
19931                 char *version;
19932                 int major, minor, patch;
19933
19934                 version = db_version( &major, &minor, &patch );
19935
19936                 if( major != DB_VERSION_MAJOR ||
19937                         minor < DB_VERSION_MINOR )
19938                 {
19939                         printf("Berkeley DB version mismatch\n"
19940                                 "\theader: %s\n\tlibrary: %s\n",
19941                                 DB_VERSION_STRING, version);
19942                         return 1;
19943                 }
19944         }
19945 #endif
19946
19947 #if DB_VERSION_MAJOR > 2
19948         db_env_create( NULL, 0 );
19949 #elif DB_VERSION_MAJOR > 1
19950         db_appexit( NULL );
19951 #else
19952         (void) dbopen( NULL, 0, 0, 0, NULL);
19953 #endif
19954
19955 ; return 0; }
19956 EOF
19957 if { (eval echo configure:19958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19958   rm -rf conftest*
19959   ol_cv_db_db=yes
19960 else
19961   echo "configure: failed program was:" >&5
19962   cat conftest.$ac_ext >&5
19963   rm -rf conftest*
19964   ol_cv_db_db=no
19965 fi
19966 rm -f conftest*
19967
19968         LIBS="$ol_LIBS"
19969
19970 fi
19971
19972 echo "$ac_t""$ol_cv_db_db" 1>&6
19973
19974         if test $ol_cv_db_db = yes ; then
19975                 ol_cv_lib_db=-ldb
19976         fi
19977 fi
19978
19979 if test $ol_cv_lib_db = no ; then
19980         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19981 echo "configure:19982: checking for Berkeley DB link (-ldb41)" >&5
19982 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19983   echo $ac_n "(cached) $ac_c" 1>&6
19984 else
19985   
19986         ol_DB_LIB=-ldb41
19987         ol_LIBS=$LIBS
19988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19989
19990         cat > conftest.$ac_ext <<EOF
19991 #line 19992 "configure"
19992 #include "confdefs.h"
19993
19994 #ifdef HAVE_DB_185_H
19995 # include <db_185.h>
19996 #else
19997 # include <db.h>
19998 #endif
19999
20000 #ifndef DB_VERSION_MAJOR
20001 # define DB_VERSION_MAJOR 1
20002 #endif
20003
20004 #ifndef NULL
20005 #define NULL ((void*)0)
20006 #endif
20007
20008 int main() {
20009
20010 #if DB_VERSION_MAJOR > 1
20011         {
20012                 char *version;
20013                 int major, minor, patch;
20014
20015                 version = db_version( &major, &minor, &patch );
20016
20017                 if( major != DB_VERSION_MAJOR ||
20018                         minor < DB_VERSION_MINOR )
20019                 {
20020                         printf("Berkeley DB version mismatch\n"
20021                                 "\theader: %s\n\tlibrary: %s\n",
20022                                 DB_VERSION_STRING, version);
20023                         return 1;
20024                 }
20025         }
20026 #endif
20027
20028 #if DB_VERSION_MAJOR > 2
20029         db_env_create( NULL, 0 );
20030 #elif DB_VERSION_MAJOR > 1
20031         db_appexit( NULL );
20032 #else
20033         (void) dbopen( NULL, 0, 0, 0, NULL);
20034 #endif
20035
20036 ; return 0; }
20037 EOF
20038 if { (eval echo configure:20039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20039   rm -rf conftest*
20040   ol_cv_db_db41=yes
20041 else
20042   echo "configure: failed program was:" >&5
20043   cat conftest.$ac_ext >&5
20044   rm -rf conftest*
20045   ol_cv_db_db41=no
20046 fi
20047 rm -f conftest*
20048
20049         LIBS="$ol_LIBS"
20050
20051 fi
20052
20053 echo "$ac_t""$ol_cv_db_db41" 1>&6
20054
20055         if test $ol_cv_db_db41 = yes ; then
20056                 ol_cv_lib_db=-ldb41
20057         fi
20058 fi
20059
20060 if test $ol_cv_lib_db = no ; then
20061         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
20062 echo "configure:20063: checking for Berkeley DB link (-ldb-41)" >&5
20063 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
20064   echo $ac_n "(cached) $ac_c" 1>&6
20065 else
20066   
20067         ol_DB_LIB=-ldb-41
20068         ol_LIBS=$LIBS
20069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20070
20071         cat > conftest.$ac_ext <<EOF
20072 #line 20073 "configure"
20073 #include "confdefs.h"
20074
20075 #ifdef HAVE_DB_185_H
20076 # include <db_185.h>
20077 #else
20078 # include <db.h>
20079 #endif
20080
20081 #ifndef DB_VERSION_MAJOR
20082 # define DB_VERSION_MAJOR 1
20083 #endif
20084
20085 #ifndef NULL
20086 #define NULL ((void*)0)
20087 #endif
20088
20089 int main() {
20090
20091 #if DB_VERSION_MAJOR > 1
20092         {
20093                 char *version;
20094                 int major, minor, patch;
20095
20096                 version = db_version( &major, &minor, &patch );
20097
20098                 if( major != DB_VERSION_MAJOR ||
20099                         minor < DB_VERSION_MINOR )
20100                 {
20101                         printf("Berkeley DB version mismatch\n"
20102                                 "\theader: %s\n\tlibrary: %s\n",
20103                                 DB_VERSION_STRING, version);
20104                         return 1;
20105                 }
20106         }
20107 #endif
20108
20109 #if DB_VERSION_MAJOR > 2
20110         db_env_create( NULL, 0 );
20111 #elif DB_VERSION_MAJOR > 1
20112         db_appexit( NULL );
20113 #else
20114         (void) dbopen( NULL, 0, 0, 0, NULL);
20115 #endif
20116
20117 ; return 0; }
20118 EOF
20119 if { (eval echo configure:20120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20120   rm -rf conftest*
20121   ol_cv_db_db_41=yes
20122 else
20123   echo "configure: failed program was:" >&5
20124   cat conftest.$ac_ext >&5
20125   rm -rf conftest*
20126   ol_cv_db_db_41=no
20127 fi
20128 rm -f conftest*
20129
20130         LIBS="$ol_LIBS"
20131
20132 fi
20133
20134 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20135
20136         if test $ol_cv_db_db_41 = yes ; then
20137                 ol_cv_lib_db=-ldb-41
20138         fi
20139 fi
20140
20141 if test $ol_cv_lib_db = no ; then
20142         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20143 echo "configure:20144: checking for Berkeley DB link (-ldb-4.1)" >&5
20144 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20145   echo $ac_n "(cached) $ac_c" 1>&6
20146 else
20147   
20148         ol_DB_LIB=-ldb-4.1
20149         ol_LIBS=$LIBS
20150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20151
20152         cat > conftest.$ac_ext <<EOF
20153 #line 20154 "configure"
20154 #include "confdefs.h"
20155
20156 #ifdef HAVE_DB_185_H
20157 # include <db_185.h>
20158 #else
20159 # include <db.h>
20160 #endif
20161
20162 #ifndef DB_VERSION_MAJOR
20163 # define DB_VERSION_MAJOR 1
20164 #endif
20165
20166 #ifndef NULL
20167 #define NULL ((void*)0)
20168 #endif
20169
20170 int main() {
20171
20172 #if DB_VERSION_MAJOR > 1
20173         {
20174                 char *version;
20175                 int major, minor, patch;
20176
20177                 version = db_version( &major, &minor, &patch );
20178
20179                 if( major != DB_VERSION_MAJOR ||
20180                         minor < DB_VERSION_MINOR )
20181                 {
20182                         printf("Berkeley DB version mismatch\n"
20183                                 "\theader: %s\n\tlibrary: %s\n",
20184                                 DB_VERSION_STRING, version);
20185                         return 1;
20186                 }
20187         }
20188 #endif
20189
20190 #if DB_VERSION_MAJOR > 2
20191         db_env_create( NULL, 0 );
20192 #elif DB_VERSION_MAJOR > 1
20193         db_appexit( NULL );
20194 #else
20195         (void) dbopen( NULL, 0, 0, 0, NULL);
20196 #endif
20197
20198 ; return 0; }
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20201   rm -rf conftest*
20202   ol_cv_db_db_4_dot_1=yes
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -rf conftest*
20207   ol_cv_db_db_4_dot_1=no
20208 fi
20209 rm -f conftest*
20210
20211         LIBS="$ol_LIBS"
20212
20213 fi
20214
20215 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20216
20217         if test $ol_cv_db_db_4_dot_1 = yes ; then
20218                 ol_cv_lib_db=-ldb-4.1
20219         fi
20220 fi
20221
20222 if test $ol_cv_lib_db = no ; then
20223         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20224 echo "configure:20225: checking for Berkeley DB link (-ldb-4-1)" >&5
20225 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20226   echo $ac_n "(cached) $ac_c" 1>&6
20227 else
20228   
20229         ol_DB_LIB=-ldb-4-1
20230         ol_LIBS=$LIBS
20231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20232
20233         cat > conftest.$ac_ext <<EOF
20234 #line 20235 "configure"
20235 #include "confdefs.h"
20236
20237 #ifdef HAVE_DB_185_H
20238 # include <db_185.h>
20239 #else
20240 # include <db.h>
20241 #endif
20242
20243 #ifndef DB_VERSION_MAJOR
20244 # define DB_VERSION_MAJOR 1
20245 #endif
20246
20247 #ifndef NULL
20248 #define NULL ((void*)0)
20249 #endif
20250
20251 int main() {
20252
20253 #if DB_VERSION_MAJOR > 1
20254         {
20255                 char *version;
20256                 int major, minor, patch;
20257
20258                 version = db_version( &major, &minor, &patch );
20259
20260                 if( major != DB_VERSION_MAJOR ||
20261                         minor < DB_VERSION_MINOR )
20262                 {
20263                         printf("Berkeley DB version mismatch\n"
20264                                 "\theader: %s\n\tlibrary: %s\n",
20265                                 DB_VERSION_STRING, version);
20266                         return 1;
20267                 }
20268         }
20269 #endif
20270
20271 #if DB_VERSION_MAJOR > 2
20272         db_env_create( NULL, 0 );
20273 #elif DB_VERSION_MAJOR > 1
20274         db_appexit( NULL );
20275 #else
20276         (void) dbopen( NULL, 0, 0, 0, NULL);
20277 #endif
20278
20279 ; return 0; }
20280 EOF
20281 if { (eval echo configure:20282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20282   rm -rf conftest*
20283   ol_cv_db_db_4_1=yes
20284 else
20285   echo "configure: failed program was:" >&5
20286   cat conftest.$ac_ext >&5
20287   rm -rf conftest*
20288   ol_cv_db_db_4_1=no
20289 fi
20290 rm -f conftest*
20291
20292         LIBS="$ol_LIBS"
20293
20294 fi
20295
20296 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20297
20298         if test $ol_cv_db_db_4_1 = yes ; then
20299                 ol_cv_lib_db=-ldb-4-1
20300         fi
20301 fi
20302
20303 if test $ol_cv_lib_db = no ; then
20304         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20305 echo "configure:20306: checking for Berkeley DB link (-ldb3)" >&5
20306 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20307   echo $ac_n "(cached) $ac_c" 1>&6
20308 else
20309   
20310         ol_DB_LIB=-ldb3
20311         ol_LIBS=$LIBS
20312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20313
20314         cat > conftest.$ac_ext <<EOF
20315 #line 20316 "configure"
20316 #include "confdefs.h"
20317
20318 #ifdef HAVE_DB_185_H
20319 # include <db_185.h>
20320 #else
20321 # include <db.h>
20322 #endif
20323
20324 #ifndef DB_VERSION_MAJOR
20325 # define DB_VERSION_MAJOR 1
20326 #endif
20327
20328 #ifndef NULL
20329 #define NULL ((void*)0)
20330 #endif
20331
20332 int main() {
20333
20334 #if DB_VERSION_MAJOR > 1
20335         {
20336                 char *version;
20337                 int major, minor, patch;
20338
20339                 version = db_version( &major, &minor, &patch );
20340
20341                 if( major != DB_VERSION_MAJOR ||
20342                         minor < DB_VERSION_MINOR )
20343                 {
20344                         printf("Berkeley DB version mismatch\n"
20345                                 "\theader: %s\n\tlibrary: %s\n",
20346                                 DB_VERSION_STRING, version);
20347                         return 1;
20348                 }
20349         }
20350 #endif
20351
20352 #if DB_VERSION_MAJOR > 2
20353         db_env_create( NULL, 0 );
20354 #elif DB_VERSION_MAJOR > 1
20355         db_appexit( NULL );
20356 #else
20357         (void) dbopen( NULL, 0, 0, 0, NULL);
20358 #endif
20359
20360 ; return 0; }
20361 EOF
20362 if { (eval echo configure:20363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20363   rm -rf conftest*
20364   ol_cv_db_db3=yes
20365 else
20366   echo "configure: failed program was:" >&5
20367   cat conftest.$ac_ext >&5
20368   rm -rf conftest*
20369   ol_cv_db_db3=no
20370 fi
20371 rm -f conftest*
20372
20373         LIBS="$ol_LIBS"
20374
20375 fi
20376
20377 echo "$ac_t""$ol_cv_db_db3" 1>&6
20378
20379         if test $ol_cv_db_db3 = yes ; then
20380                 ol_cv_lib_db=-ldb3
20381         fi
20382 fi
20383
20384 if test $ol_cv_lib_db = no ; then
20385         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20386 echo "configure:20387: checking for Berkeley DB link (-ldb-3)" >&5
20387 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20388   echo $ac_n "(cached) $ac_c" 1>&6
20389 else
20390   
20391         ol_DB_LIB=-ldb-3
20392         ol_LIBS=$LIBS
20393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20394
20395         cat > conftest.$ac_ext <<EOF
20396 #line 20397 "configure"
20397 #include "confdefs.h"
20398
20399 #ifdef HAVE_DB_185_H
20400 # include <db_185.h>
20401 #else
20402 # include <db.h>
20403 #endif
20404
20405 #ifndef DB_VERSION_MAJOR
20406 # define DB_VERSION_MAJOR 1
20407 #endif
20408
20409 #ifndef NULL
20410 #define NULL ((void*)0)
20411 #endif
20412
20413 int main() {
20414
20415 #if DB_VERSION_MAJOR > 1
20416         {
20417                 char *version;
20418                 int major, minor, patch;
20419
20420                 version = db_version( &major, &minor, &patch );
20421
20422                 if( major != DB_VERSION_MAJOR ||
20423                         minor < DB_VERSION_MINOR )
20424                 {
20425                         printf("Berkeley DB version mismatch\n"
20426                                 "\theader: %s\n\tlibrary: %s\n",
20427                                 DB_VERSION_STRING, version);
20428                         return 1;
20429                 }
20430         }
20431 #endif
20432
20433 #if DB_VERSION_MAJOR > 2
20434         db_env_create( NULL, 0 );
20435 #elif DB_VERSION_MAJOR > 1
20436         db_appexit( NULL );
20437 #else
20438         (void) dbopen( NULL, 0, 0, 0, NULL);
20439 #endif
20440
20441 ; return 0; }
20442 EOF
20443 if { (eval echo configure:20444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20444   rm -rf conftest*
20445   ol_cv_db_db_3=yes
20446 else
20447   echo "configure: failed program was:" >&5
20448   cat conftest.$ac_ext >&5
20449   rm -rf conftest*
20450   ol_cv_db_db_3=no
20451 fi
20452 rm -f conftest*
20453
20454         LIBS="$ol_LIBS"
20455
20456 fi
20457
20458 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20459
20460         if test $ol_cv_db_db_3 = yes ; then
20461                 ol_cv_lib_db=-ldb-3
20462         fi
20463 fi
20464
20465 if test $ol_cv_lib_db = no ; then
20466         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20467 echo "configure:20468: checking for Berkeley DB link (-ldb2)" >&5
20468 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   
20472         ol_DB_LIB=-ldb2
20473         ol_LIBS=$LIBS
20474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20475
20476         cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479
20480 #ifdef HAVE_DB_185_H
20481 # include <db_185.h>
20482 #else
20483 # include <db.h>
20484 #endif
20485
20486 #ifndef DB_VERSION_MAJOR
20487 # define DB_VERSION_MAJOR 1
20488 #endif
20489
20490 #ifndef NULL
20491 #define NULL ((void*)0)
20492 #endif
20493
20494 int main() {
20495
20496 #if DB_VERSION_MAJOR > 1
20497         {
20498                 char *version;
20499                 int major, minor, patch;
20500
20501                 version = db_version( &major, &minor, &patch );
20502
20503                 if( major != DB_VERSION_MAJOR ||
20504                         minor < DB_VERSION_MINOR )
20505                 {
20506                         printf("Berkeley DB version mismatch\n"
20507                                 "\theader: %s\n\tlibrary: %s\n",
20508                                 DB_VERSION_STRING, version);
20509                         return 1;
20510                 }
20511         }
20512 #endif
20513
20514 #if DB_VERSION_MAJOR > 2
20515         db_env_create( NULL, 0 );
20516 #elif DB_VERSION_MAJOR > 1
20517         db_appexit( NULL );
20518 #else
20519         (void) dbopen( NULL, 0, 0, 0, NULL);
20520 #endif
20521
20522 ; return 0; }
20523 EOF
20524 if { (eval echo configure:20525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20525   rm -rf conftest*
20526   ol_cv_db_db2=yes
20527 else
20528   echo "configure: failed program was:" >&5
20529   cat conftest.$ac_ext >&5
20530   rm -rf conftest*
20531   ol_cv_db_db2=no
20532 fi
20533 rm -f conftest*
20534
20535         LIBS="$ol_LIBS"
20536
20537 fi
20538
20539 echo "$ac_t""$ol_cv_db_db2" 1>&6
20540
20541         if test $ol_cv_db_db2 = yes ; then
20542                 ol_cv_lib_db=-ldb2
20543         fi
20544 fi
20545
20546 if test $ol_cv_lib_db = no ; then
20547         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20548 echo "configure:20549: checking for Berkeley DB link (-ldb-2)" >&5
20549 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20550   echo $ac_n "(cached) $ac_c" 1>&6
20551 else
20552   
20553         ol_DB_LIB=-ldb-2
20554         ol_LIBS=$LIBS
20555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20556
20557         cat > conftest.$ac_ext <<EOF
20558 #line 20559 "configure"
20559 #include "confdefs.h"
20560
20561 #ifdef HAVE_DB_185_H
20562 # include <db_185.h>
20563 #else
20564 # include <db.h>
20565 #endif
20566
20567 #ifndef DB_VERSION_MAJOR
20568 # define DB_VERSION_MAJOR 1
20569 #endif
20570
20571 #ifndef NULL
20572 #define NULL ((void*)0)
20573 #endif
20574
20575 int main() {
20576
20577 #if DB_VERSION_MAJOR > 1
20578         {
20579                 char *version;
20580                 int major, minor, patch;
20581
20582                 version = db_version( &major, &minor, &patch );
20583
20584                 if( major != DB_VERSION_MAJOR ||
20585                         minor < DB_VERSION_MINOR )
20586                 {
20587                         printf("Berkeley DB version mismatch\n"
20588                                 "\theader: %s\n\tlibrary: %s\n",
20589                                 DB_VERSION_STRING, version);
20590                         return 1;
20591                 }
20592         }
20593 #endif
20594
20595 #if DB_VERSION_MAJOR > 2
20596         db_env_create( NULL, 0 );
20597 #elif DB_VERSION_MAJOR > 1
20598         db_appexit( NULL );
20599 #else
20600         (void) dbopen( NULL, 0, 0, 0, NULL);
20601 #endif
20602
20603 ; return 0; }
20604 EOF
20605 if { (eval echo configure:20606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20606   rm -rf conftest*
20607   ol_cv_db_db_2=yes
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   ol_cv_db_db_2=no
20613 fi
20614 rm -f conftest*
20615
20616         LIBS="$ol_LIBS"
20617
20618 fi
20619
20620 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20621
20622         if test $ol_cv_db_db_2 = yes ; then
20623                 ol_cv_lib_db=-ldb-2
20624         fi
20625 fi
20626
20627 if test $ol_cv_lib_db = no ; then
20628         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20629 echo "configure:20630: checking for Berkeley DB link (-ldb1)" >&5
20630 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20631   echo $ac_n "(cached) $ac_c" 1>&6
20632 else
20633   
20634         ol_DB_LIB=-ldb1
20635         ol_LIBS=$LIBS
20636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20637
20638         cat > conftest.$ac_ext <<EOF
20639 #line 20640 "configure"
20640 #include "confdefs.h"
20641
20642 #ifdef HAVE_DB_185_H
20643 # include <db_185.h>
20644 #else
20645 # include <db.h>
20646 #endif
20647
20648 #ifndef DB_VERSION_MAJOR
20649 # define DB_VERSION_MAJOR 1
20650 #endif
20651
20652 #ifndef NULL
20653 #define NULL ((void*)0)
20654 #endif
20655
20656 int main() {
20657
20658 #if DB_VERSION_MAJOR > 1
20659         {
20660                 char *version;
20661                 int major, minor, patch;
20662
20663                 version = db_version( &major, &minor, &patch );
20664
20665                 if( major != DB_VERSION_MAJOR ||
20666                         minor < DB_VERSION_MINOR )
20667                 {
20668                         printf("Berkeley DB version mismatch\n"
20669                                 "\theader: %s\n\tlibrary: %s\n",
20670                                 DB_VERSION_STRING, version);
20671                         return 1;
20672                 }
20673         }
20674 #endif
20675
20676 #if DB_VERSION_MAJOR > 2
20677         db_env_create( NULL, 0 );
20678 #elif DB_VERSION_MAJOR > 1
20679         db_appexit( NULL );
20680 #else
20681         (void) dbopen( NULL, 0, 0, 0, NULL);
20682 #endif
20683
20684 ; return 0; }
20685 EOF
20686 if { (eval echo configure:20687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20687   rm -rf conftest*
20688   ol_cv_db_db1=yes
20689 else
20690   echo "configure: failed program was:" >&5
20691   cat conftest.$ac_ext >&5
20692   rm -rf conftest*
20693   ol_cv_db_db1=no
20694 fi
20695 rm -f conftest*
20696
20697         LIBS="$ol_LIBS"
20698
20699 fi
20700
20701 echo "$ac_t""$ol_cv_db_db1" 1>&6
20702
20703         if test $ol_cv_db_db1 = yes ; then
20704                 ol_cv_lib_db=-ldb1
20705         fi
20706 fi
20707
20708 if test $ol_cv_lib_db = no ; then
20709         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20710 echo "configure:20711: checking for Berkeley DB link (-ldb-1)" >&5
20711 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20712   echo $ac_n "(cached) $ac_c" 1>&6
20713 else
20714   
20715         ol_DB_LIB=-ldb-1
20716         ol_LIBS=$LIBS
20717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20718
20719         cat > conftest.$ac_ext <<EOF
20720 #line 20721 "configure"
20721 #include "confdefs.h"
20722
20723 #ifdef HAVE_DB_185_H
20724 # include <db_185.h>
20725 #else
20726 # include <db.h>
20727 #endif
20728
20729 #ifndef DB_VERSION_MAJOR
20730 # define DB_VERSION_MAJOR 1
20731 #endif
20732
20733 #ifndef NULL
20734 #define NULL ((void*)0)
20735 #endif
20736
20737 int main() {
20738
20739 #if DB_VERSION_MAJOR > 1
20740         {
20741                 char *version;
20742                 int major, minor, patch;
20743
20744                 version = db_version( &major, &minor, &patch );
20745
20746                 if( major != DB_VERSION_MAJOR ||
20747                         minor < DB_VERSION_MINOR )
20748                 {
20749                         printf("Berkeley DB version mismatch\n"
20750                                 "\theader: %s\n\tlibrary: %s\n",
20751                                 DB_VERSION_STRING, version);
20752                         return 1;
20753                 }
20754         }
20755 #endif
20756
20757 #if DB_VERSION_MAJOR > 2
20758         db_env_create( NULL, 0 );
20759 #elif DB_VERSION_MAJOR > 1
20760         db_appexit( NULL );
20761 #else
20762         (void) dbopen( NULL, 0, 0, 0, NULL);
20763 #endif
20764
20765 ; return 0; }
20766 EOF
20767 if { (eval echo configure:20768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20768   rm -rf conftest*
20769   ol_cv_db_db_1=yes
20770 else
20771   echo "configure: failed program was:" >&5
20772   cat conftest.$ac_ext >&5
20773   rm -rf conftest*
20774   ol_cv_db_db_1=no
20775 fi
20776 rm -f conftest*
20777
20778         LIBS="$ol_LIBS"
20779
20780 fi
20781
20782 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20783
20784         if test $ol_cv_db_db_1 = yes ; then
20785                 ol_cv_lib_db=-ldb-1
20786         fi
20787 fi
20788
20789
20790         if test "$ol_cv_lib_db" != no ; then
20791                 ol_cv_berkeley_db=yes
20792                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20793 echo "configure:20794: checking for Berkeley DB version match" >&5
20794 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20795   echo $ac_n "(cached) $ac_c" 1>&6
20796 else
20797   
20798         ol_LIBS="$LIBS"
20799         LIBS="$LTHREAD_LIBS $LIBS"
20800         if test $ol_cv_lib_db != yes ; then
20801                 LIBS="$ol_cv_lib_db $LIBS"
20802         fi
20803
20804         if test "$cross_compiling" = yes; then
20805   ol_cv_berkeley_db_version=cross
20806 else
20807   cat > conftest.$ac_ext <<EOF
20808 #line 20809 "configure"
20809 #include "confdefs.h"
20810
20811 #ifdef HAVE_DB_185_H
20812         choke me;
20813 #else
20814 #include <db.h>
20815 #endif
20816 #ifndef DB_VERSION_MAJOR
20817 # define DB_VERSION_MAJOR 1
20818 #endif
20819 #ifndef NULL
20820 #define NULL ((void *)0)
20821 #endif
20822 main()
20823 {
20824 #if DB_VERSION_MAJOR > 1
20825         char *version;
20826         int major, minor, patch;
20827
20828         version = db_version( &major, &minor, &patch );
20829
20830         if( major != DB_VERSION_MAJOR ||
20831                 minor != DB_VERSION_MINOR ||
20832                 patch != DB_VERSION_PATCH )
20833         {
20834                 printf("Berkeley DB version mismatch\n"
20835                         "\theader: %s\n\tlibrary: %s\n",
20836                         DB_VERSION_STRING, version);
20837                 return 1;
20838         }
20839 #endif
20840
20841         return 0;
20842 }
20843 EOF
20844 if { (eval echo configure:20845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20845 then
20846   ol_cv_berkeley_db_version=yes
20847 else
20848   echo "configure: failed program was:" >&5
20849   cat conftest.$ac_ext >&5
20850   rm -fr conftest*
20851   ol_cv_berkeley_db_version=no
20852 fi
20853 rm -fr conftest*
20854 fi
20855
20856
20857         LIBS="$ol_LIBS"
20858
20859 fi
20860
20861 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20862
20863         if test $ol_cv_berkeley_db_version = no ; then
20864                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20865         fi
20866
20867                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20868 echo "configure:20869: checking for Berkeley DB thread support" >&5
20869 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20870   echo $ac_n "(cached) $ac_c" 1>&6
20871 else
20872   
20873         ol_LIBS="$LIBS"
20874         LIBS="$LTHREAD_LIBS $LIBS"
20875         if test $ol_cv_lib_db != yes ; then
20876                 LIBS="$ol_cv_lib_db $LIBS"
20877         fi
20878
20879         if test "$cross_compiling" = yes; then
20880   ol_cv_berkeley_db_thread=cross
20881 else
20882   cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885
20886 #ifdef HAVE_DB_185_H
20887         choke me;
20888 #else
20889 #include <db.h>
20890 #endif
20891 #ifndef NULL
20892 #define NULL ((void *)0)
20893 #endif
20894 main()
20895 {
20896         int rc;
20897         u_int32_t flags = DB_CREATE |
20898 #ifdef DB_PRIVATE
20899                 DB_PRIVATE |
20900 #endif
20901                 DB_THREAD;
20902
20903 #if DB_VERSION_MAJOR > 2
20904         DB_ENV *env = NULL;
20905
20906         rc = db_env_create( &env, 0 );
20907
20908         flags |= DB_INIT_MPOOL;
20909 #ifdef DB_MPOOL_PRIVATE
20910         flags |= DB_MPOOL_PRIVATE;
20911 #endif
20912
20913         if( rc ) {
20914                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20915                 return rc;
20916         }
20917
20918 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20919         rc = env->open( env, NULL, flags, 0 );
20920 #else
20921         rc = env->open( env, NULL, NULL, flags, 0 );
20922 #endif
20923
20924         if ( rc == 0 ) {
20925                 rc = env->close( env, 0 );
20926         }
20927
20928         if( rc ) {
20929                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20930                 return rc;
20931         }
20932
20933 #else
20934         DB_ENV env;
20935         memset( &env, '\0', sizeof(env) );
20936
20937         rc = db_appinit( NULL, NULL, &env, flags );
20938
20939         if( rc == 0 ) {
20940                 db_appexit( &env );
20941         }
20942
20943         unlink("__db_mpool.share");
20944         unlink("__db_lock.share");
20945 #endif
20946
20947         return rc;
20948 }
20949 EOF
20950 if { (eval echo configure:20951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20951 then
20952   ol_cv_berkeley_db_thread=yes
20953 else
20954   echo "configure: failed program was:" >&5
20955   cat conftest.$ac_ext >&5
20956   rm -fr conftest*
20957   ol_cv_berkeley_db_thread=no
20958 fi
20959 rm -fr conftest*
20960 fi
20961
20962
20963         LIBS="$ol_LIBS"
20964
20965 fi
20966
20967 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20968
20969         if test $ol_cv_berkeley_db_thread != no ; then
20970                 cat >> confdefs.h <<\EOF
20971 #define HAVE_BERKELEY_DB_THREAD 1
20972 EOF
20973
20974         fi
20975
20976         fi
20977 fi
20978
20979         fi
20980
20981         if test $ol_cv_berkeley_db != no ; then
20982                 cat >> confdefs.h <<\EOF
20983 #define HAVE_BERKELEY_DB 1
20984 EOF
20985
20986
20987                 ol_link_ldbm=berkeley
20988                 ol_with_ldbm_api=berkeley
20989
20990                 if test $ol_with_ldbm_type = hash ; then
20991                         cat >> confdefs.h <<\EOF
20992 #define LDBM_USE_DBHASH 1
20993 EOF
20994
20995                 else
20996                         cat >> confdefs.h <<\EOF
20997 #define LDBM_USE_DBBTREE 1
20998 EOF
20999
21000                 fi
21001
21002                                                 if test $ol_cv_lib_db != yes ; then
21003                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
21004                 fi
21005         fi
21006 fi
21007
21008 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
21009         if test $ol_link_ldbm != berkeley ; then
21010                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
21011         else
21012                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
21013 echo "configure:21014: checking Berkeley DB version for BDB backend" >&5
21014 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
21015   echo $ac_n "(cached) $ac_c" 1>&6
21016 else
21017   
21018         cat > conftest.$ac_ext <<EOF
21019 #line 21020 "configure"
21020 #include "confdefs.h"
21021
21022 #include <db.h>
21023
21024  /* this check could be improved */
21025 #ifndef DB_VERSION_MAJOR
21026 #       define DB_VERSION_MAJOR 1
21027 #endif
21028 #ifndef DB_VERSION_MINOR
21029 #       define DB_VERSION_MINOR 0
21030 #endif
21031
21032 /* require 4.2 or later */
21033 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
21034         __db_version_compat
21035 #endif
21036         
21037 EOF
21038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21039   egrep "__db_version_compat" >/dev/null 2>&1; then
21040   rm -rf conftest*
21041   ol_cv_bdb_compat=yes
21042 else
21043   rm -rf conftest*
21044   ol_cv_bdb_compat=no
21045 fi
21046 rm -f conftest*
21047
21048 fi
21049
21050 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
21051
21052
21053                 if test $ol_cv_bdb_compat != yes ; then
21054                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
21055                 fi
21056         fi
21057 fi
21058
21059 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
21060         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
21061         ol_with_ldbm_api=none
21062 fi
21063
21064 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
21065         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
21066 echo "configure:21067: checking for MDBM library" >&5
21067 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
21068   echo $ac_n "(cached) $ac_c" 1>&6
21069 else
21070         ol_LIBS="$LIBS"
21071         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
21072 echo "configure:21073: checking for mdbm_set_chain" >&5
21073 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
21074   echo $ac_n "(cached) $ac_c" 1>&6
21075 else
21076   cat > conftest.$ac_ext <<EOF
21077 #line 21078 "configure"
21078 #include "confdefs.h"
21079 /* System header to define __stub macros and hopefully few prototypes,
21080     which can conflict with char mdbm_set_chain(); below.  */
21081 #include <assert.h>
21082 /* Override any gcc2 internal prototype to avoid an error.  */
21083 /* We use char because int might match the return type of a gcc2
21084     builtin and then its argument prototype would still apply.  */
21085 char mdbm_set_chain();
21086 char (*f)();
21087
21088 int main() {
21089
21090 /* The GNU C library defines this for functions which it implements
21091     to always fail with ENOSYS.  Some functions are actually named
21092     something starting with __ and the normal name is an alias.  */
21093 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21094 choke me
21095 #else
21096 f = mdbm_set_chain;
21097 #endif
21098
21099 ; return 0; }
21100 EOF
21101 if { (eval echo configure:21102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21102   rm -rf conftest*
21103   eval "ac_cv_func_mdbm_set_chain=yes"
21104 else
21105   echo "configure: failed program was:" >&5
21106   cat conftest.$ac_ext >&5
21107   rm -rf conftest*
21108   eval "ac_cv_func_mdbm_set_chain=no"
21109 fi
21110 rm -f conftest*
21111 fi
21112
21113 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21114   echo "$ac_t""yes" 1>&6
21115   ol_cv_lib_mdbm=yes
21116 else
21117   echo "$ac_t""no" 1>&6
21118
21119                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21120 echo "configure:21121: checking for mdbm_set_chain in -lmdbm" >&5
21121 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21123   echo $ac_n "(cached) $ac_c" 1>&6
21124 else
21125   ac_save_LIBS="$LIBS"
21126 LIBS="-lmdbm  $LIBS"
21127 cat > conftest.$ac_ext <<EOF
21128 #line 21129 "configure"
21129 #include "confdefs.h"
21130 /* Override any gcc2 internal prototype to avoid an error.  */
21131 /* We use char because int might match the return type of a gcc2
21132     builtin and then its argument prototype would still apply.  */
21133 char mdbm_set_chain();
21134
21135 int main() {
21136 mdbm_set_chain()
21137 ; return 0; }
21138 EOF
21139 if { (eval echo configure:21140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21140   rm -rf conftest*
21141   eval "ac_cv_lib_$ac_lib_var=yes"
21142 else
21143   echo "configure: failed program was:" >&5
21144   cat conftest.$ac_ext >&5
21145   rm -rf conftest*
21146   eval "ac_cv_lib_$ac_lib_var=no"
21147 fi
21148 rm -f conftest*
21149 LIBS="$ac_save_LIBS"
21150
21151 fi
21152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21153   echo "$ac_t""yes" 1>&6
21154   ol_cv_lib_mdbm=-lmdbm
21155 else
21156   echo "$ac_t""no" 1>&6
21157 ol_cv_lib_mdbm=no
21158 fi
21159
21160         
21161 fi
21162
21163         LIBS="$ol_LIBS"
21164
21165 fi
21166
21167 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21168
21169
21170  for ac_hdr in mdbm.h
21171 do
21172 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21173 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21174 echo "configure:21175: checking for $ac_hdr" >&5
21175 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21176   echo $ac_n "(cached) $ac_c" 1>&6
21177 else
21178   cat > conftest.$ac_ext <<EOF
21179 #line 21180 "configure"
21180 #include "confdefs.h"
21181 #include <$ac_hdr>
21182 EOF
21183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21184 { (eval echo configure:21185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21186 if test -z "$ac_err"; then
21187   rm -rf conftest*
21188   eval "ac_cv_header_$ac_safe=yes"
21189 else
21190   echo "$ac_err" >&5
21191   echo "configure: failed program was:" >&5
21192   cat conftest.$ac_ext >&5
21193   rm -rf conftest*
21194   eval "ac_cv_header_$ac_safe=no"
21195 fi
21196 rm -f conftest*
21197 fi
21198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21199   echo "$ac_t""yes" 1>&6
21200     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21201   cat >> confdefs.h <<EOF
21202 #define $ac_tr_hdr 1
21203 EOF
21204  
21205 else
21206   echo "$ac_t""no" 1>&6
21207 fi
21208 done
21209
21210  echo $ac_n "checking for db""... $ac_c" 1>&6
21211 echo "configure:21212: checking for db" >&5
21212 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21213   echo $ac_n "(cached) $ac_c" 1>&6
21214 else
21215   
21216         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21217                 ol_cv_mdbm=no
21218         else
21219                 ol_cv_mdbm=yes
21220         fi
21221
21222 fi
21223
21224 echo "$ac_t""$ol_cv_mdbm" 1>&6
21225  if test $ol_cv_mdbm = yes ; then
21226         cat >> confdefs.h <<\EOF
21227 #define HAVE_MDBM 1
21228 EOF
21229
21230  fi
21231
21232
21233         if test $ol_cv_mdbm = yes ; then
21234                 ol_link_ldbm=mdbm
21235                 ol_with_ldbm_api=mdbm
21236                 if test $ol_cv_lib_mdbm != yes ; then
21237                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21238                 fi
21239         fi
21240 fi
21241
21242 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21243         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21244 echo "configure:21245: checking for GDBM library" >&5
21245 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21246   echo $ac_n "(cached) $ac_c" 1>&6
21247 else
21248         ol_LIBS="$LIBS"
21249         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21250 echo "configure:21251: checking for gdbm_open" >&5
21251 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21252   echo $ac_n "(cached) $ac_c" 1>&6
21253 else
21254   cat > conftest.$ac_ext <<EOF
21255 #line 21256 "configure"
21256 #include "confdefs.h"
21257 /* System header to define __stub macros and hopefully few prototypes,
21258     which can conflict with char gdbm_open(); below.  */
21259 #include <assert.h>
21260 /* Override any gcc2 internal prototype to avoid an error.  */
21261 /* We use char because int might match the return type of a gcc2
21262     builtin and then its argument prototype would still apply.  */
21263 char gdbm_open();
21264 char (*f)();
21265
21266 int main() {
21267
21268 /* The GNU C library defines this for functions which it implements
21269     to always fail with ENOSYS.  Some functions are actually named
21270     something starting with __ and the normal name is an alias.  */
21271 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21272 choke me
21273 #else
21274 f = gdbm_open;
21275 #endif
21276
21277 ; return 0; }
21278 EOF
21279 if { (eval echo configure:21280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21280   rm -rf conftest*
21281   eval "ac_cv_func_gdbm_open=yes"
21282 else
21283   echo "configure: failed program was:" >&5
21284   cat conftest.$ac_ext >&5
21285   rm -rf conftest*
21286   eval "ac_cv_func_gdbm_open=no"
21287 fi
21288 rm -f conftest*
21289 fi
21290
21291 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21292   echo "$ac_t""yes" 1>&6
21293   ol_cv_lib_gdbm=yes
21294 else
21295   echo "$ac_t""no" 1>&6
21296
21297                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21298 echo "configure:21299: checking for gdbm_open in -lgdbm" >&5
21299 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21301   echo $ac_n "(cached) $ac_c" 1>&6
21302 else
21303   ac_save_LIBS="$LIBS"
21304 LIBS="-lgdbm  $LIBS"
21305 cat > conftest.$ac_ext <<EOF
21306 #line 21307 "configure"
21307 #include "confdefs.h"
21308 /* Override any gcc2 internal prototype to avoid an error.  */
21309 /* We use char because int might match the return type of a gcc2
21310     builtin and then its argument prototype would still apply.  */
21311 char gdbm_open();
21312
21313 int main() {
21314 gdbm_open()
21315 ; return 0; }
21316 EOF
21317 if { (eval echo configure:21318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21318   rm -rf conftest*
21319   eval "ac_cv_lib_$ac_lib_var=yes"
21320 else
21321   echo "configure: failed program was:" >&5
21322   cat conftest.$ac_ext >&5
21323   rm -rf conftest*
21324   eval "ac_cv_lib_$ac_lib_var=no"
21325 fi
21326 rm -f conftest*
21327 LIBS="$ac_save_LIBS"
21328
21329 fi
21330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21331   echo "$ac_t""yes" 1>&6
21332   ol_cv_lib_gdbm=-lgdbm
21333 else
21334   echo "$ac_t""no" 1>&6
21335 ol_cv_lib_gdbm=no
21336 fi
21337
21338         
21339 fi
21340
21341         LIBS="$ol_LIBS"
21342
21343 fi
21344
21345 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21346
21347
21348  for ac_hdr in gdbm.h
21349 do
21350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21352 echo "configure:21353: checking for $ac_hdr" >&5
21353 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21354   echo $ac_n "(cached) $ac_c" 1>&6
21355 else
21356   cat > conftest.$ac_ext <<EOF
21357 #line 21358 "configure"
21358 #include "confdefs.h"
21359 #include <$ac_hdr>
21360 EOF
21361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21362 { (eval echo configure:21363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21364 if test -z "$ac_err"; then
21365   rm -rf conftest*
21366   eval "ac_cv_header_$ac_safe=yes"
21367 else
21368   echo "$ac_err" >&5
21369   echo "configure: failed program was:" >&5
21370   cat conftest.$ac_ext >&5
21371   rm -rf conftest*
21372   eval "ac_cv_header_$ac_safe=no"
21373 fi
21374 rm -f conftest*
21375 fi
21376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21377   echo "$ac_t""yes" 1>&6
21378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21379   cat >> confdefs.h <<EOF
21380 #define $ac_tr_hdr 1
21381 EOF
21382  
21383 else
21384   echo "$ac_t""no" 1>&6
21385 fi
21386 done
21387
21388  echo $ac_n "checking for db""... $ac_c" 1>&6
21389 echo "configure:21390: checking for db" >&5
21390 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21391   echo $ac_n "(cached) $ac_c" 1>&6
21392 else
21393   
21394         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21395                 ol_cv_gdbm=no
21396         else
21397                 ol_cv_gdbm=yes
21398         fi
21399
21400 fi
21401
21402 echo "$ac_t""$ol_cv_gdbm" 1>&6
21403  if test $ol_cv_gdbm = yes ; then
21404         cat >> confdefs.h <<\EOF
21405 #define HAVE_GDBM 1
21406 EOF
21407
21408  fi
21409
21410
21411         if test $ol_cv_gdbm = yes ; then
21412                 ol_link_ldbm=gdbm
21413                 ol_with_ldbm_api=gdbm
21414
21415                 if test $ol_cv_lib_gdbm != yes ; then
21416                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21417                 fi
21418         fi
21419 fi
21420
21421 if test $ol_with_ldbm_api = ndbm ; then
21422         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21423 echo "configure:21424: checking for NDBM library" >&5
21424 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21425   echo $ac_n "(cached) $ac_c" 1>&6
21426 else
21427         ol_LIBS="$LIBS"
21428         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21429 echo "configure:21430: checking for dbm_open" >&5
21430 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21431   echo $ac_n "(cached) $ac_c" 1>&6
21432 else
21433   cat > conftest.$ac_ext <<EOF
21434 #line 21435 "configure"
21435 #include "confdefs.h"
21436 /* System header to define __stub macros and hopefully few prototypes,
21437     which can conflict with char dbm_open(); below.  */
21438 #include <assert.h>
21439 /* Override any gcc2 internal prototype to avoid an error.  */
21440 /* We use char because int might match the return type of a gcc2
21441     builtin and then its argument prototype would still apply.  */
21442 char dbm_open();
21443 char (*f)();
21444
21445 int main() {
21446
21447 /* The GNU C library defines this for functions which it implements
21448     to always fail with ENOSYS.  Some functions are actually named
21449     something starting with __ and the normal name is an alias.  */
21450 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21451 choke me
21452 #else
21453 f = dbm_open;
21454 #endif
21455
21456 ; return 0; }
21457 EOF
21458 if { (eval echo configure:21459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21459   rm -rf conftest*
21460   eval "ac_cv_func_dbm_open=yes"
21461 else
21462   echo "configure: failed program was:" >&5
21463   cat conftest.$ac_ext >&5
21464   rm -rf conftest*
21465   eval "ac_cv_func_dbm_open=no"
21466 fi
21467 rm -f conftest*
21468 fi
21469
21470 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21471   echo "$ac_t""yes" 1>&6
21472   ol_cv_lib_ndbm=yes
21473 else
21474   echo "$ac_t""no" 1>&6
21475
21476                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21477 echo "configure:21478: checking for dbm_open in -lndbm" >&5
21478 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21480   echo $ac_n "(cached) $ac_c" 1>&6
21481 else
21482   ac_save_LIBS="$LIBS"
21483 LIBS="-lndbm  $LIBS"
21484 cat > conftest.$ac_ext <<EOF
21485 #line 21486 "configure"
21486 #include "confdefs.h"
21487 /* Override any gcc2 internal prototype to avoid an error.  */
21488 /* We use char because int might match the return type of a gcc2
21489     builtin and then its argument prototype would still apply.  */
21490 char dbm_open();
21491
21492 int main() {
21493 dbm_open()
21494 ; return 0; }
21495 EOF
21496 if { (eval echo configure:21497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21497   rm -rf conftest*
21498   eval "ac_cv_lib_$ac_lib_var=yes"
21499 else
21500   echo "configure: failed program was:" >&5
21501   cat conftest.$ac_ext >&5
21502   rm -rf conftest*
21503   eval "ac_cv_lib_$ac_lib_var=no"
21504 fi
21505 rm -f conftest*
21506 LIBS="$ac_save_LIBS"
21507
21508 fi
21509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21510   echo "$ac_t""yes" 1>&6
21511   ol_cv_lib_ndbm=-lndbm
21512 else
21513   echo "$ac_t""no" 1>&6
21514
21515                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21516 echo "configure:21517: checking for dbm_open in -ldbm" >&5
21517 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21519   echo $ac_n "(cached) $ac_c" 1>&6
21520 else
21521   ac_save_LIBS="$LIBS"
21522 LIBS="-ldbm  $LIBS"
21523 cat > conftest.$ac_ext <<EOF
21524 #line 21525 "configure"
21525 #include "confdefs.h"
21526 /* Override any gcc2 internal prototype to avoid an error.  */
21527 /* We use char because int might match the return type of a gcc2
21528     builtin and then its argument prototype would still apply.  */
21529 char dbm_open();
21530
21531 int main() {
21532 dbm_open()
21533 ; return 0; }
21534 EOF
21535 if { (eval echo configure:21536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21536   rm -rf conftest*
21537   eval "ac_cv_lib_$ac_lib_var=yes"
21538 else
21539   echo "configure: failed program was:" >&5
21540   cat conftest.$ac_ext >&5
21541   rm -rf conftest*
21542   eval "ac_cv_lib_$ac_lib_var=no"
21543 fi
21544 rm -f conftest*
21545 LIBS="$ac_save_LIBS"
21546
21547 fi
21548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21549   echo "$ac_t""yes" 1>&6
21550   ol_cv_lib_ndbm=-ldbm
21551 else
21552   echo "$ac_t""no" 1>&6
21553 ol_cv_lib_ndbm=no
21554 fi
21555                 
21556 fi
21557
21558         
21559 fi
21560
21561         LIBS="$ol_LIBS"
21562
21563 fi
21564
21565 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21566
21567
21568  for ac_hdr in ndbm.h
21569 do
21570 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21571 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21572 echo "configure:21573: checking for $ac_hdr" >&5
21573 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21574   echo $ac_n "(cached) $ac_c" 1>&6
21575 else
21576   cat > conftest.$ac_ext <<EOF
21577 #line 21578 "configure"
21578 #include "confdefs.h"
21579 #include <$ac_hdr>
21580 EOF
21581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21582 { (eval echo configure:21583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21584 if test -z "$ac_err"; then
21585   rm -rf conftest*
21586   eval "ac_cv_header_$ac_safe=yes"
21587 else
21588   echo "$ac_err" >&5
21589   echo "configure: failed program was:" >&5
21590   cat conftest.$ac_ext >&5
21591   rm -rf conftest*
21592   eval "ac_cv_header_$ac_safe=no"
21593 fi
21594 rm -f conftest*
21595 fi
21596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21597   echo "$ac_t""yes" 1>&6
21598     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21599   cat >> confdefs.h <<EOF
21600 #define $ac_tr_hdr 1
21601 EOF
21602  
21603 else
21604   echo "$ac_t""no" 1>&6
21605 fi
21606 done
21607
21608  echo $ac_n "checking for db""... $ac_c" 1>&6
21609 echo "configure:21610: checking for db" >&5
21610 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21611   echo $ac_n "(cached) $ac_c" 1>&6
21612 else
21613   
21614         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21615                 ol_cv_ndbm=no
21616         else
21617                 ol_cv_ndbm=yes
21618         fi
21619
21620 fi
21621
21622 echo "$ac_t""$ol_cv_ndbm" 1>&6
21623  if test $ol_cv_ndbm = yes ; then
21624         cat >> confdefs.h <<\EOF
21625 #define HAVE_NDBM 1
21626 EOF
21627
21628  fi
21629
21630
21631         if test $ol_cv_ndbm = yes ; then
21632                 ol_link_ldbm=ndbm
21633                 ol_with_ldbm_api=ndbm
21634
21635                 if test $ol_cv_lib_ndbm != yes ; then
21636                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21637                 fi
21638         fi
21639 fi
21640
21641 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21642         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21643 fi
21644
21645 if test $ol_enable_bdb = yes -o \
21646         $ol_enable_hdb = yes -o \
21647         $ol_enable_ldbm = yes ; then
21648         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21649 fi
21650
21651
21652 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21653         BUILD_LIBS_DYNAMIC=shared
21654         cat >> confdefs.h <<\EOF
21655 #define LDAP_LIBS_DYNAMIC 1
21656 EOF
21657
21658         LTSTATIC=""
21659 else
21660         BUILD_LIBS_DYNAMIC=static
21661         LTSTATIC="-static"
21662 fi
21663
21664 if test $ol_enable_wrappers != no ; then
21665         for ac_hdr in tcpd.h
21666 do
21667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21669 echo "configure:21670: checking for $ac_hdr" >&5
21670 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21671   echo $ac_n "(cached) $ac_c" 1>&6
21672 else
21673   cat > conftest.$ac_ext <<EOF
21674 #line 21675 "configure"
21675 #include "confdefs.h"
21676 #include <$ac_hdr>
21677 EOF
21678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21679 { (eval echo configure:21680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21681 if test -z "$ac_err"; then
21682   rm -rf conftest*
21683   eval "ac_cv_header_$ac_safe=yes"
21684 else
21685   echo "$ac_err" >&5
21686   echo "configure: failed program was:" >&5
21687   cat conftest.$ac_ext >&5
21688   rm -rf conftest*
21689   eval "ac_cv_header_$ac_safe=no"
21690 fi
21691 rm -f conftest*
21692 fi
21693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21694   echo "$ac_t""yes" 1>&6
21695     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21696   cat >> confdefs.h <<EOF
21697 #define $ac_tr_hdr 1
21698 EOF
21699  
21700                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21701 echo "configure:21702: checking for TCP wrappers library" >&5
21702                 save_LIBS="$LIBS"
21703                 LIBS="$LIBS -lwrap"
21704                 cat > conftest.$ac_ext <<EOF
21705 #line 21706 "configure"
21706 #include "confdefs.h"
21707
21708 #include <tcpd.h>
21709 int allow_severity = 0;
21710 int deny_severity  = 0;
21711
21712 struct request_info *req;
21713                 
21714 int main() {
21715
21716 hosts_access(req)
21717                 
21718 ; return 0; }
21719 EOF
21720 if { (eval echo configure:21721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21721   rm -rf conftest*
21722   echo "$ac_t""-lwrap" 1>&6
21723                 have_wrappers=yes
21724                 LIBS="$save_LIBS"
21725 else
21726   echo "configure: failed program was:" >&5
21727   cat conftest.$ac_ext >&5
21728   rm -rf conftest*
21729   
21730                                 LIBS="$LIBS -lnsl"
21731                 cat > conftest.$ac_ext <<EOF
21732 #line 21733 "configure"
21733 #include "confdefs.h"
21734
21735 #include <tcpd.h>
21736 int allow_severity = 0;
21737 int deny_severity  = 0;
21738
21739 struct request_info *req;
21740                 
21741 int main() {
21742
21743 hosts_access(req)
21744                 
21745 ; return 0; }
21746 EOF
21747 if { (eval echo configure:21748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21748   rm -rf conftest*
21749   echo "$ac_t""-lwrap -lnsl" 1>&6
21750                 have_wrappers=yes
21751                 LIBS="$save_LIBS -lnsl"
21752 else
21753   echo "configure: failed program was:" >&5
21754   cat conftest.$ac_ext >&5
21755   rm -rf conftest*
21756   
21757                 echo "$ac_t""no" 1>&6
21758                 have_wrappers=no
21759                 LIBS=$save_LIBS
21760 fi
21761 rm -f conftest*
21762 fi
21763 rm -f conftest*
21764 else
21765   echo "$ac_t""no" 1>&6
21766 have_wrappers=no
21767 fi
21768 done
21769
21770
21771         if test $have_wrappers = yes ; then
21772                 cat >> confdefs.h <<\EOF
21773 #define HAVE_TCPD 1
21774 EOF
21775
21776                 WRAP_LIBS="-lwrap"
21777         elif test $ol_enable_wrappers = yes ; then
21778                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21779         else
21780                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21781                 WRAP_LIBS=""
21782         fi
21783 fi
21784
21785 if test $ol_enable_syslog != no ; then
21786         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21787 echo "configure:21788: checking for openlog" >&5
21788 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21789   echo $ac_n "(cached) $ac_c" 1>&6
21790 else
21791   cat > conftest.$ac_ext <<EOF
21792 #line 21793 "configure"
21793 #include "confdefs.h"
21794 /* System header to define __stub macros and hopefully few prototypes,
21795     which can conflict with char openlog(); below.  */
21796 #include <assert.h>
21797 /* Override any gcc2 internal prototype to avoid an error.  */
21798 /* We use char because int might match the return type of a gcc2
21799     builtin and then its argument prototype would still apply.  */
21800 char openlog();
21801 char (*f)();
21802
21803 int main() {
21804
21805 /* The GNU C library defines this for functions which it implements
21806     to always fail with ENOSYS.  Some functions are actually named
21807     something starting with __ and the normal name is an alias.  */
21808 #if defined (__stub_openlog) || defined (__stub___openlog)
21809 choke me
21810 #else
21811 f = openlog;
21812 #endif
21813
21814 ; return 0; }
21815 EOF
21816 if { (eval echo configure:21817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21817   rm -rf conftest*
21818   eval "ac_cv_func_openlog=yes"
21819 else
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822   rm -rf conftest*
21823   eval "ac_cv_func_openlog=no"
21824 fi
21825 rm -f conftest*
21826 fi
21827
21828 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21829   echo "$ac_t""yes" 1>&6
21830   :
21831 else
21832   echo "$ac_t""no" 1>&6
21833 fi
21834
21835         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21836                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21837         fi
21838         ol_enable_syslog=$ac_cv_func_openlog
21839 fi
21840
21841
21842 ol_link_sql=no
21843 if test $ol_enable_sql != no ; then
21844         for ac_hdr in sql.h sqlext.h
21845 do
21846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21848 echo "configure:21849: checking for $ac_hdr" >&5
21849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21850   echo $ac_n "(cached) $ac_c" 1>&6
21851 else
21852   cat > conftest.$ac_ext <<EOF
21853 #line 21854 "configure"
21854 #include "confdefs.h"
21855 #include <$ac_hdr>
21856 EOF
21857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21858 { (eval echo configure:21859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21860 if test -z "$ac_err"; then
21861   rm -rf conftest*
21862   eval "ac_cv_header_$ac_safe=yes"
21863 else
21864   echo "$ac_err" >&5
21865   echo "configure: failed program was:" >&5
21866   cat conftest.$ac_ext >&5
21867   rm -rf conftest*
21868   eval "ac_cv_header_$ac_safe=no"
21869 fi
21870 rm -f conftest*
21871 fi
21872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21873   echo "$ac_t""yes" 1>&6
21874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21875   cat >> confdefs.h <<EOF
21876 #define $ac_tr_hdr 1
21877 EOF
21878  
21879 else
21880   echo "$ac_t""no" 1>&6
21881 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21882         
21883 fi
21884 done
21885
21886
21887         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21888 echo "configure:21889: checking for SQLDriverConnect in -liodbc" >&5
21889 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21891   echo $ac_n "(cached) $ac_c" 1>&6
21892 else
21893   ac_save_LIBS="$LIBS"
21894 LIBS="-liodbc  $LIBS"
21895 cat > conftest.$ac_ext <<EOF
21896 #line 21897 "configure"
21897 #include "confdefs.h"
21898 /* Override any gcc2 internal prototype to avoid an error.  */
21899 /* We use char because int might match the return type of a gcc2
21900     builtin and then its argument prototype would still apply.  */
21901 char SQLDriverConnect();
21902
21903 int main() {
21904 SQLDriverConnect()
21905 ; return 0; }
21906 EOF
21907 if { (eval echo configure:21908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21908   rm -rf conftest*
21909   eval "ac_cv_lib_$ac_lib_var=yes"
21910 else
21911   echo "configure: failed program was:" >&5
21912   cat conftest.$ac_ext >&5
21913   rm -rf conftest*
21914   eval "ac_cv_lib_$ac_lib_var=no"
21915 fi
21916 rm -f conftest*
21917 LIBS="$ac_save_LIBS"
21918
21919 fi
21920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21921   echo "$ac_t""yes" 1>&6
21922   have_iodbc=yes
21923 else
21924   echo "$ac_t""no" 1>&6
21925 have_iodbc=no
21926 fi
21927
21928         if test $have_iodbc = yes ; then
21929                 ol_link_sql="-liodbc"
21930         else
21931                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21932 echo "configure:21933: checking for SQLDriverConnect in -lodbc" >&5
21933 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21935   echo $ac_n "(cached) $ac_c" 1>&6
21936 else
21937   ac_save_LIBS="$LIBS"
21938 LIBS="-lodbc  $LIBS"
21939 cat > conftest.$ac_ext <<EOF
21940 #line 21941 "configure"
21941 #include "confdefs.h"
21942 /* Override any gcc2 internal prototype to avoid an error.  */
21943 /* We use char because int might match the return type of a gcc2
21944     builtin and then its argument prototype would still apply.  */
21945 char SQLDriverConnect();
21946
21947 int main() {
21948 SQLDriverConnect()
21949 ; return 0; }
21950 EOF
21951 if { (eval echo configure:21952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21952   rm -rf conftest*
21953   eval "ac_cv_lib_$ac_lib_var=yes"
21954 else
21955   echo "configure: failed program was:" >&5
21956   cat conftest.$ac_ext >&5
21957   rm -rf conftest*
21958   eval "ac_cv_lib_$ac_lib_var=no"
21959 fi
21960 rm -f conftest*
21961 LIBS="$ac_save_LIBS"
21962
21963 fi
21964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21965   echo "$ac_t""yes" 1>&6
21966   have_odbc=yes
21967 else
21968   echo "$ac_t""no" 1>&6
21969 have_odbc=no
21970 fi
21971
21972                 if test $have_odbc = yes ; then
21973                         ol_link_sql="-lodbc"
21974                 fi
21975         fi
21976
21977         if test $ol_link_sql != no ; then
21978                 SLAPD_SQL_LIBS="$ol_link_sql"
21979
21980         elif test $ol_enable_sql != auto ; then
21981                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21982         fi
21983 fi
21984
21985 WITH_SASL=no
21986 ol_link_sasl=no
21987 ol_link_spasswd=no
21988 if test $ol_with_cyrus_sasl != no ; then
21989         for ac_hdr in sasl/sasl.h sasl.h
21990 do
21991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21993 echo "configure:21994: checking for $ac_hdr" >&5
21994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21995   echo $ac_n "(cached) $ac_c" 1>&6
21996 else
21997   cat > conftest.$ac_ext <<EOF
21998 #line 21999 "configure"
21999 #include "confdefs.h"
22000 #include <$ac_hdr>
22001 EOF
22002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22003 { (eval echo configure:22004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22005 if test -z "$ac_err"; then
22006   rm -rf conftest*
22007   eval "ac_cv_header_$ac_safe=yes"
22008 else
22009   echo "$ac_err" >&5
22010   echo "configure: failed program was:" >&5
22011   cat conftest.$ac_ext >&5
22012   rm -rf conftest*
22013   eval "ac_cv_header_$ac_safe=no"
22014 fi
22015 rm -f conftest*
22016 fi
22017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22018   echo "$ac_t""yes" 1>&6
22019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22020   cat >> confdefs.h <<EOF
22021 #define $ac_tr_hdr 1
22022 EOF
22023  
22024 else
22025   echo "$ac_t""no" 1>&6
22026 fi
22027 done
22028
22029
22030         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
22031                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
22032 echo "configure:22033: checking for sasl_client_init in -lsasl2" >&5
22033 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
22034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22035   echo $ac_n "(cached) $ac_c" 1>&6
22036 else
22037   ac_save_LIBS="$LIBS"
22038 LIBS="-lsasl2  $LIBS"
22039 cat > conftest.$ac_ext <<EOF
22040 #line 22041 "configure"
22041 #include "confdefs.h"
22042 /* Override any gcc2 internal prototype to avoid an error.  */
22043 /* We use char because int might match the return type of a gcc2
22044     builtin and then its argument prototype would still apply.  */
22045 char sasl_client_init();
22046
22047 int main() {
22048 sasl_client_init()
22049 ; return 0; }
22050 EOF
22051 if { (eval echo configure:22052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22052   rm -rf conftest*
22053   eval "ac_cv_lib_$ac_lib_var=yes"
22054 else
22055   echo "configure: failed program was:" >&5
22056   cat conftest.$ac_ext >&5
22057   rm -rf conftest*
22058   eval "ac_cv_lib_$ac_lib_var=no"
22059 fi
22060 rm -f conftest*
22061 LIBS="$ac_save_LIBS"
22062
22063 fi
22064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22065   echo "$ac_t""yes" 1>&6
22066   ol_link_sasl="-lsasl2"
22067 else
22068   echo "$ac_t""no" 1>&6
22069 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
22070 echo "configure:22071: checking for sasl_client_init in -lsasl" >&5
22071 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
22072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22073   echo $ac_n "(cached) $ac_c" 1>&6
22074 else
22075   ac_save_LIBS="$LIBS"
22076 LIBS="-lsasl  $LIBS"
22077 cat > conftest.$ac_ext <<EOF
22078 #line 22079 "configure"
22079 #include "confdefs.h"
22080 /* Override any gcc2 internal prototype to avoid an error.  */
22081 /* We use char because int might match the return type of a gcc2
22082     builtin and then its argument prototype would still apply.  */
22083 char sasl_client_init();
22084
22085 int main() {
22086 sasl_client_init()
22087 ; return 0; }
22088 EOF
22089 if { (eval echo configure:22090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22090   rm -rf conftest*
22091   eval "ac_cv_lib_$ac_lib_var=yes"
22092 else
22093   echo "configure: failed program was:" >&5
22094   cat conftest.$ac_ext >&5
22095   rm -rf conftest*
22096   eval "ac_cv_lib_$ac_lib_var=no"
22097 fi
22098 rm -f conftest*
22099 LIBS="$ac_save_LIBS"
22100
22101 fi
22102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22103   echo "$ac_t""yes" 1>&6
22104   ol_link_sasl="-lsasl"
22105 else
22106   echo "$ac_t""no" 1>&6
22107 fi
22108
22109 fi
22110
22111         fi
22112
22113         if test $ol_link_sasl = no ; then
22114                 if test $ol_with_cyrus_sasl != auto ; then
22115                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22116                 else
22117                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22118                         echo "configure: warning: SASL authentication not supported!" 1>&2
22119                         if test $ol_link_tls = no ; then
22120                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22121                         fi
22122                 fi
22123         else
22124                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22125 echo "configure:22126: checking Cyrus SASL library version" >&5
22126 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22127   echo $ac_n "(cached) $ac_c" 1>&6
22128 else
22129   
22130         cat > conftest.$ac_ext <<EOF
22131 #line 22132 "configure"
22132 #include "confdefs.h"
22133
22134 #ifdef HAVE_SASL_SASL_H
22135 #include <sasl/sasl.h>
22136 #else
22137 #include <sasl.h>
22138 #endif
22139
22140 /* Require 2.1.15+ */
22141 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22142         char *__sasl_compat = "2.2+ or better okay (we guess)";
22143 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22144         && SASL_VERSION_STEP >=15
22145         char *__sasl_compat = "2.1.15+ or better okay";
22146 #endif
22147         
22148 EOF
22149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22150   egrep "__sasl_compat" >/dev/null 2>&1; then
22151   rm -rf conftest*
22152   ol_cv_sasl_compat=yes
22153 else
22154   rm -rf conftest*
22155   ol_cv_sasl_compat=no
22156 fi
22157 rm -f conftest*
22158
22159 fi
22160
22161 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22162
22163                 if test $ol_cv_sasl_compat = no ; then
22164                         ol_link_sasl=no
22165                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22166                 fi
22167
22168                 cat >> confdefs.h <<\EOF
22169 #define HAVE_CYRUS_SASL 1
22170 EOF
22171
22172                 SASL_LIBS="$ol_link_sasl"
22173                 if test $ol_enable_spasswd != no ; then
22174                         ol_link_spasswd=yes
22175                 fi
22176
22177                 ac_save_LIBS="$LIBS"
22178                 LIBS="$LIBS $ol_link_sasl"
22179                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22180 echo "configure:22181: checking for sasl_version" >&5
22181 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22182   echo $ac_n "(cached) $ac_c" 1>&6
22183 else
22184   cat > conftest.$ac_ext <<EOF
22185 #line 22186 "configure"
22186 #include "confdefs.h"
22187 /* System header to define __stub macros and hopefully few prototypes,
22188     which can conflict with char sasl_version(); below.  */
22189 #include <assert.h>
22190 /* Override any gcc2 internal prototype to avoid an error.  */
22191 /* We use char because int might match the return type of a gcc2
22192     builtin and then its argument prototype would still apply.  */
22193 char sasl_version();
22194 char (*f)();
22195
22196 int main() {
22197
22198 /* The GNU C library defines this for functions which it implements
22199     to always fail with ENOSYS.  Some functions are actually named
22200     something starting with __ and the normal name is an alias.  */
22201 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22202 choke me
22203 #else
22204 f = sasl_version;
22205 #endif
22206
22207 ; return 0; }
22208 EOF
22209 if { (eval echo configure:22210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22210   rm -rf conftest*
22211   eval "ac_cv_func_sasl_version=yes"
22212 else
22213   echo "configure: failed program was:" >&5
22214   cat conftest.$ac_ext >&5
22215   rm -rf conftest*
22216   eval "ac_cv_func_sasl_version=no"
22217 fi
22218 rm -f conftest*
22219 fi
22220
22221 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22222   echo "$ac_t""yes" 1>&6
22223   cat >> confdefs.h <<\EOF
22224 #define HAVE_SASL_VERSION 1
22225 EOF
22226
22227 else
22228   echo "$ac_t""no" 1>&6
22229 fi
22230
22231                 LIBS="$ac_save_LIBS"
22232
22233                 WITH_SASL=yes
22234         fi
22235
22236 else
22237         echo "configure: warning: SASL authentication not supported!" 1>&2
22238         if test $ol_link_tls = no ; then
22239                 echo "configure: warning: Strong authentication not supported!" 1>&2
22240         fi
22241 fi
22242
22243 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22244         dev=no
22245         if test -r /dev/urandom ; then
22246                 dev="/dev/urandom";
22247         elif test -r /idev/urandom ; then
22248                 dev="/idev/urandom";
22249         elif test -r /dev/srandom ; then
22250                 dev="/dev/srandom";
22251         elif test -r /dev/random ; then
22252                 dev="/dev/random";
22253         elif test -r /idev/random ; then
22254                 dev="/idev/random";
22255         fi
22256
22257         if test $dev != no ; then
22258                 cat >> confdefs.h <<EOF
22259 #define URANDOM_DEVICE "$dev"
22260 EOF
22261
22262         fi
22263 fi
22264
22265 ol_link_fetch=no
22266 if test $ol_with_fetch != no ; then
22267         ol_LIBS=$LIBS
22268 LIBS="-lfetch -lcom_err $LIBS"
22269 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22270 echo "configure:22271: checking fetch(3) library" >&5
22271 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22272   echo $ac_n "(cached) $ac_c" 1>&6
22273 else
22274   
22275         cat > conftest.$ac_ext <<EOF
22276 #line 22277 "configure"
22277 #include "confdefs.h"
22278
22279 #include <sys/param.h>
22280 #include <stdio.h>
22281 #include <fetch.h>
22282 int main() {
22283 struct url *u = fetchParseURL("file:///"); 
22284 ; return 0; }
22285 EOF
22286 if { (eval echo configure:22287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22287   rm -rf conftest*
22288   ol_cv_lib_fetch=yes
22289 else
22290   echo "configure: failed program was:" >&5
22291   cat conftest.$ac_ext >&5
22292   rm -rf conftest*
22293   ol_cv_lib_fetch=no
22294 fi
22295 rm -f conftest*
22296 fi
22297
22298 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22299 LIBS=$ol_LIBS
22300 if test $ol_cv_lib_fetch != no ; then
22301         ol_link_fetch="-lfetch -lcom_err"
22302         cat >> confdefs.h <<\EOF
22303 #define HAVE_FETCH 1
22304 EOF
22305
22306 fi
22307
22308
22309         if test $ol_cv_lib_fetch != no ; then
22310                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22311                 ol_link_fetch=freebsd
22312
22313         elif test $ol_with_fetch != auto ; then
22314                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22315         fi 
22316 fi
22317
22318 if test $ol_enable_crypt != no ; then
22319         save_LIBS="$LIBS"
22320         LIBS="$TLS_LIBS $LIBS"
22321
22322         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22323 echo "configure:22324: checking for crypt" >&5
22324 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22325   echo $ac_n "(cached) $ac_c" 1>&6
22326 else
22327   cat > conftest.$ac_ext <<EOF
22328 #line 22329 "configure"
22329 #include "confdefs.h"
22330 /* System header to define __stub macros and hopefully few prototypes,
22331     which can conflict with char crypt(); below.  */
22332 #include <assert.h>
22333 /* Override any gcc2 internal prototype to avoid an error.  */
22334 /* We use char because int might match the return type of a gcc2
22335     builtin and then its argument prototype would still apply.  */
22336 char crypt();
22337 char (*f)();
22338
22339 int main() {
22340
22341 /* The GNU C library defines this for functions which it implements
22342     to always fail with ENOSYS.  Some functions are actually named
22343     something starting with __ and the normal name is an alias.  */
22344 #if defined (__stub_crypt) || defined (__stub___crypt)
22345 choke me
22346 #else
22347 f = crypt;
22348 #endif
22349
22350 ; return 0; }
22351 EOF
22352 if { (eval echo configure:22353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22353   rm -rf conftest*
22354   eval "ac_cv_func_crypt=yes"
22355 else
22356   echo "configure: failed program was:" >&5
22357   cat conftest.$ac_ext >&5
22358   rm -rf conftest*
22359   eval "ac_cv_func_crypt=no"
22360 fi
22361 rm -f conftest*
22362 fi
22363
22364 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22365   echo "$ac_t""yes" 1>&6
22366   have_crypt=yes
22367 else
22368   echo "$ac_t""no" 1>&6
22369
22370                 LIBS="$save_LIBS"
22371                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22372 echo "configure:22373: checking for crypt in -lcrypt" >&5
22373 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22375   echo $ac_n "(cached) $ac_c" 1>&6
22376 else
22377   ac_save_LIBS="$LIBS"
22378 LIBS="-lcrypt  $LIBS"
22379 cat > conftest.$ac_ext <<EOF
22380 #line 22381 "configure"
22381 #include "confdefs.h"
22382 /* Override any gcc2 internal prototype to avoid an error.  */
22383 /* We use char because int might match the return type of a gcc2
22384     builtin and then its argument prototype would still apply.  */
22385 char crypt();
22386
22387 int main() {
22388 crypt()
22389 ; return 0; }
22390 EOF
22391 if { (eval echo configure:22392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22392   rm -rf conftest*
22393   eval "ac_cv_lib_$ac_lib_var=yes"
22394 else
22395   echo "configure: failed program was:" >&5
22396   cat conftest.$ac_ext >&5
22397   rm -rf conftest*
22398   eval "ac_cv_lib_$ac_lib_var=no"
22399 fi
22400 rm -f conftest*
22401 LIBS="$ac_save_LIBS"
22402
22403 fi
22404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22405   echo "$ac_t""yes" 1>&6
22406   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22407                         have_crypt=yes
22408 else
22409   echo "$ac_t""no" 1>&6
22410 have_crypt=no
22411 fi
22412
22413 fi
22414
22415
22416         LIBS="$save_LIBS"
22417
22418         if test $have_crypt = yes ; then
22419                 cat >> confdefs.h <<\EOF
22420 #define HAVE_CRYPT 1
22421 EOF
22422
22423         else
22424                 echo "configure: warning: could not find crypt" 1>&2
22425                 if test $ol_enable_crypt = yes ; then
22426                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22427                 fi
22428
22429                 echo "configure: warning: disabling crypt support" 1>&2
22430                 ol_enable_crypt=no
22431         fi
22432 fi
22433
22434 if test $ol_enable_proctitle != no ; then
22435         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22436 echo "configure:22437: checking for setproctitle" >&5
22437 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22438   echo $ac_n "(cached) $ac_c" 1>&6
22439 else
22440   cat > conftest.$ac_ext <<EOF
22441 #line 22442 "configure"
22442 #include "confdefs.h"
22443 /* System header to define __stub macros and hopefully few prototypes,
22444     which can conflict with char setproctitle(); below.  */
22445 #include <assert.h>
22446 /* Override any gcc2 internal prototype to avoid an error.  */
22447 /* We use char because int might match the return type of a gcc2
22448     builtin and then its argument prototype would still apply.  */
22449 char setproctitle();
22450 char (*f)();
22451
22452 int main() {
22453
22454 /* The GNU C library defines this for functions which it implements
22455     to always fail with ENOSYS.  Some functions are actually named
22456     something starting with __ and the normal name is an alias.  */
22457 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22458 choke me
22459 #else
22460 f = setproctitle;
22461 #endif
22462
22463 ; return 0; }
22464 EOF
22465 if { (eval echo configure:22466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22466   rm -rf conftest*
22467   eval "ac_cv_func_setproctitle=yes"
22468 else
22469   echo "configure: failed program was:" >&5
22470   cat conftest.$ac_ext >&5
22471   rm -rf conftest*
22472   eval "ac_cv_func_setproctitle=no"
22473 fi
22474 rm -f conftest*
22475 fi
22476
22477 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22478   echo "$ac_t""yes" 1>&6
22479   have_setproctitle=yes
22480 else
22481   echo "$ac_t""no" 1>&6
22482
22483                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22484 echo "configure:22485: checking for setproctitle in -lutil" >&5
22485 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22487   echo $ac_n "(cached) $ac_c" 1>&6
22488 else
22489   ac_save_LIBS="$LIBS"
22490 LIBS="-lutil  $LIBS"
22491 cat > conftest.$ac_ext <<EOF
22492 #line 22493 "configure"
22493 #include "confdefs.h"
22494 /* Override any gcc2 internal prototype to avoid an error.  */
22495 /* We use char because int might match the return type of a gcc2
22496     builtin and then its argument prototype would still apply.  */
22497 char setproctitle();
22498
22499 int main() {
22500 setproctitle()
22501 ; return 0; }
22502 EOF
22503 if { (eval echo configure:22504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22504   rm -rf conftest*
22505   eval "ac_cv_lib_$ac_lib_var=yes"
22506 else
22507   echo "configure: failed program was:" >&5
22508   cat conftest.$ac_ext >&5
22509   rm -rf conftest*
22510   eval "ac_cv_lib_$ac_lib_var=no"
22511 fi
22512 rm -f conftest*
22513 LIBS="$ac_save_LIBS"
22514
22515 fi
22516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22517   echo "$ac_t""yes" 1>&6
22518   have_setproctitle=yes
22519                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22520 else
22521   echo "$ac_t""no" 1>&6
22522 have_setproctitle=no
22523                         LIBOBJS="$LIBOBJS setproctitle.o"
22524                         LIBSRCS="$LIBSRCS setproctitle.c"
22525 fi
22526
22527 fi
22528
22529
22530         if test $have_setproctitle = yes ; then
22531                 cat >> confdefs.h <<\EOF
22532 #define HAVE_SETPROCTITLE 1
22533 EOF
22534
22535         fi
22536 fi
22537
22538 if test $ol_enable_slp != no ; then
22539         for ac_hdr in slp.h 
22540 do
22541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22543 echo "configure:22544: checking for $ac_hdr" >&5
22544 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22545   echo $ac_n "(cached) $ac_c" 1>&6
22546 else
22547   cat > conftest.$ac_ext <<EOF
22548 #line 22549 "configure"
22549 #include "confdefs.h"
22550 #include <$ac_hdr>
22551 EOF
22552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22553 { (eval echo configure:22554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22555 if test -z "$ac_err"; then
22556   rm -rf conftest*
22557   eval "ac_cv_header_$ac_safe=yes"
22558 else
22559   echo "$ac_err" >&5
22560   echo "configure: failed program was:" >&5
22561   cat conftest.$ac_ext >&5
22562   rm -rf conftest*
22563   eval "ac_cv_header_$ac_safe=no"
22564 fi
22565 rm -f conftest*
22566 fi
22567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22568   echo "$ac_t""yes" 1>&6
22569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22570   cat >> confdefs.h <<EOF
22571 #define $ac_tr_hdr 1
22572 EOF
22573  
22574 else
22575   echo "$ac_t""no" 1>&6
22576 fi
22577 done
22578
22579
22580         if test $ac_cv_header_slp_h = yes ; then
22581                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22582 echo "configure:22583: checking for SLPOpen in -lslp" >&5
22583 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22585   echo $ac_n "(cached) $ac_c" 1>&6
22586 else
22587   ac_save_LIBS="$LIBS"
22588 LIBS="-lslp  $LIBS"
22589 cat > conftest.$ac_ext <<EOF
22590 #line 22591 "configure"
22591 #include "confdefs.h"
22592 /* Override any gcc2 internal prototype to avoid an error.  */
22593 /* We use char because int might match the return type of a gcc2
22594     builtin and then its argument prototype would still apply.  */
22595 char SLPOpen();
22596
22597 int main() {
22598 SLPOpen()
22599 ; return 0; }
22600 EOF
22601 if { (eval echo configure:22602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22602   rm -rf conftest*
22603   eval "ac_cv_lib_$ac_lib_var=yes"
22604 else
22605   echo "configure: failed program was:" >&5
22606   cat conftest.$ac_ext >&5
22607   rm -rf conftest*
22608   eval "ac_cv_lib_$ac_lib_var=no"
22609 fi
22610 rm -f conftest*
22611 LIBS="$ac_save_LIBS"
22612
22613 fi
22614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22615   echo "$ac_t""yes" 1>&6
22616   have_slp=yes
22617 else
22618   echo "$ac_t""no" 1>&6
22619 have_slp=no
22620 fi
22621
22622                 if test $have_slp = yes ; then
22623                         cat >> confdefs.h <<\EOF
22624 #define HAVE_SLP 1
22625 EOF
22626
22627                         SLAPD_SLP_LIBS=-lslp
22628                 fi
22629
22630         elif test $ol_enable_slp = yes ; then
22631                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22632         fi
22633 fi
22634
22635 if test "$ol_with_multiple_precision" != "no" ; then
22636         ol_have_bignum=no
22637         ol_have_gmp=no
22638
22639         for ac_hdr in openssl/bn.h bn.h
22640 do
22641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22643 echo "configure:22644: checking for $ac_hdr" >&5
22644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22645   echo $ac_n "(cached) $ac_c" 1>&6
22646 else
22647   cat > conftest.$ac_ext <<EOF
22648 #line 22649 "configure"
22649 #include "confdefs.h"
22650 #include <$ac_hdr>
22651 EOF
22652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22653 { (eval echo configure:22654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22655 if test -z "$ac_err"; then
22656   rm -rf conftest*
22657   eval "ac_cv_header_$ac_safe=yes"
22658 else
22659   echo "$ac_err" >&5
22660   echo "configure: failed program was:" >&5
22661   cat conftest.$ac_ext >&5
22662   rm -rf conftest*
22663   eval "ac_cv_header_$ac_safe=no"
22664 fi
22665 rm -f conftest*
22666 fi
22667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22668   echo "$ac_t""yes" 1>&6
22669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22670   cat >> confdefs.h <<EOF
22671 #define $ac_tr_hdr 1
22672 EOF
22673  
22674 else
22675   echo "$ac_t""no" 1>&6
22676 fi
22677 done
22678
22679         for ac_hdr in openssl/crypto.h crypto.h
22680 do
22681 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22682 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22683 echo "configure:22684: checking for $ac_hdr" >&5
22684 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22685   echo $ac_n "(cached) $ac_c" 1>&6
22686 else
22687   cat > conftest.$ac_ext <<EOF
22688 #line 22689 "configure"
22689 #include "confdefs.h"
22690 #include <$ac_hdr>
22691 EOF
22692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22693 { (eval echo configure:22694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22695 if test -z "$ac_err"; then
22696   rm -rf conftest*
22697   eval "ac_cv_header_$ac_safe=yes"
22698 else
22699   echo "$ac_err" >&5
22700   echo "configure: failed program was:" >&5
22701   cat conftest.$ac_ext >&5
22702   rm -rf conftest*
22703   eval "ac_cv_header_$ac_safe=no"
22704 fi
22705 rm -f conftest*
22706 fi
22707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22708   echo "$ac_t""yes" 1>&6
22709     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22710   cat >> confdefs.h <<EOF
22711 #define $ac_tr_hdr 1
22712 EOF
22713  
22714 else
22715   echo "$ac_t""no" 1>&6
22716 fi
22717 done
22718
22719         for ac_hdr in gmp.h 
22720 do
22721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22723 echo "configure:22724: checking for $ac_hdr" >&5
22724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22725   echo $ac_n "(cached) $ac_c" 1>&6
22726 else
22727   cat > conftest.$ac_ext <<EOF
22728 #line 22729 "configure"
22729 #include "confdefs.h"
22730 #include <$ac_hdr>
22731 EOF
22732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22733 { (eval echo configure:22734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22735 if test -z "$ac_err"; then
22736   rm -rf conftest*
22737   eval "ac_cv_header_$ac_safe=yes"
22738 else
22739   echo "$ac_err" >&5
22740   echo "configure: failed program was:" >&5
22741   cat conftest.$ac_ext >&5
22742   rm -rf conftest*
22743   eval "ac_cv_header_$ac_safe=no"
22744 fi
22745 rm -f conftest*
22746 fi
22747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22748   echo "$ac_t""yes" 1>&6
22749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22750   cat >> confdefs.h <<EOF
22751 #define $ac_tr_hdr 1
22752 EOF
22753  
22754 else
22755   echo "$ac_t""no" 1>&6
22756 fi
22757 done
22758
22759
22760         if test "$ol_with_tls" = "found" ; then
22761                 ol_have_bn_h=no
22762                 ol_have_crypto_h=no
22763
22764                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22765                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22766                         ol_have_bn_h=yes
22767                 fi
22768
22769                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22770                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22771                         ol_have_crypto_h=yes
22772                 fi
22773
22774                 if test "$ol_have_bn_h" = "yes" \
22775                                 -a "$ol_have_crypto_h" = "yes" ; then
22776                         ol_have_bignum=yes
22777                 fi
22778         fi
22779
22780         if test $ac_cv_header_gmp_h = yes ; then
22781                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22782 echo "configure:22783: checking for __gmpz_add_ui in -lgmp" >&5
22783 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22785   echo $ac_n "(cached) $ac_c" 1>&6
22786 else
22787   ac_save_LIBS="$LIBS"
22788 LIBS="-lgmp  $LIBS"
22789 cat > conftest.$ac_ext <<EOF
22790 #line 22791 "configure"
22791 #include "confdefs.h"
22792 /* Override any gcc2 internal prototype to avoid an error.  */
22793 /* We use char because int might match the return type of a gcc2
22794     builtin and then its argument prototype would still apply.  */
22795 char __gmpz_add_ui();
22796
22797 int main() {
22798 __gmpz_add_ui()
22799 ; return 0; }
22800 EOF
22801 if { (eval echo configure:22802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22802   rm -rf conftest*
22803   eval "ac_cv_lib_$ac_lib_var=yes"
22804 else
22805   echo "configure: failed program was:" >&5
22806   cat conftest.$ac_ext >&5
22807   rm -rf conftest*
22808   eval "ac_cv_lib_$ac_lib_var=no"
22809 fi
22810 rm -f conftest*
22811 LIBS="$ac_save_LIBS"
22812
22813 fi
22814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22815   echo "$ac_t""yes" 1>&6
22816   have_gmp=yes
22817 else
22818   echo "$ac_t""no" 1>&6
22819 have_gmp=no
22820 fi
22821
22822                 if test $have_gmp = yes ; then
22823                         ol_have_gmp=yes
22824                 fi
22825         fi
22826
22827         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22828 echo "configure:22829: checking for multiple precision support" >&5
22829
22830         ol_mp_support="none"
22831         case "$ol_with_multiple_precision" in
22832         auto)
22833                                                                                 if test "$ol_have_bignum" = "yes" ; then
22834                         ol_mp_support="bignum"
22835                 else
22836                         if test "$ol_have_gmp" = "yes" ; then
22837                                 ol_mp_support="gmp"
22838                         fi
22839                 fi
22840                 ;;
22841         bignum)
22842                 if test "$ol_have_bignum" != "yes" ; then
22843                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22844                 fi
22845                 ol_mp_support="bignum"
22846                 ;;
22847         gmp)
22848                 if test "$ol_have_gmp" != "yes" ; then
22849                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22850                 fi
22851                 ol_mp_support="gmp"
22852                 ;;
22853         yes)
22854                 if test "$ol_have_bignum" = "yes" ; then
22855                         ol_mp_support="bignum"
22856                 elif test "$ol_have_gmp" = "yes" ; then
22857                         ol_mp_support="gmp"
22858                 else
22859                         { echo "configure: error: not available" 1>&2; exit 1; }
22860                 fi
22861                 ;;
22862         esac
22863
22864         case "$ol_mp_support" in
22865         bignum)
22866                 cat >> confdefs.h <<\EOF
22867 #define HAVE_BIGNUM 1
22868 EOF
22869
22870                 ;;
22871         gmp)
22872                 cat >> confdefs.h <<\EOF
22873 #define HAVE_GMP 1
22874 EOF
22875
22876                 SLAPD_GMP_LIBS=-lgmp
22877                 ;;
22878         none)
22879                 ;;
22880         esac
22881
22882         echo "$ac_t""$ol_mp_support" 1>&6
22883 fi
22884
22885
22886 echo $ac_n "checking long long""... $ac_c" 1>&6
22887 echo "configure:22888: checking long long" >&5
22888 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22889   echo $ac_n "(cached) $ac_c" 1>&6
22890 else
22891   
22892         cat > conftest.$ac_ext <<EOF
22893 #line 22894 "configure"
22894 #include "confdefs.h"
22895
22896 int main() {
22897 long long x;
22898 ; return 0; }
22899 EOF
22900 if { (eval echo configure:22901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22901   rm -rf conftest*
22902   ol_cv_type_long_long=yes
22903 else
22904   echo "configure: failed program was:" >&5
22905   cat conftest.$ac_ext >&5
22906   rm -rf conftest*
22907   ol_cv_type_long_long=no
22908 fi
22909 rm -f conftest*
22910 fi
22911
22912 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22913 if test $ol_cv_type_long_long = yes; then
22914         cat >> confdefs.h <<\EOF
22915 #define HAVE_LONG_LONG 1
22916 EOF
22917
22918 fi
22919
22920 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22921 echo "configure:22922: checking for ANSI C header files" >&5
22922 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22923   echo $ac_n "(cached) $ac_c" 1>&6
22924 else
22925   cat > conftest.$ac_ext <<EOF
22926 #line 22927 "configure"
22927 #include "confdefs.h"
22928 #include <stdlib.h>
22929 #include <stdarg.h>
22930 #include <string.h>
22931 #include <float.h>
22932 EOF
22933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22934 { (eval echo configure:22935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22936 if test -z "$ac_err"; then
22937   rm -rf conftest*
22938   ac_cv_header_stdc=yes
22939 else
22940   echo "$ac_err" >&5
22941   echo "configure: failed program was:" >&5
22942   cat conftest.$ac_ext >&5
22943   rm -rf conftest*
22944   ac_cv_header_stdc=no
22945 fi
22946 rm -f conftest*
22947
22948 if test $ac_cv_header_stdc = yes; then
22949   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22950 cat > conftest.$ac_ext <<EOF
22951 #line 22952 "configure"
22952 #include "confdefs.h"
22953 #include <string.h>
22954 EOF
22955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22956   egrep "memchr" >/dev/null 2>&1; then
22957   :
22958 else
22959   rm -rf conftest*
22960   ac_cv_header_stdc=no
22961 fi
22962 rm -f conftest*
22963
22964 fi
22965
22966 if test $ac_cv_header_stdc = yes; then
22967   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22968 cat > conftest.$ac_ext <<EOF
22969 #line 22970 "configure"
22970 #include "confdefs.h"
22971 #include <stdlib.h>
22972 EOF
22973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22974   egrep "free" >/dev/null 2>&1; then
22975   :
22976 else
22977   rm -rf conftest*
22978   ac_cv_header_stdc=no
22979 fi
22980 rm -f conftest*
22981
22982 fi
22983
22984 if test $ac_cv_header_stdc = yes; then
22985   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22986 if test "$cross_compiling" = yes; then
22987   :
22988 else
22989   cat > conftest.$ac_ext <<EOF
22990 #line 22991 "configure"
22991 #include "confdefs.h"
22992 #include <ctype.h>
22993 #if ((' ' & 0x0FF) == 0x020)
22994 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22995 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22996 #else
22997 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22998  || ('j' <= (c) && (c) <= 'r') \
22999  || ('s' <= (c) && (c) <= 'z'))
23000 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
23001 #endif
23002 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
23003 int main () { int i; for (i = 0; i < 256; i++)
23004 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
23005 exit (0); }
23006
23007 EOF
23008 if { (eval echo configure:23009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23009 then
23010   :
23011 else
23012   echo "configure: failed program was:" >&5
23013   cat conftest.$ac_ext >&5
23014   rm -fr conftest*
23015   ac_cv_header_stdc=no
23016 fi
23017 rm -fr conftest*
23018 fi
23019
23020 fi
23021 fi
23022
23023 echo "$ac_t""$ac_cv_header_stdc" 1>&6
23024 if test $ac_cv_header_stdc = yes; then
23025   cat >> confdefs.h <<\EOF
23026 #define STDC_HEADERS 1
23027 EOF
23028
23029 fi
23030
23031 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
23032 echo "configure:23033: checking for mode_t" >&5
23033 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
23034   echo $ac_n "(cached) $ac_c" 1>&6
23035 else
23036   cat > conftest.$ac_ext <<EOF
23037 #line 23038 "configure"
23038 #include "confdefs.h"
23039 #include <sys/types.h>
23040 #if STDC_HEADERS
23041 #include <stdlib.h>
23042 #include <stddef.h>
23043 #endif
23044
23045 EOF
23046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23047   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23048   rm -rf conftest*
23049   eval "ac_cv_type_mode_t=yes"
23050 else
23051   rm -rf conftest*
23052   eval "ac_cv_type_mode_t=no"
23053 fi
23054 rm -f conftest*
23055
23056 fi
23057 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
23058   echo "$ac_t""yes" 1>&6
23059 else
23060   echo "$ac_t""no" 1>&6
23061   cat >> confdefs.h <<EOF
23062 #define mode_t int
23063 EOF
23064
23065 fi
23066
23067 echo $ac_n "checking for off_t""... $ac_c" 1>&6
23068 echo "configure:23069: checking for off_t" >&5
23069 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
23070   echo $ac_n "(cached) $ac_c" 1>&6
23071 else
23072   cat > conftest.$ac_ext <<EOF
23073 #line 23074 "configure"
23074 #include "confdefs.h"
23075 #include <sys/types.h>
23076 #if STDC_HEADERS
23077 #include <stdlib.h>
23078 #include <stddef.h>
23079 #endif
23080
23081 EOF
23082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23083   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23084   rm -rf conftest*
23085   eval "ac_cv_type_off_t=yes"
23086 else
23087   rm -rf conftest*
23088   eval "ac_cv_type_off_t=no"
23089 fi
23090 rm -f conftest*
23091
23092 fi
23093 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23094   echo "$ac_t""yes" 1>&6
23095 else
23096   echo "$ac_t""no" 1>&6
23097   cat >> confdefs.h <<EOF
23098 #define off_t long
23099 EOF
23100
23101 fi
23102
23103 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23104 echo "configure:23105: checking for pid_t" >&5
23105 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23106   echo $ac_n "(cached) $ac_c" 1>&6
23107 else
23108   cat > conftest.$ac_ext <<EOF
23109 #line 23110 "configure"
23110 #include "confdefs.h"
23111 #include <sys/types.h>
23112 #if STDC_HEADERS
23113 #include <stdlib.h>
23114 #include <stddef.h>
23115 #endif
23116
23117 EOF
23118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23119   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23120   rm -rf conftest*
23121   eval "ac_cv_type_pid_t=yes"
23122 else
23123   rm -rf conftest*
23124   eval "ac_cv_type_pid_t=no"
23125 fi
23126 rm -f conftest*
23127
23128 fi
23129 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23130   echo "$ac_t""yes" 1>&6
23131 else
23132   echo "$ac_t""no" 1>&6
23133   cat >> confdefs.h <<EOF
23134 #define pid_t int
23135 EOF
23136
23137 fi
23138
23139 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23140 echo "configure:23141: checking for ptrdiff_t" >&5
23141 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23142   echo $ac_n "(cached) $ac_c" 1>&6
23143 else
23144   cat > conftest.$ac_ext <<EOF
23145 #line 23146 "configure"
23146 #include "confdefs.h"
23147 #include <stddef.h>
23148 int main() {
23149 ptrdiff_t p
23150 ; return 0; }
23151 EOF
23152 if { (eval echo configure:23153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23153   rm -rf conftest*
23154   am_cv_type_ptrdiff_t=yes
23155 else
23156   echo "configure: failed program was:" >&5
23157   cat conftest.$ac_ext >&5
23158   rm -rf conftest*
23159   am_cv_type_ptrdiff_t=no
23160 fi
23161 rm -f conftest*
23162 fi
23163
23164 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23165    if test $am_cv_type_ptrdiff_t = yes; then
23166      cat >> confdefs.h <<\EOF
23167 #define HAVE_PTRDIFF_T 1
23168 EOF
23169
23170    fi
23171
23172 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23173 echo "configure:23174: checking return type of signal handlers" >&5
23174 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23175   echo $ac_n "(cached) $ac_c" 1>&6
23176 else
23177   cat > conftest.$ac_ext <<EOF
23178 #line 23179 "configure"
23179 #include "confdefs.h"
23180 #include <sys/types.h>
23181 #include <signal.h>
23182 #ifdef signal
23183 #undef signal
23184 #endif
23185 #ifdef __cplusplus
23186 extern "C" void (*signal (int, void (*)(int)))(int);
23187 #else
23188 void (*signal ()) ();
23189 #endif
23190
23191 int main() {
23192 int i;
23193 ; return 0; }
23194 EOF
23195 if { (eval echo configure:23196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23196   rm -rf conftest*
23197   ac_cv_type_signal=void
23198 else
23199   echo "configure: failed program was:" >&5
23200   cat conftest.$ac_ext >&5
23201   rm -rf conftest*
23202   ac_cv_type_signal=int
23203 fi
23204 rm -f conftest*
23205 fi
23206
23207 echo "$ac_t""$ac_cv_type_signal" 1>&6
23208 cat >> confdefs.h <<EOF
23209 #define RETSIGTYPE $ac_cv_type_signal
23210 EOF
23211
23212
23213 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23214 echo "configure:23215: checking for size_t" >&5
23215 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23216   echo $ac_n "(cached) $ac_c" 1>&6
23217 else
23218   cat > conftest.$ac_ext <<EOF
23219 #line 23220 "configure"
23220 #include "confdefs.h"
23221 #include <sys/types.h>
23222 #if STDC_HEADERS
23223 #include <stdlib.h>
23224 #include <stddef.h>
23225 #endif
23226
23227 EOF
23228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23229   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23230   rm -rf conftest*
23231   eval "ac_cv_type_size_t=yes"
23232 else
23233   rm -rf conftest*
23234   eval "ac_cv_type_size_t=no"
23235 fi
23236 rm -f conftest*
23237
23238 fi
23239 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23240   echo "$ac_t""yes" 1>&6
23241 else
23242   echo "$ac_t""no" 1>&6
23243   cat >> confdefs.h <<EOF
23244 #define size_t unsigned
23245 EOF
23246
23247 fi
23248
23249
23250 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23251 echo "configure:23252: checking for ssize_t" >&5
23252 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23253   echo $ac_n "(cached) $ac_c" 1>&6
23254 else
23255   cat > conftest.$ac_ext <<EOF
23256 #line 23257 "configure"
23257 #include "confdefs.h"
23258 #include <sys/types.h>
23259 #if STDC_HEADERS
23260 #include <stdlib.h>
23261 #include <stddef.h>
23262 #endif
23263
23264 EOF
23265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23266   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23267   rm -rf conftest*
23268   eval "ac_cv_type_ssize_t=yes"
23269 else
23270   rm -rf conftest*
23271   eval "ac_cv_type_ssize_t=no"
23272 fi
23273 rm -f conftest*
23274
23275 fi
23276 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23277   echo "$ac_t""yes" 1>&6
23278 else
23279   echo "$ac_t""no" 1>&6
23280   cat >> confdefs.h <<EOF
23281 #define ssize_t signed int
23282 EOF
23283
23284 fi
23285
23286 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23287 echo "configure:23288: checking for caddr_t" >&5
23288 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23289   echo $ac_n "(cached) $ac_c" 1>&6
23290 else
23291   cat > conftest.$ac_ext <<EOF
23292 #line 23293 "configure"
23293 #include "confdefs.h"
23294 #include <sys/types.h>
23295 #if STDC_HEADERS
23296 #include <stdlib.h>
23297 #include <stddef.h>
23298 #endif
23299
23300 EOF
23301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23302   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23303   rm -rf conftest*
23304   eval "ac_cv_type_caddr_t=yes"
23305 else
23306   rm -rf conftest*
23307   eval "ac_cv_type_caddr_t=no"
23308 fi
23309 rm -f conftest*
23310
23311 fi
23312 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23313   echo "$ac_t""yes" 1>&6
23314 else
23315   echo "$ac_t""no" 1>&6
23316   cat >> confdefs.h <<EOF
23317 #define caddr_t char *
23318 EOF
23319
23320 fi
23321
23322
23323 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23324 echo "configure:23325: checking for socklen_t" >&5
23325 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23326   echo $ac_n "(cached) $ac_c" 1>&6
23327 else
23328   cat > conftest.$ac_ext <<EOF
23329 #line 23330 "configure"
23330 #include "confdefs.h"
23331
23332 #ifdef HAVE_SYS_TYPES_H
23333 #include <sys/types.h>
23334 #endif
23335 #ifdef HAVE_SYS_SOCKET_H
23336 #include <sys/socket.h>
23337 #endif
23338
23339 int main() {
23340 socklen_t len;
23341 ; return 0; }
23342 EOF
23343 if { (eval echo configure:23344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23344   rm -rf conftest*
23345   ol_cv_type_socklen_t=yes
23346 else
23347   echo "configure: failed program was:" >&5
23348   cat conftest.$ac_ext >&5
23349   rm -rf conftest*
23350   ol_cv_type_socklen_t=no
23351 fi
23352 rm -f conftest*
23353 fi
23354
23355 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23356   if test $ol_cv_type_socklen_t = no; then
23357     cat >> confdefs.h <<\EOF
23358 #define socklen_t int
23359 EOF
23360
23361   fi
23362  
23363 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23364 echo "configure:23365: checking for member st_blksize in aggregate type struct stat" >&5
23365 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23366   echo $ac_n "(cached) $ac_c" 1>&6
23367 else
23368   cat > conftest.$ac_ext <<EOF
23369 #line 23370 "configure"
23370 #include "confdefs.h"
23371 #include <sys/types.h>
23372 #include <sys/stat.h>
23373 int main() {
23374 struct stat foo; foo.st_blksize;
23375 ; return 0; }
23376 EOF
23377 if { (eval echo configure:23378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23378   rm -rf conftest*
23379   ac_cv_c_struct_member_st_blksize=yes
23380 else
23381   echo "configure: failed program was:" >&5
23382   cat conftest.$ac_ext >&5
23383   rm -rf conftest*
23384   ac_cv_c_struct_member_st_blksize=no
23385 fi
23386 rm -f conftest*
23387 fi
23388
23389 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23390 st_blksize="$ac_cv_c_struct_member_st_blksize"
23391 if test $ac_cv_c_struct_member_st_blksize = yes; then
23392   cat >> confdefs.h <<\EOF
23393 #define HAVE_ST_BLKSIZE 1
23394 EOF
23395
23396 fi
23397
23398 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23399 echo "configure:23400: checking whether time.h and sys/time.h may both be included" >&5
23400 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23401   echo $ac_n "(cached) $ac_c" 1>&6
23402 else
23403   cat > conftest.$ac_ext <<EOF
23404 #line 23405 "configure"
23405 #include "confdefs.h"
23406 #include <sys/types.h>
23407 #include <sys/time.h>
23408 #include <time.h>
23409 int main() {
23410 struct tm *tp;
23411 ; return 0; }
23412 EOF
23413 if { (eval echo configure:23414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23414   rm -rf conftest*
23415   ac_cv_header_time=yes
23416 else
23417   echo "configure: failed program was:" >&5
23418   cat conftest.$ac_ext >&5
23419   rm -rf conftest*
23420   ac_cv_header_time=no
23421 fi
23422 rm -f conftest*
23423 fi
23424
23425 echo "$ac_t""$ac_cv_header_time" 1>&6
23426 if test $ac_cv_header_time = yes; then
23427   cat >> confdefs.h <<\EOF
23428 #define TIME_WITH_SYS_TIME 1
23429 EOF
23430
23431 fi
23432
23433 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23434 echo "configure:23435: checking whether struct tm is in sys/time.h or time.h" >&5
23435 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23436   echo $ac_n "(cached) $ac_c" 1>&6
23437 else
23438   cat > conftest.$ac_ext <<EOF
23439 #line 23440 "configure"
23440 #include "confdefs.h"
23441 #include <sys/types.h>
23442 #include <time.h>
23443 int main() {
23444 struct tm *tp; tp->tm_sec;
23445 ; return 0; }
23446 EOF
23447 if { (eval echo configure:23448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23448   rm -rf conftest*
23449   ac_cv_struct_tm=time.h
23450 else
23451   echo "configure: failed program was:" >&5
23452   cat conftest.$ac_ext >&5
23453   rm -rf conftest*
23454   ac_cv_struct_tm=sys/time.h
23455 fi
23456 rm -f conftest*
23457 fi
23458
23459 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23460 if test $ac_cv_struct_tm = sys/time.h; then
23461   cat >> confdefs.h <<\EOF
23462 #define TM_IN_SYS_TIME 1
23463 EOF
23464
23465 fi
23466
23467 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23468 echo "configure:23469: checking for uid_t in sys/types.h" >&5
23469 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23470   echo $ac_n "(cached) $ac_c" 1>&6
23471 else
23472   cat > conftest.$ac_ext <<EOF
23473 #line 23474 "configure"
23474 #include "confdefs.h"
23475 #include <sys/types.h>
23476 EOF
23477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23478   egrep "uid_t" >/dev/null 2>&1; then
23479   rm -rf conftest*
23480   ac_cv_type_uid_t=yes
23481 else
23482   rm -rf conftest*
23483   ac_cv_type_uid_t=no
23484 fi
23485 rm -f conftest*
23486
23487 fi
23488
23489 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23490 if test $ac_cv_type_uid_t = no; then
23491   cat >> confdefs.h <<\EOF
23492 #define uid_t int
23493 EOF
23494
23495   cat >> confdefs.h <<\EOF
23496 #define gid_t int
23497 EOF
23498
23499 fi
23500
23501 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23502 echo "configure:23503: checking for sig_atomic_t" >&5
23503 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23504   echo $ac_n "(cached) $ac_c" 1>&6
23505 else
23506   cat > conftest.$ac_ext <<EOF
23507 #line 23508 "configure"
23508 #include "confdefs.h"
23509 #include <signal.h>
23510 int main() {
23511 sig_atomic_t atomic;
23512 ; return 0; }
23513 EOF
23514 if { (eval echo configure:23515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23515   rm -rf conftest*
23516   ol_cv_type_sig_atomic_t=yes
23517 else
23518   echo "configure: failed program was:" >&5
23519   cat conftest.$ac_ext >&5
23520   rm -rf conftest*
23521   ol_cv_type_sig_atomic_t=no
23522 fi
23523 rm -f conftest*
23524 fi
23525
23526 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23527   if test $ol_cv_type_sig_atomic_t = no; then
23528     cat >> confdefs.h <<\EOF
23529 #define sig_atomic_t int
23530 EOF
23531
23532   fi
23533  
23534
23535
23536 # test for pw_gecos in struct passwd
23537 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23538 echo "configure:23539: checking struct passwd for pw_gecos" >&5
23539 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23540   echo $ac_n "(cached) $ac_c" 1>&6
23541 else
23542   
23543         cat > conftest.$ac_ext <<EOF
23544 #line 23545 "configure"
23545 #include "confdefs.h"
23546 #include <pwd.h>
23547 int main() {
23548
23549         struct passwd pwd;
23550         pwd.pw_gecos = pwd.pw_name;
23551
23552 ; return 0; }
23553 EOF
23554 if { (eval echo configure:23555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23555   rm -rf conftest*
23556   ol_cv_struct_passwd_pw_gecos=yes
23557 else
23558   echo "configure: failed program was:" >&5
23559   cat conftest.$ac_ext >&5
23560   rm -rf conftest*
23561   ol_cv_struct_passwd_pw_gecos=no
23562 fi
23563 rm -f conftest*
23564 fi
23565
23566 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23567 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23568         cat >> confdefs.h <<\EOF
23569 #define HAVE_PW_GECOS 1
23570 EOF
23571
23572 fi
23573
23574 # test for pw_passwd in struct passwd
23575 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23576 echo "configure:23577: checking struct passwd for pw_passwd" >&5
23577 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23578   echo $ac_n "(cached) $ac_c" 1>&6
23579 else
23580   
23581         cat > conftest.$ac_ext <<EOF
23582 #line 23583 "configure"
23583 #include "confdefs.h"
23584 #include <pwd.h>
23585 int main() {
23586
23587         struct passwd pwd;
23588         pwd.pw_passwd = pwd.pw_name;
23589
23590 ; return 0; }
23591 EOF
23592 if { (eval echo configure:23593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23593   rm -rf conftest*
23594   ol_cv_struct_passwd_pw_passwd=yes
23595 else
23596   echo "configure: failed program was:" >&5
23597   cat conftest.$ac_ext >&5
23598   rm -rf conftest*
23599   ol_cv_struct_passwd_pw_passwd=no
23600 fi
23601 rm -f conftest*
23602 fi
23603
23604 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23605 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23606         cat >> confdefs.h <<\EOF
23607 #define HAVE_PW_PASSWD 1
23608 EOF
23609
23610 fi
23611
23612
23613 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23614 echo "configure:23615: checking if toupper() requires islower()" >&5
23615 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23616   echo $ac_n "(cached) $ac_c" 1>&6
23617 else
23618   
23619         if test "$cross_compiling" = yes; then
23620   ol_cv_c_upper_lower=safe
23621 else
23622   cat > conftest.$ac_ext <<EOF
23623 #line 23624 "configure"
23624 #include "confdefs.h"
23625
23626 #include <ctype.h>
23627 main()
23628 {
23629         if ('C' == toupper('C'))
23630                 exit(0);
23631         else
23632                 exit(1);
23633 }
23634 EOF
23635 if { (eval echo configure:23636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23636 then
23637   ol_cv_c_upper_lower=no
23638 else
23639   echo "configure: failed program was:" >&5
23640   cat conftest.$ac_ext >&5
23641   rm -fr conftest*
23642   ol_cv_c_upper_lower=yes
23643 fi
23644 rm -fr conftest*
23645 fi
23646
23647 fi
23648
23649 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23650 if test $ol_cv_c_upper_lower != no ; then
23651         cat >> confdefs.h <<\EOF
23652 #define C_UPPER_LOWER 1
23653 EOF
23654
23655 fi
23656
23657 echo $ac_n "checking for working const""... $ac_c" 1>&6
23658 echo "configure:23659: checking for working const" >&5
23659 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23660   echo $ac_n "(cached) $ac_c" 1>&6
23661 else
23662   cat > conftest.$ac_ext <<EOF
23663 #line 23664 "configure"
23664 #include "confdefs.h"
23665
23666 int main() {
23667
23668 /* Ultrix mips cc rejects this.  */
23669 typedef int charset[2]; const charset x;
23670 /* SunOS 4.1.1 cc rejects this.  */
23671 char const *const *ccp;
23672 char **p;
23673 /* NEC SVR4.0.2 mips cc rejects this.  */
23674 struct point {int x, y;};
23675 static struct point const zero = {0,0};
23676 /* AIX XL C 1.02.0.0 rejects this.
23677    It does not let you subtract one const X* pointer from another in an arm
23678    of an if-expression whose if-part is not a constant expression */
23679 const char *g = "string";
23680 ccp = &g + (g ? g-g : 0);
23681 /* HPUX 7.0 cc rejects these. */
23682 ++ccp;
23683 p = (char**) ccp;
23684 ccp = (char const *const *) p;
23685 { /* SCO 3.2v4 cc rejects this.  */
23686   char *t;
23687   char const *s = 0 ? (char *) 0 : (char const *) 0;
23688
23689   *t++ = 0;
23690 }
23691 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23692   int x[] = {25, 17};
23693   const int *foo = &x[0];
23694   ++foo;
23695 }
23696 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23697   typedef const int *iptr;
23698   iptr p = 0;
23699   ++p;
23700 }
23701 { /* AIX XL C 1.02.0.0 rejects this saying
23702      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23703   struct s { int j; const int *ap[3]; };
23704   struct s *b; b->j = 5;
23705 }
23706 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23707   const int foo = 10;
23708 }
23709
23710 ; return 0; }
23711 EOF
23712 if { (eval echo configure:23713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23713   rm -rf conftest*
23714   ac_cv_c_const=yes
23715 else
23716   echo "configure: failed program was:" >&5
23717   cat conftest.$ac_ext >&5
23718   rm -rf conftest*
23719   ac_cv_c_const=no
23720 fi
23721 rm -f conftest*
23722 fi
23723
23724 echo "$ac_t""$ac_cv_c_const" 1>&6
23725 if test $ac_cv_c_const = no; then
23726   cat >> confdefs.h <<\EOF
23727 #define const 
23728 EOF
23729
23730 fi
23731
23732 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23733 echo "configure:23734: checking if compiler understands volatile" >&5
23734 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23735   echo $ac_n "(cached) $ac_c" 1>&6
23736 else
23737   cat > conftest.$ac_ext <<EOF
23738 #line 23739 "configure"
23739 #include "confdefs.h"
23740 int x, y, z;
23741 int main() {
23742 volatile int a; int * volatile b = x ? &y : &z;
23743       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23744       *b = 0;
23745 ; return 0; }
23746 EOF
23747 if { (eval echo configure:23748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23748   rm -rf conftest*
23749   ol_cv_c_volatile=yes
23750 else
23751   echo "configure: failed program was:" >&5
23752   cat conftest.$ac_ext >&5
23753   rm -rf conftest*
23754   ol_cv_c_volatile=no
23755 fi
23756 rm -f conftest*
23757 fi
23758
23759 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23760   if test $ol_cv_c_volatile = yes; then
23761     : 
23762   else
23763     cat >> confdefs.h <<\EOF
23764 #define volatile 
23765 EOF
23766
23767   fi
23768  
23769
23770 if test $cross_compiling = yes ; then
23771         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23772         cat >> confdefs.h <<\EOF
23773 #define CROSS_COMPILING 1
23774 EOF
23775
23776 else
23777         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23778 echo "configure:23779: checking whether byte ordering is bigendian" >&5
23779 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23780   echo $ac_n "(cached) $ac_c" 1>&6
23781 else
23782   ac_cv_c_bigendian=unknown
23783 # See if sys/param.h defines the BYTE_ORDER macro.
23784 cat > conftest.$ac_ext <<EOF
23785 #line 23786 "configure"
23786 #include "confdefs.h"
23787 #include <sys/types.h>
23788 #include <sys/param.h>
23789 int main() {
23790
23791 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23792  bogus endian macros
23793 #endif
23794 ; return 0; }
23795 EOF
23796 if { (eval echo configure:23797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23797   rm -rf conftest*
23798   # It does; now see whether it defined to BIG_ENDIAN or not.
23799 cat > conftest.$ac_ext <<EOF
23800 #line 23801 "configure"
23801 #include "confdefs.h"
23802 #include <sys/types.h>
23803 #include <sys/param.h>
23804 int main() {
23805
23806 #if BYTE_ORDER != BIG_ENDIAN
23807  not big endian
23808 #endif
23809 ; return 0; }
23810 EOF
23811 if { (eval echo configure:23812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23812   rm -rf conftest*
23813   ac_cv_c_bigendian=yes
23814 else
23815   echo "configure: failed program was:" >&5
23816   cat conftest.$ac_ext >&5
23817   rm -rf conftest*
23818   ac_cv_c_bigendian=no
23819 fi
23820 rm -f conftest*
23821 else
23822   echo "configure: failed program was:" >&5
23823   cat conftest.$ac_ext >&5
23824 fi
23825 rm -f conftest*
23826 if test $ac_cv_c_bigendian = unknown; then
23827 if test "$cross_compiling" = yes; then
23828     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23829 else
23830   cat > conftest.$ac_ext <<EOF
23831 #line 23832 "configure"
23832 #include "confdefs.h"
23833 main () {
23834   /* Are we little or big endian?  From Harbison&Steele.  */
23835   union
23836   {
23837     long l;
23838     char c[sizeof (long)];
23839   } u;
23840   u.l = 1;
23841   exit (u.c[sizeof (long) - 1] == 1);
23842 }
23843 EOF
23844 if { (eval echo configure:23845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23845 then
23846   ac_cv_c_bigendian=no
23847 else
23848   echo "configure: failed program was:" >&5
23849   cat conftest.$ac_ext >&5
23850   rm -fr conftest*
23851   ac_cv_c_bigendian=yes
23852 fi
23853 rm -fr conftest*
23854 fi
23855
23856 fi
23857 fi
23858
23859 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23860 if test $ac_cv_c_bigendian = yes; then
23861   cat >> confdefs.h <<\EOF
23862 #define WORDS_BIGENDIAN 1
23863 EOF
23864
23865 fi
23866
23867 fi
23868
23869 echo $ac_n "checking size of short""... $ac_c" 1>&6
23870 echo "configure:23871: checking size of short" >&5 
23871 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23872   echo $ac_n "(cached) $ac_c" 1>&6
23873 else
23874   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23875   cat > conftest.$ac_ext <<EOF
23876 #line 23877 "configure"
23877 #include "confdefs.h"
23878 #include "confdefs.h" 
23879 #include <stdlib.h>
23880 #include <sys/types.h> 
23881  
23882
23883 int main() {
23884 switch (0) case 0: case (sizeof (short) == $ac_size):;
23885 ; return 0; }
23886 EOF
23887 if { (eval echo configure:23888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23888   rm -rf conftest*
23889   ac_cv_sizeof_short=$ac_size
23890 else
23891   echo "configure: failed program was:" >&5
23892   cat conftest.$ac_ext >&5
23893 fi
23894 rm -f conftest* 
23895   if test x$ac_cv_sizeof_short != x ; then break; fi 
23896 done 
23897
23898 fi
23899  
23900 if test x$ac_cv_sizeof_short = x ; then 
23901   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23902 fi 
23903 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23904 cat >> confdefs.h <<EOF
23905 #define SIZEOF_SHORT $ac_cv_sizeof_short
23906 EOF
23907  
23908  
23909 echo $ac_n "checking size of int""... $ac_c" 1>&6
23910 echo "configure:23911: checking size of int" >&5 
23911 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23912   echo $ac_n "(cached) $ac_c" 1>&6
23913 else
23914   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23915   cat > conftest.$ac_ext <<EOF
23916 #line 23917 "configure"
23917 #include "confdefs.h"
23918 #include "confdefs.h" 
23919 #include <stdlib.h>
23920 #include <sys/types.h> 
23921  
23922
23923 int main() {
23924 switch (0) case 0: case (sizeof (int) == $ac_size):;
23925 ; return 0; }
23926 EOF
23927 if { (eval echo configure:23928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23928   rm -rf conftest*
23929   ac_cv_sizeof_int=$ac_size
23930 else
23931   echo "configure: failed program was:" >&5
23932   cat conftest.$ac_ext >&5
23933 fi
23934 rm -f conftest* 
23935   if test x$ac_cv_sizeof_int != x ; then break; fi 
23936 done 
23937
23938 fi
23939  
23940 if test x$ac_cv_sizeof_int = x ; then 
23941   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23942 fi 
23943 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23944 cat >> confdefs.h <<EOF
23945 #define SIZEOF_INT $ac_cv_sizeof_int
23946 EOF
23947  
23948  
23949 echo $ac_n "checking size of long""... $ac_c" 1>&6
23950 echo "configure:23951: checking size of long" >&5 
23951 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23952   echo $ac_n "(cached) $ac_c" 1>&6
23953 else
23954   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23955   cat > conftest.$ac_ext <<EOF
23956 #line 23957 "configure"
23957 #include "confdefs.h"
23958 #include "confdefs.h" 
23959 #include <stdlib.h>
23960 #include <sys/types.h> 
23961  
23962
23963 int main() {
23964 switch (0) case 0: case (sizeof (long) == $ac_size):;
23965 ; return 0; }
23966 EOF
23967 if { (eval echo configure:23968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23968   rm -rf conftest*
23969   ac_cv_sizeof_long=$ac_size
23970 else
23971   echo "configure: failed program was:" >&5
23972   cat conftest.$ac_ext >&5
23973 fi
23974 rm -f conftest* 
23975   if test x$ac_cv_sizeof_long != x ; then break; fi 
23976 done 
23977
23978 fi
23979  
23980 if test x$ac_cv_sizeof_long = x ; then 
23981   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23982 fi 
23983 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23984 cat >> confdefs.h <<EOF
23985 #define SIZEOF_LONG $ac_cv_sizeof_long
23986 EOF
23987  
23988
23989 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23990 echo "configure:23991: checking size of wchar_t" >&5 
23991 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23992   echo $ac_n "(cached) $ac_c" 1>&6
23993 else
23994   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23995   cat > conftest.$ac_ext <<EOF
23996 #line 23997 "configure"
23997 #include "confdefs.h"
23998 #include "confdefs.h" 
23999 #include <stdlib.h>
24000 #include <sys/types.h> 
24001  
24002
24003 int main() {
24004 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
24005 ; return 0; }
24006 EOF
24007 if { (eval echo configure:24008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24008   rm -rf conftest*
24009   ac_cv_sizeof_wchar_t=$ac_size
24010 else
24011   echo "configure: failed program was:" >&5
24012   cat conftest.$ac_ext >&5
24013 fi
24014 rm -f conftest* 
24015   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
24016 done 
24017
24018 fi
24019  
24020 if test x$ac_cv_sizeof_wchar_t = x ; then 
24021   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
24022 fi 
24023 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
24024 cat >> confdefs.h <<EOF
24025 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
24026 EOF
24027  
24028
24029
24030 if test "$ac_cv_sizeof_int" -lt 4 ; then
24031         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
24032
24033         cat >> confdefs.h <<\EOF
24034 #define LBER_INT_T long
24035 EOF
24036
24037 else
24038         cat >> confdefs.h <<\EOF
24039 #define LBER_INT_T int
24040 EOF
24041
24042 fi
24043
24044 cat >> confdefs.h <<\EOF
24045 #define LBER_LEN_T long
24046 EOF
24047
24048 cat >> confdefs.h <<\EOF
24049 #define LBER_SOCKET_T int
24050 EOF
24051
24052 cat >> confdefs.h <<\EOF
24053 #define LBER_TAG_T long
24054 EOF
24055
24056
24057 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
24058 echo "configure:24059: checking for 8-bit clean memcmp" >&5
24059 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
24060   echo $ac_n "(cached) $ac_c" 1>&6
24061 else
24062   if test "$cross_compiling" = yes; then
24063   ac_cv_func_memcmp_clean=no
24064 else
24065   cat > conftest.$ac_ext <<EOF
24066 #line 24067 "configure"
24067 #include "confdefs.h"
24068
24069 main()
24070 {
24071   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
24072   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
24073 }
24074
24075 EOF
24076 if { (eval echo configure:24077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
24077 then
24078   ac_cv_func_memcmp_clean=yes
24079 else
24080   echo "configure: failed program was:" >&5
24081   cat conftest.$ac_ext >&5
24082   rm -fr conftest*
24083   ac_cv_func_memcmp_clean=no
24084 fi
24085 rm -fr conftest*
24086 fi
24087
24088 fi
24089
24090 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24091 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24092
24093
24094 if test $ac_cv_func_memcmp_clean = no ; then
24095         cat >> confdefs.h <<\EOF
24096 #define NEED_MEMCMP_REPLACEMENT 1
24097 EOF
24098
24099 fi
24100
24101 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24102 echo "configure:24103: checking for strftime" >&5
24103 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24104   echo $ac_n "(cached) $ac_c" 1>&6
24105 else
24106   cat > conftest.$ac_ext <<EOF
24107 #line 24108 "configure"
24108 #include "confdefs.h"
24109 /* System header to define __stub macros and hopefully few prototypes,
24110     which can conflict with char strftime(); below.  */
24111 #include <assert.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 char (*f)();
24117
24118 int main() {
24119
24120 /* The GNU C library defines this for functions which it implements
24121     to always fail with ENOSYS.  Some functions are actually named
24122     something starting with __ and the normal name is an alias.  */
24123 #if defined (__stub_strftime) || defined (__stub___strftime)
24124 choke me
24125 #else
24126 f = strftime;
24127 #endif
24128
24129 ; return 0; }
24130 EOF
24131 if { (eval echo configure:24132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24132   rm -rf conftest*
24133   eval "ac_cv_func_strftime=yes"
24134 else
24135   echo "configure: failed program was:" >&5
24136   cat conftest.$ac_ext >&5
24137   rm -rf conftest*
24138   eval "ac_cv_func_strftime=no"
24139 fi
24140 rm -f conftest*
24141 fi
24142
24143 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24144   echo "$ac_t""yes" 1>&6
24145   cat >> confdefs.h <<\EOF
24146 #define HAVE_STRFTIME 1
24147 EOF
24148
24149 else
24150   echo "$ac_t""no" 1>&6
24151 # strftime is in -lintl on SCO UNIX.
24152 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24153 echo "configure:24154: checking for strftime in -lintl" >&5
24154 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24156   echo $ac_n "(cached) $ac_c" 1>&6
24157 else
24158   ac_save_LIBS="$LIBS"
24159 LIBS="-lintl  $LIBS"
24160 cat > conftest.$ac_ext <<EOF
24161 #line 24162 "configure"
24162 #include "confdefs.h"
24163 /* Override any gcc2 internal prototype to avoid an error.  */
24164 /* We use char because int might match the return type of a gcc2
24165     builtin and then its argument prototype would still apply.  */
24166 char strftime();
24167
24168 int main() {
24169 strftime()
24170 ; return 0; }
24171 EOF
24172 if { (eval echo configure:24173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24173   rm -rf conftest*
24174   eval "ac_cv_lib_$ac_lib_var=yes"
24175 else
24176   echo "configure: failed program was:" >&5
24177   cat conftest.$ac_ext >&5
24178   rm -rf conftest*
24179   eval "ac_cv_lib_$ac_lib_var=no"
24180 fi
24181 rm -f conftest*
24182 LIBS="$ac_save_LIBS"
24183
24184 fi
24185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24186   echo "$ac_t""yes" 1>&6
24187   cat >> confdefs.h <<\EOF
24188 #define HAVE_STRFTIME 1
24189 EOF
24190
24191 LIBS="-lintl $LIBS"
24192 else
24193   echo "$ac_t""no" 1>&6
24194 fi
24195
24196 fi
24197
24198
24199 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24200 echo "configure:24201: checking for inet_aton()" >&5
24201 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24202   echo $ac_n "(cached) $ac_c" 1>&6
24203 else
24204   cat > conftest.$ac_ext <<EOF
24205 #line 24206 "configure"
24206 #include "confdefs.h"
24207
24208 #ifdef HAVE_SYS_TYPES_H
24209 #       include <sys/types.h>
24210 #endif
24211 #ifdef HAVE_SYS_SOCKET_H
24212 #       include <sys/socket.h>
24213 #       ifdef HAVE_SYS_SELECT_H
24214 #               include <sys/select.h>
24215 #       endif
24216 #       include <netinet/in.h>
24217 #       ifdef HAVE_ARPA_INET_H
24218 #               include <arpa/inet.h>
24219 #       endif
24220 #endif
24221
24222 int main() {
24223 struct in_addr in;
24224 int rc = inet_aton( "255.255.255.255", &in );
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   ol_cv_func_inet_aton=yes
24230 else
24231   echo "configure: failed program was:" >&5
24232   cat conftest.$ac_ext >&5
24233   rm -rf conftest*
24234   ol_cv_func_inet_aton=no
24235 fi
24236 rm -f conftest*
24237 fi
24238
24239 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24240   if test $ol_cv_func_inet_aton != no; then
24241     cat >> confdefs.h <<\EOF
24242 #define HAVE_INET_ATON 1
24243 EOF
24244
24245   fi
24246  
24247
24248 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24249 echo "configure:24250: checking for _spawnlp" >&5
24250 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24251   echo $ac_n "(cached) $ac_c" 1>&6
24252 else
24253   cat > conftest.$ac_ext <<EOF
24254 #line 24255 "configure"
24255 #include "confdefs.h"
24256 /* System header to define __stub macros and hopefully few prototypes,
24257     which can conflict with char _spawnlp(); below.  */
24258 #include <assert.h>
24259 /* Override any gcc2 internal prototype to avoid an error.  */
24260 /* We use char because int might match the return type of a gcc2
24261     builtin and then its argument prototype would still apply.  */
24262 char _spawnlp();
24263 char (*f)();
24264
24265 int main() {
24266
24267 /* The GNU C library defines this for functions which it implements
24268     to always fail with ENOSYS.  Some functions are actually named
24269     something starting with __ and the normal name is an alias.  */
24270 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24271 choke me
24272 #else
24273 f = _spawnlp;
24274 #endif
24275
24276 ; return 0; }
24277 EOF
24278 if { (eval echo configure:24279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24279   rm -rf conftest*
24280   eval "ac_cv_func__spawnlp=yes"
24281 else
24282   echo "configure: failed program was:" >&5
24283   cat conftest.$ac_ext >&5
24284   rm -rf conftest*
24285   eval "ac_cv_func__spawnlp=no"
24286 fi
24287 rm -f conftest*
24288 fi
24289
24290 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24291   echo "$ac_t""yes" 1>&6
24292   cat >> confdefs.h <<\EOF
24293 #define HAVE_SPAWNLP 1
24294 EOF
24295
24296 else
24297   echo "$ac_t""no" 1>&6
24298 fi
24299
24300
24301 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24302 echo "configure:24303: checking for _snprintf" >&5
24303 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24304   echo $ac_n "(cached) $ac_c" 1>&6
24305 else
24306   cat > conftest.$ac_ext <<EOF
24307 #line 24308 "configure"
24308 #include "confdefs.h"
24309 /* System header to define __stub macros and hopefully few prototypes,
24310     which can conflict with char _snprintf(); below.  */
24311 #include <assert.h>
24312 /* Override any gcc2 internal prototype to avoid an error.  */
24313 /* We use char because int might match the return type of a gcc2
24314     builtin and then its argument prototype would still apply.  */
24315 char _snprintf();
24316 char (*f)();
24317
24318 int main() {
24319
24320 /* The GNU C library defines this for functions which it implements
24321     to always fail with ENOSYS.  Some functions are actually named
24322     something starting with __ and the normal name is an alias.  */
24323 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24324 choke me
24325 #else
24326 f = _snprintf;
24327 #endif
24328
24329 ; return 0; }
24330 EOF
24331 if { (eval echo configure:24332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24332   rm -rf conftest*
24333   eval "ac_cv_func__snprintf=yes"
24334 else
24335   echo "configure: failed program was:" >&5
24336   cat conftest.$ac_ext >&5
24337   rm -rf conftest*
24338   eval "ac_cv_func__snprintf=no"
24339 fi
24340 rm -f conftest*
24341 fi
24342
24343 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24344   echo "$ac_t""yes" 1>&6
24345   ac_cv_func_snprintf=yes
24346         cat >> confdefs.h <<\EOF
24347 #define snprintf _snprintf
24348 EOF
24349
24350
24351 else
24352   echo "$ac_t""no" 1>&6
24353 fi
24354
24355
24356 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24357 echo "configure:24358: checking for _vsnprintf" >&5
24358 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24359   echo $ac_n "(cached) $ac_c" 1>&6
24360 else
24361   cat > conftest.$ac_ext <<EOF
24362 #line 24363 "configure"
24363 #include "confdefs.h"
24364 /* System header to define __stub macros and hopefully few prototypes,
24365     which can conflict with char _vsnprintf(); below.  */
24366 #include <assert.h>
24367 /* Override any gcc2 internal prototype to avoid an error.  */
24368 /* We use char because int might match the return type of a gcc2
24369     builtin and then its argument prototype would still apply.  */
24370 char _vsnprintf();
24371 char (*f)();
24372
24373 int main() {
24374
24375 /* The GNU C library defines this for functions which it implements
24376     to always fail with ENOSYS.  Some functions are actually named
24377     something starting with __ and the normal name is an alias.  */
24378 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24379 choke me
24380 #else
24381 f = _vsnprintf;
24382 #endif
24383
24384 ; return 0; }
24385 EOF
24386 if { (eval echo configure:24387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24387   rm -rf conftest*
24388   eval "ac_cv_func__vsnprintf=yes"
24389 else
24390   echo "configure: failed program was:" >&5
24391   cat conftest.$ac_ext >&5
24392   rm -rf conftest*
24393   eval "ac_cv_func__vsnprintf=no"
24394 fi
24395 rm -f conftest*
24396 fi
24397
24398 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24399   echo "$ac_t""yes" 1>&6
24400   ac_cv_func_vsnprintf=yes
24401         cat >> confdefs.h <<\EOF
24402 #define vsnprintf _vsnprintf
24403 EOF
24404
24405
24406 else
24407   echo "$ac_t""no" 1>&6
24408 fi
24409
24410
24411 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24412 echo "configure:24413: checking for vprintf" >&5
24413 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24414   echo $ac_n "(cached) $ac_c" 1>&6
24415 else
24416   cat > conftest.$ac_ext <<EOF
24417 #line 24418 "configure"
24418 #include "confdefs.h"
24419 /* System header to define __stub macros and hopefully few prototypes,
24420     which can conflict with char vprintf(); below.  */
24421 #include <assert.h>
24422 /* Override any gcc2 internal prototype to avoid an error.  */
24423 /* We use char because int might match the return type of a gcc2
24424     builtin and then its argument prototype would still apply.  */
24425 char vprintf();
24426 char (*f)();
24427
24428 int main() {
24429
24430 /* The GNU C library defines this for functions which it implements
24431     to always fail with ENOSYS.  Some functions are actually named
24432     something starting with __ and the normal name is an alias.  */
24433 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24434 choke me
24435 #else
24436 f = vprintf;
24437 #endif
24438
24439 ; return 0; }
24440 EOF
24441 if { (eval echo configure:24442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24442   rm -rf conftest*
24443   eval "ac_cv_func_vprintf=yes"
24444 else
24445   echo "configure: failed program was:" >&5
24446   cat conftest.$ac_ext >&5
24447   rm -rf conftest*
24448   eval "ac_cv_func_vprintf=no"
24449 fi
24450 rm -f conftest*
24451 fi
24452
24453 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24454   echo "$ac_t""yes" 1>&6
24455   cat >> confdefs.h <<\EOF
24456 #define HAVE_VPRINTF 1
24457 EOF
24458
24459 else
24460   echo "$ac_t""no" 1>&6
24461 fi
24462
24463 if test "$ac_cv_func_vprintf" != yes; then
24464 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24465 echo "configure:24466: checking for _doprnt" >&5
24466 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24467   echo $ac_n "(cached) $ac_c" 1>&6
24468 else
24469   cat > conftest.$ac_ext <<EOF
24470 #line 24471 "configure"
24471 #include "confdefs.h"
24472 /* System header to define __stub macros and hopefully few prototypes,
24473     which can conflict with char _doprnt(); below.  */
24474 #include <assert.h>
24475 /* Override any gcc2 internal prototype to avoid an error.  */
24476 /* We use char because int might match the return type of a gcc2
24477     builtin and then its argument prototype would still apply.  */
24478 char _doprnt();
24479 char (*f)();
24480
24481 int main() {
24482
24483 /* The GNU C library defines this for functions which it implements
24484     to always fail with ENOSYS.  Some functions are actually named
24485     something starting with __ and the normal name is an alias.  */
24486 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24487 choke me
24488 #else
24489 f = _doprnt;
24490 #endif
24491
24492 ; return 0; }
24493 EOF
24494 if { (eval echo configure:24495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24495   rm -rf conftest*
24496   eval "ac_cv_func__doprnt=yes"
24497 else
24498   echo "configure: failed program was:" >&5
24499   cat conftest.$ac_ext >&5
24500   rm -rf conftest*
24501   eval "ac_cv_func__doprnt=no"
24502 fi
24503 rm -f conftest*
24504 fi
24505
24506 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24507   echo "$ac_t""yes" 1>&6
24508   cat >> confdefs.h <<\EOF
24509 #define HAVE_DOPRNT 1
24510 EOF
24511
24512 else
24513   echo "$ac_t""no" 1>&6
24514 fi
24515
24516 fi
24517
24518
24519 if test $ac_cv_func_vprintf = yes ; then
24520                 for ac_func in snprintf vsnprintf
24521 do
24522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24523 echo "configure:24524: checking for $ac_func" >&5
24524 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24525   echo $ac_n "(cached) $ac_c" 1>&6
24526 else
24527   cat > conftest.$ac_ext <<EOF
24528 #line 24529 "configure"
24529 #include "confdefs.h"
24530 /* System header to define __stub macros and hopefully few prototypes,
24531     which can conflict with char $ac_func(); below.  */
24532 #include <assert.h>
24533 /* Override any gcc2 internal prototype to avoid an error.  */
24534 /* We use char because int might match the return type of a gcc2
24535     builtin and then its argument prototype would still apply.  */
24536 char $ac_func();
24537 char (*f)();
24538
24539 int main() {
24540
24541 /* The GNU C library defines this for functions which it implements
24542     to always fail with ENOSYS.  Some functions are actually named
24543     something starting with __ and the normal name is an alias.  */
24544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24545 choke me
24546 #else
24547 f = $ac_func;
24548 #endif
24549
24550 ; return 0; }
24551 EOF
24552 if { (eval echo configure:24553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24553   rm -rf conftest*
24554   eval "ac_cv_func_$ac_func=yes"
24555 else
24556   echo "configure: failed program was:" >&5
24557   cat conftest.$ac_ext >&5
24558   rm -rf conftest*
24559   eval "ac_cv_func_$ac_func=no"
24560 fi
24561 rm -f conftest*
24562 fi
24563
24564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24565   echo "$ac_t""yes" 1>&6
24566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24567   cat >> confdefs.h <<EOF
24568 #define $ac_tr_func 1
24569 EOF
24570  
24571 else
24572   echo "$ac_t""no" 1>&6
24573 fi
24574 done
24575
24576 fi
24577
24578 for ac_func in \
24579         bcopy                   \
24580         closesocket             \
24581         chroot                  \
24582         endgrent                \
24583         endpwent                \
24584         fcntl                   \
24585         flock                   \
24586         fstat                   \
24587         getdtablesize   \
24588         getgrgid                \
24589         gethostname             \
24590         getpass                 \
24591         getpassphrase   \
24592         getpwuid                \
24593         getpwnam                \
24594         getspnam                \
24595         gettimeofday    \
24596         initgroups              \
24597         lockf                   \
24598         memcpy                  \
24599         memmove                 \
24600         mkstemp                 \
24601         mktemp                  \
24602         pipe                    \
24603         read                    \
24604         recv                    \
24605         recvfrom                \
24606         setpwfile               \
24607         setgid                  \
24608         setegid                 \
24609         setsid                  \
24610         setuid                  \
24611         seteuid                 \
24612         signal                  \
24613         strdup                  \
24614         strpbrk                 \
24615         strrchr                 \
24616         strsep                  \
24617         strstr                  \
24618         strtol                  \
24619         strtoul                 \
24620         strtoq                  \
24621         strtouq                 \
24622         strtoll                 \
24623         strspn                  \
24624         sysconf                 \
24625         usleep                  \
24626         waitpid                 \
24627         wait4                   \
24628         write                   \
24629         send                    \
24630         sendmsg                 \
24631         sendto                  \
24632
24633 do
24634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24635 echo "configure:24636: checking for $ac_func" >&5
24636 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24637   echo $ac_n "(cached) $ac_c" 1>&6
24638 else
24639   cat > conftest.$ac_ext <<EOF
24640 #line 24641 "configure"
24641 #include "confdefs.h"
24642 /* System header to define __stub macros and hopefully few prototypes,
24643     which can conflict with char $ac_func(); below.  */
24644 #include <assert.h>
24645 /* Override any gcc2 internal prototype to avoid an error.  */
24646 /* We use char because int might match the return type of a gcc2
24647     builtin and then its argument prototype would still apply.  */
24648 char $ac_func();
24649 char (*f)();
24650
24651 int main() {
24652
24653 /* The GNU C library defines this for functions which it implements
24654     to always fail with ENOSYS.  Some functions are actually named
24655     something starting with __ and the normal name is an alias.  */
24656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24657 choke me
24658 #else
24659 f = $ac_func;
24660 #endif
24661
24662 ; return 0; }
24663 EOF
24664 if { (eval echo configure:24665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24665   rm -rf conftest*
24666   eval "ac_cv_func_$ac_func=yes"
24667 else
24668   echo "configure: failed program was:" >&5
24669   cat conftest.$ac_ext >&5
24670   rm -rf conftest*
24671   eval "ac_cv_func_$ac_func=no"
24672 fi
24673 rm -f conftest*
24674 fi
24675
24676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24677   echo "$ac_t""yes" 1>&6
24678     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24679   cat >> confdefs.h <<EOF
24680 #define $ac_tr_func 1
24681 EOF
24682  
24683 else
24684   echo "$ac_t""no" 1>&6
24685 fi
24686 done
24687
24688
24689 for ac_func in getopt getpeereid
24690 do
24691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24692 echo "configure:24693: checking for $ac_func" >&5
24693 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24694   echo $ac_n "(cached) $ac_c" 1>&6
24695 else
24696   cat > conftest.$ac_ext <<EOF
24697 #line 24698 "configure"
24698 #include "confdefs.h"
24699 /* System header to define __stub macros and hopefully few prototypes,
24700     which can conflict with char $ac_func(); below.  */
24701 #include <assert.h>
24702 /* Override any gcc2 internal prototype to avoid an error.  */
24703 /* We use char because int might match the return type of a gcc2
24704     builtin and then its argument prototype would still apply.  */
24705 char $ac_func();
24706 char (*f)();
24707
24708 int main() {
24709
24710 /* The GNU C library defines this for functions which it implements
24711     to always fail with ENOSYS.  Some functions are actually named
24712     something starting with __ and the normal name is an alias.  */
24713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24714 choke me
24715 #else
24716 f = $ac_func;
24717 #endif
24718
24719 ; return 0; }
24720 EOF
24721 if { (eval echo configure:24722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24722   rm -rf conftest*
24723   eval "ac_cv_func_$ac_func=yes"
24724 else
24725   echo "configure: failed program was:" >&5
24726   cat conftest.$ac_ext >&5
24727   rm -rf conftest*
24728   eval "ac_cv_func_$ac_func=no"
24729 fi
24730 rm -f conftest*
24731 fi
24732
24733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24734   echo "$ac_t""yes" 1>&6
24735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24736   cat >> confdefs.h <<EOF
24737 #define $ac_tr_func 1
24738 EOF
24739  
24740 else
24741   echo "$ac_t""no" 1>&6
24742 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24743 fi
24744 done
24745
24746
24747
24748 if test "$ac_cv_func_getopt" != yes; then
24749         LIBSRCS="$LIBSRCS getopt.c"
24750 fi
24751 if test "$ac_cv_func_getpeereid" != yes; then
24752         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24753 echo "configure:24754: checking for msg_accrights in msghdr" >&5
24754 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24755   echo $ac_n "(cached) $ac_c" 1>&6
24756 else
24757   cat > conftest.$ac_ext <<EOF
24758 #line 24759 "configure"
24759 #include "confdefs.h"
24760 #include <sys/socket.h>
24761 int main() {
24762 struct msghdr m; m.msg_accrightslen=0
24763 ; return 0; }
24764 EOF
24765 if { (eval echo configure:24766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24766   rm -rf conftest*
24767   ol_cv_msghdr_msg_accrights=yes
24768 else
24769   echo "configure: failed program was:" >&5
24770   cat conftest.$ac_ext >&5
24771   rm -rf conftest*
24772   ol_cv_msghdr_msg_accrights=no
24773 fi
24774 rm -f conftest*
24775         
24776 fi
24777
24778 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24779   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24780         cat >> confdefs.h <<\EOF
24781 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24782 EOF
24783
24784   fi
24785
24786         if test "$ac_cv_func_getpeereid" != yes; then
24787                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24788 echo "configure:24789: checking for msg_control in msghdr" >&5
24789 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24790   echo $ac_n "(cached) $ac_c" 1>&6
24791 else
24792   cat > conftest.$ac_ext <<EOF
24793 #line 24794 "configure"
24794 #include "confdefs.h"
24795 #include <sys/socket.h>
24796 int main() {
24797 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24798 ; return 0; }
24799 EOF
24800 if { (eval echo configure:24801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24801   rm -rf conftest*
24802   ol_cv_msghdr_msg_control=yes
24803 else
24804   echo "configure: failed program was:" >&5
24805   cat conftest.$ac_ext >&5
24806   rm -rf conftest*
24807   ol_cv_msghdr_msg_control=no
24808 fi
24809 rm -f conftest*
24810         
24811 fi
24812
24813 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24814   if test $ol_cv_msghdr_msg_control = "yes" ; then
24815         cat >> confdefs.h <<\EOF
24816 #define HAVE_MSGHDR_MSG_CONTROL 1
24817 EOF
24818
24819   fi
24820
24821         fi
24822         LIBSRCS="$LIBSRCS getpeereid.c"
24823 fi
24824 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24825         if test "$ac_cv_func_snprintf" != yes; then
24826                 cat >> confdefs.h <<\EOF
24827 #define snprintf ber_pvt_snprintf
24828 EOF
24829
24830         fi
24831         if test "$ac_cv_func_vsnprintf" != yes; then
24832                 cat >> confdefs.h <<\EOF
24833 #define vsnprintf ber_pvt_vsnprintf
24834 EOF
24835
24836         fi
24837 fi
24838
24839
24840 if test "$ol_enable_slapi" != no ; then
24841                         for ac_hdr in ltdl.h
24842 do
24843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24845 echo "configure:24846: checking for $ac_hdr" >&5
24846 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24847   echo $ac_n "(cached) $ac_c" 1>&6
24848 else
24849   cat > conftest.$ac_ext <<EOF
24850 #line 24851 "configure"
24851 #include "confdefs.h"
24852 #include <$ac_hdr>
24853 EOF
24854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24855 { (eval echo configure:24856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24857 if test -z "$ac_err"; then
24858   rm -rf conftest*
24859   eval "ac_cv_header_$ac_safe=yes"
24860 else
24861   echo "$ac_err" >&5
24862   echo "configure: failed program was:" >&5
24863   cat conftest.$ac_ext >&5
24864   rm -rf conftest*
24865   eval "ac_cv_header_$ac_safe=no"
24866 fi
24867 rm -f conftest*
24868 fi
24869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24870   echo "$ac_t""yes" 1>&6
24871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24872   cat >> confdefs.h <<EOF
24873 #define $ac_tr_hdr 1
24874 EOF
24875  
24876 else
24877   echo "$ac_t""no" 1>&6
24878 fi
24879 done
24880
24881
24882         if test $ac_cv_header_ltdl_h != yes ; then
24883                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24884         fi
24885         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24886 echo "configure:24887: checking for lt_dlinit in -lltdl" >&5
24887 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24889   echo $ac_n "(cached) $ac_c" 1>&6
24890 else
24891   ac_save_LIBS="$LIBS"
24892 LIBS="-lltdl  $LIBS"
24893 cat > conftest.$ac_ext <<EOF
24894 #line 24895 "configure"
24895 #include "confdefs.h"
24896 /* Override any gcc2 internal prototype to avoid an error.  */
24897 /* We use char because int might match the return type of a gcc2
24898     builtin and then its argument prototype would still apply.  */
24899 char lt_dlinit();
24900
24901 int main() {
24902 lt_dlinit()
24903 ; return 0; }
24904 EOF
24905 if { (eval echo configure:24906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24906   rm -rf conftest*
24907   eval "ac_cv_lib_$ac_lib_var=yes"
24908 else
24909   echo "configure: failed program was:" >&5
24910   cat conftest.$ac_ext >&5
24911   rm -rf conftest*
24912   eval "ac_cv_lib_$ac_lib_var=no"
24913 fi
24914 rm -f conftest*
24915 LIBS="$ac_save_LIBS"
24916
24917 fi
24918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24919   echo "$ac_t""yes" 1>&6
24920   
24921                 SLAPI_LIBS=-lltdl
24922                 LIBSLAPI=libslapi.a
24923                 LIBSLAPITOOLS=../libslapi.a
24924                 cat >> confdefs.h <<\EOF
24925 #define HAVE_LIBLTDL 1
24926 EOF
24927
24928         
24929 else
24930   echo "$ac_t""no" 1>&6
24931 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24932 fi
24933
24934
24935         cat >> confdefs.h <<\EOF
24936 #define LDAP_SLAPI 1
24937 EOF
24938
24939 fi
24940
24941 if test "$ol_enable_debug" != no ; then
24942         cat >> confdefs.h <<\EOF
24943 #define LDAP_DEBUG 1
24944 EOF
24945
24946 fi
24947 if test "$ol_enable_syslog" = yes ; then
24948         cat >> confdefs.h <<\EOF
24949 #define LDAP_SYSLOG 1
24950 EOF
24951
24952 fi
24953 if test "$ol_link_kbind" != no ; then
24954         cat >> confdefs.h <<\EOF
24955 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24956 EOF
24957
24958 fi
24959 if test "$ol_enable_proctitle" != no ; then
24960         cat >> confdefs.h <<\EOF
24961 #define LDAP_PROCTITLE 1
24962 EOF
24963
24964 fi
24965 if test "$ol_enable_referrals" != no ; then
24966         cat >> confdefs.h <<\EOF
24967 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24968 EOF
24969
24970 fi
24971 if test "$ol_enable_local" != no; then
24972         cat >> confdefs.h <<\EOF
24973 #define LDAP_PF_LOCAL 1
24974 EOF
24975
24976 fi
24977 if test "$ol_link_ipv6" != no; then
24978         cat >> confdefs.h <<\EOF
24979 #define LDAP_PF_INET6 1
24980 EOF
24981
24982 fi
24983 if test "$ol_enable_cleartext" != no ; then
24984         cat >> confdefs.h <<\EOF
24985 #define SLAPD_CLEARTEXT 1
24986 EOF
24987
24988 fi
24989 if test "$ol_enable_crypt" != no ; then
24990         cat >> confdefs.h <<\EOF
24991 #define SLAPD_CRYPT 1
24992 EOF
24993
24994 fi
24995 if test "$ol_link_spasswd" != no ; then
24996         cat >> confdefs.h <<\EOF
24997 #define SLAPD_SPASSWD 1
24998 EOF
24999
25000 fi
25001 if test "$ol_enable_multimaster" != no ; then
25002         cat >> confdefs.h <<\EOF
25003 #define SLAPD_MULTIMASTER 1
25004 EOF
25005
25006 fi
25007 if test "$ol_enable_rlookups" != no ; then
25008         cat >> confdefs.h <<\EOF
25009 #define SLAPD_RLOOKUPS 1
25010 EOF
25011
25012 fi
25013 if test "$ol_enable_aci" != no ; then
25014         cat >> confdefs.h <<\EOF
25015 #define SLAPD_ACI_ENABLED 1
25016 EOF
25017
25018 fi
25019
25020 if test "$ol_link_modules" != no ; then
25021         cat >> confdefs.h <<\EOF
25022 #define SLAPD_MODULES 1
25023 EOF
25024
25025         BUILD_SLAPD=yes
25026         SLAPD_MODULES_LDFLAGS="-dlopen self"
25027 fi
25028
25029 cat >> confdefs.h <<\EOF
25030 #define SLAPD_MOD_STATIC 1
25031 EOF
25032
25033 cat >> confdefs.h <<\EOF
25034 #define SLAPD_MOD_DYNAMIC 2
25035 EOF
25036
25037
25038 if test "$ol_enable_bdb" != no ; then
25039         BUILD_SLAPD=yes
25040         BUILD_BDB=$ol_enable_bdb
25041         if test "$ol_enable_bdb" = mod ; then
25042                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
25043                 MFLAG=SLAPD_MOD_DYNAMIC
25044         else
25045                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
25046                 MFLAG=SLAPD_MOD_STATIC
25047         fi
25048         cat >> confdefs.h <<EOF
25049 #define SLAPD_BDB $MFLAG
25050 EOF
25051
25052 fi
25053
25054 if test "$ol_enable_dnssrv" != no ; then
25055         BUILD_SLAPD=yes
25056         BUILD_DNSSRV=$ol_enable_dnssrv
25057         if test "$ol_enable_dnssrv" = mod ; then
25058                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
25059                 MFLAG=SLAPD_MOD_DYNAMIC
25060         else
25061                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
25062                 MFLAG=SLAPD_MOD_STATIC
25063         fi
25064         cat >> confdefs.h <<EOF
25065 #define SLAPD_DNSSRV $MFLAG
25066 EOF
25067
25068 fi
25069
25070 if test "$ol_enable_hdb" != no ; then
25071         BUILD_SLAPD=yes
25072         BUILD_HDB=$ol_enable_hdb
25073         if test "$ol_enable_hdb" = mod ; then
25074                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
25075                 MFLAG=SLAPD_MOD_DYNAMIC
25076         else
25077                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
25078                 MFLAG=SLAPD_MOD_STATIC
25079         fi
25080         cat >> confdefs.h <<EOF
25081 #define SLAPD_HDB $MFLAG
25082 EOF
25083
25084 fi
25085
25086 if test "$ol_enable_ldap" != no ; then
25087         BUILD_SLAPD=yes
25088         BUILD_LDAP=$ol_enable_ldap
25089         if test "$ol_enable_ldap" = mod ; then
25090                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
25091                 MFLAG=SLAPD_MOD_DYNAMIC
25092         else
25093                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
25094                 MFLAG=SLAPD_MOD_STATIC
25095         fi
25096         cat >> confdefs.h <<EOF
25097 #define SLAPD_LDAP $MFLAG
25098 EOF
25099
25100 fi
25101
25102 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25103         BUILD_SLAPD=yes
25104         BUILD_LDBM=$ol_enable_ldbm
25105         if test "$ol_enable_ldbm" = mod ; then
25106                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25107                 MFLAG=SLAPD_MOD_DYNAMIC
25108         else
25109                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25110                 MFLAG=SLAPD_MOD_STATIC
25111         fi
25112         cat >> confdefs.h <<EOF
25113 #define SLAPD_LDBM $MFLAG
25114 EOF
25115
25116 fi
25117
25118 if test "$ol_enable_meta" != no ; then
25119         BUILD_SLAPD=yes
25120         BUILD_META=$ol_enable_meta
25121         BUILD_REWRITE=yes
25122         if test "$ol_enable_meta" = mod ; then
25123                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25124                 MFLAG=SLAPD_MOD_DYNAMIC
25125         else
25126                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25127                 MFLAG=SLAPD_MOD_STATIC
25128         fi
25129         cat >> confdefs.h <<EOF
25130 #define SLAPD_META $MFLAG
25131 EOF
25132
25133 fi
25134
25135 if test "$ol_enable_monitor" != no ; then
25136         BUILD_SLAPD=yes
25137         BUILD_MONITOR=$ol_enable_monitor
25138         if test "$ol_enable_monitor" = mod ; then
25139                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25140                 MFLAG=SLAPD_MOD_DYNAMIC
25141         else
25142                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25143                 MFLAG=SLAPD_MOD_STATIC
25144         fi
25145         cat >> confdefs.h <<EOF
25146 #define SLAPD_MONITOR $MFLAG
25147 EOF
25148
25149 fi
25150
25151 if test "$ol_enable_null" != no ; then
25152         BUILD_SLAPD=yes
25153         BUILD_NULL=$ol_enable_null
25154         if test "$ol_enable_null" = mod ; then
25155                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25156                 MFLAG=SLAPD_MOD_DYNAMIC
25157         else
25158                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25159                 MFLAG=SLAPD_MOD_STATIC
25160         fi
25161         cat >> confdefs.h <<EOF
25162 #define SLAPD_NULL $MFLAG
25163 EOF
25164
25165 fi
25166
25167 if test "$ol_enable_passwd" != no ; then
25168         BUILD_SLAPD=yes
25169         BUILD_PASSWD=$ol_enable_passwd
25170         if test "$ol_enable_passwd" = mod ; then
25171                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25172                 MFLAG=SLAPD_MOD_DYNAMIC
25173         else
25174                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25175                 MFLAG=SLAPD_MOD_STATIC
25176         fi
25177         cat >> confdefs.h <<EOF
25178 #define SLAPD_PASSWD $MFLAG
25179 EOF
25180
25181 fi
25182
25183 if test "$ol_link_perl" != no ; then
25184         BUILD_SLAPD=yes
25185         BUILD_PERL=$ol_enable_perl
25186         if test "$ol_enable_perl" = mod ; then
25187                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25188                 MFLAG=SLAPD_MOD_DYNAMIC
25189         else
25190                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25191                 MFLAG=SLAPD_MOD_STATIC
25192         fi
25193         cat >> confdefs.h <<EOF
25194 #define SLAPD_PERL $MFLAG
25195 EOF
25196
25197 fi
25198
25199 if test "$ol_enable_relay" != no ; then
25200         BUILD_SLAPD=yes
25201         BUILD_RELAY=$ol_enable_relay
25202         if test "$ol_enable_relay" = mod ; then
25203                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25204                 MFLAG=SLAPD_MOD_DYNAMIC
25205         else
25206                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25207                 MFLAG=SLAPD_MOD_STATIC
25208         fi
25209         cat >> confdefs.h <<EOF
25210 #define SLAPD_RELAY $MFLAG
25211 EOF
25212
25213 fi
25214
25215 if test "$ol_enable_shell" != no ; then
25216         if test "$ol_link_thread" != no ; then
25217                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25218         fi
25219         BUILD_SLAPD=yes
25220         BUILD_SHELL=$ol_enable_shell
25221         if test "$ol_enable_shell" = mod ; then
25222                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25223                 MFLAG=SLAPD_MOD_DYNAMIC
25224         else
25225                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25226                 MFLAG=SLAPD_MOD_STATIC
25227         fi
25228         cat >> confdefs.h <<EOF
25229 #define SLAPD_SHELL $MFLAG
25230 EOF
25231
25232 fi
25233
25234 if test "$ol_link_sql" != no ; then
25235         BUILD_SLAPD=yes
25236         BUILD_SQL=$ol_enable_sql
25237         if test "$ol_enable_sql" = mod; then
25238                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25239                 MFLAG=SLAPD_MOD_DYNAMIC
25240         else
25241                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25242                 MFLAG=SLAPD_MOD_STATIC
25243         fi
25244         cat >> confdefs.h <<EOF
25245 #define SLAPD_SQL $MFLAG
25246 EOF
25247
25248 fi
25249
25250 if test "$ol_enable_denyop" != no ; then
25251         BUILD_DENYOP=$ol_enable_denyop
25252         if test "$ol_enable_denyop" = mod ; then
25253                 MFLAG=SLAPD_MOD_DYNAMIC
25254                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25255         else
25256                 MFLAG=SLAPD_MOD_STATIC
25257         fi
25258         cat >> confdefs.h <<EOF
25259 #define SLAPD_OVER_DENYOP $MFLAG
25260 EOF
25261
25262 fi
25263
25264 if test "$ol_enable_dyngroup" != no ; then
25265         BUILD_DYNGROUP=$ol_enable_dyngroup
25266         if test "$ol_enable_dyngroup" = mod ; then
25267                 MFLAG=SLAPD_MOD_DYNAMIC
25268                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25269         else
25270                 MFLAG=SLAPD_MOD_STATIC
25271         fi
25272         cat >> confdefs.h <<EOF
25273 #define SLAPD_OVER_DYNGROUP $MFLAG
25274 EOF
25275
25276 fi
25277
25278 if test "$ol_enable_glue" != no ; then
25279         BUILD_GLUE=$ol_enable_glue
25280         if test "$ol_enable_glue" = mod ; then
25281                 MFLAG=SLAPD_MOD_DYNAMIC
25282                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25283         else
25284                 MFLAG=SLAPD_MOD_STATIC
25285         fi
25286         cat >> confdefs.h <<EOF
25287 #define SLAPD_OVER_GLUE $MFLAG
25288 EOF
25289
25290 fi
25291
25292 if test "$ol_enable_lastmod" != no ; then
25293         BUILD_LASTMOD=$ol_enable_lastmod
25294         if test "$ol_enable_lastmod" = mod ; then
25295                 MFLAG=SLAPD_MOD_DYNAMIC
25296                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25297         else
25298                 MFLAG=SLAPD_MOD_STATIC
25299         fi
25300         cat >> confdefs.h <<EOF
25301 #define SLAPD_OVER_LASTMOD $MFLAG
25302 EOF
25303
25304 fi
25305
25306 if test "$ol_enable_ppolicy" != no ; then
25307         BUILD_PPOLICY=$ol_enable_ppolicy
25308         if test "$ol_enable_ppolicy" = mod ; then
25309                 MFLAG=SLAPD_MOD_DYNAMIC
25310                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25311         else
25312                 MFLAG=SLAPD_MOD_STATIC
25313         fi
25314         cat >> confdefs.h <<EOF
25315 #define SLAPD_OVER_PPOLICY $MFLAG
25316 EOF
25317
25318 fi
25319
25320 if test "$ol_enable_proxycache" != no ; then
25321         BUILD_PROXYCACHE=$ol_enable_proxycache
25322         if test "$ol_enable_proxycache" = mod ; then
25323                 MFLAG=SLAPD_MOD_DYNAMIC
25324                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25325         else
25326                 MFLAG=SLAPD_MOD_STATIC
25327         fi
25328         cat >> confdefs.h <<EOF
25329 #define SLAPD_OVER_PROXYCACHE $MFLAG
25330 EOF
25331
25332 fi
25333
25334 if test "$ol_enable_refint" != no ; then
25335         BUILD_REFINT=$ol_enable_refint
25336         if test "$ol_enable_refint" = mod ; then
25337                 MFLAG=SLAPD_MOD_DYNAMIC
25338                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25339         else
25340                 MFLAG=SLAPD_MOD_STATIC
25341         fi
25342         cat >> confdefs.h <<EOF
25343 #define SLAPD_OVER_REFINT $MFLAG
25344 EOF
25345
25346 fi
25347
25348 if test "$ol_enable_rwm" != no ; then
25349         BUILD_REWRITE=yes
25350         BUILD_RWM=$ol_enable_rwm
25351         if test "$ol_enable_rwm" = mod ; then
25352                 MFLAG=SLAPD_MOD_DYNAMIC
25353                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25354         else
25355                 MFLAG=SLAPD_MOD_STATIC
25356         fi
25357         cat >> confdefs.h <<EOF
25358 #define SLAPD_OVER_RWM $MFLAG
25359 EOF
25360
25361 fi
25362
25363 if test "$ol_enable_syncprov" != no ; then
25364         BUILD_SYNCPROV=$ol_enable_syncprov
25365         if test "$ol_enable_syncprov" = mod ; then
25366                 MFLAG=SLAPD_MOD_DYNAMIC
25367                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25368         else
25369                 MFLAG=SLAPD_MOD_STATIC
25370         fi
25371         cat >> confdefs.h <<EOF
25372 #define SLAPD_OVER_SYNCPROV $MFLAG
25373 EOF
25374
25375 fi
25376
25377 if test "$ol_enable_translucent" != no ; then
25378         BUILD_TRANSLUCENT=$ol_enable_translucent
25379         if test "$ol_enable_translucent" = mod ; then
25380                 MFLAG=SLAPD_MOD_DYNAMIC
25381                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25382         else
25383                 MFLAG=SLAPD_MOD_STATIC
25384         fi
25385         cat >> confdefs.h <<EOF
25386 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25387 EOF
25388
25389 fi
25390
25391 if test "$ol_enable_unique" != no ; then
25392         BUILD_UNIQUE=$ol_enable_unique
25393         if test "$ol_enable_unique" = mod ; then
25394                 MFLAG=SLAPD_MOD_DYNAMIC
25395                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25396         else
25397                 MFLAG=SLAPD_MOD_STATIC
25398         fi
25399         cat >> confdefs.h <<EOF
25400 #define SLAPD_OVER_UNIQUE $MFLAG
25401 EOF
25402
25403 fi
25404
25405 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25406         $BUILD_SLAPD = yes ; then
25407         BUILD_SLURPD=yes
25408 fi
25409
25410 if test "$ol_enable_rewrite" != no ; then
25411         cat >> confdefs.h <<\EOF
25412 #define ENABLE_REWRITE 1
25413 EOF
25414
25415         BUILD_REWRITE=yes
25416 fi
25417
25418 if test "$ol_enable_slapi" != no ; then
25419         cat >> confdefs.h <<\EOF
25420 #define ENABLE_SLAPI 1
25421 EOF
25422
25423         BUILD_SLAPI=yes
25424         SLAPD_SLAPI_DEPEND=libslapi.a
25425 fi
25426
25427
25428
25429 if test "$ac_cv_mingw32" = yes ; then
25430         PLAT=NT
25431         SLAPD_MODULES_LDFLAGS=
25432 else
25433         PLAT=UNIX
25434 fi
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444   
25445   
25446   
25447   
25448   
25449   
25450   
25451   
25452   
25453   
25454   
25455   
25456   
25457   
25458   
25459   
25460   
25461   
25462   
25463   
25464   
25465   
25466   
25467   
25468   
25469   
25470   
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510 # Check whether --with-xxinstall or --without-xxinstall was given.
25511 if test "${with_xxinstall+set}" = set; then
25512   withval="$with_xxinstall"
25513   :
25514 fi
25515
25516
25517
25518 trap '' 1 2 15
25519
25520 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25521
25522 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25523 # Let make expand exec_prefix.
25524 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25525
25526 # Any assignment to VPATH causes Sun make to only execute
25527 # the first set of double-colon rules, so remove it if not needed.
25528 # If there is a colon in the path, we need to keep it.
25529 if test "x$srcdir" = x.; then
25530   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25531 fi
25532
25533 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25534
25535 DEFS=-DHAVE_CONFIG_H
25536
25537 # Without the "./", some shells look in PATH for config.status.
25538 : ${CONFIG_STATUS=./config.status}
25539
25540 echo creating $CONFIG_STATUS
25541 rm -f $CONFIG_STATUS
25542 cat > $CONFIG_STATUS <<EOF
25543 #! /bin/sh
25544 # Generated automatically by configure.
25545 # Run this file to recreate the current configuration.
25546 # This directory was configured as follows,
25547 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25548 #
25549 # $0 $ac_configure_args
25550 #
25551 # Compiler output produced by configure, useful for debugging
25552 # configure, is in ./config.log if it exists.
25553
25554 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25555 for ac_option
25556 do
25557   case "\$ac_option" in
25558   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25559     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25560     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25561   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25562     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25563     exit 0 ;;
25564   -help | --help | --hel | --he | --h)
25565     echo "\$ac_cs_usage"; exit 0 ;;
25566   *) echo "\$ac_cs_usage"; exit 1 ;;
25567   esac
25568 done
25569
25570 ac_given_srcdir=$srcdir
25571 ac_given_INSTALL="$INSTALL"
25572
25573 trap 'rm -fr `echo "\
25574 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25575 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25576 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25577 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25578 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25579 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25580 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25581 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25582 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25583 include/Makefile:build/top.mk:include/Makefile.in \
25584 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25585 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25586 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25587 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25588 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25589 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25590 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25591 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25592 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25593 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25594 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25595 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25596 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25597 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25598 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25599 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25600 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25601 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25602 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25603 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25604 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25605 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25606 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25607 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25608 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25609 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25610 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25611 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25612 tests/run \
25613 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25614  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25615 EOF
25616 cat >> $CONFIG_STATUS <<EOF
25617
25618 # Protect against being on the right side of a sed subst in config.status.
25619 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25620  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25621 $ac_vpsub
25622 $extrasub
25623 s%@SHELL@%$SHELL%g
25624 s%@CFLAGS@%$CFLAGS%g
25625 s%@CPPFLAGS@%$CPPFLAGS%g
25626 s%@CXXFLAGS@%$CXXFLAGS%g
25627 s%@FFLAGS@%$FFLAGS%g
25628 s%@DEFS@%$DEFS%g
25629 s%@LDFLAGS@%$LDFLAGS%g
25630 s%@LIBS@%$LIBS%g
25631 s%@exec_prefix@%$exec_prefix%g
25632 s%@prefix@%$prefix%g
25633 s%@program_transform_name@%$program_transform_name%g
25634 s%@bindir@%$bindir%g
25635 s%@sbindir@%$sbindir%g
25636 s%@libexecdir@%$libexecdir%g
25637 s%@datadir@%$datadir%g
25638 s%@sysconfdir@%$sysconfdir%g
25639 s%@sharedstatedir@%$sharedstatedir%g
25640 s%@localstatedir@%$localstatedir%g
25641 s%@libdir@%$libdir%g
25642 s%@includedir@%$includedir%g
25643 s%@oldincludedir@%$oldincludedir%g
25644 s%@infodir@%$infodir%g
25645 s%@mandir@%$mandir%g
25646 s%@host@%$host%g
25647 s%@host_alias@%$host_alias%g
25648 s%@host_cpu@%$host_cpu%g
25649 s%@host_vendor@%$host_vendor%g
25650 s%@host_os@%$host_os%g
25651 s%@target@%$target%g
25652 s%@target_alias@%$target_alias%g
25653 s%@target_cpu@%$target_cpu%g
25654 s%@target_vendor@%$target_vendor%g
25655 s%@target_os@%$target_os%g
25656 s%@build@%$build%g
25657 s%@build_alias@%$build_alias%g
25658 s%@build_cpu@%$build_cpu%g
25659 s%@build_vendor@%$build_vendor%g
25660 s%@build_os@%$build_os%g
25661 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25662 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25663 s%@INSTALL_DATA@%$INSTALL_DATA%g
25664 s%@PACKAGE@%$PACKAGE%g
25665 s%@VERSION@%$VERSION%g
25666 s%@ACLOCAL@%$ACLOCAL%g
25667 s%@AUTOCONF@%$AUTOCONF%g
25668 s%@AUTOMAKE@%$AUTOMAKE%g
25669 s%@AUTOHEADER@%$AUTOHEADER%g
25670 s%@MAKEINFO@%$MAKEINFO%g
25671 s%@install_sh@%$install_sh%g
25672 s%@AMTAR@%$AMTAR%g
25673 s%@AWK@%$AWK%g
25674 s%@AMTARFLAGS@%$AMTARFLAGS%g
25675 s%@SET_MAKE@%$SET_MAKE%g
25676 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25677 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25678 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25679 s%@top_builddir@%$top_builddir%g
25680 s%@ldap_subdir@%$ldap_subdir%g
25681 s%@CC@%$CC%g
25682 s%@AR@%$AR%g
25683 s%@LN_S@%$LN_S%g
25684 s%@OBJEXT@%$OBJEXT%g
25685 s%@EXEEXT@%$EXEEXT%g
25686 s%@ECHO@%$ECHO%g
25687 s%@RANLIB@%$RANLIB%g
25688 s%@STRIP@%$STRIP%g
25689 s%@DLLTOOL@%$DLLTOOL%g
25690 s%@AS@%$AS%g
25691 s%@OBJDUMP@%$OBJDUMP%g
25692 s%@CPP@%$CPP%g
25693 s%@LIBTOOL@%$LIBTOOL%g
25694 s%@PERLBIN@%$PERLBIN%g
25695 s%@OL_MKDEP@%$OL_MKDEP%g
25696 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25697 s%@LTSTATIC@%$LTSTATIC%g
25698 s%@LIBOBJS@%$LIBOBJS%g
25699 s%@LIBSRCS@%$LIBSRCS%g
25700 s%@PLAT@%$PLAT%g
25701 s%@WITH_SASL@%$WITH_SASL%g
25702 s%@WITH_TLS@%$WITH_TLS%g
25703 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25704 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25705 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25706 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25707 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25708 s%@BUILD_BDB@%$BUILD_BDB%g
25709 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25710 s%@BUILD_HDB@%$BUILD_HDB%g
25711 s%@BUILD_LDAP@%$BUILD_LDAP%g
25712 s%@BUILD_LDBM@%$BUILD_LDBM%g
25713 s%@BUILD_META@%$BUILD_META%g
25714 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25715 s%@BUILD_NULL@%$BUILD_NULL%g
25716 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25717 s%@BUILD_RELAY@%$BUILD_RELAY%g
25718 s%@BUILD_PERL@%$BUILD_PERL%g
25719 s%@BUILD_SHELL@%$BUILD_SHELL%g
25720 s%@BUILD_SQL@%$BUILD_SQL%g
25721 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25722 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25723 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25724 s%@BUILD_GLUE@%$BUILD_GLUE%g
25725 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25726 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25727 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25728 s%@BUILD_REFINT@%$BUILD_REFINT%g
25729 s%@BUILD_RWM@%$BUILD_RWM%g
25730 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25731 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25732 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25733 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25734 s%@LDAP_LIBS@%$LDAP_LIBS%g
25735 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25736 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25737 s%@LDBM_LIBS@%$LDBM_LIBS%g
25738 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25739 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25740 s%@WRAP_LIBS@%$WRAP_LIBS%g
25741 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25742 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25743 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25744 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25745 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25746 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25747 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25748 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25749 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25750 s%@KRB4_LIBS@%$KRB4_LIBS%g
25751 s%@KRB5_LIBS@%$KRB5_LIBS%g
25752 s%@SASL_LIBS@%$SASL_LIBS%g
25753 s%@TLS_LIBS@%$TLS_LIBS%g
25754 s%@MODULES_LIBS@%$MODULES_LIBS%g
25755 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25756 s%@LIBSLAPI@%$LIBSLAPI%g
25757 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25758 s%@AUTH_LIBS@%$AUTH_LIBS%g
25759 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25760 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25761 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25762 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25763 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25764
25765 CEOF
25766 EOF
25767
25768 cat >> $CONFIG_STATUS <<\EOF
25769
25770 # Split the substitutions into bite-sized pieces for seds with
25771 # small command number limits, like on Digital OSF/1 and HP-UX.
25772 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25773 ac_file=1 # Number of current file.
25774 ac_beg=1 # First line for current file.
25775 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25776 ac_more_lines=:
25777 ac_sed_cmds=""
25778 while $ac_more_lines; do
25779   if test $ac_beg -gt 1; then
25780     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25781   else
25782     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25783   fi
25784   if test ! -s conftest.s$ac_file; then
25785     ac_more_lines=false
25786     rm -f conftest.s$ac_file
25787   else
25788     if test -z "$ac_sed_cmds"; then
25789       ac_sed_cmds="sed -f conftest.s$ac_file"
25790     else
25791       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25792     fi
25793     ac_file=`expr $ac_file + 1`
25794     ac_beg=$ac_end
25795     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25796   fi
25797 done
25798 if test -z "$ac_sed_cmds"; then
25799   ac_sed_cmds=cat
25800 fi
25801 EOF
25802
25803 cat >> $CONFIG_STATUS <<EOF
25804
25805 CONFIG_FILES=\${CONFIG_FILES-"\
25806 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25807 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25808 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25809 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25810 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25811 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25812 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25813 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25814 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25815 include/Makefile:build/top.mk:include/Makefile.in \
25816 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25817 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25818 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25819 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25820 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25821 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25822 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25823 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25824 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25825 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25826 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25827 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25828 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25829 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25830 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25831 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25832 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25833 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25834 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25835 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25836 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25837 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25838 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25839 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25840 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25841 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25842 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25843 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25844 tests/run \
25845 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25846 "}
25847 EOF
25848 cat >> $CONFIG_STATUS <<\EOF
25849 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25850   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25851   case "$ac_file" in
25852   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25853        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25854   *) ac_file_in="${ac_file}.in" ;;
25855   esac
25856
25857   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25858
25859   # Remove last slash and all that follows it.  Not all systems have dirname.
25860   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25861   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25862     # The file is in a subdirectory.
25863     test ! -d "$ac_dir" && mkdir "$ac_dir"
25864     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25865     # A "../" for each directory in $ac_dir_suffix.
25866     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25867   else
25868     ac_dir_suffix= ac_dots=
25869   fi
25870
25871   case "$ac_given_srcdir" in
25872   .)  srcdir=.
25873       if test -z "$ac_dots"; then top_srcdir=.
25874       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25875   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25876   *) # Relative path.
25877     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25878     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25879   esac
25880
25881   case "$ac_given_INSTALL" in
25882   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25883   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25884   esac
25885
25886   echo creating "$ac_file"
25887   rm -f "$ac_file"
25888   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25889   case "$ac_file" in
25890   *[Mm]akefile*) ac_comsub="1i\\
25891 # $configure_input" ;;
25892   *) ac_comsub= ;;
25893   esac
25894
25895   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25896   sed -e "$ac_comsub
25897 s%@configure_input@%$configure_input%g
25898 s%@srcdir@%$srcdir%g
25899 s%@top_srcdir@%$top_srcdir%g
25900 s%@INSTALL@%$INSTALL%g
25901 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25902 fi; done
25903 rm -f conftest.s*
25904
25905 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25906 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25907 #
25908 # ac_d sets the value in "#define NAME VALUE" lines.
25909 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25910 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25911 ac_dC='\3'
25912 ac_dD='%g'
25913 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25914 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25915 ac_uB='\([      ]\)%\1#\2define\3'
25916 ac_uC=' '
25917 ac_uD='\4%g'
25918 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25919 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25920 ac_eB='$%\1#\2define\3'
25921 ac_eC=' '
25922 ac_eD='%g'
25923
25924 if test "${CONFIG_HEADERS+set}" != set; then
25925 EOF
25926 cat >> $CONFIG_STATUS <<EOF
25927   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25928 EOF
25929 cat >> $CONFIG_STATUS <<\EOF
25930 fi
25931 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25932   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25933   case "$ac_file" in
25934   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25935        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25936   *) ac_file_in="${ac_file}.in" ;;
25937   esac
25938
25939   echo creating $ac_file
25940
25941   rm -f conftest.frag conftest.in conftest.out
25942   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25943   cat $ac_file_inputs > conftest.in
25944
25945 EOF
25946
25947 # Transform confdefs.h into a sed script conftest.vals that substitutes
25948 # the proper values into config.h.in to produce config.h.  And first:
25949 # Protect against being on the right side of a sed subst in config.status.
25950 # Protect against being in an unquoted here document in config.status.
25951 rm -f conftest.vals
25952 cat > conftest.hdr <<\EOF
25953 s/[\\&%]/\\&/g
25954 s%[\\$`]%\\&%g
25955 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25956 s%ac_d%ac_u%gp
25957 s%ac_u%ac_e%gp
25958 EOF
25959 sed -n -f conftest.hdr confdefs.h > conftest.vals
25960 rm -f conftest.hdr
25961
25962 # This sed command replaces #undef with comments.  This is necessary, for
25963 # example, in the case of _POSIX_SOURCE, which is predefined and required
25964 # on some systems where configure will not decide to define it.
25965 cat >> conftest.vals <<\EOF
25966 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25967 EOF
25968
25969 # Break up conftest.vals because some shells have a limit on
25970 # the size of here documents, and old seds have small limits too.
25971
25972 rm -f conftest.tail
25973 while :
25974 do
25975   ac_lines=`grep -c . conftest.vals`
25976   # grep -c gives empty output for an empty file on some AIX systems.
25977   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25978   # Write a limited-size here document to conftest.frag.
25979   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25980   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25981   echo 'CEOF
25982   sed -f conftest.frag conftest.in > conftest.out
25983   rm -f conftest.in
25984   mv conftest.out conftest.in
25985 ' >> $CONFIG_STATUS
25986   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25987   rm -f conftest.vals
25988   mv conftest.tail conftest.vals
25989 done
25990 rm -f conftest.vals
25991
25992 cat >> $CONFIG_STATUS <<\EOF
25993   rm -f conftest.frag conftest.h
25994   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25995   cat conftest.in >> conftest.h
25996   rm -f conftest.in
25997   if cmp -s $ac_file conftest.h 2>/dev/null; then
25998     echo "$ac_file is unchanged"
25999     rm -f conftest.h
26000   else
26001     # Remove last slash and all that follows it.  Not all systems have dirname.
26002       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
26003       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26004       # The file is in a subdirectory.
26005       test ! -d "$ac_dir" && mkdir "$ac_dir"
26006     fi
26007     rm -f $ac_file
26008     mv conftest.h $ac_file
26009   fi
26010 fi; done
26011
26012 EOF
26013 cat >> $CONFIG_STATUS <<EOF
26014 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
26015 EOF
26016 cat >> $CONFIG_STATUS <<\EOF
26017
26018 chmod +x tests/run
26019 date > stamp-h
26020 BACKENDSC="servers/slapd/backends.c"
26021 echo "Making $BACKENDSC"
26022 rm -f $BACKENDSC
26023 cat > $BACKENDSC << ENDX
26024 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26025  *
26026  * Copyright 1998-2005 The OpenLDAP Foundation.
26027  * All rights reserved.
26028  *
26029  * Redistribution and use in source and binary forms, with or without
26030  * modification, are permitted only as authorized by the OpenLDAP
26031  * Public License.
26032  *
26033  * A copy of this license is available in the file LICENSE in the
26034  * top-level directory of the distribution or, alternatively, at
26035  * <http://www.OpenLDAP.org/license.html>.
26036  */
26037 /* This file is automatically generated by configure; please do not edit. */
26038
26039 #include "portable.h"
26040 #include "slap.h"
26041
26042 ENDX
26043 if test "${STATIC_BACKENDS}"; then
26044         for b in config ${STATIC_BACKENDS}; do
26045                 bb=`echo "${b}" | sed -e 's/back-//'`
26046                 cat >> $BACKENDSC << ENDX
26047 extern BI_init ${bb}_back_initialize;
26048 ENDX
26049         done
26050
26051         cat >> $BACKENDSC << ENDX
26052
26053 BackendInfo slap_binfo[] = {
26054 ENDX
26055
26056         for b in config ${STATIC_BACKENDS}; do
26057                 bb=`echo "${b}" | sed -e 's/back-//'`
26058                 echo "    Add ${bb} ..."
26059                 cat >> $BACKENDSC << ENDX
26060         { "${bb}", ${bb}_back_initialize },
26061 ENDX
26062         done
26063
26064         cat >> $BACKENDSC << ENDX
26065         { NULL, NULL },
26066 };
26067
26068 /* end of generated file */
26069 ENDX
26070 fi
26071
26072 echo Please run \"make depend\" to build dependencies
26073
26074 exit 0
26075 EOF
26076 chmod +x $CONFIG_STATUS
26077 rm -fr confdefs* $ac_clean_files
26078 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26079